Skip to content

Commit fe92a73

Browse files
committed
Continue work toward Windows .msi installer
o Reduce display size to fit in 1152 pixel display o Add Shortcut to installer
1 parent 41a0dbe commit fe92a73

File tree

3 files changed

+57
-20
lines changed

3 files changed

+57
-20
lines changed

GNUmakefile

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ install: dist/slip39-$(VERSION)-py3-none-any.whl FORCE
119119

120120
# Building / Signing / Notarizing and Uploading the macOS App
121121
# o TODO: no signed and notarized package yet accepted for upload by macOS App Store
122+
msi: dist/slip39-$(VERSION)-win64.msi
122123
app: dist/SLIP-39.app
123124
app-packages: app-zip-valid app-dmg-valid app-pkg-valid
124125
app-upload: app-dmg-upload
@@ -138,6 +139,12 @@ app-dmg-upload: dist/SLIP-39-$(VERSION).dmg.upload-package
138139
app-zip-upload: dist/SLIP-39-$(VERSION).zip.upload-package
139140
app-pkg-upload: dist/SLIP-39-$(VERSION).pkg.upload-package
140141

142+
#
143+
# Build the windows .msi installer
144+
#
145+
dist/slip39-$(VERSION)-win64.msi:
146+
$(PY3) setup.py bdist_msi
147+
141148
#
142149
# Build the macOS App, and create and sign the .dmg file
143150
#
@@ -562,7 +569,9 @@ upload: upload-check wheel
562569
python3 -m twine upload --repository pypi dist/slip39-$(VERSION)*
563570

564571
clean:
565-
@rm -rf MANIFEST *.png build dist auto *.egg-info $(shell find . -name '*.pyc' -o -name '__pycache__' )
572+
@rm -rf MANIFEST *.png build dist auto *.egg-info \
573+
$(shell find . -name '__pycache__' ) \
574+
$(shell find . -name '*.pyc' )
566575

567576

568577
# Run only tests with a prefix containing the target string, eg test-blah

setup.py

Lines changed: 42 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,28 +13,52 @@
1313
if sys.platform == 'win32':
1414
base = "Win32GUI"
1515

16-
msi_data = {
17-
"Icon": [
18-
]
19-
}
16+
company_name = "pjkundert"
17+
product_name = "python-slip39"
18+
icon_win = "images/SLIP-39.ico"
19+
20+
shortcut = (
21+
"DesktopShortcut", # Shortcut
22+
"DesktopFolder", # Directory_
23+
"SLIP-39", # Name
24+
"TARGETDIR", # Component_
25+
"[TARGETDIR]SLIP-39.exe", # Target
26+
None, # Arguments
27+
None, # Description
28+
None, # Hotkey
29+
None, # Icon
30+
None, # IconIndex
31+
None, # ShowCmd
32+
"TARGETDIR", # WkDir
33+
)
2034

21-
bdist_msi_options = {
22-
"add_to_path": True,
23-
"data": msi_data,
24-
}
35+
msi_data = dict(
36+
Shortcut = [
37+
shortcut,
38+
],
39+
#Icon = [
40+
# icon_win,
41+
#]
42+
)
2543

26-
build_exe_options = {
27-
"packages": [],
28-
"excludes": [],
29-
"include_msvcr": True
30-
}
44+
bdist_msi_options = dict(
45+
add_to_path = True,
46+
data = msi_data,
47+
initial_target_dir = rf"[ProgramFilesFolder]\{company_name}\{product_name}",
48+
)
49+
50+
build_exe_options = dict(
51+
packages = [],
52+
excludes = [],
53+
include_msvcr = True,
54+
)
3155

3256
executables = [
3357
Executable(
3458
"SLIP-39.py",
3559
copyright = "Copyright (c) 2022 Perry Kundert",
3660
base = base,
37-
icon = "images/SLIP-39.ico",
61+
icon = icon_win,
3862
),
3963
]
4064

@@ -279,5 +303,9 @@
279303
classifiers = classifiers,
280304
python_requires = ">=3.9",
281305
executables = executables,
306+
options = dict(
307+
bdist_msi = bdist_msi_options,
308+
build_exe = build_exe_options,
309+
),
282310
#**extra_options
283311
)

slip39/gui/main.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
enable_events = True,
5454
)
5555

56-
prefix = (20, 1)
56+
prefix = (15, 1)
5757
inputs = (40, 1)
5858
inlong = (128,1) # 512-bit seeds require 128 hex nibbles
5959
shorty = (10, 1)
@@ -88,7 +88,7 @@ def groups_layout(
8888
], key='-GROUP-NUMBER-' )
8989
]
9090
], **F_kwds ),
91-
sg.Frame( 'Group Name; Recovery requires at least...', [
91+
sg.Frame( 'Group Name; To recover, collect at least...', [
9292
[
9393
sg.Column( [
9494
[
@@ -98,7 +98,7 @@ def groups_layout(
9898
], key='-GROUP-NAMES-' )
9999
]
100100
], **F_kwds ),
101-
sg.Frame( '# Needed', [
101+
sg.Frame( '#', [
102102
[
103103
sg.Column( [
104104
[
@@ -108,7 +108,7 @@ def groups_layout(
108108
], key='-GROUP-NEEDS-' )
109109
]
110110
], **F_kwds ),
111-
sg.Frame( 'of # in Group', [
111+
sg.Frame( 'of #', [
112112
[
113113
sg.Column( [
114114
[
@@ -237,7 +237,7 @@ def groups_layout(
237237
[
238238
sg.Column( [
239239
[
240-
sg.Text( "Requires recovery of: ", size=prefix, **T_kwds ),
240+
sg.Text( "Recovery needs: ", size=prefix, **T_kwds ),
241241
sg.Input( f"{group_threshold}", key='-THRESHOLD-', size=tiny, **I_kwds ),
242242
sg.Text( f"of {len(groups)}", key='-RECOVERY-', **T_kwds ),
243243
sg.Button( '+', **B_kwds ),

0 commit comments

Comments
 (0)