Revision: 12193
          http://sourceforge.net/p/skim-app/code/12193
Author:   hofman
Date:     2021-03-10 15:34:25 +0000 (Wed, 10 Mar 2021)
Log Message:
-----------
Strip document background icons build by assets compiler that ignores our build 
setting saying it should not do that, they're just wasting space

Modified Paths:
--------------
    trunk/Skim.xcodeproj/project.pbxproj

Modified: trunk/Skim.xcodeproj/project.pbxproj
===================================================================
--- trunk/Skim.xcodeproj/project.pbxproj        2021-03-10 14:11:34 UTC (rev 
12192)
+++ trunk/Skim.xcodeproj/project.pbxproj        2021-03-10 15:34:25 UTC (rev 
12193)
@@ -2215,6 +2215,7 @@
                                CEE1383C0BCEA63F00BF2D3E /* Run Script: 
Genstrings */,
                                CEF60EBB114C4A830074ACC4 /* Run Script: Ibtool 
*/,
                                8D15AC2B0486D014006FF6A4 /* Resources */,
+                               CE89AF5225F91D98004352D1 /* Run Script: Strip 
document background icons */,
                                CEF82CA50C77286200A3AD51 /* Run Script: Build 
Help */,
                                CEF82CAD0C772A4200A3AD51 /* Run Script: Copy 
Help */,
                                8D15AC300486D014006FF6A4 /* Sources */,
@@ -2565,6 +2566,24 @@
                        shellPath = /bin/bash;
                        shellScript = "# app name, also image 
