diff options
author | Andrew Niefer | 2009-10-06 18:42:49 +0000 |
---|---|---|
committer | Andrew Niefer | 2009-10-06 18:42:49 +0000 |
commit | 9ffafc45f7a2bf838733d2317d50c6455ef8b5dc (patch) | |
tree | 4e264ac1fdbbe735c82e95e1427d01e28b375f57 /bundles/org.eclipse.equinox.executable/library | |
parent | 5611a9970e1942135a413f6244473f8ea5094fbe (diff) | |
download | rt.equinox.framework-9ffafc45f7a2bf838733d2317d50c6455ef8b5dc.tar.gz rt.equinox.framework-9ffafc45f7a2bf838733d2317d50c6455ef8b5dc.tar.xz rt.equinox.framework-9ffafc45f7a2bf838733d2317d50c6455ef8b5dc.zip |
bug 289138 - Remove dual ANSI/UNICODE on windows
Diffstat (limited to 'bundles/org.eclipse.equinox.executable/library')
13 files changed, 82 insertions, 375 deletions
diff --git a/bundles/org.eclipse.equinox.executable/library/eclipseCommon.h b/bundles/org.eclipse.equinox.executable/library/eclipseCommon.h index df3aeb149..e26aa062d 100644 --- a/bundles/org.eclipse.equinox.executable/library/eclipseCommon.h +++ b/bundles/org.eclipse.equinox.executable/library/eclipseCommon.h @@ -19,39 +19,8 @@ #define MAX_PATH_LENGTH 2000 -#ifdef UNICODE -#define pathSeparator pathSeparatorW -#define dirSeparator dirSeparatorW -#define getOfficialName getOfficialNameW -#define parseArgs parseArgsW -#define displayMessage displayMessageW -#define getProgramDir getProgramDirW -#define findCommand findCommandW -#define findSymlinkCommand findSymlinkCommandW -#define findFile findFileW -#define loadLibrary loadLibraryW -#define unloadLibrary unloadLibraryW -#define findSymbol findSymbolW -#define run runW -#define setInitialArgs setInitialArgsW -#define toNarrow toNarrowW -#define osArg osArgW -#define wsArg wsArgW -#define osArchArg osArchArgW -#define resolveSymlinks resolveSymlinksW -#define checkPath checkPathW -#define lastDirSeparator lastDirSeparatorW -#define firstDirSeparator firstDirSeparatorW -#endif - -#ifdef UNICODE -#define RUN_METHOD _T_ECLIPSE("runW") -#define SET_INITIAL_ARGS _T_ECLIPSE("setInitialArgsW") -#else #define RUN_METHOD _T_ECLIPSE("run") #define SET_INITIAL_ARGS _T_ECLIPSE("setInitialArgs") -#endif - #define DEFAULT_EQUINOX_STARTUP _T_ECLIPSE("org.eclipse.equinox.launcher") #ifdef _WIN32 diff --git a/bundles/org.eclipse.equinox.executable/library/eclipseConfig.h b/bundles/org.eclipse.equinox.executable/library/eclipseConfig.h index 012f71009..5315beb02 100644 --- a/bundles/org.eclipse.equinox.executable/library/eclipseConfig.h +++ b/bundles/org.eclipse.equinox.executable/library/eclipseConfig.h @@ -12,12 +12,6 @@ #ifndef ECLIPSE_CONFIG_H #define ECLIPSE_CONFIG_H -#ifdef UNICODE -#define readIniFile readIniFileW -#define readConfigFile readConfigFileW -#define freeConfig freeConfigW -#endif - /* Configuration file reading utilities */ /** diff --git a/bundles/org.eclipse.equinox.executable/library/eclipseJNI.c b/bundles/org.eclipse.equinox.executable/library/eclipseJNI.c index ae6d6cae7..8f0f267c8 100644 --- a/bundles/org.eclipse.equinox.executable/library/eclipseJNI.c +++ b/bundles/org.eclipse.equinox.executable/library/eclipseJNI.c @@ -23,24 +23,15 @@ static JNINativeMethod natives[] = {{"_update_splash", "()V", (void *)&update_sp {"_set_exit_data", "(Ljava/lang/String;Ljava/lang/String;)V", (void *)&set_exit_data}, {"_show_splash", "(Ljava/lang/String;)V", (void *)&show_splash}, {"_takedown_splash", "()V", (void *)&takedown_splash}}; - -#ifdef UNICODE -#define setExitData setExitDataW -#elif WIN32 -extern void setExitDataW(JNIEnv *env, jstring id, jstring s); -#endif /* local methods */ static jstring newJavaString(JNIEnv *env, _TCHAR * str); -static void splash(JNIEnv *env, jstring s); static void registerNatives(JNIEnv *env); static int shouldShutdown(JNIEnv *env); static void JNI_ReleaseStringChars(JNIEnv *env, jstring s, const _TCHAR* data); static const _TCHAR* JNI_GetStringChars(JNIEnv *env, jstring str); static char * getMainClass(JNIEnv *env, _TCHAR * jarFile); -void setExitData(JNIEnv *env, jstring id, jstring s); - static JavaVM * jvm = 0; static JNIEnv *env = 0; @@ -51,101 +42,8 @@ static jmethodID string_getBytesMethod = NULL; static jmethodID string_ctor = NULL; #endif -/* JNI Methods - * we only want one version of the JNI functions - * Because there are potentially ANSI and UNICODE versions of everything, we need to be - * able to call out to either, so we will set hooks depending on which version of - * registerNatives gets called. - */ -#if (!defined(UNICODE) || defined(VISTA)) -void (* exitDataHook)(JNIEnv *env, jstring id, jstring s); -void (* dispatchHook)(); -jlong (* splashHandleHook)(); -void (* showSplashHook)(JNIEnv *env, jstring s); -void (* takeDownHook)(); -#else -extern void (* exitDataHook)(JNIEnv *env, jstring id, jstring s); -extern void (* dispatchHook)(); -extern jlong (* splashHandleHook)(); -extern void (* showSplashHook)(JNIEnv *env, jstring s); -extern void (* takeDownHook)(); -#endif - -#if (!defined(UNICODE) || defined(VISTA)) /* JNI Callback methods */ JNIEXPORT void JNICALL set_exit_data(JNIEnv * env, jobject obj, jstring id, jstring s){ - if(exitDataHook != NULL) - exitDataHook(env, id, s); - else /* hook was not set, just call the ANSI version */ -#if (defined(_WIN32) || defined(VISTA)) - setExitDataW(env, id, s); -#else - setExitData(env, id, s); -#endif -} - -JNIEXPORT void JNICALL update_splash(JNIEnv * env, jobject obj){ - if(dispatchHook != NULL) - dispatchHook(); - else - dispatchMessages(); -} - -JNIEXPORT jlong JNICALL get_splash_handle(JNIEnv * env, jobject obj){ - if(splashHandleHook != NULL) - return splashHandleHook(); - else - return getSplashHandle(); -} - -JNIEXPORT void JNICALL show_splash(JNIEnv * env, jobject obj, jstring s){ - if(showSplashHook != NULL) - showSplashHook(env, s); - else - splash(env, s); -} - -JNIEXPORT void JNICALL takedown_splash(JNIEnv * env, jobject obj){ - if(takeDownHook != NULL) - takeDownHook(); - else - takeDownSplash(); -} -#endif - -static void registerNatives(JNIEnv *env) { - jclass bridge = (*env)->FindClass(env, "org/eclipse/equinox/launcher/JNIBridge"); - if(bridge != NULL) { - int numNatives = sizeof(natives) / sizeof(natives[0]); - (*env)->RegisterNatives(env, bridge, natives, numNatives); - } - if( (*env)->ExceptionOccurred(env) != 0 ){ - (*env)->ExceptionDescribe(env); - (*env)->ExceptionClear(env); - } - /*set hooks*/ - splashHandleHook = &getSplashHandle; - exitDataHook = &setExitData; - dispatchHook = &dispatchMessages; - showSplashHook = &splash; - takeDownHook = &takeDownSplash; -} - -static void splash(JNIEnv *env, jstring s) { - const _TCHAR* data = NULL; - if(s != NULL) { - data = JNI_GetStringChars(env, s); - if(data != NULL) { - showSplash(data); - JNI_ReleaseStringChars(env, s, data); - } else { - (*env)->ExceptionDescribe(env); - (*env)->ExceptionClear(env); - } - } -} - -void setExitData(JNIEnv *env, jstring id, jstring s){ const _TCHAR* data = NULL; const _TCHAR* sharedId = NULL; size_t length; @@ -176,6 +74,46 @@ void setExitData(JNIEnv *env, jstring id, jstring s){ } } +JNIEXPORT void JNICALL update_splash(JNIEnv * env, jobject obj){ + dispatchMessages(); +} + +JNIEXPORT jlong JNICALL get_splash_handle(JNIEnv * env, jobject obj){ + return getSplashHandle(); +} + +JNIEXPORT void JNICALL show_splash(JNIEnv * env, jobject obj, jstring s){ + const _TCHAR* data = NULL; + if(s != NULL) { + data = JNI_GetStringChars(env, s); + if(data != NULL) { + showSplash(data); + JNI_ReleaseStringChars(env, s, data); + } else { + (*env)->ExceptionDescribe(env); + (*env)->ExceptionClear(env); + } + } +} + +JNIEXPORT void JNICALL takedown_splash(JNIEnv * env, jobject obj){ + takeDownSplash(); +} + + +static void registerNatives(JNIEnv *env) { + jclass bridge = (*env)->FindClass(env, "org/eclipse/equinox/launcher/JNIBridge"); + if(bridge != NULL) { + int numNatives = sizeof(natives) / sizeof(natives[0]); + (*env)->RegisterNatives(env, bridge, natives, numNatives); + } + if( (*env)->ExceptionOccurred(env) != 0 ){ + (*env)->ExceptionDescribe(env); + (*env)->ExceptionClear(env); + } +} + + /* Get a _TCHAR* from a jstring, string should be released later with JNI_ReleaseStringChars */ static const _TCHAR * JNI_GetStringChars(JNIEnv *env, jstring str) { const _TCHAR * result = NULL; diff --git a/bundles/org.eclipse.equinox.executable/library/eclipseJNI.h b/bundles/org.eclipse.equinox.executable/library/eclipseJNI.h index 331751b78..b253ada78 100644 --- a/bundles/org.eclipse.equinox.executable/library/eclipseJNI.h +++ b/bundles/org.eclipse.equinox.executable/library/eclipseJNI.h @@ -14,13 +14,6 @@ #include "eclipseUnicode.h" #include <jni.h> -#ifdef UNICODE -#define loadVMLibrary loadVMLibraryW -#define unloadVMLibrary unloadVMLibraryW -#define getInvocationFunction getInvocationFunctionW -#define startJavaJNI startJavaJNIW -#define cleanupVM cleanupVMW -#endif typedef jint (JNICALL *JNI_createJavaVM)(JavaVM **pvm, JNIEnv **env, void *args); diff --git a/bundles/org.eclipse.equinox.executable/library/eclipseMain.c b/bundles/org.eclipse.equinox.executable/library/eclipseMain.c index f6adfa7aa..c1f1885d7 100644 --- a/bundles/org.eclipse.equinox.executable/library/eclipseMain.c +++ b/bundles/org.eclipse.equinox.executable/library/eclipseMain.c @@ -57,43 +57,37 @@ static _TCHAR* checkForIni(int argc, _TCHAR* argv[]); static int initialArgc; static _TCHAR** initialArgv; -#if (defined(_WIN32) || defined(VISTA)) #ifdef UNICODE extern int main(int, char**); int mainW(int, wchar_t**); int wmain( int argc, wchar_t** argv ) { -#ifndef VISTA - OSVERSIONINFOW info; - info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOW); + return mainW(argc, argv); +} + +int main(int argc, char* argv[]) { /* - * If the OS supports UNICODE functions, run the UNICODE version - * of the main function. Otherwise, convert the arguments to - * MBCS and run the ANSI version of the main function. + * Run the UNICODE version, convert the arguments from MBCS to UNICODE */ - if (!GetVersionExW (&info)) { - int i, result; - char **newArgv = malloc(argc * sizeof(char *)); - for (i=0; i<argc; i++) { - wchar_t *oldArg = argv[i]; - int byteCount = WideCharToMultiByte (CP_ACP, 0, oldArg, -1, NULL, 0, NULL, NULL); - char *newArg = malloc(byteCount+1); - newArg[byteCount] = 0; - WideCharToMultiByte (CP_ACP, 0, oldArg, -1, newArg, byteCount, NULL, NULL); - newArgv[i] = newArg; - } - result = main(argc, newArgv); - for (i=0; i<argc; i++) { - free(newArgv[i]); - } - free(newArgv); - return result; + int i, result; + wchar_t **newArgv = malloc(argc * sizeof(wchar_t *)); + for (i=0; i<argc; i++) { + char *oldArg = argv[i]; + int numChars = MultiByteToWideChar(CP_ACP, 0, oldArg, -1, NULL, 0); + wchar_t *newArg = malloc((numChars + 1) * sizeof(wchar_t)); + newArg[numChars] = 0; + MultiByteToWideChar(CP_ACP, 0, oldArg, -1, newArg, numChars); + newArgv[i] = newArg; } -#endif - return mainW(argc, argv); + result = mainW(argc, newArgv); + for (i=0; i<argc; i++) { + free(newArgv[i]); + } + free(newArgv); + return result; } + #define main mainW #endif /* UNICODE */ -#endif /* _WIN32 */ int main( int argc, _TCHAR* argv[] ) { diff --git a/bundles/org.eclipse.equinox.executable/library/eclipseOS.h b/bundles/org.eclipse.equinox.executable/library/eclipseOS.h index 63028bc9c..a55fec533 100644 --- a/bundles/org.eclipse.equinox.executable/library/eclipseOS.h +++ b/bundles/org.eclipse.equinox.executable/library/eclipseOS.h @@ -16,31 +16,6 @@ #include <jni.h> #include "eclipseUnicode.h" -#ifdef UNICODE -#define shippedVMDir shippedVMDirW -#define defaultVM defaultVMW -#define consoleVM consoleVMW -#define initWindowSystem initWindowSystemW -#define showSplash showSplashW -#define getArgVM getArgVMW -#define findCommand findCommandW -#define exitData exitDataW -#define vmLibrary vmLibraryW -#define findVMLibrary findVMLibraryW -#define dispatchMessages dispatchMessagesW -#define getSplashHandle getSplashHandleW -#define takeDownSplash takeDownSplashW -#define restartLauncher restartLauncherW -#define launchJavaVM launchJavaVMW -#define startJavaVM startJavaVMW -#define eeLibPath eeLibPathW -#define processVMArgs processVMArgsW -#define initialArgv initialArgvW -#define secondThread secondThreadW -#define isSunVM isSunVMW -#define getVMLibrarySearchPath getVMLibrarySearchPathW -#endif - #ifdef MACOSX #define JAVA_FRAMEWORK "/System/Library/Frameworks/JavaVM.framework" #endif diff --git a/bundles/org.eclipse.equinox.executable/library/eclipseShm.h b/bundles/org.eclipse.equinox.executable/library/eclipseShm.h index be3b5d3ac..750d7803e 100644 --- a/bundles/org.eclipse.equinox.executable/library/eclipseShm.h +++ b/bundles/org.eclipse.equinox.executable/library/eclipseShm.h @@ -13,13 +13,6 @@ #ifndef ECLIPSE_SHM_H #define ECLIPSE_SHM_H -#ifdef UNICODE -#define createSharedData createSharedDataW -#define destroySharedData destroySharedDataW -#define getSharedData getSharedDataW -#define setSharedData setSharedDataW -#endif - /* Shared memory utilities */ /** diff --git a/bundles/org.eclipse.equinox.executable/library/eclipseUtil.h b/bundles/org.eclipse.equinox.executable/library/eclipseUtil.h index 68086c3af..78ae23f95 100644 --- a/bundles/org.eclipse.equinox.executable/library/eclipseUtil.h +++ b/bundles/org.eclipse.equinox.executable/library/eclipseUtil.h @@ -13,15 +13,6 @@ #ifndef ECLIPSE_UTIL_H #define ECLIPSE_UTIL_H -#ifdef UNICODE -#define isJ9VM isJ9VMW -#define isVMLibrary isVMLibraryW -#define checkProvidedVMType checkProvidedVMTypeW -#define checkPathList checkPathListW -#define concatStrings concatStringsW -#define containsPaths containsPathsW -#endif - /* constants for checkProvidedVMType */ #define VM_NOTHING 0 /* NULL was given as input */ #define VM_OTHER 1 /* don't know, could be executable or could be nothing */ diff --git a/bundles/org.eclipse.equinox.executable/library/win32/eclipseWinCommon.c b/bundles/org.eclipse.equinox.executable/library/win32/eclipseWinCommon.c index 23c0f2e04..20a45cd90 100644 --- a/bundles/org.eclipse.equinox.executable/library/win32/eclipseWinCommon.c +++ b/bundles/org.eclipse.equinox.executable/library/win32/eclipseWinCommon.c @@ -23,30 +23,13 @@ _TCHAR dirSeparator = _T('\\'); _TCHAR pathSeparator = _T(';'); /* Global Main Window*/ -#ifdef UNICODE -extern HWND topWindow; -#else HWND topWindow = 0; -#endif /* Define local variables for the main window. */ /*static WNDPROC oldProc;*/ static int initialized = 0; -#ifdef UNICODE -HINSTANCE g_hInstance = NULL; -BOOL WINAPI DllMain(HANDLE hInstDLL, DWORD dwReason, LPVOID lpvReserved) -{ - if (dwReason == DLL_PROCESS_ATTACH) { - if (g_hInstance == NULL) g_hInstance = hInstDLL; - } - return TRUE; -} -#else -extern HINSTANCE g_hInstance; -#endif - /* Display a Message */ void displayMessage( _TCHAR* title, _TCHAR* message ) { diff --git a/bundles/org.eclipse.equinox.executable/library/win32/make_mingw.mak b/bundles/org.eclipse.equinox.executable/library/win32/make_mingw.mak index 6bc262c26..449b33f67 100644 --- a/bundles/org.eclipse.equinox.executable/library/win32/make_mingw.mak +++ b/bundles/org.eclipse.equinox.executable/library/win32/make_mingw.mak @@ -1,5 +1,5 @@ #******************************************************************************* -# Copyright (c) 2000, 2005 IBM Corporation and others. +# Copyright (c) 2000, 2009 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 @@ -52,11 +52,9 @@ $(error Unable to find $(CCVER)-pc-cygwin-gcc) endif # Define the object modules to be compiled and flags. -MAIN_OBJS = eclipseMain.o aeclipseMain.o -COMMON_OBJS = eclipseConfig.o eclipseCommon.o eclipseWinCommon.o\ - aeclipseConfig.o aeclipseCommon.o aeclipseWinCommon.o -DLL_OBJS = eclipse.o eclipseWin.o eclipseUtil.o eclipseJNI.o eclipseShm.o\ - aeclipse.o aeclipseWin.o aeclipseUtil.o aeclipseJNI.o aeclipseShm.o +MAIN_OBJS = eclipseMain.o +COMMON_OBJS = eclipseConfig.o eclipseCommon.o eclipseWinCommon.o +DLL_OBJS = eclipse.o eclipseWin.o eclipseUtil.o eclipseJNI.o eclipseShm.o LIBS = -lkernel32 -luser32 -lgdi32 -lcomctl32 -lmsvcrt -lversion LDFLAGS = -mwindows -mno-cygwin @@ -72,32 +70,22 @@ CFLAGS = -g -s -Wall \ -D_WIN32 \ -DWIN32_LEAN_AND_MEAN \ -mno-cygwin -D__int64="long long" -ACFLAGS = -I.. -DDEFAULT_OS="\"$(DEFAULT_OS)\"" \ +WCFLAGS = -DUNICODE -I.. -DDEFAULT_OS="\"$(DEFAULT_OS)\"" \ -DDEFAULT_OS_ARCH="\"$(DEFAULT_OS_ARCH)\"" \ -DDEFAULT_WS="\"$(DEFAULT_WS)\"" \ $(DEBUG) $(CFLAGS) -WCFLAGS = -DUNICODE $(ACFLAGS) all: $(EXEC) $(DLL) $(CONSOLE) eclipseMain.o: ../eclipseUnicode.h ../eclipseCommon.h ../eclipseMain.c $(CC) $(DEBUG) $(WCFLAGS) -c -o $@ ../eclipseMain.c -aeclipseMain.o: ../eclipseUnicode.h ../eclipseCommon.h ../eclipseMain.c - $(CC) $(DEBUG) $(ACFLAGS) -c -o $@ ../eclipseMain.c - eclipseCommon.o: ../eclipseCommon.h ../eclipseUnicode.h ../eclipseCommon.c $(CC) $(DEBUG) $(WCFLAGS) -c -o $@ ../eclipseCommon.c -aeclipseCommon.o: ../eclipseCommon.h ../eclipseUnicode.h ../eclipseCommon.c - $(CC) $(DEBUG) $(ACFLAGS) -c -o $@ ../eclipseCommon.c - eclipseWinCommon.o: ../eclipseCommon.h eclipseWinCommon.c $(CC) $(DEBUG) $(WCFLAGS) -c -o $@ eclipseWinCommon.c -aeclipseWinCommon.o: ../eclipseCommon.h eclipseWinCommon.c - $(CC) $(DEBUG) $(ACFLAGS) -c -o $@ eclipseWinCommon.c - eclipse.o: ../eclipseOS.h ../eclipseUnicode.h ../eclipseJNI.h ../eclipseCommon.h ../eclipse.c $(CC) $(DEBUG) $(WCFLAGS) -c -o $@ ../eclipse.c @@ -116,24 +104,6 @@ eclipseJNI.o: ../eclipseUnicode.h ../eclipseJNI.c eclipseShm.o: ../eclipseShm.h ../eclipseUnicode.h ../eclipseShm.c $(CC) $(DEBUG) $(WCFLAGS) -c -o $@ ../eclipseShm.c -aeclipseShm.o: ../eclipseShm.h ../eclipseUnicode.h ../eclipseShm.c - $(CC) $(DEBUG) $(ACFLAGS) -c -o $@ ../eclipseShm.c - -aeclipse.o: ../eclipseOS.h ../eclipseUnicode.h ../eclipseCommon.h ../eclipse.c - $(CC) $(DEBUG) $(ACFLAGS) -c -o $@ ../eclipse.c - -aeclipseUtil.o: ../eclipseUtil.h ../eclipseUnicode.h ../eclipseUtil.c - $(CC) $(DEBUG) $(ACFLAGS) -c -o $@ ../eclipseUtil.c - -aeclipseConfig.o: ../eclipseConfig.h ../eclipseUnicode.h ../eclipseConfig.c - $(CC) $(DEBUG) $(ACFLAGS) -c -o $@ ../eclipseConfig.c - -aeclipseWin.o: ../eclipseOS.h ../eclipseUnicode.h eclipseWin.c - $(CC) $(DEBUG) $(ACFLAGS) -c -o $@ eclipseWin.c - -aeclipseJNI.o: ../eclipseUnicode.h ../eclipseJNI.c - $(CC) $(DEBUG) $(ACFLAGS) -c -o $@ ../eclipseJNI.c - $(RES): $(PROGRAM_NAME).rc $(RC) --output-format=coff --include-dir=.. -o $@ $< @@ -144,7 +114,6 @@ $(EXEC): $(MAIN_OBJS) $(COMMON_OBJS) $(RES) $(CONSOLE): $(MAIN_OBJS) $(COMMON_OBJS) rm -f eclipseConfig.o aeclipseConfig.o $(CC) $(DEBUG) $(WCFLAGS) -D_WIN32_CONSOLE -c -o eclipseConfig.o ../eclipseConfig.c - $(CC) $(DEBUG) $(ACFLAGS) -D_WIN32_CONSOLE -c -o aeclipseConfig.o ../eclipseConfig.c $(CC) $(CONSOLEFLAGS) -o $(CONSOLE) $(MAIN_OBJS) $(COMMON_OBJS) $(LIBS) $(DLL): $(DLL_OBJS) $(COMMON_OBJS) diff --git a/bundles/org.eclipse.equinox.executable/library/win32/make_win32.mak b/bundles/org.eclipse.equinox.executable/library/win32/make_win32.mak index 6110609e0..48ffefb7e 100644 --- a/bundles/org.eclipse.equinox.executable/library/win32/make_win32.mak +++ b/bundles/org.eclipse.equinox.executable/library/win32/make_win32.mak @@ -1,5 +1,5 @@ #****************************************************************************** -# Copyright (c) 2000, 2006 IBM Corporation and others. +# Copyright (c) 2000, 2009 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 @@ -31,11 +31,9 @@ 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 +MAIN_OBJS = eclipseMain.obj +COMMON_OBJS = eclipseConfig.obj eclipseCommon.obj eclipseWinCommon.obj +DLL_OBJS = eclipse.obj eclipseWin.obj eclipseUtil.obj eclipseJNI.obj eclipseShm.obj LIBS = kernel32.lib user32.lib comctl32.lib msvcrt.lib DLL_LIBS = kernel32.lib user32.lib comctl32.lib gdi32.lib Advapi32.lib msvcrt.lib version.lib @@ -47,12 +45,12 @@ EXEC = $(PROGRAM_OUTPUT) CONSOLE = $(PROGRAM_NAME)c.exe DLL = $(PROGRAM_LIBRARY) DEBUG = #$(cdebug) -acflags = -I.. -DDEFAULT_OS="\"$(DEFAULT_OS)\"" \ +wcflags = -DUNICODE -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 @@ -82,33 +80,6 @@ eclipseJNI.obj: ../eclipseCommon.h ../eclipseOS.h ../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) @@ -116,7 +87,6 @@ $(EXEC): $(MAIN_OBJS) $(COMMON_OBJS) $(RES) $(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) diff --git a/bundles/org.eclipse.equinox.executable/library/win32/make_win64.mak b/bundles/org.eclipse.equinox.executable/library/win32/make_win64.mak index f009b00e7..f1faaabca 100644 --- a/bundles/org.eclipse.equinox.executable/library/win32/make_win64.mak +++ b/bundles/org.eclipse.equinox.executable/library/win32/make_win64.mak @@ -1,5 +1,5 @@ #****************************************************************************** -# Copyright (c) 2007 IBM Corporation and others. +# Copyright (c) 2007, 2009 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 @@ -35,11 +35,9 @@ 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 +MAIN_OBJS = eclipseMain.obj +COMMON_OBJS = eclipseConfig.obj eclipseCommon.obj eclipseWinCommon.obj +DLL_OBJS = eclipse.obj eclipseWin.obj eclipseUtil.obj eclipseJNI.obj eclipseShm.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 @@ -52,12 +50,11 @@ EXEC = $(PROGRAM_OUTPUT) CONSOLE = $(PROGRAM_NAME)c.exe DLL = $(PROGRAM_LIBRARY) DEBUG = #$(cdebug) -acflags = -I.. -DDEFAULT_OS="\"$(DEFAULT_OS)\"" \ +wcflags = -DUNICODE -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 @@ -87,33 +84,6 @@ eclipseJNI.obj: ../eclipseCommon.h ../eclipseOS.h ../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) @@ -121,7 +91,6 @@ $(EXEC): $(MAIN_OBJS) $(COMMON_OBJS) $(RES) $(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) diff --git a/bundles/org.eclipse.equinox.executable/library/win32/make_win64_ia64.mak b/bundles/org.eclipse.equinox.executable/library/win32/make_win64_ia64.mak index 123c8f3ed..5d9ff5c86 100644 --- a/bundles/org.eclipse.equinox.executable/library/win32/make_win64_ia64.mak +++ b/bundles/org.eclipse.equinox.executable/library/win32/make_win64_ia64.mak @@ -1,5 +1,5 @@ #****************************************************************************** -# Copyright (c) 2000, 2006 IBM Corporation and others. +# Copyright (c) 2000, 2009 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 @@ -27,11 +27,9 @@ NODEBUG=1 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 +MAIN_OBJS = eclipseMain.obj +COMMON_OBJS = eclipseConfig.obj eclipseCommon.obj eclipseWinCommon.obj +DLL_OBJS = eclipse.obj eclipseWin.obj eclipseUtil.obj eclipseJNI.obj eclipseShm.obj # using dynamic lib #LIBS = kernel32.lib user32.lib comctl32.lib msvcrt.lib @@ -51,12 +49,11 @@ EXEC = eclipse.exe CONSOLE = eclipsec.exe DLL = $(PROGRAM_LIBRARY) DEBUG = #$(cdebug) -acflags = -I.. -DDEFAULT_OS="\"$(DEFAULT_OS)\"" \ +wcflags = -DUNICODE -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) -D_CRT_SECURE_NO_WARNINGS -D_CRT_NON_CONFORMING_SWPRINTFS -wcflags = -DUNICODE $(acflags) all: $(EXEC) $(DLL) $(CONSOLE) eclipseMain.obj: ../eclipseUnicode.h ../eclipseCommon.h ../eclipseMain.c @@ -86,33 +83,6 @@ eclipseJNI.obj: ../eclipseCommon.h ../eclipseOS.h ../eclipseJNI.c eclipseShm.obj: ../eclipseShm.h ../eclipseUnicode.h ../eclipseShm.c $(CC) $(DEBUG) $(wcflags) $(cvars) /Fo$*.obj ../eclipseShm.c -aeclipseShm.obj: ../eclipseShm.h ../eclipseUnicode.h ../eclipseShm.c - $(CC) $(DEBUG) $(acflags) $(cvars) /FoaeclipseShm.obj ../eclipseShm.c - -aeclipseJNI.obj: ../eclipseCommon.h ../eclipseOS.h ../eclipseJNI.c - $(cc) $(DEBUG) $(acflags) $(cvars) /FoaeclipseJNI.obj ../eclipseJNI.c - -aeclipseMain.obj: ../eclipseUnicode.h ../eclipseCommon.h ../eclipseMain.c - $(cc) $(DEBUG) $(acflags) $(cvars) /FoaeclipseMain.obj ../eclipseMain.c - -aeclipseCommon.obj: ../eclipseCommon.h ../eclipseUnicode.h ../eclipseCommon.c - $(cc) $(DEBUG) $(acflags) $(cvars) /FoaeclipseCommon.obj ../eclipseCommon.c - -aeclipse.obj: ../eclipseOS.h ../eclipseUnicode.h ../eclipse.c - $(cc) $(DEBUG) $(acflags) $(cvars) /Foaeclipse.obj ../eclipse.c - -aeclipseUtil.obj: ../eclipseUtil.h ../eclipseUnicode.h ../eclipseUtil.c - $(cc) $(DEBUG) $(acflags) $(cvars) /FoaeclipseUtil.obj ../eclipseUtil.c - -aeclipseConfig.obj: ../eclipseConfig.h ../eclipseConfig.h ../eclipseConfig.c - $(cc) $(DEBUG) $(acflags) $(cvars) /FoaeclipseConfig.obj ../eclipseConfig.c - -aeclipseWin.obj: ../eclipseOS.h ../eclipseUnicode.h eclipseWin.c - $(cc) $(DEBUG) $(acflags) $(cvars) /FoaeclipseWin.obj eclipseWin.c - -aeclipseWinCommon.obj: ../eclipseCommon.h eclipseWinCommon.c - $(cc) $(DEBUG) $(acflags) $(cvars) /FoaeclipseWinCommon.obj eclipseWinCommon.c - $(EXEC): $(MAIN_OBJS) $(COMMON_OBJS) $(RES) $(link) $(LFLAGS) -out:$(PROGRAM_OUTPUT) $(MAIN_OBJS) $(COMMON_OBJS) $(RES) $(LIBS) #$(EXEC): $(MAIN_OBJS) $(COMMON_OBJS) $(RES) @@ -122,7 +92,6 @@ $(EXEC): $(MAIN_OBJS) $(COMMON_OBJS) $(RES) $(CONSOLE): $(MAIN_OBJS) $(COMMON_OBJS) del -f eclipseConfig.obj aeclipseConfig.obj $(cc) $(DEBUG) $(wcflags) $(cvars) -D_WIN32_CONSOLE /FoeclipseConfig.obj ../eclipseConfig.c - $(cc) $(DEBUG) $(acflags) $(cvars) -D_WIN32_CONSOLE /FoaeclipseConfig.obj ../eclipseConfig.c $(link) $(CONSOLEFLAGS) -out:$(CONSOLE) $(MAIN_OBJS) $(COMMON_OBJS) $(LIBS) $(DLL): $(DLL_OBJS) $(COMMON_OBJS) |