Skip to content

Commit 596ca9f

Browse files
author
Ram Rachum
committed
-
1 parent 8060818 commit 596ca9f

File tree

2 files changed

+26
-27
lines changed

2 files changed

+26
-27
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ garlicsim_wx/*.egg-info
1616
garlicsim_wx/build
1717

1818
win_dist
19+
deb_dist
20+
mac_dist
1921

2022
*/docs/_build/*
2123
*/docs/_deployed_build/*

make_distribution.py

Lines changed: 24 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -6,35 +6,24 @@
66
'''
77
Script for packaging GarlicSim as a complete program to end users.
88
9-
Currently implemented only for Windows.
9+
Currently implemented only for Windows, using `py2exe`.
1010
11-
Options:
12-
13-
General:
11+
The distribution files for Windows will be put in a `win_dist` folder.
1412
15-
--help
16-
Show this help screen
13+
Options:
1714
18-
Different operating systems:
19-
20-
--win [OR] -w
21-
Create a Windows distribution.
22-
23-
--mac [OR] -m
24-
Create a Mac distribution. Not implemented yet.
25-
26-
--deb [OR] -d
27-
Create a Debian Linux distribution. Not implemented yet.
28-
29-
30-
--installer [OR] -i
31-
After running py2exe, produce an installer using Inno Setup
32-
33-
Windows-only options:
34-
35-
--issc=[PATH]
36-
Path to `issc.exe`, needed only if (a) making a Windows installer
37-
and (b) `issc.exe` is in a non-standard location)
15+
--help
16+
Show this help screen
17+
18+
--installer [OR] -i
19+
After making distribution directory, create installer.
20+
On Windows uses Inno Setup.
21+
22+
Windows-only options:
23+
24+
--issc=[PATH]
25+
Path to `issc.exe`, needed only if (a) making a Windows installer
26+
and (b) `issc.exe` is in a non-standard location)
3827
3928
'''
4029

@@ -53,7 +42,15 @@
5342
sys.stdout.write(__doc__ + '\n')
5443
exit()
5544

56-
if os.name != 'nt':
45+
operating_systems_dict = {
46+
'nt': 'win',
47+
'posix': 'linux',
48+
'darwin': 'mac'
49+
}
50+
51+
operating_system = operating_systems_dict[os.name]
52+
53+
if operating_system != 'win':
5754
raise Exception('Py2exe may only be used on Windows.')
5855

5956
produce_installer = ('--installer' in sys.argv) or ('-i' in sys.argv)

0 commit comments

Comments
 (0)