X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=OSX%2FMakefile;h=373df6b2ca76922c1d3d0b56949e38d92a96760f;hb=c85f503f5793839a6be4c818332aca4a96927bb2;hp=d8664552cbc383e4acc0a6c53de53240bbc6844e;hpb=aa75c7476aeaa84cf3abc192b376a8b03c325213;p=xscreensaver diff --git a/OSX/Makefile b/OSX/Makefile index d8664552..373df6b2 100644 --- a/OSX/Makefile +++ b/OSX/Makefile @@ -10,9 +10,8 @@ XCODE_APP = /Applications/Xcode.app # XCODE_APP = /Applications/Xcode-5.0.2.app TARGETS = All Savers -ARCH = -arch i386 -arch x86_64 ONLY_ACTIVE_ARCH=NO -CERT = 'Jamie Zawinski' -CERT = 'iPhone Developer: Jamie Zawinski (Y5M82TL69N)' +#ARCH = -arch i386 -arch x86_64 ONLY_ACTIVE_ARCH=NO +CERT = 'Developer ID Installer: Jamie Zawinski (4627ATJELP)' PKGID = org.jwz.xscreensaver THUMBDIR = build/screenshots XCODEBUILD = $(XCODE_APP)/Contents/Developer/usr/bin/xcodebuild @@ -42,7 +41,6 @@ release:: distdepend $(XCODEBUILD) $(ARCH) -target "$(TARGETS)" -configuration Release build release:: check_versions -release:: sign Sparkle.framework: unzip ../archive/Sparkle.framework-2013-12-04.zip @@ -54,7 +52,8 @@ Sparkle.framework: # update-info-plist.pl runs this as needed. # Might be better to do this with curl, since that is installed by default. -URL = https://www.jwz.org/xscreensaver/screenshots/ +BASE = xscreensaver/screenshots/ +URL = https://www.jwz.org/$(BASE) WGET = wget -q -U xscreensaver-build-osx CVT = -thumbnail '200x150^' -gravity center -extent 200x150 \ \( +clone -alpha extract \ @@ -77,16 +76,20 @@ $(THUMBDIR)/%.png: if [ ! -d $(THUMBDIR) ]; then mkdir -p $(THUMBDIR) ; fi ; \ rm -f "$$FILE2" "$$TMP" ; \ set +e ; \ - echo "downloading $$URL..." ; \ - $(WGET) -O"$$TMP" "$$URL" ; \ - if [ ! -s "$$TMP" ]; then \ - echo "downloading $$URL2..." ; \ - $(WGET) -O"$$TMP" "$$URL2" ; \ - fi ; \ - if [ ! -s "$$TMP" ]; then \ - rm -f "$$TMP" ; \ - echo "failed: $$URL" ; \ - exit 1 ; \ + if [ -f "$$HOME/www/$(BASE)/$$FILE1" ]; then \ + cp -p "$$HOME/www/$(BASE)/$$FILE1" "$$TMP" ; \ + else \ + echo "downloading $$URL..." ; \ + $(WGET) -O"$$TMP" "$$URL" ; \ + if [ ! -s "$$TMP" ]; then \ + echo "downloading $$URL2..." ; \ + $(WGET) -O"$$TMP" "$$URL2" ; \ + fi ; \ + if [ ! -s "$$TMP" ]; then \ + rm -f "$$TMP" ; \ + echo "failed: $$URL" ; \ + exit 1 ; \ + fi ; \ fi ; \ rm -f "$$FILE2" ; \ convert jpg:- $(CVT) "$$FILE2" < "$$TMP" ; \ @@ -99,12 +102,6 @@ $(THUMBDIR)/%.png: fi -sign: - @for f in build/Release/*.app/Contents/*/*.saver \ - build/Release/*.{saver,app} ; do \ - codesign --deep -vfs $(CERT) $$f ; \ - done - check_versions: @\ SRC=../utils/version.h ; \ @@ -256,8 +253,9 @@ build/Release/installer.pkg: installer.rtf installer.xml installer.sh installer. \ DIST="installer.xml" ; \ STAGE="build/Release/pkg_stage" ; \ - PKG1="$@" ; \ - PKG2="$$STAGE/contents.pkg" ; \ + FINAL="$@" ; \ + UNSIGNED="$$STAGE/contents.pkg" ; \ + PRODUCT="$$STAGE/product_unsigned.pkg" ; \ SCRIPTS="$$STAGE/scripts" ; \ RES="$$STAGE/resources" ; \ \ @@ -270,14 +268,13 @@ build/Release/installer.pkg: installer.rtf installer.xml installer.sh installer. cp -p installer.rtf "$$RES/welcome.rtf" ; \ \ pkgbuild --identifier "$(PKGID)" --version "$$V" \ - --scripts "$$SCRIPTS" --nopayload "$$PKG2" ; \ - codesign -vfs $(CERT) "$$PKG2" ; \ - codesign -vd "$$PKG2" ; \ + --scripts "$$SCRIPTS" --nopayload "$$UNSIGNED" ; \ \ productbuild --distribution "$$DIST" --resources "$$RES" \ - --package-path "$$STAGE" --version "$$V" "$$PKG1" ; \ - codesign -vfs $(CERT) "$$PKG1" ; \ - codesign -vd "$$PKG1" ; \ + --package-path "$$STAGE" --version "$$V" "$$PRODUCT" ; \ + \ + productsign --sign $(CERT) "$$PRODUCT" "$$FINAL" ; \ + spctl --assess --verbose=4 --type install "$$FINAL" ; \ \ rm -rf "$$STAGE" ; \ @@ -341,19 +338,33 @@ dmg:: cp -p bindist.rtf "$$STAGE/Read Me.rtf" ; \ cp -p build/Release/installer.pkg "$$PKG" ; \ cp -p bindist-DS_Store "$$STAGE/.DS_Store" ; \ - cp -p bindist.webloc "$$STAGE/" ; \ + cp -p bindist*.webloc "$$STAGE/" ; \ cp -p XScreenSaverDMG.icns "$$STAGE/.VolumeIcon.icns" ; \ ${SETFILE} -a C "$$STAGE" ; \ ${SETFILE} -a E "$$STAGE"/*.{rtf,pkg,webloc} ; \ $(SETICON) -d ../../xdaliclock/OSX/daliclockSaver.icns \ "$$DST/DaliClock.saver" ; \ $(SETICON) -d XScreenSaverFolder.icns "$$DST" ; \ - $(SETICON) -d XScreenSaverWebloc.icns "$$STAGE"/*.webloc ; \ + $(SETICON) -d XScreenSaver.icns "$$DST"/*.saver ; \ + $(SETICON) -d SaverRunner.icns "$$DST"/*.app ; \ + $(SETICON) -d XScreenSaverWebloc.icns "$$STAGE"/bindist.webloc ; \ + $(SETICON) -d XScreenSaverAndroidWebloc.icns "$$STAGE"/bindist2.webloc ; \ $(SETICON) -d XScreenSaverPkg.icns "$$STAGE"/*.pkg ; \ - mv "$$STAGE/bindist.webloc" "$$STAGE/Get the iPhone:iPad Version.webloc" ; \ + mv "$$STAGE/bindist.webloc" "$$STAGE/Get the iPhone:iPad Version.webloc" ; \ + mv "$$STAGE/bindist2.webloc" "$$STAGE/Get the Android Version.webloc" ; \ + \ + set +x ; \ + echo "Checking signatures..." ; \ + spctl --assess --type install "$$PKG" ; \ + spctl --assess --type execute "$$SRC/XScreenSaverUpdater.app" ; \ + spctl --assess --type execute "$$DST/"*.app ; \ + spctl --assess --type install "$$DST/"*.saver ; \ + set -x ; \ + \ hdiutil makehybrid -quiet -ov -hfs -hfs-volume-name "$$VOLNAME" \ -hfs-openfolder "$$STAGE" "$$STAGE" -o "$$TMPDMG" ; \ rm -rf "$$STAGE" ; \ + \ hdiutil convert -quiet -ov -format UDBZ -imagekey zlib-level=9 \ "$$TMPDMG" -o "$$DMG" ; \ xattr -w com.apple.quarantine "0000;00000000;;" "$$DMG" ; \