mirror of
https://github.com/cryptoadvance/specter-desktop.git
synced 2026-08-18 13:09:14 +02:00
Prior to this change, Specter desktop had no dock icon on macOS, only a
menu bar icon. This meant that users were forced to navigate with the
cursor to the menu bar icon and select 'Open Specter App' in order to
focus the Specter desktop window, resulting in a confusing and
cumbersome user experience.
The original commit of `specter_desktop.spec` in commit
|
||
|---|---|---|
| .. | ||
| hooks | ||
| icons | ||
| windll | ||
| build-osx.sh | ||
| build-unix.sh | ||
| build-win.bat | ||
| hwibridge.py | ||
| hwibridge.spec | ||
| README.md | ||
| requirements.in | ||
| requirements.txt | ||
| specter-desktop.iss | ||
| specter_desktop.py | ||
| specter_desktop.spec | ||
| specterd.py | ||
| specterd.spec | ||
Build scripts
Run build-<your-os> <version_number> file to build everything.
For example, build-osx.sh 1.2.3 will create SpecterDesktop-1.2.3.dmg and specterd-1.2.3-osx.zip in the release folder.
On Windows release folder is empty, but dist folder contains a specter_desktop folder for inno setup and specterd.exe binary.
Pyinstaller build
cd into this directory (specter-desktop/pyinstaller) and install requirements:
$ pip3 install -r requirements.txt --require-hashes
Now run:
$ pyinstaller specterd.spec
And for HWIBridge, run:
pyinstaller hwibridge.spec
Building Specter launcher (tray app)
Creating a Windows setup file
From Powershell:
- Build
specterdin onedir mode:
pyinstaller specterd_onedir.spec
You should get a specterd directory in the dist folder.
- Copy
specterdfolder fromdistfolder to this directory. - Run
pyinstaller specter_desktop.spec- this should create aspecter_desktopfolder in thedistdirectory. Check that it works by runningdist\specter_desktop\specter_desktop.exe - Create an installer using InnoSetup, select
dist\specter_desktop\specter_desktop.exeas main executable, adddist\specter_desktopfolder to the setup wizard as well.
Creating a DMG for macOS
Note: pyinstaller doesn't fully support python3.8 at the moment, use python3.7.
- Build
specterdin onedir mode:
pyinstaller specterd_onedir.spec
You should get a specterd directory in the dist folder.
- Copy
specterdfolder fromdistfolder to this directory:cp -r dist/specterd/ ./specterd - Now in the terminal, run
pyinstaller specter_desktop.spec(you might need to use sudo). This should create a new Specter and Specter.app files. - The
Specter.appfile is the executable macOS app we will need to package now as a.dmgfor distribution. - Make sure you have
NPMinstalled, and runnpm install --global create-dmg. - Now run
create-dmg 'dist/Specter.app'. This should generate a newSpecter 0.0.0.dmg. - The
.dmgshould now be ready to use! Note: You can rename the.dmgfile to have the proper version (or just saySpecter).
Creating a binary for Linux
- Build
specterdin onedir mode:
pyinstaller specterd_onedir.spec
You should get a specterd directory in the dist folder.
- Copy
specterdfolder fromdistfolder to this directory:cp -r dist/specterd/ ./specterd - Run
pyinstaller specter_desktop.spec. This should create a Specter executable.