Skip to content

Commit aafeecd

Browse files
improved build scripts
1 parent b5ea00e commit aafeecd

File tree

2 files changed

+31
-2
lines changed

2 files changed

+31
-2
lines changed

.github/scripts/build-linux.sh

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,28 @@ cat << EOF > $package_dir/$PROJECT_NAME
2121
\`dirname "\$0"\`/pharo/bin/pharo \`dirname "\$0"\`/image/$PROJECT_NAME.image
2222
EOF
2323

24-
chmod a+rx $package_dir/$PROJECT_NAME
24+
cat << EOF > $package_dir/$PROJECT_NAME-pharo-ui
25+
#!/bin/bash
26+
pharo-ui \`dirname "\$0"\`/image/$PROJECT_NAME.image
27+
EOF
28+
29+
cat << EOF > $package_dir/README.txt
30+
To run OpenPonk on Debian-based and Ubuntu-based Linux distros, simply use $PROJECT_NAME executable.
31+
32+
-- ArchLinux, Fedora and OpenSUSE installation --
33+
ArchLinux, Fedora and OpenSUSE require installation of Pharo programming language (sudo privileges needed).
34+
35+
1. Open Pharo builds website: https://software.opensuse.org/download.html?project=devel:languages:pharo:latest&package=pharo9-ui
36+
2. Select your Linux distribution.
37+
3. Select "Add repository and install manually".
38+
4. Follow shown instruction if any and execute shown bash code in terminal - one line at a time.
39+
You might need to prepend "sudo" before each line.
40+
If your distro version number does not match given options, try manually changing the version number in shown code.
41+
42+
After Pharo is installed, you may run OpenPonk using $PROJECT_NAME-pharo-ui executable.
43+
EOF
44+
45+
chmod a+rx $package_dir/$PROJECT_NAME $package_dir/$PROJECT_NAME-pharo-ui
2546

2647
"$vm_dir/bin/pharo" --headless $package_dir/image/$PROJECT_NAME.image eval --save "OPVersion currentWithRunId: $RUN_ID projectName: '$REPOSITORY_NAME'"
2748

.github/scripts/build-win.ps1

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,15 @@ cp $vm_dir/*.dll $package_dir/Pharo
2222
cp $vm_dir/Pharo.exe $package_dir/Pharo
2323
cp $vm_dir/PharoConsole.exe $package_dir/Pharo
2424

25-
"start %~dp0Pharo\Pharo.exe %~dp0image\$PROJECT_NAME.image" | set-content "$package_dir/$PROJECT_NAME.bat"
25+
"`$openponk_path=`"`$PSScriptRoot\`" -replace '\\\\','\' -replace '\\+.*\.cvut\.cz\\[^\\]*\\[^\\]*','X:'
26+
echo `"Opening OpenPonk on path: `${openponk_path}`"
27+
Start-Process -FilePath `${openponk_path}Pharo\Pharo.exe `${openponk_path}image\$PROJECT_NAME.image" | set-content "$package_dir/$PROJECT_NAME.ps1"
28+
29+
"powershell -executionpolicy remotesigned -File %~dp0$PROJECT_NAME.ps1" | set-content "$package_dir/$PROJECT_NAME.bat"
30+
31+
"Open using $PROJECT_NAME.bat or $PROJECT_NAME.ps1 (bat just executes the ps1 in powershell).
32+
33+
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"
2634

2735
& $vm_dir/PharoConsole.exe -headless $package_dir/image/$PROJECT_NAME.image eval --save "OPVersion currentWithRunId: $RUN_ID projectName: '$REPOSITORY_NAME'"
2836

0 commit comments

Comments
 (0)