File tree Expand file tree Collapse file tree 5 files changed +16
-7
lines changed
Expand file tree Collapse file tree 5 files changed +16
-7
lines changed Original file line number Diff line number Diff line change @@ -233,6 +233,14 @@ jobs:
233233 pyivf-make_version --outfile "build/version-installer.rc" --version "${{ env.VERSION }}" --file-description "MouseTracks ${{ env.VERSION }}" --internal-name "MouseTracks" --legal-copyright "Peter Hunt" --original-filename "${{ env.FULL_INSTALLER_NAME }}" --product-name "MouseTracks ${{ env.VERSION }}"
234234 deactivate
235235
236+ - name : Write public key
237+ if : runner.os == 'Windows'
238+ shell : bash
239+ run : |
240+ source .venv/Scripts/activate
241+ python launch.py --write-public-key
242+ deactivate
243+
236244 - name : Build executable
237245 shell : bash
238246 run : |
@@ -252,7 +260,6 @@ jobs:
252260 run : |
253261 source .venv/Scripts/activate
254262 echo -n "$PRIVATE_SIGNING_KEY" > keys/private.key
255- python launch.py --dump-public-key
256263 python launch.py --sign-executable "dist/MouseTracks.exe"
257264 python launch.py --sign-executable "dist/${FULL_EXE_NAME}"
258265 rm keys/private.key
Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ if errorlevel 1 (
7575)
7676
7777:: Sign the executables
78- python launch.py --dump -public-key
78+ python launch.py --write -public-key
7979python launch.py --sign-executable " dist/MouseTracks.exe"
8080python launch.py --sign-executable " dist/MouseTracks-%VERSION% -windows-x64.exe"
8181
Original file line number Diff line number Diff line change @@ -35,11 +35,13 @@ mkdir build
3535pyivf-make_version --outfile " build/version.rc" --version %VERSION% --file-description " MouseTracks %VERSION% " --internal-name " MouseTracks" --original-filename " MouseTracks-%VERSION% -windows-x64.exe" --product-name " MouseTracks %VERSION% " --legal-copyright " Peter Hunt" --company-name " Peter Hunt"
3636pyivf-make_version --outfile " build/version-installer.rc" --version %VERSION% --file-description " MouseTracks %VERSION% " --internal-name " MouseTracks" --original-filename " MouseTracks.exe" --product-name " MouseTracks %VERSION% " --legal-copyright " Peter Hunt" --company-name " Peter Hunt"
3737
38- :: Build the executable
38+ :: Write out the public key
39+ python launch.py --write-public-key
40+
41+ :: Build the executable and launcher
3942pyinstaller MouseTracks.spec
4043
4144:: Sign the executables
42- python launch.py --dump-public-key
4345python launch.py --sign-executable " dist/MouseTracks.exe"
4446python launch.py --sign-executable " dist/MouseTracks-%VERSION% -windows-x64.exe"
4547
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ def parse_args(strict: bool = False) -> argparse.Namespace:
5555 privacy_group .add_argument ('--no-network' , action = 'store_true' , help = 'disable network tracking' )
5656
5757 parser .add_argument ('--generate-keys' , action = 'store_true' , help = argparse .SUPPRESS )
58- parser .add_argument ('--dump -public-key' , action = 'store_true' , help = argparse .SUPPRESS )
58+ parser .add_argument ('--write -public-key' , action = 'store_true' , help = argparse .SUPPRESS )
5959 parser .add_argument ('--show-public-key' , action = 'store_true' , help = argparse .SUPPRESS )
6060 parser .add_argument ('--sign-executable' , metavar = 'PATH' , help = argparse .SUPPRESS )
6161 parser .add_argument ('--verify-executable' , metavar = 'PATH' , help = argparse .SUPPRESS )
@@ -342,7 +342,7 @@ def run_cli_function() -> bool:
342342 from .sign import generate_keys
343343 generate_keys ()
344344
345- case argparse .Namespace (dump_public_key = True ) if sys .platform == 'win32' :
345+ case argparse .Namespace (write_public_key = True ) if sys .platform == 'win32' :
346346 from .sign import write_public_key_to_py
347347 write_public_key_to_py ()
348348
Original file line number Diff line number Diff line change 2222
2323PRIVATE_KEY_PATH = KEY_PATH / 'private.key'
2424
25- PYTHON_KEY_PATH = Path ('.' ).parent / '_sign.py'
25+ PYTHON_KEY_PATH = Path (__file__ ).parent / '_sign.py'
2626
2727PUBLIC_KEY_SIZE = 32
2828
You can’t perform that action at this time.
0 commit comments