File: mkosxlauncher.in

package info (click to toggle)
gwyddion 2.62-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 51,952 kB
  • sloc: ansic: 398,486; python: 7,877; sh: 5,492; makefile: 4,723; xml: 3,883; cpp: 1,969; pascal: 418; perl: 154; ruby: 130
file content (85 lines) | stat: -rwxr-xr-x 1,947 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#!/bin/sh

app_name=gwyddion
gwyddion_app_dir=${app_name}.app
contents_dir=${gwyddion_app_dir}/Contents
bin_dir=${contents_dir}/MacOS
res_dir=${contents_dir}/Resources

rm -rf ${gwyddion_app_dir}
mkdir ${gwyddion_app_dir}
mkdir ${contents_dir}
mkdir ${bin_dir}
mkdir ${res_dir}

prefix=@prefix@

if [ $# -gt 0 ] ; then
  prefix=$1
fi

LAUNCH=${prefix}/bin/${app_name}

echo "Creating launcher bundle to ${LAUNCH}"

cp pixmaps/${app_name}.icns ${res_dir}/

cat << EOT > ${bin_dir}/${app_name}
#!/bin/sh

${LAUNCH}
EOT

chmod a+x ${bin_dir}/${app_name}

cat << EOT > ${contents_dir}/Info.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>CFBundleDevelopmentRegion</key>
	<string>English</string>
	<key>CFBundleExecutable</key>
	<string>gwyddion</string>
	<key>CFBundleGetInfoString</key>
	<string>gwyddion</string>
	<key>CFBundleIconFile</key>
	<string>gwyddion.icns</string>
	<key>CFBundleIdentifier</key>
	<string>net.gwyddion.gwyddion</string>
	<key>CFBundleInfoDictionaryVersion</key>
	<string>6.0</string>
	<key>CFBundlePackageType</key>
	<string>APPL</string>
	<key>CFBundleShortVersionString</key>
	<string>@PACKAGE_VERSION@</string>
	<key>CFBundleSignature</key>
	<string>gwyd</string>
	<key>CFBundleVersion</key>
	<string>@PACKAGE_VERSION@</string>
	<key>NSHumanReadableCopyright</key>
	<string>GPL</string>
	<key>LSMinimumSystemVersion</key>
	<string>10.4</string>
	<key>CFBundleDocumentTypes</key>
	<array>
		<dict>
			<key>CFBundleTypeExtensions</key>
			<array>
				<string></string>
			</array>
			<key>CFBundleTypeName</key>
			<string>DocumentType</string>
			<key>CFBundleTypeOSTypes</key>
			<array>
				<string>****</string>
			</array>
			<key>CFBundleTypeRole</key>
			<string>Editor</string>
			<key>NSDocumentClass</key>
			<string>MyDocument</string>
		</dict>
	</array>
</dict>
</plist>
EOT