More DMG speed improvements.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9026 4a71c877-e1ca-e34f-864e-861f7616d084master
parent
996309fd29
commit
7951c86277
|
@ -3680,7 +3680,7 @@
|
|||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/bash;
|
||||
shellScript = "# Config\nsimgfl=\"http://downloads.sourceforge.net/project/warzone2100/build-tools/wztemplate.sparseimage\"\nsimgflnme=\"wztemplate.sparseimage\"\nsequence=\"http://www.il.fontys.nl/~giel/warzone/videos/latest/en/hi/sequences.wz\"\nsequencenme=\"sequences.wz\"\nsequencelo=\"http://www.il.fontys.nl/~giel/warzone/videos/latest/en/lo/sequences.wz\"\nsequencelonme=\"sequences-lo.wz\"\nrelbuild=\"build/Release/Warzone.app\"\ndmgout=\"build/dmgout\"\n\n# Fail if not release\nif [ ! -d \"$relbuild\" ]; then\n echo \"This should only be run as Release\"\n exit 1\nfi\n\n# Make a dir and get the sparseimage\nmkdir -p \"$dmgout\"\ncd \"$dmgout\"\nif [ ! -f \"$simgflnme\" ]; then\n echo \"Fetching $simgfl\"\n if ! curl -L -O --connect-timeout \"30\" \"$simgfl\"; then\n echo \"Unable to fetch $simgfl\"\n exit 1\n fi\nelse\n echo \"$simgflnme already exists, skipping\"\nfi\n\n# Get the sequences\n\n# Comment out the following to skip the high qual seq\n# if [ ! -f \"$sequencenme\" ]; then\n# echo \"Fetching $sequencenme\"\n# if ! curl -L -O --connect-timeout \"30\" \"$sequence\"; then\n# echo \"Unable to fetch $sequence\"\n# exit 1\n# fi\n# else\n# echo \"$sequencenme already exists, skipping\"\n# fi\n# \n\n# Comment out the following to skip the low qual seq\nif [ ! -f \"$sequencelonme\" ]; then\n echo \"Fetching $sequencelonme\"\n if [ -f ~/Library/Application Support/Warzone\\ 2100\\ Trunk/sequences-lq.wz ]; then\n cp ~/Library/Application Support/Warzone\\ 2100\\ Trunk/sequences-lq.wz \"$sequencelonme\"\n else\n if ! curl -L --connect-timeout \"30\" -o \"$sequencelonme\" \"$sequencelo\"; then\n echo \"Unable to fetch $sequencelo\"\n exit 1\n fi\n fi\nelse\n echo \"$sequencelonme already exists, skipping\"\nfi\n# \n\n# Copy over the app\ncd ../../\necho \"Copying the app cleanly.\"\nrm -r -f $dmgout/Warzone.app\nif ! tar -c --exclude .svn --exclude 'Makefile*' --exclude 'makefile*' -C build/Release Warzone.app | tar -xC $dmgout; then\n echo \"Unable to copy the app\"\n exit 1\nfi\ncd \"$dmgout\"\n\n# mkredist.bash\n\ncd Warzone.app/Contents/Resources/data/\n\necho \"== Compressing base.zip ==\"\nif [ -d base/ ]\nthen\n cd base/\n zip -r ../base.wz *\n cd ..\n rm -rf base/\nfi\n\necho \"== Compressing mp.zip ==\"\nif [ -d mp/ ]\nthen\n cd mp/\n zip -r ../mp.wz *\n cd ..\n rm -rf mp/\nfi\n\ncd ../../../../\n\nrm -r -f ./out ./temp\nmkdir temp/\nmkdir out/\n\necho \"== Creating DMG ==\"\ncp wztemplate.sparseimage temp/wztemplatecopy.sparseimage\nhdiutil resize -size 150m temp/wztemplatecopy.sparseimage\nmountpt=`hdiutil mount temp/wztemplatecopy.sparseimage | tr -d \"\\t\" | sed -E 's:(/dev/disk[0-9])( +)(/Volumes/Warzone 2100):\\1:'`\ncp -r Warzone.app/* /Volumes/Warzone\\ 2100/Warzone.app\n# hdiutil detach `expr match \"$mountpt\" '\\(^[^ ]*\\)'`\nhdiutil detach \"$mountpt\"\nhdiutil convert temp/wztemplatecopy.sparseimage -format UDZO -o out/warzone2100-novideo.dmg\n\nif [ -f \"$sequencelonme\" ]; then\n echo \"== Creating LQ DMG ==\"\n hdiutil resize -size 350m temp/wztemplatecopy.sparseimage\n mountpt=`hdiutil mount temp/wztemplatecopy.sparseimage | tr -d \"\\t\" | sed -E 's:(/dev/disk[0-9])( +)(/Volumes/Warzone 2100):\\1:'`\n cp sequences-lo.wz /Volumes/Warzone\\ 2100/Warzone.app/Contents/Resources/data/sequences.wz\n # hdiutil detach `expr match \"$mountpt\" '\\(^[^ ]*\\)'`\n hdiutil detach \"$mountpt\"\n hdiutil convert temp/wztemplatecopy.sparseimage -format UDZO -o out/warzone2100-lqvideo.dmg\nelse\n echo \"$sequencelonme does not exist, skipping\"\nfi\n\n\nif [ -f \"$sequencenme\" ]; then\n echo \"== Creating HQ DMG ==\"\n hdiutil resize -size 700m temp/wztemplatecopy.sparseimage\n mountpt=`hdiutil mount temp/wztemplatecopy.sparseimage | tr -d \"\\t\" | sed -E 's:(/dev/disk[0-9])( +)(/Volumes/Warzone 2100):\\1:'`\n rm /Volumes/Warzone\\ 2100/Warzone.app/Contents/Resources/data/sequences.wz\n cp sequences.wz /Volumes/Warzone\\ 2100/Warzone.app/Contents/Resources/data/sequences.wz\n hdiutil detach \"$mountpt\"\n hdiutil converttemp/wztemplatecopy.sparseimage -format UDZO -o out/warzone2100-hqvideo.dmg\nelse\n echo \"$sequencenme does not exist, skipping\"\nfi\n\necho \"== Cleaning up ==\"\nrm -f temp/wztemplatecopy.sparseimage\nrmdir temp/\n\n# Open the dir\nopen \"out\"\n\nexit 0";
|
||||
shellScript = "# Config\nsimgfl=\"http://downloads.sourceforge.net/project/warzone2100/build-tools/wztemplate.sparseimage\"\nsimgflnme=\"wztemplate.sparseimage\"\nsequence=\"http://www.il.fontys.nl/~giel/warzone/videos/latest/en/hi/sequences.wz\"\nsequencenme=\"sequences.wz\"\nsequencelo=\"http://www.il.fontys.nl/~giel/warzone/videos/latest/en/lo/sequences.wz\"\nsequencelonme=\"sequences-lo.wz\"\nrelbuild=\"build/Release/Warzone.app\"\ndmgout=\"build/dmgout\"\n\n# Fail if not release\nif [ ! -d \"$relbuild\" ]; then\n echo \"This should only be run as Release\"\n exit 1\nfi\n\n# Make a dir and get the sparseimage\nmkdir -p \"$dmgout\"\ncd \"$dmgout\"\nif [ ! -f \"$simgflnme\" ]; then\n echo \"Fetching $simgfl\"\n if ! curl -L -O --connect-timeout \"30\" \"$simgfl\"; then\n echo \"Unable to fetch $simgfl\"\n exit 1\n fi\nelse\n echo \"$simgflnme already exists, skipping\"\nfi\n\n# Get the sequences\n\n# Comment out the following to skip the high qual seq\n# if [ ! -f \"$sequencenme\" ]; then\n# echo \"Fetching $sequencenme\"\n# if ! curl -L -O --connect-timeout \"30\" \"$sequence\"; then\n# echo \"Unable to fetch $sequence\"\n# exit 1\n# fi\n# else\n# echo \"$sequencenme already exists, skipping\"\n# fi\n# \n\n# Comment out the following to skip the low qual seq\nif [ ! -f \"$sequencelonme\" ]; then\n echo \"Fetching $sequencelonme\"\n if [ -e ${HOME}/Library/Application Support/Warzone\\ 2100\\ Trunk/sequences-lq.wz ]; then\n cp ~/Library/Application Support/Warzone\\ 2100\\ Trunk/sequences-lq.wz \"$sequencelonme\"\n else\n if ! curl -L --connect-timeout \"30\" -o \"$sequencelonme\" \"$sequencelo\"; then\n echo \"Unable to fetch $sequencelo\"\n exit 1\n fi\n fi\nelse\n echo \"$sequencelonme already exists, skipping\"\nfi\n# \n\n# Copy over the app\ncd ../../\necho \"Copying the app cleanly.\"\nrm -r -f $dmgout/Warzone.app\nif ! tar -c --exclude .svn --exclude 'Makefile*' --exclude 'makefile*' -C build/Release Warzone.app | tar -xC $dmgout; then\n echo \"Unable to copy the app\"\n exit 1\nfi\ncd \"$dmgout\"\n\n# mkredist.bash\n\ncd Warzone.app/Contents/Resources/data/\n\necho \"== Compressing base.zip ==\"\nif [ -d base/ ]\nthen\n cd base/\n zip -r ../base.wz *\n cd ..\n rm -rf base/\nfi\n\necho \"== Compressing mp.zip ==\"\nif [ -d mp/ ]\nthen\n cd mp/\n zip -r ../mp.wz *\n cd ..\n rm -rf mp/\nfi\n\ncd ../../../../\n\nrm -r -f ./out ./temp\nmkdir temp/\nmkdir out/\n\necho \"== Creating DMG ==\"\ncp wztemplate.sparseimage temp/wztemplatecopy.sparseimage\nhdiutil resize -size 150m temp/wztemplatecopy.sparseimage\nmountpt=`hdiutil mount temp/wztemplatecopy.sparseimage | tr -d \"\\t\" | sed -E 's:(/dev/disk[0-9])( +)(/Volumes/Warzone 2100):\\1:'`\ncp -r Warzone.app/* /Volumes/Warzone\\ 2100/Warzone.app\n# hdiutil detach `expr match \"$mountpt\" '\\(^[^ ]*\\)'`\nhdiutil detach \"$mountpt\"\nhdiutil convert temp/wztemplatecopy.sparseimage -format UDZO -o out/warzone2100-novideo.dmg\n\nif [ -f \"$sequencelonme\" ]; then\n echo \"== Creating LQ DMG ==\"\n hdiutil resize -size 350m temp/wztemplatecopy.sparseimage\n mountpt=`hdiutil mount temp/wztemplatecopy.sparseimage | tr -d \"\\t\" | sed -E 's:(/dev/disk[0-9])( +)(/Volumes/Warzone 2100):\\1:'`\n cp sequences-lo.wz /Volumes/Warzone\\ 2100/Warzone.app/Contents/Resources/data/sequences.wz\n # hdiutil detach `expr match \"$mountpt\" '\\(^[^ ]*\\)'`\n hdiutil detach \"$mountpt\"\n hdiutil convert temp/wztemplatecopy.sparseimage -format UDZO -o out/warzone2100-lqvideo.dmg\nelse\n echo \"$sequencelonme does not exist, skipping\"\nfi\n\n\nif [ -f \"$sequencenme\" ]; then\n echo \"== Creating HQ DMG ==\"\n hdiutil resize -size 700m temp/wztemplatecopy.sparseimage\n mountpt=`hdiutil mount temp/wztemplatecopy.sparseimage | tr -d \"\\t\" | sed -E 's:(/dev/disk[0-9])( +)(/Volumes/Warzone 2100):\\1:'`\n rm /Volumes/Warzone\\ 2100/Warzone.app/Contents/Resources/data/sequences.wz\n cp sequences.wz /Volumes/Warzone\\ 2100/Warzone.app/Contents/Resources/data/sequences.wz\n hdiutil detach \"$mountpt\"\n hdiutil converttemp/wztemplatecopy.sparseimage -format UDZO -o out/warzone2100-hqvideo.dmg\nelse\n echo \"$sequencenme does not exist, skipping\"\nfi\n\necho \"== Cleaning up ==\"\nrm -f temp/wztemplatecopy.sparseimage\nrmdir temp/\n\n# Open the dir\nopen \"out\"\n\nexit 0";
|
||||
};
|
||||
9711774C0F87A677000C8A96 /* Fetch source */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
|
|
Loading…
Reference in New Issue