name\nNAME=Skim\n\n# app bundle to 
copy\nSRC_BUNDLE=\"${BUILT_PRODUCTS_DIR}/${NAME}.app\"\n\n# template image in 
source folder\nSRC_IMAGE=\"${SOURCE_ROOT}/${NAME}.dmg\"\n\n# temporary 
image\nDST_IMAGE=\"/tmp/${NAME}.dmg\"\n\n# temporary 
volume\nDST_VOLUME=\"/Volumes/${NAME}\"\n\n# 
version\nVERSION=$(/usr/bin/defaults read \"${SRC_BUNDLE}/Contents/Info\" 
CFBundleShortVersionString)\n\n# distribution 
name\nDIST_NAME=\"${NAME}-${VERSION}\"\n\n# final distribution 
image\nFINAL_IMAGE=\"${HOME}/Desktop/${DIST_NAME}.dmg\"\n\n# see if this file 
already exists and bail\nif [ -f \"${FINAL_IMAGE}\" ]; then\n\techo \"error: 
${FINAL_IMAGE} exists\"\n\texit 1\nfi\n\n# see if a volume is already mounted 
or a\n# previous cp operation was botched\nif [ -e \"${DST_VOLUME}\" ]; 
then\n\techo \"error: ${DST_VOLUME} exists\"\n\techo \"warning: opening 
${DST_VOLUME} in Finder\"\n\t/usr/bin/open ${DST_VOLUME}\n\texit 1\nfi\n\n# 
remove temp image from a previous run\nif [ -f \"${DST_IMAGE}\" ]; then\n\techo 
\"warning: removing ${DST_IMAGE}\"\n\t/bin/rm \"${DST_IMAGE}\"\n\tif [ $? != 0 
]; then\n\t\techo \"error: failed to remove ${DST_IMAGE}\"\n\t\texit 
1\n\tfi\nfi\n\n# stored zipped in svn, so unzip if needed\n# pass o to 
overwrite, or unzip waits for stdin\n# when trying to unpack the resource 
fork/EA\n\nif [ ! -f \"${SRC_IMAGE}\" ]; then\n\techo \"Unzipping disk image 
${SRC_IMAGE}.zip\"\n\t/usr/bin/unzip -uo \"${SRC_IMAGE}.zip\"\n\tif [ $? != 0 
]; then\n\t\techo \"error: failed to unzip ${SRC_IMAGE}.zip\"\n\t\texit 
1\n\tfi\nfi\n\n# copy empty image to /tmp\necho \"Copying disk image 
${SRC_IMAGE} to ${DST_IMAGE}\"\n/bin/cp \"${SRC_IMAGE}\" \"${DST_IMAGE}\"\nif [ 
$? != 0 ]; then\n\techo \"error: failed to copy ${SRC_IMAGE} to 
${DST_IMAGE}\"\n\texit 1\nfi\n\n# mount image\necho \"Mounting disk image 
${DST_IMAGE}\"\n/usr/bin/hdiutil attach -nobrowse -noautoopen 
\"${DST_IMAGE}\"\nif [ $? != 0 ]; then\n\techo \"error: failed to mount 
${DST_IMAGE}\"\n\texit 1\nfi\n\n# use cp to copy all files\necho \"Copying 
build product from ${SRC_BUNDLE} to ${DST_VOLUME}\"\n/bin/cp -R 
\"${SRC_BUNDLE}\" \"${DST_VOLUME}\"\nif [ $? != 0 ]; then\n\techo \"error: 
failed to copy ${SRC_BUNDLE}\"\n\texit 1\nfi\n\n# tell finder to set the icon 
position\necho \"Moving build product in disk image\"\n/usr/bin/osascript -e 
\"tell application \\\"Finder\\\" to set the position of application file 
\\\"${NAME}.app\\\" of disk named \\\"${NAME}\\\" to {90, 206}\"\nif [ $? != 0 
]; then\n\techo \"error: Finder failed to set position\"\n\texit 1\nfi\n\n# 
data is copied, so unmount the volume, we may need to wait when the volume is 
in use\necho \"Ejecting disk image 
${DST_VOLUME}\"\nN_TRIES=0\n/usr/sbin/diskutil eject \"${DST_VOLUME}\"\nwhile [ 
$? != 0 ]; do\n\tif [ $((++N_TRIES)) -gt 12 ]; then\n\t\techo \"error: failed 
to eject ${DST_VOLUME}\"\n\t\texit 1\n\telse\n\t\tsleep 
5\n\t\t/usr/sbin/diskutil eject \"${DST_VOLUME}\"\n\tfi\ndone\n\n# resize image 
to fit\necho \"Resizing disk image ${DST_IMAGE}\"\n/usr/bin/hdiutil resize 
-size $(/usr/bin/hdiutil resize \"${DST_IMAGE}\" | cut -f -1 -)b 
\"${DST_IMAGE}\"\nif [ $? != 0 ]; then\n\techo \"error: failed to resize 
${DST_IMAGE}\"\n\texit 1\nfi\n\n# convert image to read only and compress\necho 
\"Converting disk image ${DST_IMAGE} to read only disk image at 
${FINAL_IMAGE}\"\n/usr/bin/hdiutil convert \"${DST_IMAGE}\" -format UDZO 
-imagekey zlib-level=9 -o \"${FINAL_IMAGE}\"\nif [ $? != 0 ]; then\n\techo 
\"error: failed to convert ${DST_IMAGE}\"\n\texit 1\nfi\n\n# set 
internet-enable bit for Safari, even\n# though I dislike internet-enabled 
images...\n#echo \"Internet-enable disk image 
${FINAL_IMAGE}\"\n#/usr/bin/hdiutil internet-enable -YES 
\"${FINAL_IMAGE}\"\n#if [ $? != 0 ]; then\n#\techo \"error: failed to 
internet-enable ${DST_IMAGE}\"\n#\texit 1\n#fi\n\n# remove temp image and 
source image\necho \"Removing temporary disk images ${DST_IMAGE} and 
${SRC_IMAGE}\"\n/bin/rm -f \"${DST_IMAGE}\" \"${SRC_IMAGE}\"\nif [ $? != 0 ]; 
then\n\techo \"warning: failed to remove ${DST_IMAGE} or 
${SRC_IMAGE}\"\nfi\n\n# create the Sparkle appcast\n# see 
http://www.entropy.ch/blog/Developer/2008/09/22/Sparkle-Appcast-Automation-in-Xcode.html\n\necho
 \"Creating appcast for Sparkle...\"\n\nDATE=$(/bin/date +\"%a, %d %b %Y %T 
%z\")\nSIZE=$(/usr/bin/stat -f %z 
\"${FINAL_IMAGE}\")\nVERSION_NUMBER=$(/usr/bin/defaults read 
\"${SRC_BUNDLE}/Contents/Info\" 
CFBundleVersion)\nURL=\"https://sourceforge.net/projects/skim-app/files/${NAME}/${DIST_NAME}/${DIST_NAME}.dmg/download\"\nAPPCAST=\"${HOME}/Desktop/${DIST_NAME}.xml\"\nKEY_NAME=\"${NAME}
 Sparkle Key\"\nSIGNATURE=$(/usr/bin/openssl dgst -sha1 -binary < 
