diff --git a/.github/scripts/build-linux.sh b/.github/scripts/build-linux.sh index 2630287..90af66f 100644 --- a/.github/scripts/build-linux.sh +++ b/.github/scripts/build-linux.sh @@ -21,7 +21,28 @@ cat << EOF > $package_dir/$PROJECT_NAME \`dirname "\$0"\`/pharo/bin/pharo \`dirname "\$0"\`/image/$PROJECT_NAME.image EOF -chmod a+rx $package_dir/$PROJECT_NAME +cat << EOF > $package_dir/$PROJECT_NAME-pharo-ui +#!/bin/bash +pharo-ui \`dirname "\$0"\`/image/$PROJECT_NAME.image +EOF + +cat << EOF > $package_dir/README.txt +To run OpenPonk on Debian-based and Ubuntu-based Linux distros, simply use $PROJECT_NAME executable. + +-- ArchLinux, Fedora and OpenSUSE installation -- +ArchLinux, Fedora and OpenSUSE require installation of Pharo programming language (sudo privileges needed). + +1. Open Pharo builds website: https://software.opensuse.org/download.html?project=devel:languages:pharo:latest&package=pharo9-ui +2. Select your Linux distribution. +3. Select "Add repository and install manually". +4. Follow shown instruction if any and execute shown bash code in terminal - one line at a time. + You might need to prepend "sudo" before each line. + If your distro version number does not match given options, try manually changing the version number in shown code. + +After Pharo is installed, you may run OpenPonk using $PROJECT_NAME-pharo-ui executable. +EOF + +chmod a+rx $package_dir/$PROJECT_NAME $package_dir/$PROJECT_NAME-pharo-ui "$vm_dir/bin/pharo" --headless $package_dir/image/$PROJECT_NAME.image eval --save "OPVersion currentWithRunId: $RUN_ID projectName: '$REPOSITORY_NAME'" diff --git a/.github/scripts/build-win.ps1 b/.github/scripts/build-win.ps1 index 930bb2f..4b10f9d 100644 --- a/.github/scripts/build-win.ps1 +++ b/.github/scripts/build-win.ps1 @@ -22,7 +22,15 @@ cp $vm_dir/*.dll $package_dir/Pharo cp $vm_dir/Pharo.exe $package_dir/Pharo cp $vm_dir/PharoConsole.exe $package_dir/Pharo -"start %~dp0Pharo\Pharo.exe %~dp0image\$PROJECT_NAME.image" | set-content "$package_dir/$PROJECT_NAME.bat" +"`$openponk_path=`"`$PSScriptRoot\`" -replace '\\\\','\' -replace '\\+.*\.cvut\.cz\\[^\\]*\\[^\\]*','X:' +echo `"Opening OpenPonk on path: `${openponk_path}`" +Start-Process -FilePath `${openponk_path}Pharo\Pharo.exe `${openponk_path}image\$PROJECT_NAME.image" | set-content "$package_dir/$PROJECT_NAME.ps1" + +"powershell -executionpolicy remotesigned -File %~dp0$PROJECT_NAME.ps1" | set-content "$package_dir/$PROJECT_NAME.bat" + +"Open using $PROJECT_NAME.bat or $PROJECT_NAME.ps1 (bat just executes the ps1 in powershell). + +OpenPonk does not work when executed from network drives (like \\example.com\home\Downloads), unless accessed via mapped letter drive (like X:\). There is a hardcoded fix only for cvut.cz student home directories." | set-content "$package_dir/README.txt" & $vm_dir/PharoConsole.exe -headless $package_dir/image/$PROJECT_NAME.image eval --save "OPVersion currentWithRunId: $RUN_ID projectName: '$REPOSITORY_NAME'"