Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSilenio Quarti2013-12-06 16:18:21 +0000
committerSilenio Quarti2013-12-06 16:18:21 +0000
commit72c26472b6269957b427fbc4b5251d5f3d047745 (patch)
tree328936e99519431252072c5262fbeb7a3e3c15ea /features/org.eclipse.equinox.executable.feature
parent38ce3e64440c1f5b4d2414987af381845829f78d (diff)
downloadrt.equinox.framework-72c26472b6269957b427fbc4b5251d5f3d047745.tar.gz
rt.equinox.framework-72c26472b6269957b427fbc4b5251d5f3d047745.tar.xz
rt.equinox.framework-72c26472b6269957b427fbc4b5251d5f3d047745.zip
Bug 420471 - rt.equinox.framework/bundles/org.eclipse.equinox.executable should be removed (from master)I20131209-0800I20131208-2000
Diffstat (limited to 'features/org.eclipse.equinox.executable.feature')
-rw-r--r--features/org.eclipse.equinox.executable.feature/library/carbon/eclipseCarbon.c238
-rw-r--r--features/org.eclipse.equinox.executable.feature/library/carbon/eclipseCarbonCommon.c29
-rw-r--r--features/org.eclipse.equinox.executable.feature/library/eclipse.c97
-rw-r--r--features/org.eclipse.equinox.executable.feature/library/eclipseShm.c5
-rw-r--r--features/org.eclipse.equinox.executable.feature/library/gtk/eclipseGtk.c1
-rw-r--r--features/org.eclipse.equinox.executable.feature/library/gtk/eclipseGtk.h1
-rw-r--r--features/org.eclipse.equinox.executable.feature/library/gtk/eclipseGtkCommon.c2
-rw-r--r--features/org.eclipse.equinox.executable.feature/library/gtk/eclipseGtkInit.c6
-rw-r--r--features/org.eclipse.equinox.executable.feature/library/make_version.mak2
-rw-r--r--features/org.eclipse.equinox.executable.feature/library/win32/build.bat2
10 files changed, 250 insertions, 133 deletions
diff --git a/features/org.eclipse.equinox.executable.feature/library/carbon/eclipseCarbon.c b/features/org.eclipse.equinox.executable.feature/library/carbon/eclipseCarbon.c
index 29348fc56..0170578b3 100644
--- a/features/org.eclipse.equinox.executable.feature/library/carbon/eclipseCarbon.c
+++ b/features/org.eclipse.equinox.executable.feature/library/carbon/eclipseCarbon.c
@@ -30,7 +30,6 @@
#include "NgWinBMPFileFormat.h"
#endif
#include <mach-o/dyld.h>
-#include <pthread.h>
#define startupJarName "startup.jar"
#define LAUNCHER "-launcher"
@@ -70,26 +69,22 @@ static char * findLib(char * command);
#define MAX_LOCATION_LENGTH 40 /* none of the jvmLocations strings should be longer than this */
#define MAX_JVMLIB_LENGTH 15 /* none of the jvmLibs strings should be longer than this */
-static const char* jvmLocations[] = { "../lib/" JAVA_ARCH "/client",
- "../lib/" JAVA_ARCH "/server",
- "../jre/lib/" JAVA_ARCH "/client",
- "../jre/lib/" JAVA_ARCH "/server",
- "../jre/lib/client",
- "../jre/lib/server", NULL };
+static const char* jvmLocations[] = {
+ "../lib/" JAVA_ARCH "/client",
+ "../lib/" JAVA_ARCH "/server",
+ "../lib/client",
+ "../lib/server",
+ "../jre/lib/" JAVA_ARCH "/client",
+ "../jre/lib/" JAVA_ARCH "/server",
+ "../jre/lib/client",
+ "../jre/lib/server",
+ NULL
+};
static const char* jvmLibs[] = { "libjvm.dylib", "libjvm.jnilib", "libjvm.so", NULL };
/* Define the window system arguments for the various Java VMs. */
static char* argVM_JAVA[] = { "-XstartOnFirstThread", NULL };
-/* thread stuff */
-typedef struct {
- _TCHAR * libPath;
- _TCHAR ** vmArgs;
- _TCHAR ** progArgs;
- _TCHAR * jarFile;
- JavaResults* result;
-} StartVMArgs;
-
#ifdef COCOA
static NSWindow* window = nil;
@interface KeyWindow : NSWindow { }
@@ -106,6 +101,59 @@ static NSWindow* window = nil;
window = nil;
}
++ (int)show: (NSString *) featureImage {
+ ProcessSerialNumber psn;
+ if (GetCurrentProcess(&psn) == noErr) {
+ TransformProcessType(&psn, kProcessTransformToForegroundApplication);
+ SetFrontProcess(&psn);
+ }
+ 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: featureImage];
+ [featureImage release];
+ if (image != NULL) {
+ NSImageRep* imageRep = [image bestRepresentationForDevice: [[NSScreen mainScreen] deviceDescription]];
+ NSRect rect = {{0, 0}, {[imageRep pixelsWide], [imageRep pixelsHigh]}};
+ [image setSize: NSMakeSize([imageRep pixelsWide], [imageRep pixelsHigh])];
+ [image autorelease];
+ window = [[KeyWindow 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)shutdown {
+ if (window != 0) {
+ NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
+ [window close];
+ window = nil;
+ [pool release];
+ }
+}
+
++ (void)dispatch {
+ 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];
+}
+
@end
@interface AppleEventDelegate : NSObject
@@ -163,10 +211,6 @@ static NSWindow* window = nil;
@end
#endif
-static CFRunLoopRef loopRef = NULL;
-static void * startThread(void * init);
-static void runEventLoop(CFRunLoopRef ref);
-static void dummyCallback(void * info) {}
#ifndef COCOA
static CFMutableArrayRef files;
static EventHandlerRef appHandler;
@@ -194,50 +238,36 @@ int reuseWorkbench(_TCHAR** filePath, int timeout) {
*/
int showSplash( const _TCHAR* featureImage )
{
- if (window != NULL)
- return 0; /*already showing */
- if (featureImage == NULL)
- return ENOENT;
-
- int result = ENOENT;
+ int result = 0;
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 setSize: NSMakeSize([imageRep pixelsWide], [imageRep pixelsHigh])];
- [image autorelease];
- window = [[KeyWindow 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;
- }
+ NSString *str = [[NSString stringWithUTF8String: featureImage] retain];
+ if ([NSThread isMainThread]) {
+ result = [KeyWindow show: str];
+ } else {
+ [KeyWindow performSelectorOnMainThread: @selector(show:) withObject: str waitUntilDone: 0];
}
[pool release];
return result;
}
void takeDownSplash() {
- if (window != 0) {
- NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
- [window close];
- window = nil;
- [pool release];
+ NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
+ if ([NSThread isMainThread]) {
+ [KeyWindow shutdown];
+ } else {
+ [KeyWindow performSelectorOnMainThread: @selector(shutdown) withObject: nil waitUntilDone: 0];
}
+ [pool release];
}
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];
+ if ([NSThread isMainThread]) {
+ [KeyWindow dispatch];
+ } else {
+ [KeyWindow performSelectorOnMainThread: @selector(dispatch) withObject: nil waitUntilDone: 0];
}
- [pool release];
+ [pool release];
}
#else
@@ -477,6 +507,43 @@ char** getArgVM( char* vm )
return result;
}
+char * getJavaVersion(char* command) {
+ FILE *fp;
+ char buffer[4096];
+ char *version = NULL, *firstChar;
+ int numChars = 0;
+ sprintf(buffer,"%s -version 2>&1", command);
+ fp = popen(buffer, "r");
+ if (fp == NULL) {
+ return NULL;
+ }
+ while (fgets(buffer, sizeof(buffer)-1, fp) != NULL) {
+ if (!version) {
+ firstChar = (char *) (strchr(buffer, '"') + 1);
+ if (firstChar != NULL)
+ numChars = (int) (strrchr(buffer, '"') - firstChar);
+
+ /* Allocate a buffer and copy the version string into it. */
+ if (numChars > 0)
+ {
+ version = malloc( numChars + 1 );
+ strncpy(version, firstChar, numChars);
+ version[numChars] = '\0';
+ }
+ }
+ if (strstr(buffer, "Java HotSpot(TM)") || strstr(buffer, "OpenJDK")) {
+ isSUN = 1;
+ break;
+ }
+ if (strstr(buffer, "IBM") != NULL) {
+ isSUN = 0;
+ break;
+ }
+ }
+ pclose(fp);
+ return version;
+}
+
char * getJavaHome() {
FILE *fp;
char path[4096];
@@ -531,11 +598,14 @@ char * findVMLibrary( char* command ) {
if (strstr(cmd, "/JavaVM.framework/") != NULL && (strstr(cmd, "/Current/") != NULL || strstr(cmd, "/A/") != NULL)) {
cmd = getJavaHome();
}
+ // This is necessary to initialize isSUN
+ getJavaVersion(cmd);
result = JAVA_FRAMEWORK;
if (strstr(cmd, "/JavaVM.framework/") == NULL) {
char * lib = findLib(cmd);
if (lib != NULL) {
- adjustLibraryPath(lib);
+ // This does not seem to be necessary to load the Mac JVM library
+ if (0) adjustLibraryPath(lib);
result = lib;
}
}
@@ -670,69 +740,7 @@ JavaResults* launchJavaVM( _TCHAR* args[] )
JavaResults* startJavaVM( _TCHAR* libPath, _TCHAR* vmArgs[], _TCHAR* progArgs[], _TCHAR* jarFile )
{
- if (secondThread == 0) {
- /* Set an environment variable that tells the AWT (if started) we started the JVM on the main thread. */
- char firstThreadEnvVariable[80];
- sprintf(firstThreadEnvVariable, "JAVA_STARTED_ON_FIRST_THREAD_%d", getpid());
- setenv(firstThreadEnvVariable, "1", 1);
- return startJavaJNI(libPath, vmArgs, progArgs, jarFile);
- }
-
- /* else, --launcher.secondThread was specified, create a new thread and run the
- * vm on it. This main thread will run the CFRunLoop
- */
- pthread_t thread;
- struct rlimit limit = {0, 0};
- int stackSize = 0;
- if (getrlimit(RLIMIT_STACK, &limit) == 0) {
- if (limit.rlim_cur != 0) {
- stackSize = limit.rlim_cur;
- }
- }
-
- /* initialize thread attributes */
- pthread_attr_t attributes;
- pthread_attr_init(&attributes);
- pthread_attr_setscope(&attributes, PTHREAD_SCOPE_SYSTEM);
- pthread_attr_setdetachstate(&attributes, PTHREAD_CREATE_DETACHED);
- if (stackSize != 0)
- pthread_attr_setstacksize(&attributes, stackSize);
-
- /* arguments to start the vm */
- StartVMArgs args;
- args.libPath = libPath;
- args.vmArgs = vmArgs;
- args.progArgs = progArgs;
- args.jarFile = jarFile;
- args.result = 0;
-
- loopRef = CFRunLoopGetCurrent();
-
- /* create the thread */
- pthread_create( &thread, &attributes, &startThread, &args);
- pthread_attr_destroy(&attributes);
-
- runEventLoop(loopRef);
-
- return args.result;
-}
-
-void * startThread(void * init) {
- StartVMArgs *args = (StartVMArgs *) init;
- args->result = startJavaJNI(args->libPath, args->vmArgs, args->progArgs, args->jarFile);
- return NULL;
-}
-
-void runEventLoop(CFRunLoopRef ref) {
- CFRunLoopSourceContext sourceContext = { .version = 0, .info = NULL, .retain = NULL, .release = NULL,
- .copyDescription = NULL, .equal = NULL, .hash = NULL,
- .schedule = NULL, .cancel = NULL, .perform = &dummyCallback };
-
- CFRunLoopSourceRef sourceRef = CFRunLoopSourceCreate(NULL, 0, &sourceContext);
- CFRunLoopAddSource(ref, sourceRef, kCFRunLoopCommonModes);
-
- CFRunLoopRun();
- CFRelease(sourceRef);
+ return startJavaJNI(libPath, vmArgs, progArgs, jarFile);
}
#ifndef COCOA
diff --git a/features/org.eclipse.equinox.executable.feature/library/carbon/eclipseCarbonCommon.c b/features/org.eclipse.equinox.executable.feature/library/carbon/eclipseCarbonCommon.c
index 2870c62e8..68767328b 100644
--- a/features/org.eclipse.equinox.executable.feature/library/carbon/eclipseCarbonCommon.c
+++ b/features/org.eclipse.equinox.executable.feature/library/carbon/eclipseCarbonCommon.c
@@ -120,20 +120,33 @@ static int isLibrary( _TCHAR* vm ){
return (_tcsicmp(ch, _T_ECLIPSE(".so")) == 0) || (_tcsicmp(ch, _T_ECLIPSE(".jnilib")) == 0) || (_tcsicmp(ch, _T_ECLIPSE(".dylib")) == 0);
}
+static void loadVMBundle( char * bundle ) {
+ CFURLRef url = CFURLCreateFromFileSystemRepresentation(kCFAllocatorDefault, (const UInt8 *)bundle, strlen(bundle), true);
+ javaVMBundle = CFBundleCreate(kCFAllocatorDefault, url);
+ CFRelease(url);
+}
+
/* Load the specified shared library
*/
void * loadLibrary( char * library ){
if (!isLibrary(library)) {
- CFURLRef url = CFURLCreateFromFileSystemRepresentation(kCFAllocatorDefault, (const UInt8 *)library, strlen(library), true);
- javaVMBundle = CFBundleCreate(kCFAllocatorDefault, url);
- CFRelease(url);
+ loadVMBundle(library);
return (void*) &javaVMBundle;
- } else {
- void * result= dlopen(library, RTLD_NOW);
- if(result == 0)
- printf("%s\n",dlerror());
- return result;
}
+ _TCHAR *bundle = strdup(library), *start;
+ if (strstr(bundle, "libjvm") && (start = strstr(bundle, "/Contents/")) != NULL) {
+ start[0] = NULL;
+ loadVMBundle(bundle);
+ free(bundle);
+ if (javaVMBundle) {
+ return (void*) &javaVMBundle;
+ }
+ }
+ free(bundle);
+ void * result= dlopen(library, RTLD_NOW);
+ if(result == 0)
+ printf("%s\n",dlerror());
+ return result;
}
/* Unload the shared library
diff --git a/features/org.eclipse.equinox.executable.feature/library/eclipse.c b/features/org.eclipse.equinox.executable.feature/library/eclipse.c
index be01c9ccc..ce48cdc6d 100644
--- a/features/org.eclipse.equinox.executable.feature/library/eclipse.c
+++ b/features/org.eclipse.equinox.executable.feature/library/eclipse.c
@@ -150,6 +150,16 @@
#include <strings.h>
#endif
+#ifdef MACOSX
+
+#ifdef COCOA
+#include <Cocoa/Cocoa.h>
+#else
+#include <Carbon/Carbon.h>
+#endif
+
+#endif
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -352,6 +362,7 @@ static _TCHAR* findStartupJar();
static _TCHAR* findSplash(_TCHAR* splashArg);
static _TCHAR** getRelaunchCommand( _TCHAR **vmCommand );
static const _TCHAR* getVMArch();
+static int _run(int argc, _TCHAR* argv[], _TCHAR* vmArgs[]);
#ifdef _WIN32
static void createConsole();
@@ -367,10 +378,92 @@ JNIEXPORT void setInitialArgs(int argc, _TCHAR** argv, _TCHAR* lib) {
eclipseLibrary = lib;
}
+#ifdef MACOSX
+
+#include <pthread.h>
+/* thread stuff */
+typedef struct {
+ int argc;
+ _TCHAR ** argv;
+ _TCHAR ** vmArgs;
+ int result;
+} StartVMArgs;
+
+static void * startThread(void * init) {
+ StartVMArgs *args = (StartVMArgs *) init;
+ args->result = _run(args->argc, args->argv, args->vmArgs);
+ return NULL;
+}
+
+static void dummyCallback(void * info) {}
+#endif
+
/* this method must match the RunMethod typedef in eclipseMain.c */
/* vmArgs must be NULL terminated */
JNIEXPORT int run(int argc, _TCHAR* argv[], _TCHAR* vmArgs[])
{
+ /* Parse command line arguments (looking for the VM to use). */
+ /* Override configuration file arguments */
+ parseArgs( &argc, argv );
+
+#ifdef MACOSX
+ if (secondThread != 0) {
+
+ /* --launcher.secondThread was specified, create a new thread and run the
+ * vm on it. This main thread will run the CFRunLoop
+ */
+ pthread_t thread;
+ struct rlimit limit = {0, 0};
+ int stackSize = 0;
+ if (getrlimit(RLIMIT_STACK, &limit) == 0) {
+ if (limit.rlim_cur != 0) {
+ stackSize = limit.rlim_cur;
+ }
+ }
+
+ /* initialize thread attributes */
+ pthread_attr_t attributes;
+ pthread_attr_init(&attributes);
+ pthread_attr_setscope(&attributes, PTHREAD_SCOPE_SYSTEM);
+ pthread_attr_setdetachstate(&attributes, PTHREAD_CREATE_DETACHED);
+ if (stackSize != 0)
+ pthread_attr_setstacksize(&attributes, stackSize);
+
+ /* arguments to start the vm */
+ StartVMArgs args;
+ args.argc = argc;
+ args.argv = argv;
+ args.vmArgs = vmArgs;
+ args.result = 0;
+
+ /* create the thread */
+ pthread_create( &thread, &attributes, &startThread, &args);
+ pthread_attr_destroy(&attributes);
+
+ CFRunLoopSourceContext sourceContext = {
+ .version = 0, .info = NULL, .retain = NULL, .release = NULL,
+ .copyDescription = NULL, .equal = NULL, .hash = NULL,
+ .schedule = NULL, .cancel = NULL, .perform = &dummyCallback
+ };
+ CFRunLoopSourceRef sourceRef = CFRunLoopSourceCreate(NULL, 0, &sourceContext);
+ CFRunLoopRef loopRef = CFRunLoopGetCurrent();
+ CFRunLoopAddSource(loopRef, sourceRef, kCFRunLoopCommonModes);
+ CFRunLoopRun();
+ CFRelease(sourceRef);
+
+ return args.result;
+ }
+
+ char firstThreadEnvVariable[80];
+ sprintf(firstThreadEnvVariable, "JAVA_STARTED_ON_FIRST_THREAD_%d", getpid());
+ setenv(firstThreadEnvVariable, "1", 1);
+#endif
+
+ return _run(argc, argv, vmArgs);
+}
+
+static int _run(int argc, _TCHAR* argv[], _TCHAR* vmArgs[])
+{
_TCHAR** vmCommand = NULL;
_TCHAR** vmCommandArgs = NULL;
_TCHAR** progCommandArgs = NULL;
@@ -382,10 +475,6 @@ JNIEXPORT int run(int argc, _TCHAR* argv[], _TCHAR* vmArgs[])
/* arg[0] should be the full pathname of this program. */
program = _tcsdup( argv[0] );
-
- /* Parse command line arguments (looking for the VM to use). */
- /* Override configuration file arguments */
- parseArgs( &argc, argv );
/* Initialize official program name */
officialName = name != NULL ? _tcsdup( name ) : getDefaultOfficialName();
diff --git a/features/org.eclipse.equinox.executable.feature/library/eclipseShm.c b/features/org.eclipse.equinox.executable.feature/library/eclipseShm.c
index e46c1f5bc..0aaadbe2b 100644
--- a/features/org.eclipse.equinox.executable.feature/library/eclipseShm.c
+++ b/features/org.eclipse.equinox.executable.feature/library/eclipseShm.c
@@ -29,7 +29,7 @@ int createSharedData(_TCHAR** id, int size) {
if (id != NULL) {
*id = malloc(18 * sizeof(_TCHAR));
#ifdef WIN64
- _stprintf(*id, _T_ECLIPSE("%lx_%lx"), GetCurrentProcessId(), (DWORDLONG) mapHandle);
+ _stprintf(*id, _T_ECLIPSE("%lx_%I64x"), GetCurrentProcessId(), (DWORDLONG) mapHandle);
#else
_stprintf(*id, _T_ECLIPSE("%lx_%lx"), GetCurrentProcessId(), (DWORD) mapHandle);
#endif
@@ -44,10 +44,11 @@ static int getShmID(const _TCHAR* id, LPDWORD processID, LPHANDLE handle) {
DWORD i1;
#ifdef WIN64
DWORDLONG i2;
+ if (_stscanf(id, _T_ECLIPSE("%lx_%I64x"), &i1, &i2) != 2) return -1;
#else
DWORD i2;
-#endif
if (_stscanf(id, _T_ECLIPSE("%lx_%lx"), &i1, &i2) != 2) return -1;
+#endif
*processID = (DWORD)i1;
*handle = (HANDLE)i2;
return 0;
diff --git a/features/org.eclipse.equinox.executable.feature/library/gtk/eclipseGtk.c b/features/org.eclipse.equinox.executable.feature/library/gtk/eclipseGtk.c
index 6ec48e79f..1c60b3d00 100644
--- a/features/org.eclipse.equinox.executable.feature/library/gtk/eclipseGtk.c
+++ b/features/org.eclipse.equinox.executable.feature/library/gtk/eclipseGtk.c
@@ -245,6 +245,7 @@ int showSplash( const char* featureImage )
shellHandle = gtk.gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk.gtk_window_set_decorated((GtkWindow*)(shellHandle), FALSE);
+ gtk.gtk_window_set_type_hint((GtkWindow*)(shellHandle), 4 /*GDK_WINDOW_TYPE_HINT_SPLASHSCREEN*/);
gtk.g_signal_connect_data((gpointer)shellHandle, "destroy", (GtkSignalFunc)(gtk.gtk_widget_destroyed), &shellHandle, NULL, 0);
pixbuf = gtk.gdk_pixbuf_new_from_file(featureImage, NULL);
diff --git a/features/org.eclipse.equinox.executable.feature/library/gtk/eclipseGtk.h b/features/org.eclipse.equinox.executable.feature/library/gtk/eclipseGtk.h
index 503c9a5f9..5a233eea9 100644
--- a/features/org.eclipse.equinox.executable.feature/library/gtk/eclipseGtk.h
+++ b/features/org.eclipse.equinox.executable.feature/library/gtk/eclipseGtk.h
@@ -31,6 +31,7 @@ struct GTK_PTRS {
void (*gtk_window_resize) (GtkWindow*, gint, gint);
void (*gtk_window_set_title) (GtkWindow*, const gchar*);
void (*gtk_window_set_decorated) (GtkWindow*, gboolean);
+ void (*gtk_window_set_type_hint) (GtkWindow*, int);
void (*gtk_window_set_position) (GtkWindow*, GtkWindowPosition);
gulong (*g_signal_connect_data) (gpointer, const gchar*, GCallback, gpointer, GClosureNotify, GConnectFlags);
diff --git a/features/org.eclipse.equinox.executable.feature/library/gtk/eclipseGtkCommon.c b/features/org.eclipse.equinox.executable.feature/library/gtk/eclipseGtkCommon.c
index b30327ec5..c28593a6f 100644
--- a/features/org.eclipse.equinox.executable.feature/library/gtk/eclipseGtkCommon.c
+++ b/features/org.eclipse.equinox.executable.feature/library/gtk/eclipseGtkCommon.c
@@ -93,7 +93,7 @@ int initWindowSystem(int* pArgc, char* argv[], int showSplash)
if (gtk.gtk_set_locale) gtk.gtk_set_locale();
if (gtk.gtk_init_with_args) {
GError *error = NULL;
- if (!gtk.gtk_init_with_args(pArgc, &argv, NULL, NULL, NULL, &error)) {
+ if (!gtk.gtk_init_with_args(0, NULL, NULL, NULL, NULL, &error)) {
if (error) {
fprintf(stderr, "%s: %s\n", getOfficialName(), error->message);
if (gtk.g_error_free) gtk.g_error_free(error);
diff --git a/features/org.eclipse.equinox.executable.feature/library/gtk/eclipseGtkInit.c b/features/org.eclipse.equinox.executable.feature/library/gtk/eclipseGtkInit.c
index 51ed70a9f..996c9ef75 100644
--- a/features/org.eclipse.equinox.executable.feature/library/gtk/eclipseGtkInit.c
+++ b/features/org.eclipse.equinox.executable.feature/library/gtk/eclipseGtkInit.c
@@ -34,6 +34,7 @@ static FN_TABLE gtkFunctions[] = {
FN_TABLE_ENTRY(gtk_window_resize, 1),
FN_TABLE_ENTRY(gtk_window_set_title, 1),
FN_TABLE_ENTRY(gtk_window_set_decorated, 1),
+ FN_TABLE_ENTRY(gtk_window_set_type_hint, 1),
FN_TABLE_ENTRY(gtk_window_set_position, 1),
{ NULL, NULL }
};
@@ -100,8 +101,9 @@ int loadGtk() {
#endif
void *gdkLib = NULL, *gtkLib = NULL, *objLib = NULL, *pixLib = NULL, *x11Lib = NULL;
-
- if (getenv("SWT_GTK3")) {
+
+ char *gtk3 = getenv("SWT_GTK3");
+ if (gtk3 == NULL || strcmp(gtk3,"1") == 0) {
gdkLib = dlopen(GDK3_LIB, DLFLAGS);
gtkLib = dlopen(GTK3_LIB, DLFLAGS);
}
diff --git a/features/org.eclipse.equinox.executable.feature/library/make_version.mak b/features/org.eclipse.equinox.executable.feature/library/make_version.mak
index 41c9b799c..39fb88723 100644
--- a/features/org.eclipse.equinox.executable.feature/library/make_version.mak
+++ b/features/org.eclipse.equinox.executable.feature/library/make_version.mak
@@ -10,5 +10,5 @@
#*******************************************************************************
maj_ver=1
-min_ver=505
+min_ver=601
LIB_VERSION = $(maj_ver)$(min_ver)
diff --git a/features/org.eclipse.equinox.executable.feature/library/win32/build.bat b/features/org.eclipse.equinox.executable.feature/library/win32/build.bat
index 81f5afcd1..e02abbb5d 100644
--- a/features/org.eclipse.equinox.executable.feature/library/win32/build.bat
+++ b/features/org.eclipse.equinox.executable.feature/library/win32/build.bat
@@ -58,6 +58,7 @@ GOTO MAKE
:X86_64
shift
set defaultOSArch=x86_64
+set PROCESSOR_ARCHITECTURE=AMD64
IF x.%JAVA_HOME%==x. set JAVA_HOME=%LAUNCHER_BUILDDIR%\ibm-sdk50-x86_64
IF "x.%MSSDK%" == "x." set MSSDK="%LAUNCHER_BUILDDIR%\MSSDKs\Windows Server 2003 SP1 SDK"
set javaHome=%JAVA_HOME%
@@ -68,6 +69,7 @@ GOTO MAKE
:IA64
shift
set defaultOSArch=ia64
+set PROCESSOR_ARCHITECTURE=AMD64
IF x.%JAVA_HOME%==x. set JAVA_HOME=%LAUNCHER_BUILDDIR%\ibm-sdk142-ia64
IF "x.%MSSDK%" == "x." set MSSDK="%LAUNCHER_BUILDDIR%\MSSDKs\Windows Server 2003 SP1 SDK"
set javaHome=%JAVA_HOME%

Back to the top