Skip to content

Commit 5fb504d

Browse files
committed
Dev scripts for packages updates for macos/ios/vs (x64)
1 parent 94aa831 commit 5fb504d

13 files changed

+49
-99
lines changed

scripts/ci/package_builds.sh

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ $ROOT/scripts/dev/create_package.sh ios $lastversion master
3434
$ROOT/scripts/dev/create_package.sh macos $lastversion master
3535
$ROOT/scripts/dev/create_package.sh msys2 $lastversion master mingw64
3636
$ROOT/scripts/dev/create_package.sh vs $lastversion master
37+
$ROOT/scripts/dev/create_package.sh vs_min $lastversion master
3738

3839
ls -la
3940
cd $ROOT

scripts/ci/vs/install_bleeding.sh

+4
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ downloader https://github.com/openframeworks/projectGenerator/releases/download/
1818
unzip projectGenerator-vs.zip 2> /dev/null
1919
rm projectGenerator-vs.zip
2020

21+
downloader https://github.com/openframeworks/projectGenerator/releases/download/nightly/projectGenerator-vs-gui.zip 2> /dev/null
22+
unzip projectGenerator-vs-gui.zip 2> /dev/null
23+
rm projectGenerator-vs-gui.zip
24+
2125
cd $OF_ROOT
2226
PG_OF_PATH=$OF_ROOT ~/projectGenerator/projectGenerator.exe examples/templates/emptyExample
2327
PG_OF_PATH=$OF_ROOT ~/projectGenerator/projectGenerator.exe examples/templates/allAddonsExample

scripts/dev/create_package.sh

