Skip to content

Commit

Permalink
Merge e829e65
Browse files Browse the repository at this point in the history
  • Loading branch information
JanBliznicenko committed Oct 5, 2021
2 parents 0f2fe48 + e829e65 commit 35c1b84
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 2 deletions.
23 changes: 22 additions & 1 deletion .github/scripts/build-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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'"

Expand Down
10 changes: 9 additions & 1 deletion .github/scripts/build-win.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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'"

Expand Down

0 comments on commit 35c1b84

Please sign in to comment.