Skip to content

Commit

Permalink
download libs scripts uniformity. fix linux libraries to -b, fix gcc …
Browse files Browse the repository at this point in the history
…check when not installed
  • Loading branch information
danoli3 committed Aug 19, 2024
1 parent b7c5147 commit df83740
Show file tree
Hide file tree
Showing 21 changed files with 32 additions and 202 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/of.yml
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ jobs:
key: ${{ matrix.cfg.target }}-${{ matrix.cfg.libs }}

- name: Download libs
run: ./scripts/${{matrix.cfg.libs}}/download_latest_libs.sh
run: ./scripts/${{matrix.cfg.libs}}/download_libs.sh
- name: install
run: ./scripts/ci/$TARGET/install.sh
- name: Build
Expand Down Expand Up @@ -291,7 +291,7 @@ jobs:


- name: Download libs
run: ./scripts/${{ matrix.cfg.target }}/download_latest_libs.sh
run: ./scripts/${{ matrix.cfg.target }}/download_libs.sh

- name: Build
run:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1195,7 +1195,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = "/usr/bin/env bash";
shellScript = "#!/usr/bin/env bash\nif [ ! -d \"${SRCROOT}/../../../freetype/lib/macos/freetype.xcframework\" ]; then\n\techo \"openFrameworks has missing xcFrameworks for iOS / macOS. Downloading libaries now via scripts/macos/download_latest_libs.sh\"\n ${SRCROOT}/../../../../scripts/macos/download_latest_libs.sh\nelse\n\techo \"xcFrameworks found\"\nfi\n";
shellScript = "#!/usr/bin/env bash\nif [ ! -d \"${SRCROOT}/../../../freetype/lib/macos/freetype.xcframework\" ]; then\n\techo \"openFrameworks has missing xcFrameworks for iOS / macOS. Downloading libaries now via scripts/macos/download_libs.sh\"\n ${SRCROOT}/../../../../scripts/macos/download_libs.sh\nelse\n\techo \"xcFrameworks found\"\nfi\n";
};
BFF80A5C2C50B25B00784E74 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -871,7 +871,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = "/usr/bin/env bash";
shellScript = "#!/usr/bin/env bash\nif [ ! -d \"${SRCROOT}/../../../freetype/lib/macos/freetype.xcframework\" ]; then\n\techo \"openFrameworks has missing xcFrameworks for osx. Downloading libaries now via scripts/osx/download_latest_libs.sh\"\n ${SRCROOT}/../../../../scripts/osx/download_latest_libs.sh\nelse\n\techo \"xcFrameworks found\"\nfi\n";
shellScript = "#!/usr/bin/env bash\nif [ ! -d \"${SRCROOT}/../../../freetype/lib/macos/freetype.xcframework\" ]; then\n\techo \"openFrameworks has missing xcFrameworks for osx. Downloading libaries now via scripts/osx/download_libs.sh\"\n ${SRCROOT}/../../../../scripts/osx/download_libs.sh\nelse\n\techo \"xcFrameworks found\"\nfi\n";
};
BFF80A5D2C50B2C300784E74 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -997,7 +997,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = "/usr/bin/env bash";
shellScript = "#!/usr/bin/env bash\nif [ ! -d \"${SRCROOT}/../../../freetype/lib/macos/freetype.xcframework\" ]; then\n\techo \"openFrameworks has missing xcFrameworks for tvOS / macOS. Downloading libaries now via scripts/macos/download_latest_libs.sh\"\n ${SRCROOT}/../../../../scripts/macos/download_latest_libs.sh\nelse\n\techo \"xcFrameworks found\"\nfi\n";
shellScript = "#!/usr/bin/env bash\nif [ ! -d \"${SRCROOT}/../../../freetype/lib/macos/freetype.xcframework\" ]; then\n\techo \"openFrameworks has missing xcFrameworks for tvOS / macOS. Downloading libaries now via scripts/macos/download_libs.sh\"\n ${SRCROOT}/../../../../scripts/macos/download_libs.sh\nelse\n\techo \"xcFrameworks found\"\nfi\n";
};
BFF80A5B2C50B01B00784E74 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/vs/install_bleeding.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ if [[ ! -d "$SCRIPT_DIR" ]]; then SCRIPT_DIR="$PWD"; fi

unset BITS
cd "${OF_ROOT}"
./scripts/vs/download_latest_libs.sh -p vs --silent
./scripts/vs/download_libs.sh -p vs --silent

rm -rf projectGenerator
mkdir -p projectGenerator
Expand Down
7 changes: 6 additions & 1 deletion scripts/dev/download_libs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,12 @@ if [ "$ARCH" == "" ]; then
if [ "$PLATFORM" == "linux" ]; then
ARCH=$(uname -m)
if [ "$ARCH" == "x86_64" ]; then
GCC_VERSION=$(gcc -dumpversion | cut -f1 -d.)
if command -v gcc &> /dev/null
then
GCC_VERSION=$(gcc -dumpversion | cut -f1 -d.)
else
GCC_VERSION=6
fi
if [ $GCC_VERSION -eq 4 ]; then
ARCH=64gcc6
elif [ $GCC_VERSION -eq 5 ]; then
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $SCRIPT_DIR
../dev/download_libs.sh -p emscripten -b $@
../dev/download_libs.sh -p emscripten $@
2 changes: 1 addition & 1 deletion scripts/emscripten/download_libs.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $SCRIPT_DIR
../dev/download_libs.sh -p emscripten $@
../dev/download_libs.sh -p emscripten -b $@
9 changes: 0 additions & 9 deletions scripts/ios/download_latest_libs.sh

