1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341
|
Use mingw32 to build the windows launchers. These are useful if the Netbeans platform is used to build
another application on Debian which you want to be able to run on a Windows system.
--- a/o.n.bootstrap/launcher/windows/Makefile
+++ b/o.n.bootstrap/launcher/windows/Makefile
@@ -15,7 +15,7 @@
MKDIR=mkdir
CP=cp
CCADMIN=CCadmin
-RANLIB=ranlib
+RANLIB=i686-w64-mingw32-ranlib
@@ -26,16 +26,12 @@
# Add your pre 'build' code here...
.build-post-nbexec: .build-impl nbexecexe.cpp nbexecloader.h utilsfuncs.cpp nbexec_exe.rc
- windres.exe -Ocoff nbexec_exe.rc nbexec_exe.res
- g++ -s -mno-cygwin -DNBEXEC_DLL=\"nbexec.dll\" nbexecexe.cpp utilsfuncs.cpp nbexec_exe.res -o nbexec.exe
- cp nbexec.exe ../../../nbbuild/netbeans/platform/lib/
- cp nbexec.dll ../../../nbbuild/netbeans/platform/lib/
+ i686-w64-mingw32-windres -Ocoff nbexec_exe.rc nbexec_exe.res
+ i686-w64-mingw32-g++ -s -DNBEXEC_DLL=\"nbexec.dll\" nbexecexe.cpp utilsfuncs.cpp nbexec_exe.res -o nbexec.exe
.build-post-nbexec64: .build-impl nbexecexe.cpp nbexecloader.h utilsfuncs.cpp nbexec_exe.rc
- x86_64-w64-mingw32-windres.exe -Ocoff nbexec_exe.rc nbexec_exe64.res
- x86_64-w64-mingw32-g++.exe -m64 -s -mno-cygwin -DNBEXEC_DLL=\"nbexec64.dll\" -static-libgcc -static-libstdc++ nbexecexe.cpp utilsfuncs.cpp nbexec_exe64.res -o nbexec64.exe
- cp nbexec64.exe ../../../nbbuild/netbeans/platform/lib/
- cp nbexec64.dll ../../../nbbuild/netbeans/platform/lib/
+ x86_64-w64-mingw32-windres -Ocoff nbexec_exe.rc nbexec_exe64.res
+ x86_64-w64-mingw32-g++ -m64 -s -DNBEXEC_DLL=\"nbexec64.dll\" -static-libgcc -static-libstdc++ nbexecexe.cpp utilsfuncs.cpp nbexec_exe64.res -o nbexec64.exe
@@ -46,7 +42,7 @@
# Add your pre 'clean' code here...
.clean-post-nbexec: .clean-impl
- rm -f nbexec_exe32.res nbexec32.exe
+ rm -f nbexec_exe.res nbexec.exe
.clean-post-nbexec64: .clean-impl
rm -f nbexec_exe64.res nbexec64.exe
--- a/apisupport.harness/windows-launcher-src/Makefile
+++ b/apisupport.harness/windows-launcher-src/Makefile
@@ -17,7 +17,7 @@
MKDIR=mkdir
CP=cp
CCADMIN=CCadmin
-RANLIB=ranlib
+RANLIB=i686-w64-mingw32-ranlib
@@ -28,10 +28,10 @@
# Add your pre 'build' code here...
.build-pre-app.exe: app.rc
- windres -oapp.res -Ocoff app.rc
+ i686-w64-mingw32-windres -oapp.res -Ocoff app.rc
.build-pre-app64.exe: app.rc
- x86_64-w64-mingw32-windres.exe -oapp64.res -Ocoff app.rc
+ x86_64-w64-mingw32-windres -oapp64.res -Ocoff app.rc
.build-post: .build-impl
# Add your post 'build' code here...
@@ -40,6 +40,7 @@
# clean
clean: .clean-post
+ rm -f app.res app64.res
.clean-pre:
# Add your pre 'clean' code here...
--- a/o.n.bootstrap/launcher/windows/jvmlauncher.h
+++ b/o.n.bootstrap/launcher/windows/jvmlauncher.h
@@ -50,6 +50,18 @@
#include <windows.h>
#include <string>
#include <list>
+
+// Use the definitions below rather than the linux jdk ones
+#define _JAVASOFT_JNI_MD_H_
+// imports, exports, and calling conventions need to match those used in a dll
+#define JNIEXPORT __declspec(dllexport)
+#define JNIIMPORT __declspec(dllimport)
+#define JNICALL __stdcall
+// Correct types for the windows platform
+typedef long jint;
+typedef __int64 jlong;
+typedef signed char jbyte;
+
#include "jni.h"
#include "utilsfuncs.h"
--- a/o.n.bootstrap/launcher/windows/nbproject/Makefile-nbexec.mk
+++ b/o.n.bootstrap/launcher/windows/nbproject/Makefile-nbexec.mk
@@ -13,12 +13,12 @@
GREP=grep
NM=nm
CCADMIN=CCadmin
-RANLIB=ranlib
-CC=gcc.exe
-CCC=g++.exe
-CXX=g++.exe
-FC=gfortran
-AS=as.exe
+RANLIB=i686-w64-mingw32-ranlib
+CC=
+CCC=i686-w64-mingw32-g++
+CXX=i686-w64-mingw32-g++
+FC=
+AS=i686-w64-mingw32-as
# Macros
CND_PLATFORM=Cygwin-Windows
@@ -46,8 +46,8 @@
CFLAGS=
# CC Compiler Flags
-CCFLAGS=-m32 -mno-cygwin
-CXXFLAGS=-m32 -mno-cygwin
+CCFLAGS=-m32
+CXXFLAGS=-m32
# Fortran Compiler Flags
FFLAGS=
@@ -65,12 +65,12 @@
nbexec.dll: ${OBJECTDIR}/nbexec.res
nbexec.dll: ${OBJECTFILES}
- ${LINK.cc} -mno-cygwin -shared -o nbexec.dll ${OBJECTFILES} ${LDLIBSOPTIONS}
+ ${LINK.cc} -shared -o nbexec.dll ${OBJECTFILES} ${LDLIBSOPTIONS}
${OBJECTDIR}/jvmlauncher.o: jvmlauncher.cpp
${MKDIR} -p ${OBJECTDIR}
${RM} $@.d
- $(COMPILE.cc) -O2 -s -DNBEXEC_DLL=\"nbexec.dll\" -I/cygdrive/C/Program\ Files/Java/jdk1.7.0_17/include -I/cygdrive/C/Program\ Files/Java/jdk1.7.0_17/include/win32 -MMD -MP -MF $@.d -o ${OBJECTDIR}/jvmlauncher.o jvmlauncher.cpp
+ $(COMPILE.cc) -O2 -s -DNBEXEC_DLL=\"nbexec.dll\" -I/usr/lib/jvm/default-java/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/jvmlauncher.o jvmlauncher.cpp
: nbexec_exe.rc
@echo
@@ -79,27 +79,27 @@
${OBJECTDIR}/nbexec.res: nbexec.rc version.h
${MKDIR} -p ${OBJECTDIR}
@echo Compiling Resource files...
- windres.exe -Ocoff nbexec.rc ${OBJECTDIR}/nbexec.res
+ i686-w64-mingw32-windres -Ocoff nbexec.rc ${OBJECTDIR}/nbexec.res
${OBJECTDIR}/platformlauncher.o: platformlauncher.cpp
${MKDIR} -p ${OBJECTDIR}
${RM} $@.d
- $(COMPILE.cc) -O2 -s -DNBEXEC_DLL=\"nbexec.dll\" -I/cygdrive/C/Program\ Files/Java/jdk1.7.0_17/include -I/cygdrive/C/Program\ Files/Java/jdk1.7.0_17/include/win32 -MMD -MP -MF $@.d -o ${OBJECTDIR}/platformlauncher.o platformlauncher.cpp
+ $(COMPILE.cc) -O2 -s -DNBEXEC_DLL=\"nbexec.dll\" -I/usr/lib/jvm/default-java/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/platformlauncher.o platformlauncher.cpp
${OBJECTDIR}/nbexec.o: nbexec.cpp
${MKDIR} -p ${OBJECTDIR}
${RM} $@.d
- $(COMPILE.cc) -O2 -s -DNBEXEC_DLL=\"nbexec.dll\" -I/cygdrive/C/Program\ Files/Java/jdk1.7.0_17/include -I/cygdrive/C/Program\ Files/Java/jdk1.7.0_17/include/win32 -MMD -MP -MF $@.d -o ${OBJECTDIR}/nbexec.o nbexec.cpp
+ $(COMPILE.cc) -O2 -s -DNBEXEC_DLL=\"nbexec.dll\" -I/usr/lib/jvm/default-java/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/nbexec.o nbexec.cpp
${OBJECTDIR}/utilsfuncs.o: utilsfuncs.cpp
${MKDIR} -p ${OBJECTDIR}
${RM} $@.d
- $(COMPILE.cc) -O2 -s -DNBEXEC_DLL=\"nbexec.dll\" -I/cygdrive/C/Program\ Files/Java/jdk1.7.0_17/include -I/cygdrive/C/Program\ Files/Java/jdk1.7.0_17/include/win32 -MMD -MP -MF $@.d -o ${OBJECTDIR}/utilsfuncs.o utilsfuncs.cpp
+ $(COMPILE.cc) -O2 -s -DNBEXEC_DLL=\"nbexec.dll\" -I/usr/lib/jvm/default-java/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/utilsfuncs.o utilsfuncs.cpp
${OBJECTDIR}/nbexecexe.o: nbexecexe.cpp
${MKDIR} -p ${OBJECTDIR}
${RM} $@.d
- $(COMPILE.cc) -O2 -s -DNBEXEC_DLL=\"nbexec.dll\" -I/cygdrive/C/Program\ Files/Java/jdk1.7.0_17/include -I/cygdrive/C/Program\ Files/Java/jdk1.7.0_17/include/win32 -MMD -MP -MF $@.d -o ${OBJECTDIR}/nbexecexe.o nbexecexe.cpp
+ $(COMPILE.cc) -O2 -s -DNBEXEC_DLL=\"nbexec.dll\" -I/usr/lib/jvm/default-java/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/nbexecexe.o nbexecexe.cpp
# Subprojects
.build-subprojects:
--- a/o.n.bootstrap/launcher/windows/utilsfuncs.cpp
+++ b/o.n.bootstrap/launcher/windows/utilsfuncs.cpp
@@ -52,6 +52,7 @@
#include "argnames.h"
#include <tlhelp32.h>
#include <windows.h>
+#include <stdio.h>
using namespace std;
--- a/apisupport.harness/windows-launcher-src/nbproject/Makefile-app.exe.mk
+++ b/apisupport.harness/windows-launcher-src/nbproject/Makefile-app.exe.mk
@@ -13,12 +13,12 @@
GREP=grep
NM=nm
CCADMIN=CCadmin
-RANLIB=ranlib
-CC=gcc.exe
-CCC=g++.exe
-CXX=g++.exe
-FC=gfortran
-AS=as.exe
+RANLIB=i686-w64-mingw32-ranlib
+CC=
+CCC=i686-w64-mingw32-g++
+CXX=i686-w64-mingw32-g++
+FC=
+AS=i686-w64-mingw32-as
# Macros
CND_PLATFORM=Cygwin-Windows
@@ -45,8 +45,8 @@
CFLAGS=
# CC Compiler Flags
-CCFLAGS=-m32 -mno-cygwin
-CXXFLAGS=-m32 -mno-cygwin
+CCFLAGS=-m32
+CXXFLAGS=-m32
# Fortran Compiler Flags
FFLAGS=
--- a/ide/launcher/windows/nblauncher.cpp
+++ b/ide/launcher/windows/nblauncher.cpp
@@ -53,6 +53,7 @@
#include "../../../o.n.bootstrap/launcher/windows/utilsfuncs.h"
#include "../../../o.n.bootstrap/launcher/windows/argnames.h"
#include "../../../o.n.bootstrap/launcher/windows/nbexecloader.h"
+#include <stdio.h>
using namespace std;
--- a/o.n.bootstrap/launcher/windows/nbproject/Makefile-nbexec64.mk
+++ b/o.n.bootstrap/launcher/windows/nbproject/Makefile-nbexec64.mk
@@ -13,12 +13,12 @@
GREP=grep
NM=nm
CCADMIN=CCadmin
-RANLIB=ranlib
-CC=x86_64-w64-mingw32-gcc.exe
-CCC=x86_64-w64-mingw32-g++.exe
-CXX=x86_64-w64-mingw32-g++.exe
-FC=gfortran
-AS=as.exe
+RANLIB=x86_64-w64-mingw32-ranlib
+CC=
+CCC=x86_64-w64-mingw32-g++
+CXX=x86_64-w64-mingw32-g++
+FC=
+AS=x86_64-w64-mingw32-as
# Macros
CND_PLATFORM=Cygwin64-Windows
@@ -46,8 +46,8 @@
CFLAGS=
# CC Compiler Flags
-CCFLAGS=-m64 -mno-cygwin -static-libgcc -static-libstdc++
-CXXFLAGS=-m64 -mno-cygwin -static-libgcc -static-libstdc++
+CCFLAGS=-m64 -static-libgcc -static-libstdc++
+CXXFLAGS=-m64 -static-libgcc -static-libstdc++
# Fortran Compiler Flags
FFLAGS=
@@ -65,12 +65,12 @@
nbexec64.dll: ${OBJECTDIR}/nbexec64.res
nbexec64.dll: ${OBJECTFILES}
- ${LINK.cc} -mno-cygwin -shared -o nbexec64.dll ${OBJECTFILES} ${LDLIBSOPTIONS}
+ ${LINK.cc} -shared -o nbexec64.dll ${OBJECTFILES} ${LDLIBSOPTIONS}
${OBJECTDIR}/jvmlauncher.o: jvmlauncher.cpp
${MKDIR} -p ${OBJECTDIR}
${RM} $@.d
- $(COMPILE.cc) -O2 -s -DNBEXEC_DLL=\"nbexec64.dll\" -I/cygdrive/C/Program\ Files/Java/jdk1.7.0_17/include -I/cygdrive/C/Program\ Files/Java/jdk1.7.0_17/include/win32 -MMD -MP -MF $@.d -o ${OBJECTDIR}/jvmlauncher.o jvmlauncher.cpp
+ $(COMPILE.cc) -O2 -s -DNBEXEC_DLL=\"nbexec64.dll\" -I/usr/lib/jvm/default-java/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/jvmlauncher.o jvmlauncher.cpp
: nbexec_exe.rc
@echo
@@ -79,27 +79,27 @@
${OBJECTDIR}/nbexec64.res: nbexec.rc version.h
${MKDIR} -p ${OBJECTDIR}
@echo Compiling Resource files...
- x86_64-w64-mingw32-windres.exe -Ocoff nbexec.rc ${OBJECTDIR}/nbexec64.res
+ x86_64-w64-mingw32-windres -Ocoff nbexec.rc ${OBJECTDIR}/nbexec64.res
${OBJECTDIR}/platformlauncher.o: platformlauncher.cpp
${MKDIR} -p ${OBJECTDIR}
${RM} $@.d
- $(COMPILE.cc) -O2 -s -DNBEXEC_DLL=\"nbexec64.dll\" -I/cygdrive/C/Program\ Files/Java/jdk1.7.0_17/include -I/cygdrive/C/Program\ Files/Java/jdk1.7.0_17/include/win32 -MMD -MP -MF $@.d -o ${OBJECTDIR}/platformlauncher.o platformlauncher.cpp
+ $(COMPILE.cc) -O2 -s -DNBEXEC_DLL=\"nbexec64.dll\" -I/usr/lib/jvm/default-java/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/platformlauncher.o platformlauncher.cpp
${OBJECTDIR}/nbexec.o: nbexec.cpp
${MKDIR} -p ${OBJECTDIR}
${RM} $@.d
- $(COMPILE.cc) -O2 -s -DNBEXEC_DLL=\"nbexec64.dll\" -I/cygdrive/C/Program\ Files/Java/jdk1.7.0_17/include -I/cygdrive/C/Program\ Files/Java/jdk1.7.0_17/include/win32 -MMD -MP -MF $@.d -o ${OBJECTDIR}/nbexec.o nbexec.cpp
+ $(COMPILE.cc) -O2 -s -DNBEXEC_DLL=\"nbexec64.dll\" -I/usr/lib/jvm/default-java/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/nbexec.o nbexec.cpp
${OBJECTDIR}/utilsfuncs.o: utilsfuncs.cpp
${MKDIR} -p ${OBJECTDIR}
${RM} $@.d
- $(COMPILE.cc) -O2 -s -DNBEXEC_DLL=\"nbexec64.dll\" -I/cygdrive/C/Program\ Files/Java/jdk1.7.0_17/include -I/cygdrive/C/Program\ Files/Java/jdk1.7.0_17/include/win32 -MMD -MP -MF $@.d -o ${OBJECTDIR}/utilsfuncs.o utilsfuncs.cpp
+ $(COMPILE.cc) -O2 -s -DNBEXEC_DLL=\"nbexec64.dll\" -I/usr/lib/jvm/default-java/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/utilsfuncs.o utilsfuncs.cpp
${OBJECTDIR}/nbexecexe.o: nbexecexe.cpp
${MKDIR} -p ${OBJECTDIR}
${RM} $@.d
- $(COMPILE.cc) -O2 -s -DNBEXEC_DLL=\"nbexec64.dll\" -I/cygdrive/C/Program\ Files/Java/jdk1.7.0_17/include -I/cygdrive/C/Program\ Files/Java/jdk1.7.0_17/include/win32 -MMD -MP -MF $@.d -o ${OBJECTDIR}/nbexecexe.o nbexecexe.cpp
+ $(COMPILE.cc) -O2 -s -DNBEXEC_DLL=\"nbexec64.dll\" -I/usr/lib/jvm/default-java/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/nbexecexe.o nbexecexe.cpp
# Subprojects
.build-subprojects:
--- a/apisupport.harness/windows-launcher-src/nbproject/Makefile-app64.exe.mk
+++ b/apisupport.harness/windows-launcher-src/nbproject/Makefile-app64.exe.mk
@@ -13,12 +13,12 @@
GREP=grep
NM=nm
CCADMIN=CCadmin
-RANLIB=ranlib
-CC=x86_64-w64-mingw32-gcc.exe
-CCC=x86_64-w64-mingw32-g++.exe
-CXX=x86_64-w64-mingw32-g++.exe
-FC=gfortran
-AS=as.exe
+RANLIB=x86_64-w64-mingw32-ranlib
+CC=x86_64-w64-mingw32-gcc
+CCC=x86_64-w64-mingw32-g++
+CXX=x86_64-w64-mingw32-g++
+FC=
+AS=x86_64-w64-mingw32-as
# Macros
CND_PLATFORM=Cygwin64-Windows
@@ -45,8 +45,8 @@
CFLAGS=
# CC Compiler Flags
-CCFLAGS=-m64 -mno-cygwin -static-libgcc -static-libstdc++
-CXXFLAGS=-m64 -mno-cygwin -static-libgcc -static-libstdc++
+CCFLAGS=-m64 -static-libgcc -static-libstdc++
+CXXFLAGS=-m64 -static-libgcc -static-libstdc++
# Fortran Compiler Flags
FFLAGS=
|