\"${FINAL_IMAGE}\" | /usr/bin/openssl dgst -dss1 -sign <(security 
find-generic-password -g -s \"${KEY_NAME}\" 2>&1 1>/dev/null | perl -pe '($_) = 
/\"(.+)\"/; s/\\\\012/\\n/g') | /usr/bin/openssl enc -base64)\nif [ $? != 0 ]; 
then\n\techo \"warning: failed to generate signature.  You need the private key 
in a secure note named \\\"${KEY_NAME}\\\"\" >&2\nfi\n\n/bin/cat > 
\"${APPCAST}\" << EOF\n<?xml version=\"1.0\" encoding=\"utf-8\"?> \n<rss 
version=\"2.0\" 
xmlns:sparkle=\"http://www.andymatuschak.org/xml-namespaces/sparkle\";  
xmlns:dc=\"http://purl.org/dc/elements/1.1/\";>\n    <channel> \n        
<title>${NAME} Changelog</title>\n        
<link>https://skim-app.sourceforge.io</link>\n        <description>PDF reader 
and note-taker</description>\n        <item>\n            <title>Version 
${VERSION}</title>\n            <description><![CDATA[\n<h1>Version 
${VERSION}</h1>\n\n<h2>New Features</h2>\n<ul>\n<li></li>\n</ul>\n\n<h2>Bugs 
Fixed</h2>\n<ul>\n<li></li>\n</ul>\n\t\t\t]]></description>\n            
<pubDate>${DATE}</pubDate>\n            
<sparkle:minimumSystemVersion>10.10.0</sparkle:minimumSystemVersion>\n          
  <enclosure sparkle:version=\"${VERSION_NUMBER}\" 
sparkle:shortVersionString=\"${VERSION}\" url=\"${URL}\" 
sparkle:dsaSignature=\"${SIGNATURE}\" length=\"${SIZE}\" 
type=\"application/x-apple-diskimage\"/>\n        </item>\n\n    
</channel>\n</rss>\nEOF\n\n# reveal the disk image\necho \"Revealing disk 
image\"\n/usr/bin/open -R \"${FINAL_IMAGE}\"\n\nexit 0\n";
                };
+               CE89AF5225F91D98004352D1 /* Run Script: Strip document 
background icons */ = {
+                       isa = PBXShellScriptBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       inputFileListPaths = (
+                       );
+                       inputPaths = (
+                       );
+                       name = "Run Script: Strip document background icons";
+                       outputFileListPaths = (
+                       );
+                       outputPaths = (
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+                       shellPath = /bin/sh;
+                       shellScript = "// the assets compiler ignores the build 
setting to not include standalone icons\n\necho \"*** stripping document 
background icons ***\"\n\nfind 
\"${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}\" -type file -name 
\"*DocumentBackground.icns\" -delete\n";
+               };
                CEE1383C0BCEA63F00BF2D3E /* Run Script: Genstrings */ = {
                        isa = PBXShellScriptBuildPhase;
                        buildActionMask = 12;

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to