Clean up Factor.app stuff
parent
12b7a927b0
commit
d87a0dffc2
|
@ -8,7 +8,6 @@
|
|||
- x86 %box-struct
|
||||
- x86 %write-barrier
|
||||
- OS X stuff:
|
||||
- look for image in bundle
|
||||
- set resource path to bundle path
|
||||
- link in freetype statically
|
||||
|
||||
|
@ -29,6 +28,9 @@
|
|||
|
||||
+ ui/help:
|
||||
|
||||
- add some padding to launchpad ui
|
||||
- saving the image should save window configuration
|
||||
- memory leaks
|
||||
- menu drag retarget broken
|
||||
- hang when scrolling
|
||||
- hang with multiple windows
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
! Copyright (C) 2006 Slava Pestov
|
||||
! See http://factorcode.org/license.txt for BSD license.
|
||||
IN: cocoa
|
||||
USING: alien arrays errors hashtables kernel math namespaces
|
||||
sequences ;
|
||||
USING: alien arrays errors hashtables kernel math memory
|
||||
namespaces sequences ;
|
||||
|
||||
TYPEDEF: int CFIndex
|
||||
|
||||
|
@ -28,12 +28,6 @@ FUNCTION: CFIndex CFStringGetLength ( void* string ) ;
|
|||
|
||||
FUNCTION: void* CFBundleCreate ( void* allocator, void* bundleURL ) ;
|
||||
|
||||
FUNCTION: void* CFBundleGetMainBundle ( ) ;
|
||||
|
||||
FUNCTION: void* CFBundleCopyExecutableURL ( void* bundle ) ;
|
||||
|
||||
FUNCTION: void* CFBundleGetFunctionPointerForName ( void* bundle, void* functionName ) ;
|
||||
|
||||
FUNCTION: bool CFBundleLoadExecutable ( void* bundle ) ;
|
||||
|
||||
FUNCTION: void CFRelease ( void* cf ) ;
|
||||
|
@ -67,15 +61,9 @@ FUNCTION: void CFRelease ( void* cf ) ;
|
|||
"Cannot load bundled named " swap append throw
|
||||
] ?if ;
|
||||
|
||||
: executable ( -- path )
|
||||
CFBundleGetMainBundle CFBundleCopyExecutableURL [
|
||||
kCFURLPOSIXPathStyle CFURLCopyFileSystemPath
|
||||
[ CF>string ] keep CFRelease
|
||||
] keep CFRelease ;
|
||||
|
||||
: running.app? ( -- ? )
|
||||
#! Test if we're running Factor.app.
|
||||
executable "Contents/MacOS/Factor" tail? ;
|
||||
"Contents/Resources" image subseq? ;
|
||||
|
||||
IN: kernel
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
! Copyright (C) 2006 Slava Pestov.
|
||||
! See http://factorcode.org/license.txt for BSD license.
|
||||
USING: arrays cocoa freetype gadgets gadgets-launchpad
|
||||
USING: arrays cocoa errors freetype gadgets gadgets-launchpad
|
||||
gadgets-layouts gadgets-listener gadgets-panes hashtables kernel
|
||||
lists math namespaces objc objc-NSApplication objc-NSEvent
|
||||
objc-NSObject objc-NSOpenGLView objc-NSView objc-NSWindow
|
||||
|
@ -159,6 +159,9 @@ IN: gadgets
|
|||
IN: shells
|
||||
|
||||
: ui
|
||||
running.app? [
|
||||
"The Factor UI requires you to run the supplied Factor.app." throw
|
||||
] unless
|
||||
[
|
||||
[
|
||||
launchpad-window
|
||||
|
|
|
@ -43,6 +43,6 @@ const char *default_image_path(void)
|
|||
{
|
||||
NSBundle *bundle = [NSBundle mainBundle];
|
||||
NSString *path = [bundle bundlePath];
|
||||
NSString *image = [path stringByAppendingString:@"/Contents/factor.image"];
|
||||
NSString *image = [path stringByAppendingString:@"/Contents/Resources/factor.image"];
|
||||
return [image cString];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue