Mercurial > skaapsteker
annotate scripts/wine-py2exe @ 634:20d6aef11249 default tip
Fix iCCC profiles in PNGs to avoid verbose warnings from libpng.
author | Simon Cross <hodgestar@gmail.com> |
---|---|
date | Fri, 27 Jan 2023 23:32:07 +0100 |
parents | 303087bcf1fa |
children |
rev | line source |
---|---|
570 | 1 #!/bin/sh |
2 # wine-py2exe | |
3 # | |
4 # Usage: wine-py2exe | |
5 | |
581
779c29924a8a
Make wine py2exe builder work.
Simon Cross <hodgestar@gmail.com>
parents:
577
diff
changeset
|
6 NT_VERSION=`sed -nre 's/VERSION_STR = "(.*)"/\1/p' setup.py` |
779c29924a8a
Make wine py2exe builder work.
Simon Cross <hodgestar@gmail.com>
parents:
577
diff
changeset
|
7 BUILD_FOLDER="nine-tales-${NT_VERSION}" |
570 | 8 ZIP_NAME="${BUILD_FOLDER}.zip" |
9 PY2EXE_LOG="py2exe.log" | |
10 | |
581
779c29924a8a
Make wine py2exe builder work.
Simon Cross <hodgestar@gmail.com>
parents:
577
diff
changeset
|
11 WINE_PYTHON=`winepath "C:/Python26"` |
570 | 12 WINE_SYS32=`winepath "C:/windows/system32"` |
13 | |
14 # | |
15 # Run py2exe build under wine | |
16 # | |
17 | |
18 echo "=== Running wine python setup.py ===" | |
19 echo "" | |
581
779c29924a8a
Make wine py2exe builder work.
Simon Cross <hodgestar@gmail.com>
parents:
577
diff
changeset
|
20 echo " Nine Tales version: ${NT_VERSION}" |
570 | 21 echo " Writing log to ${PY2EXE_LOG}." |
22 echo " ---" | |
23 echo " Please make sure you have patched your py2exe run.exe" | |
24 echo " and run_w.exe with PETools (they need to have their" | |
25 echo " executable size correctly set)." | |
26 echo "" | |
27 | |
28 rm -rf "dist/${BUILD_FOLDER}" | |
29 mkdir -p "dist/${BUILD_FOLDER}" | |
30 rm -rf "dist/${ZIP_NAME}" | |
31 | |
32 wine python setup.py py2exe >${PY2EXE_LOG} 2>&1 | |
33 | |
34 # | |
35 # Copy dependencies py2exe missed | |
36 # | |
37 | |
38 echo "=== Copying dependencies that py2exe missed ===" | |
39 echo "" | |
40 | |
41 DEST="dist/${BUILD_FOLDER}" | |
42 | |
581
779c29924a8a
Make wine py2exe builder work.
Simon Cross <hodgestar@gmail.com>
parents:
577
diff
changeset
|
43 cp -v "${WINE_SYS32}/python26.dll" "${DEST}" |
613
303087bcf1fa
Note that this copies in the Wine placeholder DLL and add a TODO for including the walkthrough.
Simon Cross <hodgestar@gmail.com>
parents:
581
diff
changeset
|
44 # TODO: the line below copies in the Wine placeholder DLL (oddly this doesn't appear to break anything) |
581
779c29924a8a
Make wine py2exe builder work.
Simon Cross <hodgestar@gmail.com>
parents:
577
diff
changeset
|
45 cp -v "${WINE_SYS32}/msvcr80.dll" "${DEST}" |
570 | 46 |
581
779c29924a8a
Make wine py2exe builder work.
Simon Cross <hodgestar@gmail.com>
parents:
577
diff
changeset
|
47 echo "'data' -> '${DEST}/data'" |
779c29924a8a
Make wine py2exe builder work.
Simon Cross <hodgestar@gmail.com>
parents:
577
diff
changeset
|
48 hg archive -I "path:data/" "${DEST}" |
570 | 49 |
50 echo "'${WINE_PYTHON}/Lib/site-packages/pygame' -> '${DEST}'" | |
51 rm -rf "${DEST}/pygame" | |
52 cp -R "${WINE_PYTHON}/Lib/site-packages/pygame" "${DEST}" | |
53 rm -rf "${DEST}/pygame/examples" "${DEST}/pygame/tests" "${DEST}/pygame/docs" | |
54 | |
613
303087bcf1fa
Note that this copies in the Wine placeholder DLL and add a TODO for including the walkthrough.
Simon Cross <hodgestar@gmail.com>
parents:
581
diff
changeset
|
55 # TODO: copy in walkthrough |
570 | 56 |
57 echo "" | |
58 | |
59 # | |
60 # create zip file | |
61 # | |
62 | |
63 echo "=== Creating zip of patched py2exe dist folder ===" | |
64 echo "" | |
65 echo " Zip file: dist/${ZIP_NAME}" | |
66 echo " Build folder: dist/${BUILD_FOLDER}" | |
67 echo "" | |
68 | |
69 cd dist | |
70 rm -f "$ZIP_NAME" | |
71 zip -r -q "$ZIP_NAME" "$BUILD_FOLDER" | |
72 cd .. | |
73 | |
74 echo "=== Done ===" | |
75 echo "" | |
76 echo -n " "; du -sh dist/${ZIP_NAME} | |
77 echo -n " "; du -sh dist/${BUILD_FOLDER} | |
78 echo "" |