# HG changeset patch # User Simon Cross # Date 1252177833 0 # Node ID e2e8d268683226934b15a445e70f195375adba03 # Parent ae5989b3ce0137baf3969c5a7a1f8eb67c839fbe Remove dependence on py2exe template. diff -r ae5989b3ce01 -r e2e8d2686832 wine-py2exe --- a/wine-py2exe Sat Sep 05 18:56:59 2009 +0000 +++ b/wine-py2exe Sat Sep 05 19:10:33 2009 +0000 @@ -7,19 +7,17 @@ OFA_VERSION=`PYTHONPATH=. python -c "from gamelib import version; print version.VERSION_STR"` BUILD_FOLDER="foxassault-${OFA_VERSION}" ZIP_NAME="${BUILD_FOLDER}.zip" -TEMPLATE_FOLDER="$1" PY2EXE_LOG="py2exe.log" -WINE_PYTHON=`winepath "C:/Python25"` -if [ "x$TEMPLATE_FOLDER" = "x" ] ; then - TEMPLATE_FOLDER="py2exe-template" -fi +WINE_PYTHON=`winepath "C:/Python25"` +WINE_SYS32=`winepath "C:/windows/system32"` # # Run py2exe build under wine # echo "=== Running wine python setup.py ===" +echo "" echo " Fox Assault version: ${OFA_VERSION}" echo " Writing log to ${PY2EXE_LOG}." echo " ---" @@ -33,33 +31,28 @@ wine python setup.py py2exe >${PY2EXE_LOG} 2>&1 # -# Copy in GTK dependencies py2exe missed -# One should be able to obtain /etc, /lib -# and /share by installing GTK in a Windows machine -# and copying them into the template folder. -# Copy python dll that py2exe misses -# Copy sqlite dll that py2exe misses -# One should be able to obtain python25.dll and -# sqlite3.dll from a Windows Python 2.5 installation. +# Copy dependencies py2exe missed +# echo "=== Copying dependencies that py2exe missed ===" -echo " Using template folder ${TEMPLATE_FOLDER}." echo "" DEST="dist/${BUILD_FOLDER}" -cp -v "${WINE_PYTHON}/Lib/site-packages/pygame"/*.dll "${DEST}" -cp -v "${TEMPLATE_FOLDER}/python25.dll" "${DEST}" -cp -v "${TEMPLATE_FOLDER}/msvcr71.dll" "${DEST}" +cp -v "${WINE_SYS32}/python25.dll" "${DEST}" +cp -v "${WINE_SYS32}/msvcr71.dll" "${DEST}" + +echo "'${WINE_PYTHON}/share/pgu/themes/default' -> '${DEST}/share/pgu/themes/'" mkdir -p "${DEST}/share/pgu/themes" -echo "'${WINE_PYTHON}/share/pgu/themes/default' -> '${DEST}/share/pgu/themes/'" cp -R "${WINE_PYTHON}/share/pgu/themes/default" "${DEST}/share/pgu/themes/" + echo "'data' -> '${DEST}/data'" svn export -q "data" "${DEST}/data" echo "'${WINE_PYTHON}/Lib/site-packages/pygame' -> '${DEST}'" rm -rf "${DEST}/pygame" cp -R "${WINE_PYTHON}/Lib/site-packages/pygame" "${DEST}" +rm -rf "${DEST}/pygame/examples" "${DEST}/pygame/tests" "${DEST}/pygame/docs" echo "" @@ -68,6 +61,7 @@ # echo "=== Creating zip of patched py2exe dist folder ===" +echo "" echo " Zip file: dist/${ZIP_NAME}" echo " Build folder: dist/${BUILD_FOLDER}" echo "" @@ -75,6 +69,8 @@ cd dist rm -f "$ZIP_NAME" zip -r -q "$ZIP_NAME" "$BUILD_FOLDER" -rm -rf "~/.VirtualBox/shared/$BUILD_FOLDER" -cp -R "$BUILD_FOLDER" ~/.VirtualBox/shared/ cd .. + +echo "=== Done ===" +echo "" +echo " " `ls -sh dist/*.zip`