Skip to content

Commit

Permalink
-
Browse files Browse the repository at this point in the history
  • Loading branch information
Ram Rachum committed Feb 14, 2011
1 parent 8060818 commit 596ca9f
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 27 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ garlicsim_wx/*.egg-info
garlicsim_wx/build garlicsim_wx/build


win_dist win_dist
deb_dist
mac_dist


*/docs/_build/* */docs/_build/*
*/docs/_deployed_build/* */docs/_deployed_build/*
Expand Down
51 changes: 24 additions & 27 deletions make_distribution.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -6,35 +6,24 @@
''' '''
Script for packaging GarlicSim as a complete program to end users. Script for packaging GarlicSim as a complete program to end users.
Currently implemented only for Windows. Currently implemented only for Windows, using `py2exe`.
Options: The distribution files for Windows will be put in a `win_dist` folder.
General:
--help Options:
Show this help screen
Different operating systems: --help
Show this help screen
--win [OR] -w
Create a Windows distribution. --installer [OR] -i
After making distribution directory, create installer.
--mac [OR] -m On Windows uses Inno Setup.
Create a Mac distribution. Not implemented yet.
Windows-only options:
--deb [OR] -d
Create a Debian Linux distribution. Not implemented yet. --issc=[PATH]
Path to `issc.exe`, needed only if (a) making a Windows installer
and (b) `issc.exe` is in a non-standard location)
--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)
''' '''


Expand All @@ -53,7 +42,15 @@
sys.stdout.write(__doc__ + '\n') sys.stdout.write(__doc__ + '\n')
exit() 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.') raise Exception('Py2exe may only be used on Windows.')


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

0 comments on commit 596ca9f

Please sign in to comment.