From 15707a8bd0a68fd0fa5f94149df90b9295c95fcd Mon Sep 17 00:00:00 2001 From: builder555 <85308587+builder555@users.noreply.github.com> Date: Wed, 31 Jan 2024 17:38:40 -0500 Subject: [PATCH] fix: use PineSAM as name for binary --- Readme.md | 4 ++-- ci/build.ps1 | 2 +- ci/build.sh | 2 +- ci/package.ps1 | 2 +- ci/package.sh | 2 +- ci/start.sh | 22 +++++----------------- docs/install-guide/troubleshooting.md | 2 +- 7 files changed, 12 insertions(+), 24 deletions(-) diff --git a/Readme.md b/Readme.md index 94afd741..eff9efc6 100644 --- a/Readme.md +++ b/Readme.md @@ -63,7 +63,7 @@ Why focus on soldering when you can play with the settings instead? With this ap 4. **Windows**: * right click on the zip, properties> general, check box to Unblock, then extract ([reference](https://github.com/builder555/PineSAM/discussions/106#discussion-4960445)). - * Run `Pinesam.exe` + * Run `PineSAM.exe` * Approve any pop-up warnings. * Open http://localhost:8080 in your normal browser (the page will not open automatically). * Usage guide [here](https://builder555.github.io/PineSAM/user-guide/usage/). @@ -150,7 +150,7 @@ You can access the settings remotely once the app is running on the main PC/lapt * possible reason: you paired your Pinecil using system settings. solution: unpair it from all other places. * possible reason: using older firmware (below 2.21). solution: [flash](https://github.com/Ralim/IronOS/discussions/1518#discussioncomment-4866637) current [BLE firmware](https://github.com/Ralim/IronOS/releases/tag/v2.21); below IronOS 2.21 only BETA versions will work with PineSAM. -3. Pinecil script terminal crashes on start of script: incompatible version of IronOS, check/update firmware see above. +3. PineSAM script terminal crashes on start of script: incompatible version of IronOS, check/update firmware see above. 4. Windows Powershell issue * windows by default does not allow any scripts to run in powershell. Make sure the zip file property is _Unblock_ ([reference](https://github.com/builder555/PineSAM/discussions/106#discussion-4960445)) and set powershell to remotesigned with:
diff --git a/ci/build.ps1 b/ci/build.ps1 index 3946bb85..45aeb06c 100755 --- a/ci/build.ps1 +++ b/ci/build.ps1 @@ -2,4 +2,4 @@ Push-Location ui npm run build Pop-Location -pyinstaller --onefile --name Pinecil --hidden-import=winrt.windows.foundation.collections --add-data "./version.txt;./" --add-data "./ui/dist;./gui" backend/main.py +pyinstaller --onefile --name PineSAM --hidden-import=winrt.windows.foundation.collections --add-data "./version.txt;./" --add-data "./ui/dist;./gui" backend/main.py diff --git a/ci/build.sh b/ci/build.sh index 2c0cc86b..1001d44e 100755 --- a/ci/build.sh +++ b/ci/build.sh @@ -6,4 +6,4 @@ pushd ui || exit 2 npm run build popd || exit 2 -pyinstaller --onefile --name Pinecil --add-data "./version.txt:./" --add-data "./ui/dist:./gui" backend/main.py --hidden-import=typing_extensions --collect-submodules dbus_fast +pyinstaller --onefile --name PineSAM --add-data "./version.txt:./" --add-data "./ui/dist:./gui" backend/main.py --hidden-import=typing_extensions --collect-submodules dbus_fast diff --git a/ci/package.ps1 b/ci/package.ps1 index 87084ad3..50f8ffe1 100755 --- a/ci/package.ps1 +++ b/ci/package.ps1 @@ -8,7 +8,7 @@ exit 1 $zip_path = "$(Get-Location)/$name.zip" Push-Location dist -Compress-Archive -Path Pinecil.exe -DestinationPath $zip_path -Force +Compress-Archive -Path PineSAM.exe -DestinationPath $zip_path -Force Pop-Location Write-Output "asset_path=$zip_path" >> $Env:GITHUB_OUTPUT diff --git a/ci/package.sh b/ci/package.sh index abaa552b..7279ac0c 100755 --- a/ci/package.sh +++ b/ci/package.sh @@ -10,7 +10,7 @@ fi zip_path="$(dirname "${PWD}")/${name}.zip" pushd dist || exit -zip -r "${zip_path}" Pinecil +zip -r "${zip_path}" PineSAM popd || exit zip -u -j "${zip_path}" ci/start.sh diff --git a/ci/start.sh b/ci/start.sh index 3f9846ad..6f091b05 100755 --- a/ci/start.sh +++ b/ci/start.sh @@ -1,8 +1,8 @@ #!/bin/bash cd "$(dirname "$0")" -# ensure Pinecil binary is present -if [ ! -f ./Pinecil ] ; then +# ensure PineSAM binary is present +if [ ! -f ./PineSAM ] ; then echo "This file is used to run a built version of the project." echo "Please run setup-dev.sh and use run-dev.sh to run the project" exit @@ -12,21 +12,9 @@ if [ "$(uname)" == "Darwin" ]; then # for MacOS, remove the quarantine attributes # this is needed because the mac will not execute binaries that are downloaded from the internet # see https://developer.apple.com/library/archive/technotes/tn2459/_index.html - if xattr -p com.apple.quarantine ./Pinecil >/dev/null 2>&1; then - find ./ -name Pinecil | xargs xattr -rd com.apple.quarantine + if xattr -p com.apple.quarantine ./PineSAM >/dev/null 2>&1; then + xargs xattr -rd com.apple.quarantine ./PineSAM fi fi -./Pinecil & -pid1=$! - -sleep 5 - -if [ "$(uname)" == "Darwin" ]; then - open http://localhost:8080/ -else - xdg-open http://localhost:8080/ -fi - -trap "kill $pid1" EXIT -wait $pid1 +./PineSAM \ No newline at end of file diff --git a/docs/install-guide/troubleshooting.md b/docs/install-guide/troubleshooting.md index c3cf5e5b..dc0e14eb 100644 --- a/docs/install-guide/troubleshooting.md +++ b/docs/install-guide/troubleshooting.md @@ -8,7 +8,7 @@ 2. bleak causes Python to crash on Mac: https://github.com/hbldh/bleak/issues/768 * possible solution: give access to iTerm (or whichever terminal you use) to Bluetooth in Settings -3. Pinecil script terminal crashes on start of script: incompatible version of IronOS, check/update firmware see [](https://wiki.pine64.org/wiki/Pinecil_Firmware#Update_V2:_Windows). +3. PineSAM script terminal crashes on start of script: incompatible version of IronOS, check/update firmware see [](https://wiki.pine64.org/wiki/Pinecil_Firmware#Update_V2:_Windows). 4. Windows Powershell issue * windows by default does not allow any scripts to run in powershell. Make sure the zip file property is _Unblock_ ([reference](https://github.com/builder555/PineSAM/discussions/106#discussion-4960445)) and set powershell to remotesigned with: