Browse files

-

  • Loading branch information...
1 parent 8060818 commit 596ca9f7a47b5de87490975e6982c7bfdec081ae Ram Rachum committed Feb 14, 2011
Showing with 26 additions and 27 deletions.
  1. +2 −0 .gitignore
  2. +24 −27 make_distribution.py
View
2 .gitignore
@@ -16,6 +16,8 @@ garlicsim_wx/*.egg-info
garlicsim_wx/build
win_dist
+deb_dist
+mac_dist
*/docs/_build/*
*/docs/_deployed_build/*
View
51 make_distribution.py
@@ -6,35 +6,24 @@
'''
Script for packaging GarlicSim as a complete program to end users.
-Currently implemented only for Windows.
+Currently implemented only for Windows, using `py2exe`.
-Options:
-
- General:
+The distribution files for Windows will be put in a `win_dist` folder.
- --help
- Show this help screen
+Options:
- Different operating systems:
-
- --win [OR] -w
- Create a Windows distribution.
-
- --mac [OR] -m
- Create a Mac distribution. Not implemented yet.
-
- --deb [OR] -d
- Create a Debian Linux distribution. Not implemented yet.
-
-
- --installer [OR] -i
- After running py2exe, produce an installer using Inno Setup
-
- Windows-only options:
-
- --issc=[PATH]
- Path to `issc.exe`, needed only if (a) making a Windows installer
- and (b) `issc.exe` is in a non-standard location)
+ --help
+ Show this help screen
+
+ --installer [OR] -i
+ After making distribution directory, create installer.
+ On Windows uses Inno Setup.
+
+Windows-only options:
+
+ --issc=[PATH]
+ Path to `issc.exe`, needed only if (a) making a Windows installer
+ and (b) `issc.exe` is in a non-standard location)
'''
@@ -53,7 +42,15 @@
sys.stdout.write(__doc__ + '\n')
exit()
-if os.name != 'nt':
+operating_systems_dict = {
+ 'nt': 'win',
+ 'posix': 'linux',
+ 'darwin': 'mac'
+}
+
+operating_system = operating_systems_dict[os.name]
+
+if operating_system != 'win':
raise Exception('Py2exe may only be used on Windows.')
produce_installer = ('--installer' in sys.argv) or ('-i' in sys.argv)

0 comments on commit 596ca9f

Please sign in to comment.