Skip to content

Commit 2f061e4

Browse files
authored
Merge pull request #308 from djs55/Info.plist
Embed an Info.plist, with a distinct bundle identifier
2 parents 40cbd5c + e41508c commit 2f061e4

File tree

3 files changed

+34
-2
lines changed

3 files changed

+34
-2
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ _build
77
/test/initrd.gz
88
/test/disk.dmg
99
/test/disk.qcow2
10+
Info.plist

Info.plist.in

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>CFBundleDisplayName</key>
6+
<string>HyperKit</string>
7+
<key>CFBundleIdentifier</key>
8+
<string>com.moby.hyperkit</string>
9+
<key>CFBundleInfoDictionaryVersion</key>
10+
<string>6.0</string>
11+
<key>CFBundleName</key>
12+
<string>HyperKit</string>
13+
<key>CFBundlePackageType</key>
14+
<string>APPL</string>
15+
<key>CFBundleShortVersionString</key>
16+
<string>%VERSION%</string>
17+
<key>CFBundleSupportedPlatforms</key>
18+
<array>
19+
<string>MacOSX</string>
20+
</array>
21+
<key>CFBundleVersion</key>
22+
<string>0.0.0</string>
23+
<key>LSApplicationCategoryType</key>
24+
<string>public.app-category.developer-tools</string>
25+
<key>LSMinimumSystemVersion</key>
26+
<string>10.11</string>
27+
</dict>
28+
</plist>

Makefile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,12 @@ build/%.o: src/%.ml
173173
$(VERBOSE) $(ENV) ocamlfind ocamlopt -thread -package "$(OCAML_PACKS)" -c $< -o build/$*.cmx
174174
$(VERBOSE) $(ENV) ocamlfind ocamlopt -thread -linkpkg -package "$(OCAML_PACKS)" -output-obj -o $@ build/$*.cmx
175175

176-
$(TARGET).sym: $(OBJ)
176+
Info.plist: Info.plist.in
177+
cat Info.plist.in | sed "s/%VERSION%/$(shell git describe --tags)/" > Info.plist
178+
179+
$(TARGET).sym: $(OBJ) Info.plist
177180
@echo ld $(notdir $@)
178-
$(VERBOSE) $(ENV) $(LD) $(LDFLAGS) -Xlinker $(TARGET).lto.o -o $@ $(OBJ) $(LDLIBS) $(OCAML_LDLIBS)
181+
$(VERBOSE) $(ENV) $(LD) $(LDFLAGS) -Xlinker $(TARGET).lto.o -o $@ $(OBJ) $(LDLIBS) $(OCAML_LDLIBS) -sectcreate __TEXT __info_plist Info.plist
179182
@echo dsym $(notdir $(TARGET).dSYM)
180183
$(VERBOSE) $(ENV) $(DSYM) $@ -o $(TARGET).dSYM
181184

0 commit comments

Comments
 (0)