| 
									
										
										
										
											2013-02-16 23:46:17 +01:00
										 |  |  | #!/bin/sh
 | 
					
						
							| 
									
										
										
										
											2012-10-21 13:38:19 -07:00
										 |  |  | # | 
					
						
							|  |  |  | # this simply automates the steps to create a DMG we can ship | 
					
						
							| 
									
										
										
										
											2013-02-15 01:17:27 -08:00
										 |  |  | # | 
					
						
							| 
									
										
										
										
											2012-10-21 13:38:19 -07:00
										 |  |  | # for this to work you need to have a custom build of MacPorts / gtk / etc | 
					
						
							|  |  |  | # with prefix=/Applications/Subsurface.app/Contents/Resources | 
					
						
							|  |  |  | # yes, that's a major hack, but otherwise gettext cannot seem to find | 
					
						
							|  |  |  | # the gtk related .mo files and localization is only partial | 
					
						
							|  |  |  | # | 
					
						
							| 
									
										
										
										
											2013-02-15 01:17:27 -08:00
										 |  |  | # run this from the top subsurface directory | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # install location of yourway-create-dmg | 
					
						
							| 
									
										
										
										
											2013-02-17 00:09:28 +01:00
										 |  |  | DMGCREATE=../yoursway-create-dmg/create-dmg | 
					
						
							| 
									
										
										
										
											2013-02-15 01:17:27 -08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-02-15 22:28:31 -08:00
										 |  |  | # same git version magic as in the Makefile | 
					
						
							| 
									
										
										
										
											2013-02-20 22:45:11 -08:00
										 |  |  | # for the naming of volume and dmg we don't need the "always 3 digits" | 
					
						
							|  |  |  | # darwin version - the 'regular' version that has 2 digits for releases | 
					
						
							|  |  |  | # is better | 
					
						
							| 
									
										
										
										
											2015-04-04 16:31:16 -07:00
										 |  |  | VERSION=$(cd ../subsurface; ./scripts/get-version linux) | 
					
						
							| 
									
										
										
										
											2012-10-21 13:38:19 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-02-15 22:28:31 -08:00
										 |  |  | 
 | 
					
						
							|  |  |  | # first build and install Subsurface and then clean up the staging area | 
					
						
							| 
									
										
										
										
											2015-01-02 15:49:08 -08:00
										 |  |  | rm -rf ./Subsurface.app | 
					
						
							|  |  |  | make -j8 | 
					
						
							| 
									
										
										
										
											2015-04-04 16:31:16 -07:00
										 |  |  | make install | 
					
						
							| 
									
										
										
										
											2015-01-02 15:49:08 -08:00
										 |  |  | install_name_tool -change /Users/hohndel/src/marble/install/libssrfmarblewidget.0.19.2.dylib @executable_path/../Frameworks/libssrfmarblewidget.0.19.2.dylib Subsurface.app/Contents/MacOS/Subsurface | 
					
						
							| 
									
										
										
										
											2015-04-04 16:31:16 -07:00
										 |  |  | install_name_tool -change /Users/hohndel/src/libgit2/build/libgit2.22.dylib @executable_path/../Frameworks/libgit2.22.dylib Subsurface.app/Contents/MacOS/Subsurface | 
					
						
							| 
									
										
										
										
											2013-02-15 01:17:27 -08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-12-15 11:19:01 -08:00
										 |  |  | # copy things into staging so we can create a nice DMG | 
					
						
							|  |  |  | rm -rf ./staging | 
					
						
							|  |  |  | mkdir ./staging | 
					
						
							|  |  |  | cp -a ./Subsurface.app ./staging | 
					
						
							| 
									
										
										
										
											2013-02-15 01:17:27 -08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-04-04 16:31:16 -07:00
										 |  |  | sh ../subsurface/packaging/macosx/sign | 
					
						
							| 
									
										
										
										
											2013-02-15 01:17:27 -08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-02-17 00:12:04 +01:00
										 |  |  | if [ -f ./Subsurface-$VERSION.dmg ]; then | 
					
						
							|  |  |  | 	rm ./Subsurface-$VERSION.dmg.bak | 
					
						
							|  |  |  | 	mv ./Subsurface-$VERSION.dmg ./Subsurface-$VERSION.dmg.bak | 
					
						
							| 
									
										
										
										
											2012-10-21 13:38:19 -07:00
										 |  |  | fi | 
					
						
							| 
									
										
										
										
											2013-02-15 01:17:27 -08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-04-04 16:31:16 -07:00
										 |  |  | $DMGCREATE --background ../subsurface/packaging/macosx/DMG-Background.png \
 | 
					
						
							| 
									
										
										
										
											2013-02-17 00:12:04 +01:00
										 |  |  | 	--window-size 500 300 --icon-size 96 --volname Subsurface-$VERSION \
 | 
					
						
							| 
									
										
										
										
											2013-02-15 01:17:27 -08:00
										 |  |  | 	--app-drop-link 380 205 \
 | 
					
						
							| 
									
										
										
										
											2015-04-04 16:31:16 -07:00
										 |  |  | 	--volicon ../subsurface/packaging/macosx/Subsurface.icns \
 | 
					
						
							| 
									
										
										
										
											2013-02-17 00:12:04 +01:00
										 |  |  | 	--icon "Subsurface" 110 205 ./Subsurface-$VERSION.dmg ./staging |