+42-37
Original file line numberDiff line numberDiff line change
@@ -185,11 +185,6 @@ function deleteEclipse {
185185
function createProjectFiles {
186186
if [ "$pkg_platform" != "linuxarmv6l" ] && [ "$pkg_platform" != "linuxarmv7l" ] && [ "$pkg_platform" != "linuxaarch64" ] ; then
187187
mkdir -p ${main_ofroot}/libs/openFrameworksCompiled/lib/linux64/
188-
#cd ${main_ofroot}/libs/openFrameworksCompiled/lib/linux64/
189-
#rm -f ${main_ofroot}/libs/openFrameworksCompiled/lib/linux64/libopenFrameworksDebug.a
190-
#downloader http://ci.openframeworks.cc/openFrameworks_libs/linux64/libopenFrameworksDebug.a
191-
192-
#git clone $PG_REPO --depth=1 --branch=$PG_BRANCH
193188
cd ${main_ofroot}/apps/projectGenerator/commandLine
194189
echo "Recompiling command line PG"
195190
if [ -d ~/logs ]; then
@@ -229,7 +224,9 @@ function createProjectFiles {
229224

230225

231226
remove_current_platform() {
232-
echo "$all_platforms" | sed "s/$1 //"
227+
local platforms="$1"
228+
local platform_to_remove="$2"
229+
echo "$platforms" | sed "s/\b$platform_to_remove\b//g"
233230
}
234231

235232
function createPackage {
@@ -359,41 +356,44 @@ function createPackage {
359356
elif [ "$pkg_platform" = "android" ]; then
360357
scripts/android/download_libs.sh
361358
elif [ "$pkg_platform" = "ios" ]; then
362-
scripts/ios/download_latest_libs.sh
359+
scripts/macos/download_latest_libs.sh
363360
elif [ "$pkg_platform" = "macos" ]; then
364361
scripts/macos/download_latest_libs.sh
365362
scripts/emscripten/download_libs.sh -n
366363
fi
367364

368-
#create project files for platform
369365
createProjectFiles $pkg_platform $pkg_ofroot
370366

371367
if [ "$pkg_platform" = "linux" ]; then
372-
otherplatforms=$(remove_current_platform "linux")
368+
otherplatforms=$(remove_current_platform "$all_platforms" "linux")
373369
elif [ "$pkg_platform" = "linux64" ]; then
374-
otherplatforms=$(remove_current_platform "emscripten")
375-
otherplatforms=$(remove_current_platform "linux64")
370+
otherplatforms=$(remove_current_platform "$all_platforms" "emscripten")
371+
otherplatforms=$(remove_current_platform "$otherplatforms" "linux64")
376372
elif [ "$pkg_platform" = "linuxarmv6l" ]; then
377-
otherplatforms=$(remove_current_platform "linuxarmv6l")
373+
otherplatforms=$(remove_current_platform "$all_platforms" "linuxarmv6l")
378374
elif [ "$pkg_platform" = "linuxarmv7l" ]; then
379-
otherplatforms=$(remove_current_platform "linuxarmv7l")
375+
otherplatforms=$(remove_current_platform "$all_platforms" "linuxarmv7l")
380376
elif [ "$pkg_platform" = "linuxaarch64" ]; then
381-
otherplatforms=$(remove_current_platform "linuxaarch64")
377+
otherplatforms=$(remove_current_platform "$all_platforms" "linuxaarch64")
382378
elif [ "$pkg_platform" = "osx" ]; then
383-
otherplatforms=$(remove_current_platform "osx")
384-
otherplatforms=$(remove_current_platform "emscripten")
379+
otherplatforms=$(remove_current_platform "$all_platforms" "osx")
380+
otherplatforms=$(remove_current_platform "$otherplatforms" "emscripten")
385381
elif [ "$pkg_platform" = "msys2" ]; then
386-
otherplatforms=$(remove_current_platform "msys2")
382+
otherplatforms=$(remove_current_platform "$all_platforms" "msys2")
387383
elif [ "$pkg_platform" = "vs" ]; then
388-
otherplatforms=$(remove_current_platform "vs")
389-
otherplatforms=$(remove_current_platform "emscripten")
384+
otherplatforms=$(remove_current_platform "$all_platforms" "vs")
385+
otherplatforms=$(remove_current_platform "$otherplatforms" "emscripten")
390386
elif [ "$pkg_platform" = "ios" ]; then
391-
otherplatforms=$(remove_current_platform "ios")
387+
otherplatforms=$(remove_current_platform "$all_platforms" "ios")
388+
otherplatforms=$(remove_current_platform "$otherplatforms" "tvos")
389+
otherplatforms=$(remove_current_platform "$otherplatforms" "macos")
392390
elif [ "$pkg_platform" = "macos" ]; then
393-
otherplatforms=$(remove_current_platform "macos")
394-
otherplatforms=$(remove_current_platform "emscripten")
391+
otherplatforms=$(remove_current_platform "$all_platforms" "macos")
392+
otherplatforms=$(remove_current_platform "$otherplatforms" "ios")
393+
otherplatforms=$(remove_current_platform "$otherplatforms" "tvos")
394+
otherplatforms=$(remove_current_platform "$otherplatforms" "emscripten")
395395
elif [ "$pkg_platform" = "android" ]; then
396-
otherplatforms=$(remove_current_platform "android")
396+
otherplatforms=$(remove_current_platform "$all_platforms" "android")
397397
else
398398
echo "Unknown platform: $pkg_platform"
399399
exit 1
@@ -421,12 +421,10 @@ function createPackage {
421421

422422
if [ "$pkg_platform" = "osx" ]; then
423423
downloader https://github.com/openframeworks/projectGenerator/releases/download/nightly/projectGenerator-osx.zip 2> /dev/null
424-
unzip projectGenerator-osx.zip
425-
mv projectGenerator-osx projectGenerator
426-
rm projectGenerator-osx.zip
424+
unzip projectGenerator-osx.zip
425+
mv projectGenerator-osx projectGenerator
426+
rm projectGenerator-osx.zip
427427
rm -rf apps/projectGenerator
428-
429-
430428
fi
431429

432430
if [ "$pkg_platform" = "ios" ]; then
@@ -443,7 +441,6 @@ function createPackage {
443441
npm run build:linux32 > /dev/null
444442
mv dist/projectGenerator-linux-ia32 ${pkg_ofroot}/projectGenerator-linux
445443
cd ${pkg_ofroot}
446-
# sed -i "s/osx/linux/g" projectGenerator-linux/resources/app/settings.json
447444
fi
448445

449446
if [ "$pkg_platform" = "linux64" ]; then
@@ -452,7 +449,6 @@ function createPackage {
452449
npm run build:linux64 > /dev/null
453450
mv dist/projectGenerator-linux-x64 ${pkg_ofroot}/projectGenerator-linux64
454451
cd ${pkg_ofroot}
455-
# sed -i "s/osx/linux64/g" projectGenerator-linux64/resources/app/settings.json
456452
chmod +x projectGenerator-linux64/projectGenerator
457453
fi
458454

@@ -466,16 +462,12 @@ function createPackage {
466462
unzip -d "projectGenerator" projectGenerator-vs-gui.zip 2> /dev/null
467463
rm projectGenerator-vs-gui.zip
468464
cd ${pkg_ofroot}
469-
# sed -i "s/osx/android/g" projectGenerator-windows/resources/app/settings.json
470-
471-
472465

473466
cd ${pkg_ofroot}/apps/projectGenerator/frontend
474467
npm install > /dev/null
475468
npm run build:linux64 > /dev/null
476469
mv dist/projectGenerator-linux-x64 ${pkg_ofroot}/projectGenerator-linux64
477470
cd ${pkg_ofroot}
478-
# sed -i "s/osx/android/g" projectGenerator-linux64/resources/app/settings.json
479471
fi
480472

481473
# linux remove other platform projects from PG source and copy ofxGui
@@ -499,7 +491,7 @@ function createPackage {
499491
rm -Rf ofxUnitTests
500492
fi
501493
#delete ofxiPhone in non ios
502-
if [ "$pkg_platform" != "ios" ]; then
494+
if [ "$pkg_platform" != "ios" ] || [ "$pkg_platform" != "macos" ];; then
503495
rm -Rf ofxiPhone
504496
rm -Rf ofxiOS
505497
rm -Rf ofxUnitTests
@@ -524,7 +516,6 @@ function createPackage {
524516
#android, move paths.default.make to paths.make
525517
if [ "$pkg_platform" == "android" ]; then
526518
cd ${pkg_ofroot}
527-
#mv libs/openFrameworksCompiled/project/android/paths.default.make libs/openFrameworksCompiled/project/android/paths.make
528519
fi
529520

530521
#delete other platforms OF project files
@@ -535,6 +526,14 @@ function createPackage {
535526

536527
#delete scripts
537528
cd $pkg_ofroot/scripts
529+
530+
mkdir -p developer
531+
# Copy the specified scripts to the new folder
532+
cp dev/download_libs.sh developer/
533+
cp dev/download_pg.sh developer/
534+
cp dev/downloader.sh developer/
535+
cp dev/init_submodules.sh developer/
536+
538537
if [ "$pkg_platform" != "linux64" ] && [ "$pkg_platform" != "linuxarmv6l" ] && [ "$pkg_platform" != "linuxarmv7l" ] && [ "$pkg_platform" != "linuxaarch64" ]; then
539538
rm -Rf $otherplatforms
540539
rm -Rf ci dev apothecary
@@ -567,7 +566,13 @@ function createPackage {
567566
#delete dev folders
568567
cd ${pkg_ofroot}/scripts
569568
rm -Rf dev
570-
rm */download_libs.sh
569+
# rm */download_libs.sh
570+
571+
# put the useful dev scripts back
572+
mv developer dev
573+
574+
# make sure any remaining dev scripts are executable
575+
find . -type f -name "*.sh" -exec chmod +x {} +
571576

572577
#delete xcode templates in other platforms
573578
cd $pkg_ofroot

scripts/ios/catos/download_latest_libs.sh

-9
This file was deleted.

scripts/ios/catos/download_libs.sh

-4
This file was deleted.

scripts/ios/download_latest_libs.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
33
cd $SCRIPT_DIR
44
cd $SCRIPT_DIR
55
if [ ! -z ${BITS+x} ]; then
6-
../dev/download_libs.sh -p ios -b -a $BITS -n $@
6+
../dev/download_libs.sh -p macos -b -a $BITS -n $@
77
else
8-
../dev/download_libs.sh -p ios -b -n $@
8+
../dev/download_libs.sh -p macos -b -n $@
99
fi

scripts/ios/tvos/download_latest_libs.sh

-9
This file was deleted.

scripts/ios/tvos/download_libs.sh

-4
This file was deleted.

scripts/ios/watchos/download_latest_libs.sh

-9
This file was deleted.

scripts/ios/watchos/download_libs.sh

-4
This file was deleted.

scripts/ios/xros/download_latest_libs.sh

-9
This file was deleted.

scripts/ios/xros/download_libs.sh

-4
This file was deleted.

scripts/vs/install_libs.sh

-8
This file was deleted.

0 commit comments

Comments
 (0)