|
Revision 694:ee364596c341, 432 bytes
(checked in by Kirk McDonald <kirklin.mcdonald@…>, 2 years ago)
|
|
Win32 postinstallation script. (Adds shortcut to examples to desktop.)
|
| Line | |
|---|
| 1 | import os, os.path |
|---|
| 2 | import sys |
|---|
| 3 | import distutils.sysconfig as sysconfig |
|---|
| 4 | |
|---|
| 5 | desktop = get_special_folder_path("CSIDL_DESKTOPDIRECTORY") |
|---|
| 6 | shortcut = os.path.join(desktop, 'PySoy Examples.lnk') |
|---|
| 7 | examples = os.path.join(sysconfig.get_python_lib(True), 'soy', 'examples') |
|---|
| 8 | |
|---|
| 9 | if sys.argv[1] == '-install': |
|---|
| 10 | create_shortcut(examples, "PySoy Examples", shortcut) |
|---|
| 11 | else: |
|---|
| 12 | if os.path.exists(shortcut): |
|---|
| 13 | os.remove(shortcut) |
|---|
| 14 | |
|---|