comparison scripts/wine-py2exe @ 854:3577c51029f1 default tip

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