From a1ec050728985c756195bdc4894c8f7ba3fa115b Mon Sep 17 00:00:00 2001 From: Gregory John Casamento Date: Sun, 23 Feb 2025 23:18:26 -0500 Subject: [PATCH 1/6] Add new scripts --- install-dependencies-linux | 5 ++-- setup-linux | 51 +++----------------------------------- setup-linux-debian | 27 ++++++++++++++++++++ setup-linux-ubuntu | 38 ++++++++++++++++++++++++++++ 4 files changed, 72 insertions(+), 49 deletions(-) create mode 100755 setup-linux-debian create mode 100755 setup-linux-ubuntu diff --git a/install-dependencies-linux b/install-dependencies-linux index d9741bc..57731c7 100755 --- a/install-dependencies-linux +++ b/install-dependencies-linux @@ -54,11 +54,12 @@ install_debian() 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 "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 diff --git a/setup-linux b/setup-linux index b44dd56..9d75448 100755 --- a/setup-linux +++ b/setup-linux @@ -1,52 +1,9 @@ #!/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 -x ./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 0 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 From 2b1843cd407334e6c62b3b662dcd1289ec7bccee Mon Sep 17 00:00:00 2001 From: Gregory John Casamento Date: Sun, 23 Feb 2025 23:42:51 -0500 Subject: [PATCH 2/6] Update script, remove -x option --- setup-linux | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup-linux b/setup-linux index 9d75448..32143cf 100755 --- a/setup-linux +++ b/setup-linux @@ -4,6 +4,6 @@ . /etc/os-release # Run the script for the correct distro... -sh -x ./tools-scripts/setup-linux-${ID} +sh ./tools-scripts/setup-linux-${ID} exit 0 From 2f35036e3517de535232b0852af20ec44f44cea3 Mon Sep 17 00:00:00 2001 From: Gregory John Casamento Date: Mon, 24 Feb 2025 09:28:47 -0500 Subject: [PATCH 3/6] Add code to return the last status code when done --- setup-linux | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup-linux b/setup-linux index 32143cf..4991bd5 100755 --- a/setup-linux +++ b/setup-linux @@ -6,4 +6,5 @@ # Run the script for the correct distro... sh ./tools-scripts/setup-linux-${ID} -exit 0 +# Exit with the last result code... +exit $? From 7ca7603e16b7b1e99394ac1ebb7c4daecc7efd60 Mon Sep 17 00:00:00 2001 From: Gregory John Casamento Date: Tue, 25 Feb 2025 07:57:41 -0500 Subject: [PATCH 4/6] Add dependencies scripts --- install-dependencies-linux | 122 +----------------------------- install-dependencies-linux-debian | 49 ++++++++++++ install-dependencies-linux-fedora | 45 +++++++++++ install-dependencies-linux-redhat | 3 + install-dependencies-linux-ubuntu | 3 + 5 files changed, 104 insertions(+), 118 deletions(-) create mode 100755 install-dependencies-linux-debian create mode 100755 install-dependencies-linux-fedora create mode 100755 install-dependencies-linux-redhat create mode 100755 install-dependencies-linux-ubuntu diff --git a/install-dependencies-linux b/install-dependencies-linux index 57731c7..854761e 100755 --- a/install-dependencies-linux +++ b/install-dependencies-linux @@ -1,123 +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/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..." -} - -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 From 06af658323f072361cddce982b75734440829385 Mon Sep 17 00:00:00 2001 From: Gregory John Casamento Date: Thu, 22 May 2025 22:07:19 -0400 Subject: [PATCH 5/6] updates to scripts --- build-openbsd | 20 ++++++++++---------- compile-libobjc2 | 1 + 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/build-openbsd b/build-openbsd index 9697b4f..548068b 100755 --- a/build-openbsd +++ b/build-openbsd @@ -69,17 +69,17 @@ ${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 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 "======== Build Gorm" +# cd ../apps-gorm +# ${SUDO} ${MAKE} clean +# ${MAKE} debug=yes -j${CPUS} +# ${SUDO} ${MAKE} install echo "Done." diff --git a/compile-libobjc2 b/compile-libobjc2 index 466a57a..b318eb2 100755 --- a/compile-libobjc2 +++ b/compile-libobjc2 @@ -12,6 +12,7 @@ fi echo "Build ObjC2 library..." cd libobjc2 +git pull rm -rf build # remove the dir if it exists... mkdir build cd build From 000165a43f57b72b095e69e00ed342da73ffbc3e Mon Sep 17 00:00:00 2001 From: Gregory John Casamento Date: Sat, 24 May 2025 07:46:04 -0400 Subject: [PATCH 6/6] Move scripts to standard places under new structure --- install.sh => Common/install.sh | 0 Common/kernel | 3 ++ Common/kernel~ | 3 ++ compile-libobjc2 => Common/libobjc2 | 10 ------ Common/logo | 31 +++++++++++++++++++ system_type => Generic/system_type | 0 Platforms/darwin/build | 0 Platforms/darwin/dependencies | 0 Platforms/darwin/setup | 0 Platforms/freebsd/build | 0 Platforms/freebsd/dependencies | 0 Platforms/freebsd/setup | 0 Platforms/linux/build | 0 Platforms/linux/dependencies | 0 Platforms/linux/setup | 0 Platforms/mingw64_nt/build | 0 Platforms/mingw64_nt/dependencies | 0 .../mingw64_nt/setup | 0 Platforms/mingw64_nt/windows/build | 0 .../mingw64_nt/windows/dependencies | 0 Platforms/mingw64_nt/windows/setup | 0 Platforms/netbsd/build | 0 Platforms/netbsd/dependencies | 0 Platforms/netbsd/setup | 0 build-openbsd => Platforms/openbsd/build | 31 +------------------ Platforms/openbsd/config | 29 +++++++++++++++++ .../openbsd/dependencies | 0 setup-openbsd => Platforms/openbsd/setup | 0 fontconfig.pc => Resources/fontconfig.pc | 0 changeloggen => Utils/changeloggen | 0 Utils/makelib.sh | 24 ++++++++++++++ makelib.sh => Utils/makelib.sh~ | 0 pkgconfig.sh => Utils/pkgconfig.sh | 0 setup-mingw64_nt | 11 ------- setup-msys_nt | 11 ------- 35 files changed, 91 insertions(+), 62 deletions(-) rename install.sh => Common/install.sh (100%) create mode 100644 Common/kernel create mode 100644 Common/kernel~ rename compile-libobjc2 => Common/libobjc2 (59%) create mode 100644 Common/logo rename system_type => Generic/system_type (100%) create mode 100644 Platforms/darwin/build create mode 100644 Platforms/darwin/dependencies create mode 100644 Platforms/darwin/setup create mode 100644 Platforms/freebsd/build create mode 100644 Platforms/freebsd/dependencies create mode 100644 Platforms/freebsd/setup create mode 100644 Platforms/linux/build create mode 100644 Platforms/linux/dependencies create mode 100644 Platforms/linux/setup create mode 100644 Platforms/mingw64_nt/build create mode 100644 Platforms/mingw64_nt/dependencies rename setup-mingw32_nt => Platforms/mingw64_nt/setup (100%) mode change 100755 => 100644 create mode 100644 Platforms/mingw64_nt/windows/build rename install-dependencies-mingw64_nt => Platforms/mingw64_nt/windows/dependencies (100%) create mode 100644 Platforms/mingw64_nt/windows/setup create mode 100644 Platforms/netbsd/build create mode 100644 Platforms/netbsd/dependencies create mode 100644 Platforms/netbsd/setup rename build-openbsd => Platforms/openbsd/build (59%) create mode 100755 Platforms/openbsd/config rename install-dependencies-openbsd => Platforms/openbsd/dependencies (100%) rename setup-openbsd => Platforms/openbsd/setup (100%) rename fontconfig.pc => Resources/fontconfig.pc (100%) rename changeloggen => Utils/changeloggen (100%) create mode 100755 Utils/makelib.sh rename makelib.sh => Utils/makelib.sh~ (100%) rename pkgconfig.sh => Utils/pkgconfig.sh (100%) delete mode 100755 setup-mingw64_nt delete mode 100755 setup-msys_nt 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 59% rename from compile-libobjc2 rename to Common/libobjc2 index b318eb2..0b943df 100755 --- a/compile-libobjc2 +++ b/Common/libobjc2 @@ -1,14 +1,4 @@ #!/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 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 < ./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/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