diff --git a/install.sh b/Common/install.sh similarity index 100% rename from install.sh rename to Common/install.sh diff --git a/Common/kernel b/Common/kernel new file mode 100644 index 0000000..aeb30ed --- /dev/null +++ b/Common/kernel @@ -0,0 +1,3 @@ +#!/bin/sh + +export KERNEL=`uname -s | sed "s/\-.*//g" | awk '{print(tolower($0))}'` diff --git a/Common/kernel~ b/Common/kernel~ new file mode 100644 index 0000000..8e0cb16 --- /dev/null +++ b/Common/kernel~ @@ -0,0 +1,3 @@ +#!/bin/sh +export KERNEL=`uname -s | sed "s/\-.*//g" | awk '{print(tolower($0))}'` +echo "Begin setup for ${KERNEL}" \ No newline at end of file diff --git a/compile-libobjc2 b/Common/libobjc2 similarity index 57% rename from compile-libobjc2 rename to Common/libobjc2 index 466a57a..0b943df 100755 --- a/compile-libobjc2 +++ b/Common/libobjc2 @@ -1,17 +1,8 @@ #!/bin/sh - -# determine make command -which gmake -if [ $? -eq 0 ]; then - export MAKE=gmake -else - export MAKE=make -fi - -# build libobjc2 echo "Build ObjC2 library..." cd libobjc2 +git pull rm -rf build # remove the dir if it exists... mkdir build cd build diff --git a/Common/logo b/Common/logo new file mode 100644 index 0000000..765e434 --- /dev/null +++ b/Common/logo @@ -0,0 +1,31 @@ +#!/bin/sh + +echo "Install GNUstep" +echo " " +cat < /dev/null # stop it from complaining... +./configure --with-layout=gnustep --prefix="${PREFIX}" ${EXTRA_GSMAKE_FLAGS} CC="${GSMAKE_CC}" CXX="${GSMAKE_CXX}" CPP="${GSMAKE_CPP}" LD="${GSMAKE_LD}" AS="${GSMAKE_AS}" LDFLAGS="${GSMAKE_LDFLAGS}" CPPFLAGS="${GSMAKE_CPPFLAGS}" +echo "======== Build make" +${MAKE} -j${CPUS} +${SUDO} -u root ${MAKE} install +. ${GNUSTEP_ROOT}/System/Library/Makefiles/GNUstep.sh + +# Build base +echo "======== Build base" +cd ../libs-base +${SUDO} ${MAKE} clean +./configure --with-installation-domain=SYSTEM +${MAKE} debug=yes -j${CPUS} +${SUDO} -u root ./install.sh ${GNUSTEP_ROOT} ${MAKE} +echo "===" + +# Build gui +echo "======== Build gui" +cd ../libs-gui +${SUDO} ${MAKE} clean +./configure --with-x --enable-speech +${MAKE} debug=yes -j${CPUS} +${SUDO} -u root ./install.sh ${GNUSTEP_ROOT} ${MAKE} +echo "===" + +# Build backend +echo "======== Build back" +cd ../libs-back +${SUDO} ${MAKE} clean +./configure --enable-graphics=cairo +${MAKE} debug=yes -j${CPUS} +${SUDO} -u root ./install.sh ${GNUSTEP_ROOT} ${MAKE} +echo "===" + +# Build applications... +# echo "======== Build ProjectCenter" +# cd ../apps-projectcenter +# ${SUDO} ${MAKE} clean +# ${MAKE} debug=yes -j${CPUS} +# ${SUDO} ${MAKE} install + +# echo "======== Build Gorm" +# cd ../apps-gorm +# ${SUDO} ${MAKE} clean +# ${MAKE} debug=yes -j${CPUS} +# ${SUDO} ${MAKE} install + +echo "Done." + +exit 0 diff --git a/Platforms/openbsd/config b/Platforms/openbsd/config new file mode 100755 index 0000000..fe8bef4 --- /dev/null +++ b/Platforms/openbsd/config @@ -0,0 +1,29 @@ +#!/bin/sh + +echo "BUIDLING WITH CLANG and ARC" + +export GSMAKE_CC=clang +export GSMAKE_CXX=clang++ +export GSMAKE_CPP="clang -E" +export GSMAKE_LD=ld +export GSMAKE_AS=llvm-as +export EXTRA_GSMAKE_FLAGS="--with-objc-lib-flag=-lobjc2 --enable-strict-v2-mode --with-runtime-abi=gnustep-2.2 --with-library-combo=ng-gnu-gnu GS_WITH_ARC=1" +export GSMAKE_CPPFLAGS="-I/usr/local/include -I/usr/local/include/gnustep" +export GSMAKE_LDFLAGS="-L/usr/local/lib -lc++abi -lobjc2 -pthread" +export MAKE=gmake +export SUDO=sudo + +export CPUS=`sysctl hw.ncpu | sed 's/hw.ncpu\=//g'` +export ROOT=/ +export USR_ROOT=${ROOT}usr +export GNUSTEP_ROOT=${USR_ROOT}/GNUstep +export GNUSTEP_CONFIG_FILE=/etc/GNUstep/GNUstep.conf +export GNUSTEP_INSTALL_LD_SO_CONF=no +export PREFIX=${GNUSTEP_ROOT} + +echo "" +echo "Installation directory is $GNUSTEP_ROOT" +echo "Building GNUstep for OpenBSD" +echo "" + +SUDO='sudo LD_LIBRARY_PATH=$LD_LIBRARY_PATH' diff --git a/install-dependencies-openbsd b/Platforms/openbsd/dependencies similarity index 100% rename from install-dependencies-openbsd rename to Platforms/openbsd/dependencies diff --git a/setup-openbsd b/Platforms/openbsd/setup similarity index 100% rename from setup-openbsd rename to Platforms/openbsd/setup diff --git a/fontconfig.pc b/Resources/fontconfig.pc similarity index 100% rename from fontconfig.pc rename to Resources/fontconfig.pc diff --git a/changeloggen b/Utils/changeloggen similarity index 100% rename from changeloggen rename to Utils/changeloggen diff --git a/Utils/makelib.sh b/Utils/makelib.sh new file mode 100755 index 0000000..89dec2c --- /dev/null +++ b/Utils/makelib.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +# +# This script generates the missing lib file using dlltool +# under msys. This is needed to properly link some libraries +# into apps. +# + +date > ./makelib.log +FILES=`ls -C1 *.dll` +for i in $FILES +do + echo "Generating def file for ${i}..." + gendef 2>> ./makelib.log $i + defname=`echo $i | sed 's/dll/def/'` + libname=`echo $i | sed 's/dll/lib/'` + echo "Generating lib file ${libname}..." + dlltool 2>> ./makelib.log -d ${defname} -l ${libname} + echo "Done" +done + +echo "Finished..." + +exit 0 diff --git a/makelib.sh b/Utils/makelib.sh~ similarity index 100% rename from makelib.sh rename to Utils/makelib.sh~ diff --git a/pkgconfig.sh b/Utils/pkgconfig.sh similarity index 100% rename from pkgconfig.sh rename to Utils/pkgconfig.sh diff --git a/build-openbsd b/build-openbsd deleted file mode 100755 index 9697b4f..0000000 --- a/build-openbsd +++ /dev/null @@ -1,86 +0,0 @@ -#!/bin/sh - -echo "BUIDLING WITH CLANG and ARC" - -export GSMAKE_CC=clang -export GSMAKE_CXX=clang++ -export GSMAKE_CPP="clang -E" -export GSMAKE_LD=ld -export GSMAKE_AS=llvm-as -export EXTRA_GSMAKE_FLAGS="--with-objc-lib-flag=-lobjc2 --enable-strict-v2-mode --with-runtime-abi=gnustep-2.2 --with-library-combo=ng-gnu-gnu GS_WITH_ARC=1" -export GSMAKE_CPPFLAGS="-I/usr/local/include -I/usr/local/include/gnustep" -export GSMAKE_LDFLAGS="-L/usr/local/lib -lc++abi -lobjc2 -pthread" -export MAKE=gmake -export SUDO=sudo - -export CPUS=`sysctl hw.ncpu | sed 's/hw.ncpu\=//g'` -export ROOT=/ -export USR_ROOT=${ROOT}usr -export GNUSTEP_ROOT=${USR_ROOT}/GNUstep -export GNUSTEP_CONFIG_FILE=/etc/GNUstep/GNUstep.conf -export GNUSTEP_INSTALL_LD_SO_CONF=no -export PREFIX=${GNUSTEP_ROOT} - -echo "" -echo "Installation directory is $GNUSTEP_ROOT" -echo "Building GNUstep for OpenBSD" -echo "" - -SUDO='sudo LD_LIBRARY_PATH=$LD_LIBRARY_PATH' -scriptsdir="`pwd`/tools-scripts" - -# Build libobjc2 -./tools-scripts/compile-libobjc2 - -# Build make -cd tools-make -${MAKE} clean 2> /dev/null # stop it from complaining... -./configure --with-layout=gnustep --prefix="${PREFIX}" ${EXTRA_GSMAKE_FLAGS} CC="${GSMAKE_CC}" CXX="${GSMAKE_CXX}" CPP="${GSMAKE_CPP}" LD="${GSMAKE_LD}" AS="${GSMAKE_AS}" LDFLAGS="${GSMAKE_LDFLAGS}" CPPFLAGS="${GSMAKE_CPPFLAGS}" -echo "======== Build make" -${MAKE} -j${CPUS} -${SUDO} -u root ${MAKE} install -. ${GNUSTEP_ROOT}/System/Library/Makefiles/GNUstep.sh - -# Build base -echo "======== Build base" -cd ../libs-base -${SUDO} ${MAKE} clean -./configure --with-installation-domain=SYSTEM -${MAKE} debug=yes -j${CPUS} -${SUDO} -u root ./install.sh ${GNUSTEP_ROOT} ${MAKE} -echo "===" - -# Build gui -echo "======== Build gui" -cd ../libs-gui -${SUDO} ${MAKE} clean -./configure --with-x --enable-speech -${MAKE} debug=yes -j${CPUS} -${SUDO} -u root ./install.sh ${GNUSTEP_ROOT} ${MAKE} -echo "===" - -# Build backend -echo "======== Build back" -cd ../libs-back -${SUDO} ${MAKE} clean -./configure --enable-graphics=cairo -${MAKE} debug=yes -j${CPUS} -${SUDO} -u root ./install.sh ${GNUSTEP_ROOT} ${MAKE} -echo "===" - -# Build applications... -echo "======== Build ProjectCenter" -cd ../apps-projectcenter -${SUDO} ${MAKE} clean -${MAKE} debug=yes -j${CPUS} -${SUDO} ${MAKE} install - -echo "======== Build Gorm" -cd ../apps-gorm -${SUDO} ${MAKE} clean -${MAKE} debug=yes -j${CPUS} -${SUDO} ${MAKE} install - -echo "Done." - -exit 0 diff --git a/install-dependencies-linux b/install-dependencies-linux index d9741bc..854761e 100755 --- a/install-dependencies-linux +++ b/install-dependencies-linux @@ -1,122 +1,9 @@ #!/bin/bash -install_debian() -{ - echo "NOTE: Make sure you have done apt-get update and apt-get upgrade prior to running this script." - echo "Installing Debian/Ubuntu dependencies" - echo "-------" +# Add distro specific variables... +. /etc/os-release - sudo apt update - sudo apt upgrade - - sudo apt --yes install gobjc - sudo apt --yes install gobjc++ - sudo apt --yes install clang - sudo apt --yes install libjpeg-dev - sudo apt --yes install libtiff-dev - sudo apt --yes install libpng-dev - sudo apt --yes install libicns-dev - sudo apt --yes install libmagickcore-dev - sudo apt --yes install libxml2-dev - sudo apt --yes install libxslt-dev - sudo apt --yes install libgnutls-dev - sudo apt --yes install libffi-dev - sudo apt --yes install libicu-dev - sudo apt --yes install libcairo2-dev - sudo apt --yes install libxft-dev - sudo apt --yes install libavahi-client-dev - sudo apt --yes install flite-dev - sudo apt --yes install libxt-dev - sudo apt --yes install libportaudio-dev - sudo apt --yes install wmaker - sudo apt --yes install portaudio19-dev - sudo apt --yes install make - sudo apt --yes install cmake - sudo apt --yes install gnutls-dev - sudo apt --yes install libblocksruntime-dev - sudo apt --yes install pocketsphinx - sudo apt --yes install pocketsphinx-en-us - sudo apt --yes install libpocketsphinx-dev - sudo apt --yes install libsphinxbase-dev - sudo apt --yes install sphinxbase-utils - sudo apt --yes install sphinxtrain - sudo apt --yes install libssl-dev - sudo apt --yes install freeglut3-dev - sudo apt --yes install libwayland-dev - sudo apt --yes install libxkbcommon-dev - sudo apt --yes install wayland-protocols - sudo apt --yes install libcurl4-gnutls-dev - - echo "-------" - echo "Done..." -} - -install_redhat() -{ - echo "NOTE: Make sure you have done apt-get update and apt-get upgrade prior to running this script." - echo "Installing RedHat/CentOS/etc dependencies" - echo "-------" - - sudo yum update - - sudo yum -y install gcc - sudo yum -y install gcc-objc - sudo yum -y install clang - sudo yum -y install libjpeg-turbo-devel - sudo yum -y install libtiff-devel - sudo yum -y install libpng-devel - sudo yum -y install libicns-devel - sudo yum -y install ImageMagick-devel - sudo yum -y install libxml2-devel - sudo yum -y install libxslt-devel - sudo yum -y install gnutls-devel - sudo yum -y install libffi-devel - sudo yum -y install libicu-devel - sudo yum -y install cairo-devel - sudo yum -y install libXft-devel - sudo yum -y install avahi-devel - sudo yum -y install flite-devel - sudo yum -y install libXt-devel -# sudo yum -y install libportaudio-devel -# sudo yum -y install wmaker -# sudo yum -y install portaudio19-dev - sudo yum -y install make - sudo yum -y install cmake -# sudo yum -y install libblocksruntime-dev -# sudo yum -y install pocketsphinx -# sudo yum -y install pocketsphinx-en-us -# sudo yum -y install libpocketsphinx-dev -# sudo yum -y install libsphinxbase-dev -# sudo yum -y install sphinxbase-utils -# sudo yum -y install sphinxtrain - sudo yum -y install openssl-devel - sudo yum -y install gnutls-devel - sudo yum -y install libcurl4-gnutls-devel - - echo "-------" - echo "Done..." -} - -get_system() -{ - if [ -e /etc/os-release ]; then - . /etc/os-release - fi -} - -get_system echo "You are using ${ID}" -which apt > /dev/null -if [ "$?" == "0" ]; then - install_debian -else - which yum - if [ "$?" == "0" ]; then - install_redhat - else - echo "Please report this to bugs-gnustep@gnu.org." - echo "Your linux os ${ID} is currently unsupported." - fi -fi - +# Run the script for the correct distro... +sh ./tools-scripts/install-dependencies-linux-${ID} diff --git a/install-dependencies-linux-debian b/install-dependencies-linux-debian new file mode 100755 index 0000000..16c7477 --- /dev/null +++ b/install-dependencies-linux-debian @@ -0,0 +1,49 @@ +#!/bin/bash + +echo "NOTE: Make sure you have done apt update and apt upgrade prior to running this script." +echo "Installing Debian/Ubuntu dependencies" +echo "-------" + +sudo apt update +sudo apt upgrade + +sudo apt --yes install gobjc +sudo apt --yes install gobjc++ +sudo apt --yes install clang +sudo apt --yes install libjpeg-dev +sudo apt --yes install libtiff-dev +sudo apt --yes install libpng-dev +sudo apt --yes install libicns-dev +sudo apt --yes install libmagickcore-dev +sudo apt --yes install libxml2-dev +sudo apt --yes install libxslt-dev +sudo apt --yes install libgnutls-dev +sudo apt --yes install libffi-dev +sudo apt --yes install libicu-dev +sudo apt --yes install libcairo2-dev +sudo apt --yes install libxft-dev +sudo apt --yes install libavahi-client-dev +sudo apt --yes install flite-dev +sudo apt --yes install libxt-dev +sudo apt --yes install libportaudio-dev +sudo apt --yes install wmaker +sudo apt --yes install portaudio19-dev +sudo apt --yes install make +sudo apt --yes install cmake +sudo apt --yes install gnutls-dev +sudo apt --yes install libblocksruntime-dev +sudo apt --yes install pocketsphinx +sudo apt --yes install pocketsphinx-en-us +sudo apt --yes install libpocketsphinx-dev +sudo apt --yes install libsphinxbase-dev +sudo apt --yes install sphinxbase-utils +sudo apt --yes install sphinxtrain +sudo apt --yes install libssl-dev +sudo apt --yes install freeglut3-dev +sudo apt --yes install libwayland-dev +sudo apt --yes install libxkbcommon-dev +sudo apt --yes install wayland-protocols +sudo apt --yes install libcurl4-gnutls-dev + +echo "-------" +echo "Done..." diff --git a/install-dependencies-linux-fedora b/install-dependencies-linux-fedora new file mode 100755 index 0000000..fb7a406 --- /dev/null +++ b/install-dependencies-linux-fedora @@ -0,0 +1,45 @@ +#!/bin/bash + +echo "NOTE: Make sure you have done apt-get update and apt-get upgrade prior to running this script." +echo "Installing RedHat/CentOS/Fedora/etc dependencies" +echo "-------" + +sudo yum update + +sudo yum -y install git +sudo yum -y install gcc +sudo yum -y install gcc-objc +sudo yum -y install clang +sudo yum -y install libjpeg-turbo-devel +sudo yum -y install libtiff-devel +sudo yum -y install libpng-devel +sudo yum -y install libicns-devel +sudo yum -y install ImageMagick-devel +sudo yum -y install libxml2-devel +sudo yum -y install libxslt-devel +sudo yum -y install gnutls-devel +sudo yum -y install libffi-devel +sudo yum -y install libicu-devel +sudo yum -y install cairo-devel +sudo yum -y install libXft-devel +sudo yum -y install avahi-devel +sudo yum -y install flite-devel +sudo yum -y install libXt-devel +# sudo yum -y install libportaudio-devel +# sudo yum -y install wmaker +# sudo yum -y install portaudio19-dev +sudo yum -y install make +sudo yum -y install cmake +# sudo yum -y install libblocksruntime-dev +# sudo yum -y install pocketsphinx +# sudo yum -y install pocketsphinx-en-us +# sudo yum -y install libpocketsphinx-dev +# sudo yum -y install libsphinxbase-dev +# sudo yum -y install sphinxbase-utils +# sudo yum -y install sphinxtrain +sudo yum -y install openssl-devel +sudo yum -y install gnutls-devel +sudo yum -y install libcurl4-gnutls-devel + +echo "-------" +echo "Done..." diff --git a/install-dependencies-linux-redhat b/install-dependencies-linux-redhat new file mode 100755 index 0000000..22367d8 --- /dev/null +++ b/install-dependencies-linux-redhat @@ -0,0 +1,3 @@ +#!/bin/bash + +./tools-scripts/install-dependencies-linux-fedora diff --git a/install-dependencies-linux-ubuntu b/install-dependencies-linux-ubuntu new file mode 100755 index 0000000..d8e176d --- /dev/null +++ b/install-dependencies-linux-ubuntu @@ -0,0 +1,3 @@ +#!/bin/bash + +./tools-scripts/install-dependencies-linux-debian diff --git a/setup-linux b/setup-linux index b44dd56..4991bd5 100755 --- a/setup-linux +++ b/setup-linux @@ -1,52 +1,10 @@ #!/bin/sh -export USER=`whoami` -COMMAND="apt" - # Add distro specific variables... -. /etc/lsb-release - -# Install SUDO if needed... -if [ ! -e /usr/bin/sudo ]; then - echo "Installing sudo..." - if [ -e /usr/bin/apt ]; then - su -c "apt install sudo" - - else - su -c "rpm install sudo" - COMMAND="rpm" - fi -else - echo "sudo command is already present." -fi - -# Update root password... -echo "Checking if root password is not set, please set it..." -if [ "${DISTRIB_ID}" = "Ubuntu" ]; then - STATUS=`sudo passwd root --status | cut -f2 -d' '` - if [ "${STATUS}" = "L" ]; then - sudo passwd root - fi -fi - -# Add to sudoers -if [ "${DISTRIB_ID}" != "Ubuntu" ]; then - if [ ! -e /etc/sudoers.d/${USER} ]; then - echo "Adding ${USER} to sudoers..." - echo "Please enter the root user's password." - su -c 'echo "${USER} ALL=(ALL:ALL) ALL" > /etc/sudoers.d/${USER}' - else - echo "${USER} is already a member of sudo users." - fi -fi +. /etc/os-release -# Install git and curl if needed... -if [ ! -e /usr/bin/curl ]; then - echo "Installing git" - sudo ${COMMAND} install curl -fi +# Run the script for the correct distro... +sh ./tools-scripts/setup-linux-${ID} -if [ ! -e /usr/bin/git ]; then - echo "Installing git" - sudo ${COMMAND} install git -fi \ No newline at end of file +# Exit with the last result code... +exit $? diff --git a/setup-linux-debian b/setup-linux-debian new file mode 100755 index 0000000..d3c727e --- /dev/null +++ b/setup-linux-debian @@ -0,0 +1,27 @@ +#!/bin/sh + +# Is the root password set... +STATUS=`sudo passwd root --status | cut -f2 -d' '` +if [ "${STATUS}" = "L" ]; then + sudo passwd root +fi + +# Add to sudoers +if [ ! -e /etc/sudoers.d/${USER} ]; then + echo "Adding ${USER} to sudoers..." + echo "Please enter the root user's password." + su -c 'echo "${USER} ALL=(ALL:ALL) ALL" > /etc/sudoers.d/${USER}' +else + echo "${USER} is already a member of sudo users." +fi + +# Install git and curl if needed... +if [ ! -e /usr/bin/curl ]; then + echo "Installing curl" + sudo apt --yes install curl +fi + +if [ ! -e /usr/bin/git ]; then + echo "Installing git" + sudo apt --yes install git +fi diff --git a/setup-linux-ubuntu b/setup-linux-ubuntu new file mode 100755 index 0000000..3442fb2 --- /dev/null +++ b/setup-linux-ubuntu @@ -0,0 +1,38 @@ +#!/bin/sh + +# Install SUDO if needed... +if [ ! -e /usr/bin/sudo ]; then + echo "Installing sudo..." + if [ -e /usr/bin/apt ]; then + su -c "apt --yes install sudo" + fi +else + echo "sudo command is already present." +fi + +# Update root password... +echo "Checking if root password is not set, please set it..." +STATUS=`sudo passwd root --status | cut -f2 -d' '` +if [ "${STATUS}" = "L" ]; then + sudo passwd root +fi + +# Add to sudoers +if [ ! -e /etc/sudoers.d/${USER} ]; then + echo "Adding ${USER} to sudoers..." + echo "Please enter the root user's password." + su -c 'echo "${USER} ALL=(ALL:ALL) ALL" > /etc/sudoers.d/${USER}' +else + echo "${USER} is already a member of sudo users." +fi + +# Install git and curl if needed... +if [ ! -e /usr/bin/curl ]; then + echo "Installing curl" + sudo apt --yes install curl +fi + +if [ ! -e /usr/bin/git ]; then + echo "Installing git" + sudo apt --yes install git +fi diff --git a/setup-mingw64_nt b/setup-mingw64_nt deleted file mode 100755 index b181b2b..0000000 --- a/setup-mingw64_nt +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh -echo "Setting up for GNUstep install" -pacman -S git - -echo "Add .bashrc code to initialize GNUstep" -cat >> ~/.bashrc << EOF - -echo "Setting up GNUstep environment on $(uname -s)" -. /usr/GNUstep/System/Library/Makefiles/GNUstep.sh - -EOF diff --git a/setup-msys_nt b/setup-msys_nt deleted file mode 100755 index b181b2b..0000000 --- a/setup-msys_nt +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh -echo "Setting up for GNUstep install" -pacman -S git - -echo "Add .bashrc code to initialize GNUstep" -cat >> ~/.bashrc << EOF - -echo "Setting up GNUstep environment on $(uname -s)" -. /usr/GNUstep/System/Library/Makefiles/GNUstep.sh - -EOF