Version 0.1

This commit is contained in:
Lior Halphon 2016-04-01 23:36:43 +03:00
parent 1538ad451c
commit cc8a09763f
3 changed files with 12 additions and 6 deletions

View File

@ -54,7 +54,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.0</string>
<string>Version @VERSION</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleSupportedPlatforms</key>

View File

@ -4,6 +4,8 @@ else
default: sdl
endif
VERSION := 0.1
BIN := build/bin
OBJ := build/obj
@ -15,7 +17,7 @@ LDFLAGS += -lc -lm
CONF ?= debug
ifeq ($(shell uname -s),Darwin)
CFLAGS += -F/Library/Frameworks
CFLAGS += -F/Library/Frameworks -DVERSION="$(VERSION)"
OCFLAGS += -x objective-c -fobjc-arc -Wno-deprecated-declarations -isysroot $(shell xcode-select -p)/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -mmacosx-version-min=10.9
LDFLAGS += -framework AppKit
SDL_LDFLAGS := -framework SDL
@ -67,15 +69,15 @@ $(OBJ)/%.m.o: %.m
$(BIN)/Sameboy.app: $(BIN)/Sameboy.app/Contents/MacOS/Sameboy \
$(shell echo Cocoa/*.icns) \
$(shell echo Cocoa/info.plist) \
Cocoa/License.html \
Cocoa/info.plist \
$(BIN)/BootROMs/dmg_boot.bin \
$(BIN)/BootROMs/cgb_boot.bin \
$(BIN)/Sameboy.app/Contents/Resources/Base.lproj/Document.nib \
$(BIN)/Sameboy.app/Contents/Resources/Base.lproj/MainMenu.nib \
Cocoa/License.html
$(BIN)/Sameboy.app/Contents/Resources/Base.lproj/MainMenu.nib
mkdir -p $(BIN)/Sameboy.app/Contents/Resources
cp Cocoa/*.icns $(BIN)/BootROMs/dmg_boot.bin $(BIN)/BootROMs/cgb_boot.bin $(BIN)/Sameboy.app/Contents/Resources/
cp Cocoa/info.plist $(BIN)/Sameboy.app/Contents/
sed s/@VERSION/$(VERSION)/ < Cocoa/info.plist > $(BIN)/Sameboy.app/Contents/info.plist
cp Cocoa/License.html $(BIN)/Sameboy.app/Contents/Resources/Credits.html
$(BIN)/Sameboy.app/Contents/MacOS/Sameboy: $(CORE_OBJECTS) $(COCOA_OBJECTS)

View File

@ -134,6 +134,10 @@ int main(int argc, char **argv)
GB_gameboy_t gb;
bool dmg = false;
#define str(x) #x
#define xstr(x) str(x)
fprintf(stderr, "SameBoy v" xstr(VERSION) "\n");
if (argc == 1 || argc > 3) {
usage:
fprintf(stderr, "Usage: %s [--dmg] rom\n", argv[0]);