@@ -185,11 +185,6 @@ function deleteEclipse {
185
185
function createProjectFiles {
186
186
if [ " $pkg_platform " != " linuxarmv6l" ] && [ " $pkg_platform " != " linuxarmv7l" ] && [ " $pkg_platform " != " linuxaarch64" ] ; then
187
187
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
193
188
cd ${main_ofroot} /apps/projectGenerator/commandLine
194
189
echo " Recompiling command line PG"
195
190
if [ -d ~ /logs ]; then
@@ -229,7 +224,9 @@ function createProjectFiles {
229
224
230
225
231
226
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"
233
230
}
234
231
235
232
function createPackage {
@@ -359,41 +356,44 @@ function createPackage {
359
356
elif [ " $pkg_platform " = " android" ]; then
360
357
scripts/android/download_libs.sh
361
358
elif [ " $pkg_platform " = " ios" ]; then
362
- scripts/ios /download_latest_libs.sh
359
+ scripts/macos /download_latest_libs.sh
363
360
elif [ " $pkg_platform " = " macos" ]; then
364
361
scripts/macos/download_latest_libs.sh
365
362
scripts/emscripten/download_libs.sh -n
366
363
fi
367
364
368
- # create project files for platform
369
365
createProjectFiles $pkg_platform $pkg_ofroot
370
366
371
367
if [ " $pkg_platform " = " linux" ]; then
372
- otherplatforms=$( remove_current_platform " linux" )
368
+ otherplatforms=$( remove_current_platform " $all_platforms " " linux" )
373
369
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" )
376
372
elif [ " $pkg_platform " = " linuxarmv6l" ]; then
377
- otherplatforms=$( remove_current_platform " linuxarmv6l" )
373
+ otherplatforms=$( remove_current_platform " $all_platforms " " linuxarmv6l" )
378
374
elif [ " $pkg_platform " = " linuxarmv7l" ]; then
379
- otherplatforms=$( remove_current_platform " linuxarmv7l" )
375
+ otherplatforms=$( remove_current_platform " $all_platforms " " linuxarmv7l" )
380
376
elif [ " $pkg_platform " = " linuxaarch64" ]; then
381
- otherplatforms=$( remove_current_platform " linuxaarch64" )
377
+ otherplatforms=$( remove_current_platform " $all_platforms " " linuxaarch64" )
382
378
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" )
385
381
elif [ " $pkg_platform " = " msys2" ]; then
386
- otherplatforms=$( remove_current_platform " msys2" )
382
+ otherplatforms=$( remove_current_platform " $all_platforms " " msys2" )
387
383
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" )
390
386
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" )
392
390
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" )
395
395
elif [ " $pkg_platform " = " android" ]; then
396
- otherplatforms=$( remove_current_platform " android" )
396
+ otherplatforms=$( remove_current_platform " $all_platforms " " android" )
397
397
else
398
398
echo " Unknown platform: $pkg_platform "
399
399
exit 1
@@ -421,12 +421,10 @@ function createPackage {
421
421
422
422
if [ " $pkg_platform " = " osx" ]; then
423
423
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
427
427
rm -rf apps/projectGenerator
428
-
429
-
430
428
fi
431
429
432
430
if [ " $pkg_platform " = " ios" ]; then
@@ -443,7 +441,6 @@ function createPackage {
443
441
npm run build:linux32 > /dev/null
444
442
mv dist/projectGenerator-linux-ia32 ${pkg_ofroot} /projectGenerator-linux
445
443
cd ${pkg_ofroot}
446
- # sed -i "s/osx/linux/g" projectGenerator-linux/resources/app/settings.json
447
444
fi
448
445
449
446
if [ " $pkg_platform " = " linux64" ]; then
@@ -452,7 +449,6 @@ function createPackage {
452
449
npm run build:linux64 > /dev/null
453
450
mv dist/projectGenerator-linux-x64 ${pkg_ofroot} /projectGenerator-linux64
454
451
cd ${pkg_ofroot}
455
- # sed -i "s/osx/linux64/g" projectGenerator-linux64/resources/app/settings.json
456
452
chmod +x projectGenerator-linux64/projectGenerator
457
453
fi
458
454
@@ -466,16 +462,12 @@ function createPackage {
466
462
unzip -d " projectGenerator" projectGenerator-vs-gui.zip 2> /dev/null
467
463
rm projectGenerator-vs-gui.zip
468
464
cd ${pkg_ofroot}
469
- # sed -i "s/osx/android/g" projectGenerator-windows/resources/app/settings.json
470
-
471
-
472
465
473
466
cd ${pkg_ofroot} /apps/projectGenerator/frontend
474
467
npm install > /dev/null
475
468
npm run build:linux64 > /dev/null
476
469
mv dist/projectGenerator-linux-x64 ${pkg_ofroot} /projectGenerator-linux64
477
470
cd ${pkg_ofroot}
478
- # sed -i "s/osx/android/g" projectGenerator-linux64/resources/app/settings.json
479
471
fi
480
472
481
473
# linux remove other platform projects from PG source and copy ofxGui
@@ -499,7 +491,7 @@ function createPackage {
499
491
rm -Rf ofxUnitTests
500
492
fi
501
493
# delete ofxiPhone in non ios
502
- if [ " $pkg_platform " != " ios" ]; then
494
+ if [ " $pkg_platform " != " ios" ] || [ " $pkg_platform " != " macos " ] ; ; then
503
495
rm -Rf ofxiPhone
504
496
rm -Rf ofxiOS
505
497
rm -Rf ofxUnitTests
@@ -524,7 +516,6 @@ function createPackage {
524
516
# android, move paths.default.make to paths.make
525
517
if [ " $pkg_platform " == " android" ]; then
526
518
cd ${pkg_ofroot}
527
- # mv libs/openFrameworksCompiled/project/android/paths.default.make libs/openFrameworksCompiled/project/android/paths.make
528
519
fi
529
520
530
521
# delete other platforms OF project files
@@ -535,6 +526,14 @@ function createPackage {
535
526
536
527
# delete scripts
537
528
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
+
538
537
if [ " $pkg_platform " != " linux64" ] && [ " $pkg_platform " != " linuxarmv6l" ] && [ " $pkg_platform " != " linuxarmv7l" ] && [ " $pkg_platform " != " linuxaarch64" ]; then
539
538
rm -Rf $otherplatforms
540
539
rm -Rf ci dev apothecary
@@ -567,7 +566,13 @@ function createPackage {
567
566
# delete dev folders
568
567
cd ${pkg_ofroot} /scripts
569
568
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 {} +
571
576
572
577
# delete xcode templates in other platforms
573
578
cd $pkg_ofroot
0 commit comments