diff options
Diffstat (limited to 'cocoa')
-rw-r--r-- | cocoa/Makefile.target | 21 | ||||
-rw-r--r-- | cocoa/NetsurfApp.m | 12 |
2 files changed, 28 insertions, 5 deletions
diff --git a/cocoa/Makefile.target b/cocoa/Makefile.target index 635790a61..82900b6b0 100644 --- a/cocoa/Makefile.target +++ b/cocoa/Makefile.target @@ -41,7 +41,9 @@ endif CFLAGS += -I/usr/include/libxml2 CFLAGS += -include cocoa/Prefix.pch - VERSION_FULL := $(shell sed -n '/\"/{s/.*"\(.*\)\".*/\1/;p;}' desktop/version.c) +# VERSION_FULL := $(shell sed -n '/\"/{s/.*"\(.*\)\".*/\1/;p;}' desktop/version.c) +# TODO: this needs fixing properly everywhere + VERSION_FULL := "3.0 (Dev)" VERSION_MAJ := $(shell sed -n '/_major/{s/.* = \([0-9]*\).*/\1/;p;}' desktop/version.c) VERSION_MIN := $(shell sed -n '/_minor/{s/.* = \([0-9]*\).*/\1/;p;}' desktop/version.c) @@ -218,12 +220,27 @@ NetSurf.app/Contents/Info.plist: cocoa/res/NetSurf-Info.plist cocoa/Makefile.tar package-cocoa: NetSurf.dmg +.INTERMEDIATE: NetSurf.tmp.dmg + NetSurf.tmp.dmg: NetSurf.app hdiutil create -size 8m -fs HFS+ -volname "NetSurf" $@ + sleep 2 hdiutil attach $@ - cp -a $^ /Volumes/NetSurf/ + sleep 2 + cp -pPR $^ /Volumes/NetSurf/ hdiutil detach $$(echo $$(hdiutil attach $@ | cut -f 1) | cut -f 1 -d ' ') + sleep 2 NetSurf.dmg: NetSurf.tmp.dmg hdiutil convert $^ -format UDZO -o $@ +CLEANS += clean-package-cocoa + +clean-package-cocoa: + $(VQ)echo " CLEAN: NetSurf.tmp.dmg" + $(Q)$(RM) NetSurf.tmp.dmg + $(VQ)echo " CLEAN: NetSurf.dmg" + $(Q)$(RM) NetSurf.dmg + $(VQ)echo " CLEAN: NetSurf.app" + $(Q)$(RM) -r NetSurf.app + diff --git a/cocoa/NetsurfApp.m b/cocoa/NetsurfApp.m index 65c9f8cd1..4c2dfc185 100644 --- a/cocoa/NetsurfApp.m +++ b/cocoa/NetsurfApp.m @@ -164,15 +164,21 @@ void cocoa_autorelease( void ) pool = [[NSAutoreleasePool alloc] init]; } +/* Documented in desktop/options.h */ +void gui_options_init_defaults(void) +{ + /* Set defaults for absent option strings */ + const char * const ca_bundle = [[[NSBundle mainBundle] pathForResource: @"ca-bundle" ofType: @""] UTF8String]; + + nsoption_setnull_charp(ca_bundle, strdup(ca_bundle)); +} + int main( int argc, char **argv ) { cocoa_autorelease(); const char * const messages = [[[NSBundle mainBundle] pathForResource: @"Messages" ofType: @""] UTF8String]; const char * const options = cocoa_get_options_file(); - const char * const ca_bundle = [[[NSBundle mainBundle] pathForResource: @"ca-bundle" ofType: @""] UTF8String]; - - nsoption_setnull_charp(ca_bundle, strdup(ca_bundle)); netsurf_init(&argc, &argv, options, messages); |