forked from apache/netbeans
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Since the build scripts will from now on be used in a CI/CD pipeline they need to be strictly correct, not have bugs and not require manual intervention. Therefore... Fixes: - The Windows build scripts did not incorporate Peter's fix, i.e. creating the 'config.h' file as a pre-cursor to the actual build. This is now fixed. (compare to build scripts for MacOS and Linux) - The Windows build script did not include headers from '..\build' when compiling. They therefore did not work. This is now fixed. (this is a consequence of the JNI headers having been removed from source control in commit f395ace; the change was correctly implemented at the time in build scripts for Linux and MacOS but for some reason never in build scripts for Windows) - The Windows build scripts will now stop on first error. (checks for exit code and abends immediately). The Linux and MacOS scripts do not need the same logic as such script can simply be executed with 'bash -x <script>'. - The content of the 'config.h' file is now echoed to the console as part of the build. This file is crucial to understand the fix for the bug reported in NETBEANS-1428. - Since we will be creating 32-bit binaries on 64-bit platforms (because we can no longer find 32-bit hosts to build on): The Linux 32-bit script did not create a 32-bit binary for the 'config' application, hence it produced an incorrect 'config.h' file. - The Windows build scripts could not handle path names with spaces in them as is typical in Windows world. Hence the script did not work when executed from a GitHub Action workflow. This is now fixed. (too lazy to fix the same problem in the MacOS and Linux scripts; on those platforms the problem never manifests itself) - MacOS script: was hardwired to use the installed JDK rather than using the JDK_HOME environment variable. This is now fixed. - MacOS script: added comments and transparency about how the Universal Library mechanism works. (the result of the mechanism is that binaries for legacy platforms PowerPC and i386 architectures still exist in the bundle but do not receive bug fixes .. meaning they'll not as an example receive bug fix for NETBEANS-1428) - The Windows build scripts used Unix line endings. Although Windows doesn't mind this when executing such script it has now been corrected.
- Loading branch information
Showing
5 changed files
with
194 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
116 changes: 65 additions & 51 deletions
116
profiler/lib.profiler/native/scripts/buildnative-windows-16.bat
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,66 @@ | ||
rem Licensed to the Apache Software Foundation (ASF) under one | ||
rem or more contributor license agreements. See the NOTICE file | ||
rem distributed with this work for additional information | ||
rem regarding copyright ownership. The ASF licenses this file | ||
rem to you under the Apache License, Version 2.0 (the | ||
rem "License"); you may not use this file except in compliance | ||
rem with the License. You may obtain a copy of the License at | ||
rem | ||
rem http://www.apache.org/licenses/LICENSE-2.0 | ||
rem | ||
rem Unless required by applicable law or agreed to in writing, | ||
rem software distributed under the License is distributed on an | ||
rem "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
rem KIND, either express or implied. See the License for the | ||
rem specific language governing permissions and limitations | ||
rem under the License. | ||
|
||
rem Edit the following line to set the JDK location (for JNI headers) | ||
rem or leave if you have JDK_HOME set. | ||
SET BUILD_JDK=%JDK_HOME% | ||
rem Edit the following line to affect the deployment directory. | ||
rem Should not need to be changed as JNI is compatible for all versions | ||
rem after 1.6. | ||
SET JDK_DEPLOY=jdk16 | ||
SET PLATFORM=windows | ||
|
||
rem Do not alter below this line | ||
SET BUILD_SRC_15=..\src-jdk15 | ||
SET BUILD_SRC=..\src | ||
SET BUILD_DEPLOY=..\..\release\lib | ||
|
||
mkdir %BUILD_DEPLOY%\deployed\%JDK_DEPLOY%\%PLATFORM% | ||
|
||
rc /Fo .\version.res %BUILD_SRC_15%\windows\version.rc | ||
|
||
cl /I%BUILD_JDK%\include /I%BUILD_JDK%\include\win32 ^ | ||
%BUILD_SRC_15%\class_file_cache.c ^ | ||
%BUILD_SRC_15%\attach.c ^ | ||
%BUILD_SRC_15%\Classes.c ^ | ||
%BUILD_SRC_15%\HeapDump.c ^ | ||
%BUILD_SRC_15%\Timers.c ^ | ||
%BUILD_SRC_15%\GC.c ^ | ||
%BUILD_SRC_15%\Threads.c ^ | ||
%BUILD_SRC_15%\Stacks.c ^ | ||
%BUILD_SRC_15%\common_functions.c ^ | ||
version.res ^ | ||
/D WIN32 /D NDEBUG /LD /MD /O2 ^ | ||
/Fe:%BUILD_DEPLOY%\deployed\%JDK_DEPLOY%\%PLATFORM%\profilerinterface.dll ^ | ||
/Fm:%BUILD_DEPLOY%\deployed\%JDK_DEPLOY%\%PLATFORM%\profilerinterface.map ^ | ||
/link /DYNAMICBASE | ||
|
||
rem Licensed to the Apache Software Foundation (ASF) under one | ||
rem or more contributor license agreements. See the NOTICE file | ||
rem distributed with this work for additional information | ||
rem regarding copyright ownership. The ASF licenses this file | ||
rem to you under the Apache License, Version 2.0 (the | ||
rem "License"); you may not use this file except in compliance | ||
rem with the License. You may obtain a copy of the License at | ||
rem | ||
rem http://www.apache.org/licenses/LICENSE-2.0 | ||
rem | ||
rem Unless required by applicable law or agreed to in writing, | ||
rem software distributed under the License is distributed on an | ||
rem "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
rem KIND, either express or implied. See the License for the | ||
rem specific language governing permissions and limitations | ||
rem under the License. | ||
|
||
rem Edit the following line to set the JDK location (for JNI headers) | ||
rem or leave if you have JDK_HOME set. | ||
SET BUILD_JDK=%JDK_HOME% | ||
rem Edit the following line to affect the deployment directory. | ||
rem Should not need to be changed as JNI is compatible for all versions | ||
rem after 1.6. | ||
SET JDK_DEPLOY=jdk16 | ||
SET PLATFORM=windows | ||
|
||
rem Do not alter below this line | ||
SET BUILD_SRC_15=..\src-jdk15 | ||
SET BUILD_SRC=..\src | ||
SET BUILD_DEPLOY=..\..\release\lib | ||
|
||
if not exist "%BUILD_DEPLOY%\deployed\%JDK_DEPLOY%\%PLATFORM%" mkdir "%BUILD_DEPLOY%\deployed\%JDK_DEPLOY%\%PLATFORM%" | ||
|
||
echo on | ||
|
||
rem Generate 'config.h' file | ||
cl /I"%BUILD_JDK%\include" /I"%BUILD_JDK%\include\win32" ^ | ||
..\src-jdk15\config.c /link /out:..\build\config.exe && ^ | ||
..\build\config.exe > ..\build\config.h || ^ | ||
exit /b 1 | ||
|
||
echo Content of config.h : | ||
type ..\build\config.h | ||
|
||
|
||
|
||
rc /Fo .\version.res "%BUILD_SRC_15%\windows\version.rc" | ||
|
||
cl /I"%BUILD_JDK%\include" /I"%BUILD_JDK%\include\win32" /I..\build ^ | ||
"%BUILD_SRC_15%\class_file_cache.c" ^ | ||
"%BUILD_SRC_15%\attach.c" ^ | ||
"%BUILD_SRC_15%\Classes.c" ^ | ||
"%BUILD_SRC_15%\HeapDump.c" ^ | ||
"%BUILD_SRC_15%\Timers.c" ^ | ||
"%BUILD_SRC_15%\GC.c" ^ | ||
"%BUILD_SRC_15%\Threads.c" ^ | ||
"%BUILD_SRC_15%\Stacks.c" ^ | ||
"%BUILD_SRC_15%\common_functions.c" ^ | ||
version.res ^ | ||
/D WIN32 /D NDEBUG /LD /MD /O2 ^ | ||
/Fe:"%BUILD_DEPLOY%\deployed\%JDK_DEPLOY%\%PLATFORM%\profilerinterface.dll" ^ | ||
/Fm:"%BUILD_DEPLOY%\deployed\%JDK_DEPLOY%\%PLATFORM%\profilerinterface.map" ^ | ||
/link /DYNAMICBASE || ^ | ||
exit /b 1 | ||
|
||
del version.res |
116 changes: 65 additions & 51 deletions
116
profiler/lib.profiler/native/scripts/buildnative-windows64-16.bat
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,66 @@ | ||
rem Licensed to the Apache Software Foundation (ASF) under one | ||
rem or more contributor license agreements. See the NOTICE file | ||
rem distributed with this work for additional information | ||
rem regarding copyright ownership. The ASF licenses this file | ||
rem to you under the Apache License, Version 2.0 (the | ||
rem "License"); you may not use this file except in compliance | ||
rem with the License. You may obtain a copy of the License at | ||
rem | ||
rem http://www.apache.org/licenses/LICENSE-2.0 | ||
rem | ||
rem Unless required by applicable law or agreed to in writing, | ||
rem software distributed under the License is distributed on an | ||
rem "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
rem KIND, either express or implied. See the License for the | ||
rem specific language governing permissions and limitations | ||
rem under the License. | ||
|
||
rem Edit the following line to set the JDK location (for JNI headers) | ||
rem or leave if you have JDK_HOME set. | ||
SET BUILD_JDK=%JDK_HOME% | ||
rem Edit the following line to affect the deployment directory. | ||
rem Should not need to be changed as JNI is compatible for all versions | ||
rem after 1.6. | ||
SET JDK_DEPLOY=jdk16 | ||
SET PLATFORM=windows-amd64 | ||
|
||
rem Do not alter below this line | ||
SET BUILD_SRC_15=..\src-jdk15 | ||
SET BUILD_SRC=..\src | ||
SET BUILD_DEPLOY=..\..\release\lib | ||
|
||
mkdir %BUILD_DEPLOY%\deployed\%JDK_DEPLOY%\%PLATFORM% | ||
|
||
rc /Fo .\version.res %BUILD_SRC_15%\windows\version.rc | ||
|
||
cl /I%BUILD_JDK%\include /I%BUILD_JDK%\include\win32 ^ | ||
%BUILD_SRC_15%\class_file_cache.c ^ | ||
%BUILD_SRC_15%\attach.c ^ | ||
%BUILD_SRC_15%\Classes.c ^ | ||
%BUILD_SRC_15%\HeapDump.c ^ | ||
%BUILD_SRC_15%\Timers.c ^ | ||
%BUILD_SRC_15%\GC.c ^ | ||
%BUILD_SRC_15%\Threads.c ^ | ||
%BUILD_SRC_15%\Stacks.c ^ | ||
%BUILD_SRC_15%\common_functions.c ^ | ||
version.res ^ | ||
/D WIN32 /D NDEBUG /LD /MD /O2 ^ | ||
/Fe:%BUILD_DEPLOY%\deployed\%JDK_DEPLOY%\%PLATFORM%\profilerinterface.dll ^ | ||
/Fm:%BUILD_DEPLOY%\deployed\%JDK_DEPLOY%\%PLATFORM%\profilerinterface.map ^ | ||
/link /DYNAMICBASE | ||
|
||
rem Licensed to the Apache Software Foundation (ASF) under one | ||
rem or more contributor license agreements. See the NOTICE file | ||
rem distributed with this work for additional information | ||
rem regarding copyright ownership. The ASF licenses this file | ||
rem to you under the Apache License, Version 2.0 (the | ||
rem "License"); you may not use this file except in compliance | ||
rem with the License. You may obtain a copy of the License at | ||
rem | ||
rem http://www.apache.org/licenses/LICENSE-2.0 | ||
rem | ||
rem Unless required by applicable law or agreed to in writing, | ||
rem software distributed under the License is distributed on an | ||
rem "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
rem KIND, either express or implied. See the License for the | ||
rem specific language governing permissions and limitations | ||
rem under the License. | ||
|
||
rem Edit the following line to set the JDK location (for JNI headers) | ||
rem or leave if you have JDK_HOME set. | ||
SET BUILD_JDK=%JDK_HOME% | ||
rem Edit the following line to affect the deployment directory. | ||
rem Should not need to be changed as JNI is compatible for all versions | ||
rem after 1.6. | ||
SET JDK_DEPLOY=jdk16 | ||
SET PLATFORM=windows-amd64 | ||
|
||
rem Do not alter below this line | ||
SET BUILD_SRC_15=..\src-jdk15 | ||
SET BUILD_SRC=..\src | ||
SET BUILD_DEPLOY=..\..\release\lib | ||
|
||
if not exist "%BUILD_DEPLOY%\deployed\%JDK_DEPLOY%\%PLATFORM%" mkdir "%BUILD_DEPLOY%\deployed\%JDK_DEPLOY%\%PLATFORM%" | ||
|
||
echo on | ||
|
||
rem Generate 'config.h' file | ||
cl /I"%BUILD_JDK%\include" /I"%BUILD_JDK%\include\win32" ^ | ||
..\src-jdk15\config.c /link /out:..\build\config.exe && ^ | ||
..\build\config.exe > ..\build\config.h || ^ | ||
exit /b 1 | ||
|
||
echo Content of config.h : | ||
type ..\build\config.h | ||
|
||
|
||
|
||
rc /Fo .\version.res "%BUILD_SRC_15%\windows\version.rc" | ||
|
||
cl /I"%BUILD_JDK%\include" /I"%BUILD_JDK%\include\win32" /I..\build ^ | ||
"%BUILD_SRC_15%\class_file_cache.c" ^ | ||
"%BUILD_SRC_15%\attach.c" ^ | ||
"%BUILD_SRC_15%\Classes.c" ^ | ||
"%BUILD_SRC_15%\HeapDump.c" ^ | ||
"%BUILD_SRC_15%\Timers.c" ^ | ||
"%BUILD_SRC_15%\GC.c" ^ | ||
"%BUILD_SRC_15%\Threads.c" ^ | ||
"%BUILD_SRC_15%\Stacks.c" ^ | ||
"%BUILD_SRC_15%\common_functions.c" ^ | ||
version.res ^ | ||
/D WIN32 /D NDEBUG /LD /MD /O2 ^ | ||
/Fe:"%BUILD_DEPLOY%\deployed\%JDK_DEPLOY%\%PLATFORM%\profilerinterface.dll" ^ | ||
/Fm:"%BUILD_DEPLOY%\deployed\%JDK_DEPLOY%\%PLATFORM%\profilerinterface.map" ^ | ||
/link /DYNAMICBASE || ^ | ||
exit /b 1 | ||
|
||
del version.res |