-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #74 from reloxx13/feature/generate_binary
Feature/generate binary for Windows
- Loading branch information
Showing
8 changed files
with
75 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,10 @@ | |
*.log | ||
*.pyc | ||
*.pyo | ||
.idea | ||
|
||
/Release/build/* | ||
/Release/dist/* | ||
|
||
|
||
!empty |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,7 @@ The included final Arduino Sketch binary is v5.9.1, defaulting `WIFI_CONFIG_TOOL | |
### Prerequisites | ||
|
||
**Windows users:** | ||
Skip if you use the sonota.exe file | ||
* Download and install Python v3.5.x: https://www.python.org/downloads/windows/ | ||
(Python v3.5.x is recommended for Windows as the `netifaces` module has prebuilt wheels) | ||
* **All firewalls must be disabled** when running SonOTA | ||
|
@@ -32,11 +33,20 @@ The included final Arduino Sketch binary is v5.9.1, defaulting `WIFI_CONFIG_TOOL | |
|
||
### Running | ||
|
||
Method 1) | ||
After setting up the prerequisites, download the repo (either using `git clone`, or downloading and extracting the .zip file). Then install the Python dependencies by changing into the SonOTA directory and running: | ||
`pip3 install --user -r requirements.txt` | ||
|
||
Once installed, you can run SonOTA (`./sonota.py`, you may need something like `python3 sonota.py` on Windows), and it will prompt you for the various settings it needs, and guide you through what to do for each step. | ||
|
||
Method 2) | ||
Download latest sonota.exe from the releases page | ||
|
||
Run the exe as administrator** | ||
|
||
A Console Windows will popup and it will prompt you for the various settings it needs, and guide you through what to do for each step. | ||
|
||
|
||
**Ensure all firewalls are disabled on all WiFi networks, including FinalStage when connected.** This is the most common reason things to not complete. | ||
|
||
Once complete and Sonoff-Tasmota is installed, you will have an AP called `sonoff-####` (note: this will be up for a minute then down for a minute until configured). | ||
|
@@ -85,6 +95,11 @@ This program is based on research documented here: | |
|
||
The script is fairly well documented (I think) - apart from that above stated links should provide some context of what's been done how and why. Feel free to open issue tickets or contact me directly: [email protected] | ||
|
||
|
||
|
||
### Building own Exe File | ||
just run the built.bat in the Release folder to create your own sonota.exe. You will find the exe in the Release/dist folder. | ||
|
||
# Compatibility | ||
|
||
Please see the [wiki](https://github.com/mirko/SonOTA/wiki) for known working configurations. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
pyinstaller sonota.spec --clean | ||
pause |
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# -*- mode: python -*- | ||
|
||
block_cipher = None | ||
|
||
added_files = [ | ||
('..\static','static'), | ||
('..\ssl','ssl') | ||
] | ||
|
||
a = Analysis(['..\\sonota.py'], | ||
pathex=[], | ||
binaries=[], | ||
datas = added_files, | ||
hiddenimports=[], | ||
hookspath=[], | ||
runtime_hooks=[], | ||
excludes=[], | ||
win_no_prefer_redirects=False, | ||
win_private_assemblies=False, | ||
cipher=block_cipher) | ||
pyz = PYZ(a.pure, a.zipped_data, | ||
cipher=block_cipher) | ||
exe = EXE(pyz, | ||
a.scripts, | ||
a.binaries, | ||
a.zipfiles, | ||
a.datas, | ||
name='sonota', | ||
debug=True, | ||
strip=False, | ||
upx=True, | ||
console=True, | ||
uac_admin=False, | ||
icon='..\\res\\wifi.ico' ) | ||
|
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters