Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.equinox.executable/library')
-rw-r--r--bundles/org.eclipse.equinox.executable/library/carbon/eclipseCarbon.c4
-rw-r--r--bundles/org.eclipse.equinox.executable/library/eclipse.c22
-rw-r--r--bundles/org.eclipse.equinox.executable/library/eclipseCommon.c9
-rw-r--r--bundles/org.eclipse.equinox.executable/library/eclipseConfig.c3
-rw-r--r--bundles/org.eclipse.equinox.executable/library/eclipseJNI.c10
-rw-r--r--bundles/org.eclipse.equinox.executable/library/eclipseMain.c4
-rw-r--r--bundles/org.eclipse.equinox.executable/library/eclipseOS.h3
-rw-r--r--bundles/org.eclipse.equinox.executable/library/eclipseShm.c15
-rw-r--r--bundles/org.eclipse.equinox.executable/library/eclipseUtil.c7
-rw-r--r--bundles/org.eclipse.equinox.executable/library/gtk/eclipseGtk.c2
-rw-r--r--bundles/org.eclipse.equinox.executable/library/motif/eclipseMotif.c4
-rw-r--r--bundles/org.eclipse.equinox.executable/library/win32/build.bat32
-rw-r--r--bundles/org.eclipse.equinox.executable/library/win32/eclipse.exe.manifest4
-rw-r--r--bundles/org.eclipse.equinox.executable/library/win32/eclipseWin.c36
-rw-r--r--bundles/org.eclipse.equinox.executable/library/win32/eclipseWinCommon.c4
-rw-r--r--bundles/org.eclipse.equinox.executable/library/win32/make_win64.mak138
-rw-r--r--bundles/org.eclipse.equinox.executable/library/wpf/eclipseWpf.cpp4
17 files changed, 232 insertions, 69 deletions
diff --git a/bundles/org.eclipse.equinox.executable/library/carbon/eclipseCarbon.c b/bundles/org.eclipse.equinox.executable/library/carbon/eclipseCarbon.c
index 27fcf4b23..1a9782d2d 100644
--- a/bundles/org.eclipse.equinox.executable/library/carbon/eclipseCarbon.c
+++ b/bundles/org.eclipse.equinox.executable/library/carbon/eclipseCarbon.c
@@ -175,8 +175,8 @@ int showSplash( const _TCHAR* featureImage )
return 0;
}
-long getSplashHandle() {
- return (long)window;
+jlong getSplashHandle() {
+ return (jlong)window;
}
void takeDownSplash() {
diff --git a/bundles/org.eclipse.equinox.executable/library/eclipse.c b/bundles/org.eclipse.equinox.executable/library/eclipse.c
index 21e8d9e1f..d5afee5e0 100644
--- a/bundles/org.eclipse.equinox.executable/library/eclipse.c
+++ b/bundles/org.eclipse.equinox.executable/library/eclipse.c
@@ -642,7 +642,8 @@ static void parseArgs( int* pArgc, _TCHAR* argv[] )
* Parse the data into a list of arguments separated by \n.
*/
static _TCHAR** parseArgList( _TCHAR* data ) {
- int totalArgs = 0, dst = 0, length;
+ int totalArgs = 0, dst = 0;
+ size_t length;
_TCHAR *ch1, *ch2, **execArg;
length = _tcslen( data );
ch1 = ch2 = data;
@@ -843,7 +844,7 @@ static void getVMCommand( int argc, _TCHAR* argv[], _TCHAR **vmArgv[], _TCHAR **
static _TCHAR* formatVmCommandMsg( _TCHAR* args[], _TCHAR* vmArgs[], _TCHAR* progArgs[] )
{
int index;
- int length = 0;
+ size_t length = 0;
_TCHAR** list;
_TCHAR* ch;
_TCHAR* message;
@@ -961,7 +962,7 @@ static _TCHAR* findSplash(_TCHAR* splashArg) {
struct _stat stats;
_TCHAR *ch;
_TCHAR *path, *prefix;
- int length;
+ size_t length;
if (splashArg == NULL)
return NULL;
@@ -1031,7 +1032,7 @@ static _TCHAR* findStartupJar(){
_TCHAR * file, *ch;
_TCHAR * pluginsPath;
struct _stat stats;
- int pathLength, progLength;
+ size_t pathLength, progLength;
if( startupArg != NULL ) {
/* startup jar was specified on the command line */
@@ -1121,14 +1122,17 @@ static _TCHAR ** getRelaunchCommand( _TCHAR **vmCommand )
#ifdef _WIN32
static void createConsole() {
- long stdHandle;
+#ifndef WIN64
+#define intptr_t long
+#endif
+ intptr_t stdHandle;
int conHandle;
FILE *fp;
AllocConsole();
/* redirect stdout */
- stdHandle = (long)GetStdHandle(STD_OUTPUT_HANDLE);
+ stdHandle = (intptr_t) GetStdHandle(STD_OUTPUT_HANDLE);
conHandle = _open_osfhandle(stdHandle, _O_TEXT);
if (conHandle != -1) {
fp = _fdopen(conHandle, "w");
@@ -1136,7 +1140,7 @@ static void createConsole() {
}
/* redirect stdin */
- stdHandle = (long)GetStdHandle(STD_INPUT_HANDLE);
+ stdHandle = (intptr_t) GetStdHandle(STD_INPUT_HANDLE);
conHandle = _open_osfhandle(stdHandle, _O_TEXT);
if (conHandle != -1) {
fp = _fdopen(conHandle, "r");
@@ -1144,7 +1148,7 @@ static void createConsole() {
}
/* stderr */
- stdHandle = (long)GetStdHandle(STD_ERROR_HANDLE);
+ stdHandle = (intptr_t) GetStdHandle(STD_ERROR_HANDLE);
conHandle = _open_osfhandle(stdHandle, _O_TEXT);
if (conHandle != -1) {
fp = _fdopen(conHandle, "r");
@@ -1168,7 +1172,7 @@ static int determineVM(_TCHAR** msg) {
/* vmName is passed in on command line with -vm */
if (vmName != NULL) {
- int length = _tcslen(vmName);
+ size_t length = _tcslen(vmName);
/* remove the trailing separator */
if (vmName[length - 1] == _T_ECLIPSE('/') || vmName[length - 1] == _T_ECLIPSE('\\')) {
vmName[length - 1] = 0;
diff --git a/bundles/org.eclipse.equinox.executable/library/eclipseCommon.c b/bundles/org.eclipse.equinox.executable/library/eclipseCommon.c
index 4499417aa..05e12c682 100644
--- a/bundles/org.eclipse.equinox.executable/library/eclipseCommon.c
+++ b/bundles/org.eclipse.equinox.executable/library/eclipseCommon.c
@@ -47,7 +47,7 @@ _TCHAR* wsArg = _T_ECLIPSE(DEFAULT_WS); /* the SWT supported GUI to be us
#ifndef _WIN32
static _TCHAR* filterPrefix = NULL; /* prefix for the find files filter */
#endif
-static int prefixLength = 0;
+static size_t prefixLength = 0;
typedef struct {
int segment[3];
@@ -181,7 +181,7 @@ int setenv (const char *name, const char *value, int replace)
_TCHAR* findCommand( _TCHAR* command )
{
_TCHAR* cmdPath;
- int length;
+ size_t length;
_TCHAR* ch;
_TCHAR* dir;
_TCHAR* path;
@@ -250,7 +250,8 @@ _TCHAR* findCommand( _TCHAR* command )
/* Remove quotes */
if (_tcschr( cmdPath, _T_ECLIPSE('"') ) != NULL)
{
- int i = 0, j = 0, c;
+ int i = 0, j = 0;
+ _TCHAR c;
length = _tcslen( cmdPath );
while (i < length) {
c = cmdPath[ i++ ];
@@ -358,7 +359,7 @@ static int filter(const struct dirent *dir) {
_TCHAR* findFile( _TCHAR* path, _TCHAR* prefix)
{
struct _stat stats;
- int pathLength;
+ size_t pathLength;
_TCHAR* candidate = NULL;
_TCHAR* result = NULL;
diff --git a/bundles/org.eclipse.equinox.executable/library/eclipseConfig.c b/bundles/org.eclipse.equinox.executable/library/eclipseConfig.c
index 00e451a71..0edb80ce2 100644
--- a/bundles/org.eclipse.equinox.executable/library/eclipseConfig.c
+++ b/bundles/org.eclipse.equinox.executable/library/eclipseConfig.c
@@ -80,7 +80,8 @@ int readConfigFile( _TCHAR * config_file, int *argc, _TCHAR ***argv )
_TCHAR * arg;
FILE *file = NULL;
int maxArgs = 128;
- int index, length;
+ int index;
+ size_t length;
/* Open the config file as a text file
* Note that carriage return-linefeed combination \r\n are automatically
diff --git a/bundles/org.eclipse.equinox.executable/library/eclipseJNI.c b/bundles/org.eclipse.equinox.executable/library/eclipseJNI.c
index 3623107bd..d01b8b496 100644
--- a/bundles/org.eclipse.equinox.executable/library/eclipseJNI.c
+++ b/bundles/org.eclipse.equinox.executable/library/eclipseJNI.c
@@ -52,13 +52,13 @@ static JNIEnv *env = 0;
#if (!defined(UNICODE) || defined(VISTA))
void (* exitDataHook)(JNIEnv *env, jstring id, jstring s);
void (* dispatchHook)();
-long (* splashHandleHook)();
+jlong (* splashHandleHook)();
void (* showSplashHook)(JNIEnv *env, jstring s);
void (* takeDownHook)();
#else
extern void (* exitDataHook)(JNIEnv *env, jstring id, jstring s);
extern void (* dispatchHook)();
-extern long (* splashHandleHook)();
+extern jlong (* splashHandleHook)();
extern void (* showSplashHook)(JNIEnv *env, jstring s);
extern void (* takeDownHook)();
#endif
@@ -140,7 +140,7 @@ static void splash(JNIEnv *env, jstring s) {
void setExitData(JNIEnv *env, jstring id, jstring s){
const _TCHAR* data = NULL;
const _TCHAR* sharedId = NULL;
- int length;
+ size_t length;
if(s != NULL) {
length = (*env)->GetStringLength(env, s);
@@ -181,7 +181,7 @@ static const _TCHAR * JNI_GetStringChars(JNIEnv *env, jstring str) {
if (getBytesMethod != NULL) {
jbyteArray bytes = (*env)->CallObjectMethod(env, str, getBytesMethod);
if (!(*env)->ExceptionOccurred(env)) {
- jint length = (*env)->GetArrayLength(env, bytes);
+ jsize length = (*env)->GetArrayLength(env, bytes);
buffer = malloc( (length + 1) * sizeof(_TCHAR*));
(*env)->GetByteArrayRegion(env, bytes, 0, length, (jbyte*)buffer);
buffer[length] = 0;
@@ -210,7 +210,7 @@ static void JNI_ReleaseStringChars(JNIEnv *env, jstring s, const _TCHAR* data) {
static jstring newJavaString(JNIEnv *env, _TCHAR * str)
{
jstring newString = NULL;
- int length = _tcslen(str);
+ size_t length = _tcslen(str);
#ifdef UNICODE
newString = (*env)->NewString(env, str, length);
diff --git a/bundles/org.eclipse.equinox.executable/library/eclipseMain.c b/bundles/org.eclipse.equinox.executable/library/eclipseMain.c
index 140214338..caa1add42 100644
--- a/bundles/org.eclipse.equinox.executable/library/eclipseMain.c
+++ b/bundles/org.eclipse.equinox.executable/library/eclipseMain.c
@@ -365,8 +365,8 @@ static _TCHAR* findLibrary(_TCHAR* library, _TCHAR* program)
_TCHAR* fragment;
_TCHAR* result;
_TCHAR* dot = _T_ECLIPSE(".");
- int progLength, pathLength;
- int fragmentLength;
+ size_t progLength, pathLength;
+ size_t fragmentLength;
struct _stat stats;
if (library != NULL) {
diff --git a/bundles/org.eclipse.equinox.executable/library/eclipseOS.h b/bundles/org.eclipse.equinox.executable/library/eclipseOS.h
index 306c31199..d193c38d0 100644
--- a/bundles/org.eclipse.equinox.executable/library/eclipseOS.h
+++ b/bundles/org.eclipse.equinox.executable/library/eclipseOS.h
@@ -13,6 +13,7 @@
#ifndef ECLIPSE_OS_H
#define ECLIPSE_OS_H
+#include <jni.h>
#include "eclipseUnicode.h"
#ifdef UNICODE
@@ -114,7 +115,7 @@ extern _TCHAR * findVMLibrary( _TCHAR * command );
extern void dispatchMessages();
-extern long getSplashHandle();
+extern jlong getSplashHandle();
extern void takeDownSplash();
diff --git a/bundles/org.eclipse.equinox.executable/library/eclipseShm.c b/bundles/org.eclipse.equinox.executable/library/eclipseShm.c
index 68f0c6f09..7ed3b8107 100644
--- a/bundles/org.eclipse.equinox.executable/library/eclipseShm.c
+++ b/bundles/org.eclipse.equinox.executable/library/eclipseShm.c
@@ -26,14 +26,23 @@ int createSharedData(_TCHAR** id, int size) {
if (mapHandle == 0) return -1;
if (id != NULL) {
*id = malloc(18 * sizeof(_TCHAR));
+#ifdef WIN64
+ _stprintf(*id, _T_ECLIPSE("%lx_%lx"), GetCurrentProcessId(), (DWORDLONG) mapHandle);
+#else
_stprintf(*id, _T_ECLIPSE("%lx_%lx"), GetCurrentProcessId(), (DWORD) mapHandle);
+#endif
}
return 0;
}
static int getShmID(const _TCHAR* id, LPDWORD processID, LPHANDLE handle) {
if (id != NULL && _tcslen(id) > 0) {
- DWORD i1, i2;
+ DWORD i1;
+#ifdef WIN64
+ DWORDLONG i2;
+#else
+ DWORD i2;
+#endif
if (_stscanf(id, _T_ECLIPSE("%lx_%lx"), &i1, &i2) != 2) return -1;
*processID = (DWORD)i1;
*handle = (HANDLE)i2;
@@ -67,7 +76,7 @@ int getSharedData(_TCHAR* id, _TCHAR** data) {
sharedData = MapViewOfFile(handle, FILE_MAP_WRITE, 0, 0, 0);
if (sharedData == NULL) return -1;
if (data != NULL) {
- int length = (_tcslen(sharedData) + 1) * sizeof(_TCHAR);
+ size_t length = (_tcslen(sharedData) + 1) * sizeof(_TCHAR);
newData = malloc(length);
memcpy(newData, sharedData, length);
}
@@ -99,7 +108,7 @@ int setSharedData(const _TCHAR* id, const _TCHAR* data) {
sharedData = MapViewOfFile(mapHandle, FILE_MAP_WRITE, 0, 0, 0);
if (sharedData == NULL) return -1;
if (data != NULL) {
- int length = (_tcslen(data) + 1) * sizeof(_TCHAR);
+ size_t length = (_tcslen(data) + 1) * sizeof(_TCHAR);
memcpy(sharedData, data, length);
} else {
memset(sharedData, 0, sizeof(_TCHAR));
diff --git a/bundles/org.eclipse.equinox.executable/library/eclipseUtil.c b/bundles/org.eclipse.equinox.executable/library/eclipseUtil.c
index 645edea85..649814558 100644
--- a/bundles/org.eclipse.equinox.executable/library/eclipseUtil.c
+++ b/bundles/org.eclipse.equinox.executable/library/eclipseUtil.c
@@ -146,8 +146,8 @@ _TCHAR* checkPath( _TCHAR* path, _TCHAR* programDir, int reverseOrder )
_TCHAR * checkPathList( _TCHAR* pathList, _TCHAR* programDir, int reverseOrder) {
_TCHAR * c1, *c2;
_TCHAR * checked, *result;
- int checkedLength = 0, resultLength = 0;
- int bufferLength = _tcslen(pathList);
+ size_t checkedLength = 0, resultLength = 0;
+ size_t bufferLength = _tcslen(pathList);
result = malloc(bufferLength * sizeof(_TCHAR));
c1 = pathList;
@@ -183,7 +183,8 @@ _TCHAR * checkPathList( _TCHAR* pathList, _TCHAR* programDir, int reverseOrder)
_TCHAR * concatStrings(_TCHAR** strs) {
_TCHAR * result;
- int i = -1, length = 0;
+ int i = -1;
+ size_t length = 0;
/* first count how large a buffer we need */
while( strs[++i] != NULL) {
length += _tcslen(strs[i]);
diff --git a/bundles/org.eclipse.equinox.executable/library/gtk/eclipseGtk.c b/bundles/org.eclipse.equinox.executable/library/gtk/eclipseGtk.c
index 6855f872a..0d1b04a35 100644
--- a/bundles/org.eclipse.equinox.executable/library/gtk/eclipseGtk.c
+++ b/bundles/org.eclipse.equinox.executable/library/gtk/eclipseGtk.c
@@ -120,7 +120,7 @@ void dispatchMessages() {
while(g_main_context_iteration(0,0) != 0) {}
}
-long getSplashHandle() {
+jlong getSplashHandle() {
return splashHandle;
}
diff --git a/bundles/org.eclipse.equinox.executable/library/motif/eclipseMotif.c b/bundles/org.eclipse.equinox.executable/library/motif/eclipseMotif.c
index 10cafa02f..c3cda9ce7 100644
--- a/bundles/org.eclipse.equinox.executable/library/motif/eclipseMotif.c
+++ b/bundles/org.eclipse.equinox.executable/library/motif/eclipseMotif.c
@@ -196,8 +196,8 @@ char** getArgVM( char* vm )
}
-long getSplashHandle() {
- return (long)shellHandle;
+jlong getSplashHandle() {
+ return (jlong)shellHandle;
}
void dispatchMessages() {
diff --git a/bundles/org.eclipse.equinox.executable/library/win32/build.bat b/bundles/org.eclipse.equinox.executable/library/win32/build.bat
index ea748c0c5..335d6d482 100644
--- a/bundles/org.eclipse.equinox.executable/library/win32/build.bat
+++ b/bundles/org.eclipse.equinox.executable/library/win32/build.bat
@@ -31,34 +31,44 @@
@rem want this to be done by this script.
@rem
@rem ******
-@echo off
-IF NOT "%JAVA_HOME%"=="" GOTO MSVC
-rem *****
-rem Javah
-rem *****
-set JAVA_HOME=j:\teamswt\swt-builddir\ibm-jdk1.4.1
-set path=%JAVA_HOME%;%path%
-:MSVC
+IF x.%1==x.x86_64 GOTO X86_64
+
+:X86
+IF x.%JAVA_HOME%==x. set JAVA_HOME=C:\Dev\Java\IBM_1.5.0
+set javaHome=%JAVA_HOME%
if not "%MSVC_HOME%" == "" goto MAKE
set MSVC_HOME=k:\dev\products\msvc60\vc98
call %MSVC_HOME%\bin\vcvars32.bat
if not "%mssdk%" == "" goto MAKE
set mssdk=K:\dev\PRODUCTS\PLATSDK\feb2003
call %mssdk%\setenv.bat
+IF x.%1==x.x86 shift
+set defaultOSArch=x86
+set makefile=make_win32.mak
+GOTO MAKE
-:MAKE
+:X86_64
+shift
+set defaultOSArch=x86_64
+IF x.%JAVA_HOME%==x. set JAVA_HOME=C:\Dev\Java\ibm-sdk-n142p-win64-x86
+IF "x.%mssdk%" == "x." set mssdk="C:\Program Files\MS_SDK_2003_R2"
+echo %mssdk%
+set javaHome=%JAVA_HOME%
+set makefile=make_win64.mak
+call %mssdk%\setenv /X64 /RETAIL
+GOTO MAKE
+:MAKE
+echo Making!1
rem --------------------------
rem Define default values for environment variables used in the makefiles.
rem --------------------------
set programOutput=eclipse.exe
set programLibrary=eclipse.dll
set defaultOS=win32
-set defaultOSArch=x86
set defaultWS=win32
-set makefile=make_win32.mak
set OS=Windows
rem --------------------------
diff --git a/bundles/org.eclipse.equinox.executable/library/win32/eclipse.exe.manifest b/bundles/org.eclipse.equinox.executable/library/win32/eclipse.exe.manifest
index 51cdc24f6..dda153470 100644
--- a/bundles/org.eclipse.equinox.executable/library/win32/eclipse.exe.manifest
+++ b/bundles/org.eclipse.equinox.executable/library/win32/eclipse.exe.manifest
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
- <assemblyIdentity version="3.1.0.0" processorArchitecture="X86" name="Eclipse Launcher" type="win32"/>
+ <assemblyIdentity version="3.1.0.0" processorArchitecture="*" name="Eclipse Launcher" type="win32"/>
<description>Standard Widget Toolkit</description>
<dependency>
<dependentAssembly>
- <assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="X86" publicKeyToken="6595b64144ccf1df" language="*"/>
+ <assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="*" publicKeyToken="6595b64144ccf1df" language="*"/>
</dependentAssembly>
</dependency>
</assembly>
diff --git a/bundles/org.eclipse.equinox.executable/library/win32/eclipseWin.c b/bundles/org.eclipse.equinox.executable/library/win32/eclipseWin.c
index 0bacee89b..800b11399 100644
--- a/bundles/org.eclipse.equinox.executable/library/win32/eclipseWin.c
+++ b/bundles/org.eclipse.equinox.executable/library/win32/eclipseWin.c
@@ -38,10 +38,10 @@ _TCHAR* shippedVMDir = _T("jre\\bin\\");
static _TCHAR* argVM[] = { NULL };
/* Define local variables for running the JVM and detecting its exit. */
-static int jvmProcess = 0;
+static HANDLE jvmProcess = 0;
static int jvmExitCode = 0;
-static int jvmExitTimeout = 100;
-static int jvmExitTimerId = 99;
+static UINT jvmExitTimeout = 100;
+static UINT_PTR jvmExitTimerId = 99;
static void CALLBACK detectJvmExit( HWND hwnd, UINT uMsg, UINT id, DWORD dwTime );
static _TCHAR* checkVMRegistryKey(HKEY jrekey, _TCHAR* subKeyName);
@@ -138,8 +138,8 @@ void dispatchMessages() {
}
}
-long getSplashHandle() {
- return (long)topWindow;
+jlong getSplashHandle() {
+ return (jlong)topWindow;
}
void takeDownSplash() {
@@ -208,7 +208,7 @@ void adjustSearchPath( _TCHAR* vmLib ){
*/
static _TCHAR* findLib( _TCHAR* command ) {
int i, j;
- int pathLength;
+ size_t pathLength;
struct _stat stats;
_TCHAR * path; /* path to resulting jvm shared library */
_TCHAR * location; /* points to begining of jvmLocations section of path */
@@ -229,7 +229,7 @@ static _TCHAR* findLib( _TCHAR* command ) {
return NULL; /* doesn't exist */
}
- pathLength = location - command;
+ pathLength = (size_t) (location - command);
path = malloc((pathLength + MAX_LOCATION_LENGTH + 1 + _tcslen(vmLibrary) + 1) * sizeof(_TCHAR));
_tcsncpy(path, command, pathLength);
location = &path[pathLength];
@@ -312,7 +312,8 @@ static _TCHAR* checkVMRegistryKey(HKEY jreKey, _TCHAR* subKeyName) {
static _TCHAR* buildCommandLine( _TCHAR* program, _TCHAR* args[] )
{
- int index, length = 0;
+ int index;
+ size_t length = 0;
_TCHAR *commandLine, *ch, *space;
/*
@@ -366,7 +367,7 @@ int launchJavaVM( _TCHAR* args[] )
{
MSG msg;
_TCHAR* commandLine;
- jvmProcess = -1;
+ jvmProcess = 0;
commandLine = buildCommandLine(NULL, args);
/*
@@ -379,22 +380,15 @@ int launchJavaVM( _TCHAR* args[] )
GetStartupInfo(&si);
if (CreateProcess(NULL, commandLine, NULL, NULL, TRUE, 0, NULL, NULL, &si, &pi)) {
CloseHandle( pi.hThread );
- jvmProcess = (int)pi.hProcess;
- }
+ jvmProcess = pi.hProcess;
+ } else {
+ jvmExitCode = errno;
+ }
}
free( commandLine );
- /* If the child process (JVM) would not start */
- if (jvmProcess == -1)
- {
- /* Return the error number. */
- jvmExitCode = errno;
- jvmProcess = 0;
- }
-
- /* else */
- else
+ if (jvmProcess > 0)
{
/* Set a timer to detect JVM process termination. */
SetTimer( topWindow, jvmExitTimerId, jvmExitTimeout, detectJvmExit );
diff --git a/bundles/org.eclipse.equinox.executable/library/win32/eclipseWinCommon.c b/bundles/org.eclipse.equinox.executable/library/win32/eclipseWinCommon.c
index 01ec099bf..c33c5b761 100644
--- a/bundles/org.eclipse.equinox.executable/library/win32/eclipseWinCommon.c
+++ b/bundles/org.eclipse.equinox.executable/library/win32/eclipseWinCommon.c
@@ -90,7 +90,11 @@ void initWindowSystem( int* pArgc, _TCHAR* argv[], int showSplash )
icon = LoadIcon(module, MAKEINTRESOURCE(ECLIPSE_ICON));
if (icon != NULL)
+#ifdef WIN64
+ SetClassLongPtr(topWindow, GCLP_HICON, (LONG_PTR)icon);
+#else
SetClassLong(topWindow, GCL_HICON, (LONG)icon);
+#endif
initialized = 1;
}
diff --git a/bundles/org.eclipse.equinox.executable/library/win32/make_win64.mak b/bundles/org.eclipse.equinox.executable/library/win32/make_win64.mak
new file mode 100644
index 000000000..f009b00e7
--- /dev/null
+++ b/bundles/org.eclipse.equinox.executable/library/win32/make_win64.mak
@@ -0,0 +1,138 @@
+#******************************************************************************
+# Copyright (c) 2007 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:
+# IBM Corporation - initial API and implementation
+#*******************************************************************************
+
+# Makefile for creating the eclipse launcher program.
+
+# This makefile expects the following environment variables set:
+#
+# PROGRAM_OUTPUT - the filename of the output executable
+# PROGRAM_LIBRARY - the filename of the output dll library
+# 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
+# JAVA_HOME - the location of the Java for JNI includes
+NODEBUG=1
+
+APPVER=4.0
+_WIN32_WINNT=0x0400
+_WIN32_IE=0x0300
+
+!include <ntwin32.mak>
+!include <..\make_version.mak>
+
+PROGRAM_OUTPUT=eclipse.exe
+# Separate filename from extention
+PROGRAM_NAME=$(PROGRAM_OUTPUT:.exe=)
+
+PROGRAM_LIBRARY = eclipse_$(LIB_VERSION).dll
+
+# Define the object modules to be compiled and flags.
+MAIN_OBJS = eclipseMain.obj aeclipseMain.obj
+COMMON_OBJS = eclipseConfig.obj eclipseCommon.obj eclipseWinCommon.obj\
+ aeclipseConfig.obj aeclipseCommon.obj aeclipseWinCommon.obj
+DLL_OBJS = eclipse.obj eclipseWin.obj eclipseUtil.obj eclipseJNI.obj eclipseShm.obj\
+ aeclipse.obj aeclipseWin.obj aeclipseUtil.obj aeclipseJNI.obj aeclipseShm.obj
+
+LIBS = kernel32.lib user32.lib comctl32.lib msvcrt.lib bufferoverflowU.lib
+DLL_LIBS = kernel32.lib user32.lib comctl32.lib gdi32.lib Advapi32.lib msvcrt.lib version.lib bufferoverflowU.lib
+LFLAGS = /NODEFAULTLIB /INCREMENTAL:NO /RELEASE /NOLOGO -subsystem:windows -entry:wmainCRTStartup
+CONSOLEFLAGS = /NODEFAULTLIB /INCREMENTAL:NO /RELEASE /NOLOGO -subsystem:console -entry:wmainCRTStartup
+#DLL_LFLAGS = /NODEFAULTLIB /INCREMENTAL:NO /PDB:NONE /RELEASE /NOLOGO -entry:_DllMainCRTStartup@12 -dll /BASE:0x72000000 /DLL
+DLL_LFLAGS = /NODEFAULTLIB /INCREMENTAL:NO /PDB:NONE /RELEASE /NOLOGO -dll /BASE:0x72000000 /DLL
+RES = $(PROGRAM_NAME).res
+EXEC = $(PROGRAM_OUTPUT)
+CONSOLE = $(PROGRAM_NAME)c.exe
+DLL = $(PROGRAM_LIBRARY)
+DEBUG = #$(cdebug)
+acflags = -I.. -DDEFAULT_OS="\"$(DEFAULT_OS)\"" \
+ -DDEFAULT_OS_ARCH="\"$(DEFAULT_OS_ARCH)\"" \
+ -DDEFAULT_WS="\"$(DEFAULT_WS)\"" \
+ -I$(JAVA_HOME)\include -I$(JAVA_HOME)\include\win32 \
+ $(cflags)
+wcflags = -DUNICODE $(acflags)
+all: $(EXEC) $(DLL) $(CONSOLE)
+
+eclipseMain.obj: ../eclipseUnicode.h ../eclipseCommon.h ../eclipseMain.c
+ $(cc) $(DEBUG) $(wcflags) $(cvarsdll) /Fo$*.obj ../eclipseMain.c
+
+eclipseCommon.obj: ../eclipseCommon.h ../eclipseUnicode.h ../eclipseCommon.c
+ $(cc) $(DEBUG) $(wcflags) $(cvarsdll) /Fo$*.obj ../eclipseCommon.c
+
+eclipse.obj: ../eclipseOS.h ../eclipseUnicode.h ../eclipse.c
+ $(cc) $(DEBUG) $(wcflags) $(cvarsdll) /Fo$*.obj ../eclipse.c
+
+eclipseUtil.obj: ../eclipseUtil.h ../eclipseUnicode.h ../eclipseUtil.c
+ $(cc) $(DEBUG) $(wcflags) $(cvarsdll) /Fo$*.obj ../eclipseUtil.c
+
+eclipseConfig.obj: ../eclipseConfig.h ../eclipseUnicode.h ../eclipseConfig.c
+ $(cc) $(DEBUG) $(wcflags) $(cvarsdll) /Fo$*.obj ../eclipseConfig.c
+
+eclipseWin.obj: ../eclipseOS.h ../eclipseUnicode.h eclipseWin.c
+ $(cc) $(DEBUG) $(wcflags) $(cvarsdll) /Fo$*.obj eclipseWin.c
+
+eclipseWinCommon.obj: ../eclipseCommon.h eclipseWinCommon.c
+ $(cc) $(DEBUG) $(wcflags) $(cvarsdll) /Fo$*.obj eclipseWinCommon.c
+
+eclipseJNI.obj: ../eclipseCommon.h ../eclipseOS.h ../eclipseJNI.c
+ $(CC) $(DEBUG) $(wcflags) $(cvarsdll) /Fo$*.obj ../eclipseJNI.c
+
+eclipseShm.obj: ../eclipseShm.h ../eclipseUnicode.h ../eclipseShm.c
+ $(CC) $(DEBUG) $(wcflags) $(cvarsdll) /Fo$*.obj ../eclipseShm.c
+
+aeclipseShm.obj: ../eclipseShm.h ../eclipseUnicode.h ../eclipseShm.c
+ $(CC) $(DEBUG) $(acflags) $(cvarsdll) /FoaeclipseShm.obj ../eclipseShm.c
+
+aeclipseJNI.obj: ../eclipseCommon.h ../eclipseOS.h ../eclipseJNI.c
+ $(cc) $(DEBUG) $(acflags) $(cvarsdll) /FoaeclipseJNI.obj ../eclipseJNI.c
+
+aeclipseMain.obj: ../eclipseUnicode.h ../eclipseCommon.h ../eclipseMain.c
+ $(cc) $(DEBUG) $(acflags) $(cvarsdll) /FoaeclipseMain.obj ../eclipseMain.c
+
+aeclipseCommon.obj: ../eclipseCommon.h ../eclipseUnicode.h ../eclipseCommon.c
+ $(cc) $(DEBUG) $(acflags) $(cvarsdll) /FoaeclipseCommon.obj ../eclipseCommon.c
+
+aeclipse.obj: ../eclipseOS.h ../eclipseUnicode.h ../eclipse.c
+ $(cc) $(DEBUG) $(acflags) $(cvarsdll) /Foaeclipse.obj ../eclipse.c
+
+aeclipseUtil.obj: ../eclipseUtil.h ../eclipseUnicode.h ../eclipseUtil.c
+ $(cc) $(DEBUG) $(acflags) $(cvarsdll) /FoaeclipseUtil.obj ../eclipseUtil.c
+
+aeclipseConfig.obj: ../eclipseConfig.h ../eclipseConfig.h ../eclipseConfig.c
+ $(cc) $(DEBUG) $(acflags) $(cvarsdll) /FoaeclipseConfig.obj ../eclipseConfig.c
+
+aeclipseWin.obj: ../eclipseOS.h ../eclipseUnicode.h eclipseWin.c
+ $(cc) $(DEBUG) $(acflags) $(cvarsdll) /FoaeclipseWin.obj eclipseWin.c
+
+aeclipseWinCommon.obj: ../eclipseCommon.h eclipseWinCommon.c
+ $(cc) $(DEBUG) $(acflags) $(cvarsdll) /FoaeclipseWinCommon.obj eclipseWinCommon.c
+
+$(EXEC): $(MAIN_OBJS) $(COMMON_OBJS) $(RES)
+ $(link) $(LFLAGS) -out:$(PROGRAM_OUTPUT) $(MAIN_OBJS) $(COMMON_OBJS) $(RES) $(LIBS)
+
+#the console version needs a flag set, should look for a better way to do this
+$(CONSOLE): $(MAIN_OBJS) $(COMMON_OBJS)
+ del -f eclipseConfig.obj aeclipseConfig.obj
+ $(cc) $(DEBUG) $(wcflags) $(cvarsdll) -D_WIN32_CONSOLE /FoeclipseConfig.obj ../eclipseConfig.c
+ $(cc) $(DEBUG) $(acflags) $(cvarsdll) -D_WIN32_CONSOLE /FoaeclipseConfig.obj ../eclipseConfig.c
+ $(link) $(CONSOLEFLAGS) -out:$(CONSOLE) $(MAIN_OBJS) $(COMMON_OBJS) $(LIBS)
+
+$(DLL): $(DLL_OBJS) $(COMMON_OBJS)
+ $(link) $(DLL_LFLAGS) -out:$(PROGRAM_LIBRARY) $(DLL_OBJS) $(COMMON_OBJS) $(DLL_LIBS)
+
+$(RES): $(PROGRAM_NAME).rc
+ $(rc) -r -fo $(RES) eclipse.rc
+
+install: all
+ copy $(EXEC) $(OUTPUT_DIR)
+ del -f $(EXEC) $(MAIN_OBJS) $(DLL_OBJS) $(COMMON_OBJS) $(RES)
+
+clean:
+ del $(EXEC) $(DLL) $(MAIN_OBJS) $(DLL_OBJS) $(COMMON_OBJS) $(RES)
diff --git a/bundles/org.eclipse.equinox.executable/library/wpf/eclipseWpf.cpp b/bundles/org.eclipse.equinox.executable/library/wpf/eclipseWpf.cpp
index 7edbecace..dd35e2bce 100644
--- a/bundles/org.eclipse.equinox.executable/library/wpf/eclipseWpf.cpp
+++ b/bundles/org.eclipse.equinox.executable/library/wpf/eclipseWpf.cpp
@@ -197,9 +197,9 @@ void dispatchMessages() {
Globals::frame = nullptr;
}
-long getSplashHandle() {
+jlong getSplashHandle() {
Window^ window = Globals::window;
- return (long)(int)GCHandle::ToIntPtr(GCHandle::Alloc(window));
+ return (jlong)(int)GCHandle::ToIntPtr(GCHandle::Alloc(window));
}
void takeDownSplash() {

Back to the top