Skip to content

Commit

Permalink
fix: updated instructions and convenience scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
builder555 committed Mar 10, 2023
1 parent 9b2c65c commit 61177fc
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 11 deletions.
24 changes: 15 additions & 9 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,13 @@ Why focus on soldering when you can play with the settings instead? With this ap
- [x] iOS
- [x] Android

## Using binaries (MAY BE LAGGY OR UNSTABLE):

## Mac/Linux
1. Download latest [release](https://github.com/builder555/PineSAM/releases/latest) version for your system
2. Extract
3. Mac/LinuxL run `./start.sh` in terminal. Windows: run `start.ps1` in powershell

## Using Dev version on Mac/Linux:

### Install

Expand All @@ -79,24 +84,24 @@ On a Mac http://localhost:8080 will open in your browser automatically. On some
For Debian 12 instructions, see [this post](https://github.com/builder555/PineSAM/discussions/47#discussion-4884758).


## Windows
## Using Dev version on Windows:

If you already have python installed, you can skip to step 2.
If you already have Python and NodeJS installed, you can skip to step 3.

1. Install Python: https://www.python.org/downloads
* Check "Add python.exe to PATH" and select "Customize Installation"
* Check "Add Python to environment variables" option
* See a reference screen [here](https://github.com/builder555/PineSAM/discussions/7#discussion-4862766).
2. Download the source code from the latest release: https://github.com/builder555/PineSAM/releases/latest
3. Right click the zip and open Properties > General tab and check Unblock if it appears at the bottom. Then Unzip it.
2. Install NodeJS: https://nodejs.org/en/download/
3. Download the source code from the latest release: https://github.com/builder555/PineSAM/releases/latest
4. Right click the zip and open Properties > General tab and check Unblock if it appears at the bottom. Then Unzip it.

### Run
1. Open a command terminal (windows powershell recommended).
2. Change directory, `cd` to the location of the PineSAM folder that was unzipped above.
```shell
# from inside the PineSAM\backend directory:
.\setup-dev.bat
.\run-dev.bat
```batch
setup-dev.bat
run-dev.bat
```


Expand All @@ -116,6 +121,7 @@ You can access the settings remotely (i.e, run from a phone) once the app is run
- Pinecil not detected
* possible solution: need to [flash](https://github.com/Ralim/IronOS/discussions/1518#discussioncomment-4866637) [BLE firmware](https://github.com/builder555/PineSAM/files/10797411/Pinecilv2_EN.zip)
* upcoming Ralim's IronOS 2.21 will be the first stable release that has BLE support built-in for V2. Before 2.21, only beta BLE versions of IronOS firmware will work.
* You paired your Pinecil using system settings - unpair it.


## Testing
Expand Down
7 changes: 5 additions & 2 deletions backend/start.bat → run-dev.bat
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
@echo off
set LOG_LEVEL=info

cd backend
python check_install.py

start /b python main_server.py
set pidsrv=%ERRORLEVEL%
cd ..\ui

start /b python -m http.server --directory ../ui 8080
start /b npm run dev
set pidhttp=%ERRORLEVEL%
cd ..

ping -n 3 127.0.0.1 > nul
start http://localhost:8080/settings.html
start http://localhost:8080

taskkill /f /pid %pidsrv% /pid %pidhttp%
19 changes: 19 additions & 0 deletions setup-dev.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
@echo off
cd backend
where python3 >nul 2>&1 || (
echo python3 could not be found
cd ..
exit /b
)
python3 -m pip install --user bleak websockets

cd ../ui
where npm >nul 2>&1 || (
echo npm could not be found
cd ..
exit /b
)
rd /s /q node_modules

npm install -D
cd ..
1 change: 1 addition & 0 deletions setup-dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@ fi
rm -rf node_modules
# install dependencies
npm install -D
cd ..

0 comments on commit 61177fc

Please sign in to comment.