Skip to content

Commit

Permalink
fix: use PineSAM as name for binary
Browse files Browse the repository at this point in the history
  • Loading branch information
builder555 committed Jan 31, 2024
1 parent 1ce7469 commit 15707a8
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 24 deletions.
4 changes: 2 additions & 2 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/).
Expand Down Expand Up @@ -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:<br/>
Expand Down
2 changes: 1 addition & 1 deletion ci/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion ci/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion ci/package.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion ci/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
22 changes: 5 additions & 17 deletions ci/start.sh
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
2 changes: 1 addition & 1 deletion docs/install-guide/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:<br/>
Expand Down

0 comments on commit 15707a8

Please sign in to comment.