diff options
author | Andrew Niefer | 2008-07-30 18:31:13 +0000 |
---|---|---|
committer | Andrew Niefer | 2008-07-30 18:31:13 +0000 |
commit | fb3912400f623a739c2db854a254ddb1468b7132 (patch) | |
tree | c95798fec303336370c3e4ee00a924c9fd87c6fb | |
parent | 0f322e6866b7f2ca4b73e35f718f5dd119bbb9cc (diff) | |
download | rt.equinox.framework-fb3912400f623a739c2db854a254ddb1468b7132.tar.gz rt.equinox.framework-fb3912400f623a739c2db854a254ddb1468b7132.tar.xz rt.equinox.framework-fb3912400f623a739c2db854a254ddb1468b7132.zip |
bug 220461 - cocoa port
13 files changed, 325 insertions, 23 deletions
diff --git a/bundles/org.eclipse.equinox.executable/.cproject b/bundles/org.eclipse.equinox.executable/.cproject index 87f345d4a..cb7b26070 100644 --- a/bundles/org.eclipse.equinox.executable/.cproject +++ b/bundles/org.eclipse.equinox.executable/.cproject @@ -64,21 +64,35 @@ </extensions> </storageModule> <storageModule moduleId="org.eclipse.cdt.core.language.mapping"/> + +<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/> +<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/> + <storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"> <buildTargets> -<target name="all" path="library/carbon" targetID="org.eclipse.cdt.make.MakeTargetBuilder"> +<target name="carbon" path="library/carbon" targetID="org.eclipse.cdt.make.MakeTargetBuilder"> <buildCommand>make</buildCommand> -<buildArguments>-f make_macosx.mak</buildArguments> +<buildArguments>-f make_carbon.mak</buildArguments> <buildTarget>all</buildTarget> <stopOnError>false</stopOnError> <useDefaultCommand>false</useDefaultCommand> +<runAllBuilders>true</runAllBuilders> </target> <target name="clean" path="library/carbon" targetID="org.eclipse.cdt.make.MakeTargetBuilder"> <buildCommand>make</buildCommand> -<buildArguments>-f make_macosx.mak</buildArguments> +<buildArguments>-f make_carbon.mak</buildArguments> <buildTarget>clean</buildTarget> <stopOnError>false</stopOnError> <useDefaultCommand>false</useDefaultCommand> +<runAllBuilders>true</runAllBuilders> +</target> +<target name="cocoa" path="library/carbon" targetID="org.eclipse.cdt.make.MakeTargetBuilder"> +<buildCommand>make</buildCommand> +<buildArguments>-f make_cocoa.mak DEFAULT_WS=cocoa</buildArguments> +<buildTarget>all</buildTarget> +<stopOnError>false</stopOnError> +<useDefaultCommand>false</useDefaultCommand> +<runAllBuilders>true</runAllBuilders> </target> <target name="all-mingw" path="library/win32" targetID="org.eclipse.cdt.make.MakeTargetBuilder"> <buildCommand>make</buildCommand> @@ -86,6 +100,7 @@ <buildTarget>all</buildTarget> <stopOnError>false</stopOnError> <useDefaultCommand>false</useDefaultCommand> +<runAllBuilders>true</runAllBuilders> </target> <target name="clean" path="library/win32" targetID="org.eclipse.cdt.make.MakeTargetBuilder"> <buildCommand>make</buildCommand> @@ -93,6 +108,7 @@ <buildTarget>clean</buildTarget> <stopOnError>false</stopOnError> <useDefaultCommand>false</useDefaultCommand> +<runAllBuilders>true</runAllBuilders> </target> <target name="linux-all" path="library/motif" targetID="org.eclipse.cdt.make.MakeTargetBuilder"> <buildCommand>make</buildCommand> @@ -100,6 +116,7 @@ <buildTarget>all</buildTarget> <stopOnError>false</stopOnError> <useDefaultCommand>false</useDefaultCommand> +<runAllBuilders>true</runAllBuilders> </target> <target name="clean" path="library/motif" targetID="org.eclipse.cdt.make.MakeTargetBuilder"> <buildCommand>make</buildCommand> @@ -107,6 +124,7 @@ <buildTarget>clean</buildTarget> <stopOnError>false</stopOnError> <useDefaultCommand>false</useDefaultCommand> +<runAllBuilders>true</runAllBuilders> </target> <target name="linux-all" path="library/gtk" targetID="org.eclipse.cdt.make.MakeTargetBuilder"> <buildCommand>make JAVA_HOME=/usr/java/sun-150 DEFAULT_OS_ARCH=x86_64</buildCommand> @@ -114,6 +132,7 @@ <buildTarget>all</buildTarget> <stopOnError>false</stopOnError> <useDefaultCommand>false</useDefaultCommand> +<runAllBuilders>true</runAllBuilders> </target> <target name="clean" path="library/gtk" targetID="org.eclipse.cdt.make.MakeTargetBuilder"> <buildCommand>make</buildCommand> @@ -121,10 +140,10 @@ <buildTarget>clean</buildTarget> <stopOnError>false</stopOnError> <useDefaultCommand>false</useDefaultCommand> +<runAllBuilders>true</runAllBuilders> </target> </buildTargets> </storageModule> -<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/> </cconfiguration> </storageModule> </cproject> diff --git a/bundles/org.eclipse.equinox.executable/bin/cocoa/macosx/ppc/Eclipse.app/Contents/Info.plist b/bundles/org.eclipse.equinox.executable/bin/cocoa/macosx/ppc/Eclipse.app/Contents/Info.plist new file mode 100644 index 000000000..dae419e2f --- /dev/null +++ b/bundles/org.eclipse.equinox.executable/bin/cocoa/macosx/ppc/Eclipse.app/Contents/Info.plist @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> + +<dict> + <key>CFBundleExecutable</key> + <string>eclipse</string> + <key>CFBundleGetInfoString</key> + <string>Eclipse 3.4 for Mac OS X, Copyright IBM Corp. and others 2002, 2008. All rights reserved.</string> + <key>CFBundleIconFile</key> + <string>Eclipse.icns</string> + <key>CFBundleIdentifier</key> + <string>org.eclipse.eclipse</string> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundleName</key> + <string>Eclipse</string> + <key>CFBundlePackageType</key> + <string>APPL</string> + <key>CFBundleShortVersionString</key> + <string>3.4</string> + <key>CFBundleSignature</key> + <string>????</string> + <key>CFBundleVersion</key> + <string>3.4</string> + + <key>Eclipse</key> + <array> + <!-- to use a specific Java version (instead of the platform's default) uncomment one of the following options: + <string>-vm</string><string>/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Commands/java</string> + <string>-vm</string><string>/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Commands/java</string> + --> + <string>-keyring</string><string>~/.eclipse_keyring</string> + <string>-consoleLog</string> + <string>-showlocation</string> + <!-- WARNING: + If you try to add a single VM argument (-vmargs) here, + *all* vmargs specified in eclipse.ini will be ignored. + We recommend to add all arguments in eclipse.ini + --> + </array> +</dict> + +</plist> diff --git a/bundles/org.eclipse.equinox.executable/bin/cocoa/macosx/ppc/Eclipse.app/Contents/MacOS/eclipse.ini b/bundles/org.eclipse.equinox.executable/bin/cocoa/macosx/ppc/Eclipse.app/Contents/MacOS/eclipse.ini new file mode 100644 index 000000000..72fea18c7 --- /dev/null +++ b/bundles/org.eclipse.equinox.executable/bin/cocoa/macosx/ppc/Eclipse.app/Contents/MacOS/eclipse.ini @@ -0,0 +1,9 @@ +-showsplash +org.eclipse.platform +-vmargs +-Xdock:icon=../Resources/Eclipse.icns +-XstartOnFirstThread +-Xms40m +-Xmx256m +-XX:MaxPermSize=256m +-Dorg.eclipse.swt.internal.carbon.smallFonts diff --git a/bundles/org.eclipse.equinox.executable/bin/cocoa/macosx/ppc/Eclipse.app/Contents/Resources/Eclipse.icns b/bundles/org.eclipse.equinox.executable/bin/cocoa/macosx/ppc/Eclipse.app/Contents/Resources/Eclipse.icns Binary files differnew file mode 100644 index 000000000..490093017 --- /dev/null +++ b/bundles/org.eclipse.equinox.executable/bin/cocoa/macosx/ppc/Eclipse.app/Contents/Resources/Eclipse.icns diff --git a/bundles/org.eclipse.equinox.executable/bin/cocoa/macosx/x86/Eclipse.app/Contents/Info.plist b/bundles/org.eclipse.equinox.executable/bin/cocoa/macosx/x86/Eclipse.app/Contents/Info.plist new file mode 100644 index 000000000..dae419e2f --- /dev/null +++ b/bundles/org.eclipse.equinox.executable/bin/cocoa/macosx/x86/Eclipse.app/Contents/Info.plist @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> + +<dict> + <key>CFBundleExecutable</key> + <string>eclipse</string> + <key>CFBundleGetInfoString</key> + <string>Eclipse 3.4 for Mac OS X, Copyright IBM Corp. and others 2002, 2008. All rights reserved.</string> + <key>CFBundleIconFile</key> + <string>Eclipse.icns</string> + <key>CFBundleIdentifier</key> + <string>org.eclipse.eclipse</string> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundleName</key> + <string>Eclipse</string> + <key>CFBundlePackageType</key> + <string>APPL</string> + <key>CFBundleShortVersionString</key> + <string>3.4</string> + <key>CFBundleSignature</key> + <string>????</string> + <key>CFBundleVersion</key> + <string>3.4</string> + + <key>Eclipse</key> + <array> + <!-- to use a specific Java version (instead of the platform's default) uncomment one of the following options: + <string>-vm</string><string>/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Commands/java</string> + <string>-vm</string><string>/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Commands/java</string> + --> + <string>-keyring</string><string>~/.eclipse_keyring</string> + <string>-consoleLog</string> + <string>-showlocation</string> + <!-- WARNING: + If you try to add a single VM argument (-vmargs) here, + *all* vmargs specified in eclipse.ini will be ignored. + We recommend to add all arguments in eclipse.ini + --> + </array> +</dict> + +</plist> diff --git a/bundles/org.eclipse.equinox.executable/bin/cocoa/macosx/x86/Eclipse.app/Contents/MacOS/eclipse.ini b/bundles/org.eclipse.equinox.executable/bin/cocoa/macosx/x86/Eclipse.app/Contents/MacOS/eclipse.ini new file mode 100644 index 000000000..72fea18c7 --- /dev/null +++ b/bundles/org.eclipse.equinox.executable/bin/cocoa/macosx/x86/Eclipse.app/Contents/MacOS/eclipse.ini @@ -0,0 +1,9 @@ +-showsplash +org.eclipse.platform +-vmargs +-Xdock:icon=../Resources/Eclipse.icns +-XstartOnFirstThread +-Xms40m +-Xmx256m +-XX:MaxPermSize=256m +-Dorg.eclipse.swt.internal.carbon.smallFonts diff --git a/bundles/org.eclipse.equinox.executable/bin/cocoa/macosx/x86/Eclipse.app/Contents/Resources/Eclipse.icns b/bundles/org.eclipse.equinox.executable/bin/cocoa/macosx/x86/Eclipse.app/Contents/Resources/Eclipse.icns Binary files differnew file mode 100644 index 000000000..aca2f3e07 --- /dev/null +++ b/bundles/org.eclipse.equinox.executable/bin/cocoa/macosx/x86/Eclipse.app/Contents/Resources/Eclipse.icns diff --git a/bundles/org.eclipse.equinox.executable/library/carbon/build.sh b/bundles/org.eclipse.equinox.executable/library/carbon/build.sh index c5454cdb3..1a32785fc 100644 --- a/bundles/org.eclipse.equinox.executable/library/carbon/build.sh +++ b/bundles/org.eclipse.equinox.executable/library/carbon/build.sh @@ -29,7 +29,7 @@ programOutput="eclipse" defaultOS="macosx" defaultOSArch="" # for universal binary the arch is not specified defaultWS="carbon" -makefile="make_macosx.mak" +makefile="make_carbon.mak" if [ "$OS" = "" ]; then OS=`uname -s` fi @@ -65,6 +65,10 @@ X86_OUTPUT_DIR="../../bin/$defaultWS/$defaultOS/x86/Eclipse.app/Contents/MacOS" export PPC_OUTPUT_DIR X86_OUTPUT_DIR PROGRAM_OUTPUT DEFAULT_OS DEFAULT_OS_ARCH DEFAULT_WS +if [ "$DEFAULT_WS" == "cocoa" ]; then + makefile = "make_cocoa.mak" +fi + # If the OS is supported (a makefile exists) if [ "$makefile" != "" ]; then if [ "$extraArgs" != "" ]; then diff --git a/bundles/org.eclipse.equinox.executable/library/carbon/eclipseCarbon.c b/bundles/org.eclipse.equinox.executable/library/carbon/eclipseCarbon.c index 6ad7da804..5796f5a81 100644 --- a/bundles/org.eclipse.equinox.executable/library/carbon/eclipseCarbon.c +++ b/bundles/org.eclipse.equinox.executable/library/carbon/eclipseCarbon.c @@ -18,12 +18,16 @@ #include <unistd.h> #include <CoreServices/CoreServices.h> +#ifdef COCOA +#include <Cocoa/Cocoa.h> +#else #include <Carbon/Carbon.h> -#include <mach-o/dyld.h> -#include <pthread.h> #include "NgCommon.h" #include "NgImageData.h" #include "NgWinBMPFileFormat.h" +#endif +#include <mach-o/dyld.h> +#include <pthread.h> #define startupJarName "startup.jar" #define LAUNCHER "-launcher" @@ -41,11 +45,6 @@ char* shippedVMDir = "jre/bin/"; /* Define the window system arguments for the various Java VMs. */ static char* argVM_JAVA[] = { "-XstartOnFirstThread", NULL }; -static WindowRef window; -static ControlRef pane = NULL; -static CGImageRef image = NULL; -static CGImageRef loadBMPImage(const char *image); - /* thread stuff */ typedef struct { _TCHAR * libPath; @@ -60,15 +59,73 @@ static void * startThread(void * init); static void runEventLoop(CFRunLoopRef ref); static void dummyCallback(void * info) {} +int main() { + return -1; +} + +#ifdef COCOA +static NSWindow* window = nil; + +/* Show the Splash Window + * + * Create the splash window, load the bitmap and display the splash window. + */ +int showSplash( const _TCHAR* featureImage ) +{ + if (window != NULL) + return 0; /*already showing */ + if (featureImage == NULL) + return ENOENT; + + int result = ENOENT; + NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; + [NSApplication sharedApplication]; + NSImage* image = [[NSImage alloc] initByReferencingFile: [NSString stringWithUTF8String: featureImage]]; + if (image != NULL) { + NSImageRep* imageRep = [image bestRepresentationForDevice: [[NSScreen mainScreen] deviceDescription]]; + NSRect rect = {{0, 0}, {[imageRep pixelsWide], [imageRep pixelsHigh]}}; + [image autorelease]; + window = [[NSWindow alloc] initWithContentRect: rect styleMask: NSBorderlessWindowMask backing: NSBackingStoreBuffered defer: 0]; + if (window != nil) { + [window center]; + [window setBackgroundColor: [NSColor colorWithPatternImage: image]]; + [window makeKeyAndOrderFront: nil]; + dispatchMessages(); + result = 0; + } + } + [pool release]; + return result; +} + +void takeDownSplash() { + if (window != 0) { + [window close]; + window = nil; + } +} + +void dispatchMessages() { + NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; + NSEvent* event; + NSApplication* application = [NSApplication sharedApplication]; + while ((event = [application nextEventMatchingMask: 0 untilDate: nil inMode: NSDefaultRunLoopMode dequeue: TRUE]) != nil) { + [application sendEvent: event]; + } + [pool release]; +} + +#else +static WindowRef window; +static ControlRef pane = NULL; +static CGImageRef image = NULL; +static CGImageRef loadBMPImage(const char *image); + typedef CGImageSourceRef (*CGImageSourceCreateWithURL_FUNC) (CFURLRef, CFDictionaryRef); typedef CGImageRef (*CGImageSourceCreateImageAtIndex_FUNC)(CGImageSourceRef, size_t, CFDictionaryRef); static CGImageSourceCreateWithURL_FUNC createWithURL = NULL; static CGImageSourceCreateImageAtIndex_FUNC createAtIndex = NULL; -int main() { - return -1; -} - static OSStatus drawProc (EventHandlerCallRef eventHandlerCallRef, EventRef eventRef, void * data) { int result = CallNextEventHandler(eventHandlerCallRef, eventRef); if (image) { @@ -176,10 +233,6 @@ int showSplash( const _TCHAR* featureImage ) return 0; } -jlong getSplashHandle() { - return (jlong)window; -} - void takeDownSplash() { if( window != 0) { DisposeWindow(window); @@ -200,7 +253,12 @@ void dispatchMessages() { SendEventToEventTarget(event, target); ReleaseEvent(event); } -} +} +#endif + +jlong getSplashHandle() { + return (jlong)window; +} /* Get the window system specific VM arguments */ char** getArgVM( char* vm ) @@ -330,6 +388,7 @@ void runEventLoop(CFRunLoopRef ref) { CFRelease(sourceRef); } +#ifndef COCOA void disposeData(void *info, void *data, size_t size) { DisposePtr(data); @@ -391,6 +450,7 @@ static CGImageRef loadBMPImage (const char *bmpPathname) { return ref; } +#endif #define DOCK_ICON_PREFIX "-Xdock:icon=" #define DOCK_NAME_PREFIX "-Xdock:name=" diff --git a/bundles/org.eclipse.equinox.executable/library/carbon/eclipseCarbonCommon.c b/bundles/org.eclipse.equinox.executable/library/carbon/eclipseCarbonCommon.c index 4fb997846..82e97194e 100644 --- a/bundles/org.eclipse.equinox.executable/library/carbon/eclipseCarbonCommon.c +++ b/bundles/org.eclipse.equinox.executable/library/carbon/eclipseCarbonCommon.c @@ -17,7 +17,11 @@ #include <dlfcn.h> #include <unistd.h> #include <CoreServices/CoreServices.h> +#ifdef COCOA +#include <Cocoa/Cocoa.h> +#else #include <Carbon/Carbon.h> +#endif #include <mach-o/dyld.h> char dirSeparator = '/'; @@ -34,7 +38,11 @@ static void init() { TransformProcessType(&psn, kProcessTransformToForegroundApplication); SetFrontProcess(&psn); } +#ifdef COCOA + [NSApplication sharedApplication]; +#else ClearMenuBar(); +#endif initialized= true; } } @@ -81,6 +89,14 @@ void displayMessage(char *title, char *message) init(); +#ifdef COCOA + NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; + NSAlert* alert = [NSAlert alertWithMessageText: (NSString*)(inDescription != nil ? inError : nil) defaultButton: nil alternateButton: nil otherButton: nil informativeTextWithFormat: (NSString*)(inDescription != nil ? inDescription : inError)]; + [[alert window] setTitle: [NSString stringWithUTF8String: title]]; + [alert setAlertStyle: NSCriticalAlertStyle]; + [alert runModal]; + [pool release]; +#else DialogRef outAlert; OSStatus status= CreateStandardAlert(kAlertStopAlert, inError, inDescription, NULL, &outAlert); if (status == noErr) { @@ -89,6 +105,7 @@ void displayMessage(char *title, char *message) } else { /*debug("%s: displayMessage: %s\n", title, message);*/ } +#endif CFRelease(inError); if (inDescription != NULL) CFRelease(inDescription); diff --git a/bundles/org.eclipse.equinox.executable/library/carbon/make_macosx.mak b/bundles/org.eclipse.equinox.executable/library/carbon/make_carbon.mak index c12d29e5a..c12d29e5a 100644..100755 --- a/bundles/org.eclipse.equinox.executable/library/carbon/make_macosx.mak +++ b/bundles/org.eclipse.equinox.executable/library/carbon/make_carbon.mak diff --git a/bundles/org.eclipse.equinox.executable/library/carbon/make_cocoa.mak b/bundles/org.eclipse.equinox.executable/library/carbon/make_cocoa.mak new file mode 100755 index 000000000..cb31556ea --- /dev/null +++ b/bundles/org.eclipse.equinox.executable/library/carbon/make_cocoa.mak @@ -0,0 +1,96 @@ +#********************************************************************** +# Copyright (c) 2000, 2005 IBM Corporation and others. +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License v1.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-v10.html +# +# Contributors: +# Kevin Cornell (Rational Software Corporation) +#********************************************************************** +include ../make_version.mak +# Makefile for creating the Carbon eclipse launcher program. + +# This makefile expects the following environment variables set: +# +# PROGRAM_OUTPUT - the filename of the output executable +# DEFAULT_OS - the default value of the "-os" switch +# DEFAULT_OS_ARCH - the default value of the "-arch" switch +# DEFAULT_WS - the default value of the "-ws" switch + +#default value for PROGRAM_OUTPUT +ifeq ($(PROGRAM_OUTPUT),) + PROGRAM_OUTPUT=eclipse +endif +PROGRAM_LIBRARY=eclipse_$(LIB_VERSION).so + +# Define the object modules to be compiled and flags. +MAIN_OBJS = eclipseMain.o eclipseCarbonMain.o +COMMON_OBJS = eclipseConfig.o eclipseCommon.o eclipseCarbonCommon.o +DLL_OBJS = eclipse.o eclipseCarbon.o eclipseUtil.o eclipseJNI.o eclipseShm.o +#NgImageData.o NgWinBMPFileFormat.o NgCommon.o + +EXEC = $(PROGRAM_OUTPUT) +DLL = $(PROGRAM_LIBRARY) +#LIBS = -framework Carbon +LIBS = -framework Cocoa +ARCHS = -arch i386 -arch ppc +CFLAGS = -O -s \ + -mmacosx-version-min=10.3 \ + -Wall \ + -DCOCOA -xobjective-c \ + $(ARCHS) \ + -DMACOSX \ + -DDEFAULT_OS="\"$(DEFAULT_OS)\"" \ + -DDEFAULT_OS_ARCH="\"$(DEFAULT_OS_ARCH)\"" \ + -DDEFAULT_WS="\"$(DEFAULT_WS)\"" \ + -I.. -I../motif -I/System/Library/Frameworks/JavaVM.framework/Headers + +all: $(EXEC) $(DLL) + +eclipse.o: ../eclipse.c ../eclipseOS.h ../eclipseCommon.h ../eclipseJNI.h + $(CC) $(CFLAGS) -c ../eclipse.c -o $@ + +eclipseCarbonMain.o : eclipseCarbonMain.c + $(CC) $(CFLAGS) -c eclipseCarbonMain.c -o $@ + +eclipseMain.o: ../eclipseUnicode.h ../eclipseCommon.h eclipseMain.c ../eclipseMain.c + $(CC) $(CFLAGS) -c eclipseMain.c -o $@ + +eclipseJNI.o: ../eclipseJNI.c ../eclipseCommon.h ../eclipseOS.h ../eclipseJNI.h + $(CC) $(CFLAGS) -c ../eclipseJNI.c -o $@ + +eclipseUtil.o: ../eclipseUtil.c ../eclipseUtil.h ../eclipseOS.h + $(CC) $(CFLAGS) -c ../eclipseUtil.c -o $@ + +eclipseConfig.o: ../eclipseConfig.c ../eclipseConfig.h ../eclipseOS.h + $(CC) $(CFLAGS) -c ../eclipseConfig.c -o $@ + +eclipseCommon.o: ../eclipseCommon.h ../eclipseUnicode.h ../eclipseCommon.c + $(CC) $(CFLAGS) -c ../eclipseCommon.c -o $@ + +eclipseShm.o: ../eclipseShm.h ../eclipseUnicode.h ../eclipseShm.c + $(CC) $(CFLAGS) -c ../eclipseShm.c -o $@ + +NgCommon.o: ../motif/NgCommon.c + $(CC) $(CFLAGS) -c ../motif/NgCommon.c -o $@ + +NgWinBMPFileFormat.o: ../motif/NgWinBMPFileFormat.c + $(CC) $(CFLAGS) -c ../motif/NgWinBMPFileFormat.c -o $@ + +NgImageData.o: ../motif/NgImageData.c + $(CC) $(CFLAGS) -c ../motif/NgImageData.c -o $@ + +$(EXEC): $(MAIN_OBJS) $(COMMON_OBJS) + $(CC) -o $(EXEC) $(ARCHS) $(MAIN_OBJS) $(COMMON_OBJS) $(LIBS) + +$(DLL): $(DLL_OBJS) $(COMMON_OBJS) + $(CC) -bundle -o $(DLL) $(ARCHS) $(DLL_OBJS) $(COMMON_OBJS) $(LIBS) + +install: all + cp $(EXEC) $(PPC_OUTPUT_DIR) + cp $(EXEC) $(X86_OUTPUT_DIR) + rm -f $(EXEC) $(OBJS) + +clean: + rm -f $(EXEC) $(DLL) $(MAIN_OBJS) $(COMMON_OBJS) $(DLL_OBJS) diff --git a/bundles/org.eclipse.equinox.executable/library/eclipseJNI.c b/bundles/org.eclipse.equinox.executable/library/eclipseJNI.c index 6ac45ce23..f3c83924b 100644 --- a/bundles/org.eclipse.equinox.executable/library/eclipseJNI.c +++ b/bundles/org.eclipse.equinox.executable/library/eclipseJNI.c @@ -388,8 +388,8 @@ int startJavaJNI( _TCHAR* libPath, _TCHAR* vmArgs[], _TCHAR* progArgs[], _TCHAR* } static char * getMainClass(JNIEnv *env, _TCHAR * jarFile) { - jclass jarFileClass, manifestClass, attributesClass = NULL; - jmethodID jarFileConstructor, getManifestMethod, getMainAttributesMethod, closeJarMethod, getValueMethod = NULL; + jclass jarFileClass = NULL, manifestClass = NULL, attributesClass = NULL; + jmethodID jarFileConstructor = NULL, getManifestMethod = NULL, getMainAttributesMethod = NULL, closeJarMethod = NULL, getValueMethod = NULL; jobject jarFileObject, manifest, attributes; jstring mainClassString = NULL; jstring jarFileString, headerString; |