This file was deleted.

7 changes: 6 additions & 1 deletion scripts/ios/download_libs.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
#!/usr/bin/env bash
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $SCRIPT_DIR
../dev/download_libs.sh -p ios -n $@
cd $SCRIPT_DIR
if [ ! -z ${BITS+x} ]; then
../dev/download_libs.sh -p macos -b -a $BITS -n $@
else
../dev/download_libs.sh -p macos -b -n $@
fi
2 changes: 1 addition & 1 deletion scripts/linux/download_libs.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $SCRIPT_DIR
../dev/download_libs.sh -p linux $@
../dev/download_libs.sh -p linux -b $@
6 changes: 3 additions & 3 deletions scripts/linux/ubuntu/install_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,22 +36,22 @@ function installPackages {
exit_code=$?
if [ $exit_code != 0 ]; then
echo "error installing ${pkg}, there could be an error with your internet connection"
echo "if the error persists, please report an issue in github: http://github.com/openframeworks/openFrameworks/issues"
echo "if the error persists, please report an issue in github: https://github.com/openframeworks/openFrameworks/issues"
exit $exit_code
fi
elif [ $exit_code -eq 0 ]; then
apt-get -y -qq install ${pkg}
exit_code=$?
if [ $exit_code != 0 ]; then
echo "error installing ${pkg}, there could be an error with your internet connection"
echo "if the error persists, please report an issue in github: http://github.com/openframeworks/openFrameworks/issues"
echo "if the error persists, please report an issue in github: https://github.com/openframeworks/openFrameworks/issues"
exit $exit_code
fi
else
echo "error installing ${pkg}"
echo $error
echo "this seems an error with your distribution repositories but you can also"
echo "report an issue in the openFrameworks github: http://github.com/openframeworks/openFrameworks/issues"
echo "report an issue in the openFrameworks github: https://github.com/openframeworks/openFrameworks/issues"
exit $exit_code
fi
fi
Expand Down
9 changes: 0 additions & 9 deletions scripts/macos/download_latest_libs.sh

This file was deleted.

4 changes: 2 additions & 2 deletions scripts/macos/download_libs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $SCRIPT_DIR
cd $SCRIPT_DIR
if [ ! -z ${BITS+x} ]; then
../dev/download_libs.sh -p macos -a $BITS $@
../dev/download_libs.sh -p macos -b -a $BITS $@
else
../dev/download_libs.sh -p macos $@
../dev/download_libs.sh -p macos -b -n $@
fi
9 changes: 0 additions & 9 deletions scripts/osx/download_latest_libs.sh

This file was deleted.

4 changes: 2 additions & 2 deletions scripts/osx/download_libs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $SCRIPT_DIR
cd $SCRIPT_DIR
if [ ! -z ${BITS+x} ]; then
../dev/download_libs.sh -p osx -a $BITS $@
../dev/download_libs.sh -p osx -b -a $BITS $@
else
../dev/download_libs.sh -p osx $@
../dev/download_libs.sh -p osx -b $@
fi
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"outputPaths": [],
"runOnlyForDeploymentPostprocessing": "0",
"shellPath": "/usr/bin/env bash",
"shellScript": "#!/usr/bin/env bash\nif [ ! -d \"${OF_PATH}/libs/freetype/lib/macos/freetype.xcframework\" ]; then\n\techo \"openFrameworks has missing xcFrameworks for osx. Downloading libaries now via scripts/osx/download_latest_libs.sh\"\n ${OF_PATH}/scripts/osx/download_latest_libs.sh\nelse\n\techo \"xcFrameworks found\"\nfi\n"
"shellScript": "#!/usr/bin/env bash\nif [ ! -d \"${OF_PATH}/libs/freetype/lib/macos/freetype.xcframework\" ]; then\n\techo \"openFrameworks has missing xcFrameworks for osx. Downloading libaries now via scripts/osx/download_libs.sh\"\n ${OF_PATH}/scripts/osx/download_libs.sh\nelse\n\techo \"xcFrameworks found\"\nfi\n"
},
"E42962A92163ECCD00A6A9E2": {
"alwaysOutOfDate": "1",
Expand Down
8 changes: 0 additions & 8 deletions scripts/vs/download_latest_libs.sh

This file was deleted.

145 changes: 0 additions & 145 deletions scripts/vs/download_libs.ps1

This file was deleted.

6 changes: 3 additions & 3 deletions scripts/vs/download_libs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $SCRIPT_DIR
if [ ! -z ${BITS+x} ]; then
../dev/download_libs.sh -p vs -n $@ -a $BITS
../dev/download_libs.sh -p vs -b -a $BITS -n $@
else
../dev/download_libs.sh -p vs -n $@
fi
../dev/download_libs.sh -p vs -b -n $@
fi
File renamed without changes.

0 comments on commit df83740

Please sign in to comment.