Mercurial > pyntnclick
annotate scripts/wine-py2exe @ 531:60c345d19daf
PEP-8 cleanup of skellington bits in root
author | Stefano Rivera <stefano@rivera.za.net> |
---|---|
date | Sat, 11 Feb 2012 12:00:19 +0200 |
parents | f98e1b326250 |
children | 096a568d98aa |
rev | line source |
---|---|
186 | 1 #!/bin/sh |
2 # wine-py2exe | |
3 # Copyright Simon Cross, Neil Muller, 2009 (see COPYING File) | |
4 # | |
5 # Usage: wine-py2exe | |
6 | |
7 OFA_VERSION=`PYTHONPATH=. python -c "from gamelib import version; print version.VERSION_STR"` | |
8 BUILD_FOLDER="suspended-sentence-${OFA_VERSION}" | |
9 ZIP_NAME="${BUILD_FOLDER}.zip" | |
10 PY2EXE_LOG="py2exe.log" | |
11 | |
12 WINE_PYTHON=`winepath "C:/Python25"` | |
13 WINE_SYS32=`winepath "C:/windows/system32"` | |
14 | |
15 # | |
16 # Run py2exe build under wine | |
17 # | |
18 | |
19 echo "=== Running wine python setup.py ===" | |
20 echo "" | |
21 echo " Suspended Sentence version: ${OFA_VERSION}" | |
22 echo " Writing log to ${PY2EXE_LOG}." | |
23 echo " ---" | |
24 echo " Please make sure you have patched your py2exe run.exe" | |
25 echo " and run_w.exe with PETools (they need to have their" | |
26 echo " executable size correctly set)." | |
27 echo "" | |
28 | |
29 rm -rf "dist/${BUILD_FOLDER}" | |
30 mkdir -p "dist/${BUILD_FOLDER}" | |
31 rm -rf "dist/${ZIP_NAME}" | |
32 | |
33 wine python setup.py py2exe >${PY2EXE_LOG} 2>&1 | |
34 | |
35 # | |
36 # Copy dependencies py2exe missed | |
37 # | |
38 | |
39 echo "=== Copying dependencies that py2exe missed ===" | |
40 echo "" | |
41 | |
42 DEST="dist/${BUILD_FOLDER}" | |
43 | |
44 cp -v "${WINE_SYS32}/python25.dll" "${DEST}" | |
45 cp -v "${WINE_SYS32}/msvcr71.dll" "${DEST}" | |
46 | |
47 #echo "'${WINE_PYTHON}/share/pgu/themes/default' -> '${DEST}/share/pgu/themes/'" | |
48 #mkdir -p "${DEST}/share/pgu/themes" | |
49 #cp -R "${WINE_PYTHON}/share/pgu/themes/default" "${DEST}/share/pgu/themes/" | |
50 | |
51 echo "'Resources' -> '${DEST}/Resources'" | |
52 bzr export -q "${DEST}/Resources" "Resources" | |
53 #find "${DEST}/data" -name '*.svg' -delete | |
54 | |
55 echo "'${WINE_PYTHON}/Lib/site-packages/pygame' -> '${DEST}'" | |
56 rm -rf "${DEST}/pygame" | |
57 cp -R "${WINE_PYTHON}/Lib/site-packages/pygame" "${DEST}" | |
58 rm -rf "${DEST}/pygame/examples" "${DEST}/pygame/tests" "${DEST}/pygame/docs" | |
59 | |
470
f98e1b326250
Add walkthrough to windows bundle.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
186
diff
changeset
|
60 echo "'docs/walkthrough.rst' -> '${DEST}/Resources'" |
f98e1b326250
Add walkthrough to windows bundle.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
186
diff
changeset
|
61 rm -f "${DEST}/walkthrough.rst" |
f98e1b326250
Add walkthrough to windows bundle.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
186
diff
changeset
|
62 cp "docs/walkthrough.rst" "${DEST}/walkthrough.rst" |
f98e1b326250
Add walkthrough to windows bundle.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
186
diff
changeset
|
63 |
186 | 64 echo "" |
65 | |
66 # | |
67 # create zip file | |
68 # | |
69 | |
70 echo "=== Creating zip of patched py2exe dist folder ===" | |
71 echo "" | |
72 echo " Zip file: dist/${ZIP_NAME}" | |
73 echo " Build folder: dist/${BUILD_FOLDER}" | |
74 echo "" | |
75 | |
76 cd dist | |
77 rm -f "$ZIP_NAME" | |
78 zip -r -q "$ZIP_NAME" "$BUILD_FOLDER" | |
79 cd .. | |
80 | |
81 echo "=== Done ===" | |
82 echo "" | |
83 echo -n " "; du -sh dist/${ZIP_NAME} | |
84 echo -n " "; du -sh dist/${BUILD_FOLDER} | |
85 echo "" |