diff --git a/.github/workflows/native-binary-build-launcher.yml b/.github/workflows/native-binary-build-launcher.yml new file mode 100644 index 000000000000..2b4ea7b96eb9 --- /dev/null +++ b/.github/workflows/native-binary-build-launcher.yml @@ -0,0 +1,210 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +# ---------------------- +# +# This workflow builds the native Windows launchers for the IDE and platform. +# +# The result of the build are files 'launcher-external-sources.zip' +# and 'launcher-external-binaries.zip' which can be downloaded from +# the GitHub Actions UI and prepared for release to be used by the Ant build +# scripts for the NetBeans distribution. +# +# ---------------------- + + +name: NetBeans Native Launcher + + +on: + push: + # Triggers the workflow on push or pull request events but only for + # relevant paths + paths: + - .github/workflows/native-binary-build-launcher.y* + - platform/o.n.bootstrap/launcher/windows/** + - harness/apisupport.harness/windows-launcher-src/** + - nb/ide.launcher/windows/** + + pull_request: + paths: + - .github/workflows/native-binary-build-launcher.y* + - platform/o.n.bootstrap/launcher/windows/** + - harness/apisupport.harness/windows-launcher-src/** + - nb/ide.launcher/windows/** + + # Allows you to run this workflow manually from the Actions tab in GitHub UI + workflow_dispatch: + +# cancel other PR workflow run in the same head-base group if it exists (e.g. during PR syncs) +# if this is not a PR run (no github.head_ref and github.base_ref defined), use an UID as group +concurrency: + group: launcher-${{ github.head_ref || github.run_id }}-${{ github.base_ref }} + cancel-in-progress: true + +jobs: + + source: + + name: Package Sources + runs-on: ubuntu-latest + + steps: + + - name: Checkout + uses: actions/checkout@v4 + with: + persist-credentials: false + submodules: false + show-progress: false + + - name: Generate source bundle + run: | + SOURCES="nbbuild/build/native/launcher/sources" + mkdir -p ${SOURCES}/platform/o.n.bootstrap/launcher/ + cp -r platform/o.n.bootstrap/launcher/windows/ ${SOURCES}/platform/o.n.bootstrap/launcher/ + mkdir -p ${SOURCES}/harness/apisupport.harness/ + cp -r harness/apisupport.harness/windows-launcher-src/ ${SOURCES}/harness/apisupport.harness/ + mkdir -p ${SOURCES}/nb/ide.launcher/ + cp -r nb/ide.launcher/windows/ ${SOURCES}/nb/ide.launcher/ + cp LICENSE ${SOURCES}/LICENSE + cp NOTICE ${SOURCES}/NOTICE + ls -l -R ${SOURCES} + + - name: Upload native sources + uses: actions/upload-artifact@v3 + with: + name: launcher-external-sources + path: nbbuild/build/native/launcher/sources/ + if-no-files-found: error + + + build-linux: + + name: Build with MinGW + runs-on: ubuntu-latest + needs: source + + steps: + + - name: Install MinGW + run: sudo apt install mingw-w64 mingw-w64-tools + + - name: Download sources + uses: actions/download-artifact@v3 + with: + name: launcher-external-sources + + - name: Build bootstrap binaries + run: | + echo "Building bootstrap binaries" + rm -rf ./build/ + make -f Makefile.mingw + ls -l -R ./build/ + echo "done" + working-directory: platform/o.n.bootstrap/launcher/windows/ + + - name: Upload bootstrap artifacts + uses: actions/upload-artifact@v3 + with: + name: launcher-bootstrap-bin + path: platform/o.n.bootstrap/launcher/windows/build/ + if-no-files-found: error + + - name: Build harness binaries + run: | + echo "Building harness binaries" + rm -rf ./build/ + make -f Makefile.mingw + ls -l -R ./build/ + echo "done" + working-directory: harness/apisupport.harness/windows-launcher-src + + - name: Upload harness artifacts + uses: actions/upload-artifact@v3 + with: + name: launcher-harness-bin + path: harness/apisupport.harness/windows-launcher-src/build/ + if-no-files-found: error + + - name: Build IDE binaries + run: | + echo "Building IDE binaries" + rm -rf ./build/ + make -f Makefile.mingw + ls -l -R ./build/ + echo "done" + working-directory: nb/ide.launcher/windows + + - name: Upload IDE artifacts + uses: actions/upload-artifact@v3 + with: + name: launcher-ide-bin + path: nb/ide.launcher/windows/build/ + if-no-files-found: error + + build-zip-with-build-artifacts: + + name: Package Binaries + runs-on: ubuntu-latest + + # Only run when the platform specific builds are finished + needs: [build-linux] + + steps: + + - name: Create dir structure + run: mkdir -p myfiles/ + + - name: Download artifacts from predecessor jobs + uses: actions/download-artifact@v3 + with: + path: myfiles/ + + - name: Tidy up and display artifacts + run: | + cp myfiles/launcher-external-sources/LICENSE myfiles/LICENSE + cp myfiles/launcher-external-sources/NOTICE myfiles/NOTICE + cp myfiles/*bin/*.exe myfiles/ + cp myfiles/*bin/*.dll myfiles/ + rm -rf myfiles/*-sources/ + rm -rf myfiles/*-bin/ + ls -l -R + + - name: Create BUILDINFO + run: | + BUILDINFO="myfiles/BUILDINFO.txt" + touch "$BUILDINFO" + echo "Apache NetBeans" >> "$BUILDINFO" + echo "" >> "$BUILDINFO" + echo "Binaries in this ZIP are..." >> "$BUILDINFO" + echo "Build by GitHub Actions Workflow: ${GITHUB_WORKFLOW}" >> "$BUILDINFO" + echo "" >> "$BUILDINFO" + echo "Build from:" >> "$BUILDINFO" + echo " Git repo : ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}" >> "$BUILDINFO" + echo " Git commit SHA : ${GITHUB_SHA}" >> "$BUILDINFO" + echo " Git ref : ${GITHUB_REF}" >> "$BUILDINFO" + echo "" >> "$BUILDINFO" + echo "Build time UTC : $(date --rfc-3339=seconds --utc)" >> "$BUILDINFO" + echo "" >> "$BUILDINFO" + + - name: Upload bundle + uses: actions/upload-artifact@v3 + with: + name: launcher-external-binaries + path: myfiles/ + if-no-files-found: error diff --git a/harness/apisupport.harness/windows-launcher-src/Makefile.mingw b/harness/apisupport.harness/windows-launcher-src/Makefile.mingw index 866b30dd1e54..0a4dfb6421af 100644 --- a/harness/apisupport.harness/windows-launcher-src/Makefile.mingw +++ b/harness/apisupport.harness/windows-launcher-src/Makefile.mingw @@ -15,8 +15,8 @@ # specific language governing permissions and limitations # under the License. -TMPFLD = ../../../../target/tmp/ -OFLD = ../../../../target/harness/ +TMPFLD = ./build/ +OFLD = ./build/ all: prepfolder app64.exe app.exe @@ -30,12 +30,12 @@ clean: app64.res: app.rc app.exe.manifest x86_64-w64-mingw32-windres -o$(TMPFLD)app64.res -Ocoff -DMANIFEST_FILE=app.exe.manifest app.rc -app64.exe: app.cpp applauncher.cpp app64.res ../bootstrap/utilsfuncs.cpp - x86_64-w64-mingw32-gcc -s -DNBEXEC_DLL='"/lib/nbexec64.dll"' -DARCHITECTURE=64 -Wl,--nxcompat -Wl,--dynamicbase -Wl,--no-seh app.cpp -mwindows applauncher.cpp $(TMPFLD)app64.res ../bootstrap/utilsfuncs.cpp ../ide/nblauncher.cpp -I ../bootstrap/ -o$(OFLD)app64.exe -static -lstdc++ -static-libstdc++ -static-libgcc +app64.exe: app.cpp applauncher.cpp app64.res ../../../platform/o.n.bootstrap/launcher/windows/utilsfuncs.cpp + x86_64-w64-mingw32-gcc -s -DNBEXEC_DLL='"/lib/nbexec64.dll"' -DARCHITECTURE=64 -Wl,--nxcompat -Wl,--dynamicbase -Wl,--no-seh app.cpp -mwindows applauncher.cpp $(TMPFLD)app64.res ../../../platform/o.n.bootstrap/launcher/windows/utilsfuncs.cpp ../../../nb/ide.launcher/windows/nblauncher.cpp -I ../../../platform/o.n.bootstrap/launcher/windows/ -o$(OFLD)app64.exe -static -lstdc++ -static-libstdc++ -static-libgcc app.res: app.rc app.exe.manifest i686-w64-mingw32-windres -o$(TMPFLD)app.res -Ocoff -DMANIFEST_FILE=app.exe.manifest app.rc -app.exe: app.cpp applauncher.cpp app.res ../bootstrap/utilsfuncs.cpp - i686-w64-mingw32-gcc -s -DNBEXEC_DLL='"/lib/nbexec.dll"' -DARCHITECTURE=32 -Wl,--nxcompat -Wl,--dynamicbase -Wl,--no-seh -mwindows app.cpp applauncher.cpp $(TMPFLD)app.res ../bootstrap/utilsfuncs.cpp ../ide/nblauncher.cpp -I ../bootstrap/ -o$(OFLD)app.exe -static -lstdc++ -static-libstdc++ -static-libgcc +app.exe: app.cpp applauncher.cpp app.res ../../../platform/o.n.bootstrap/launcher/windows/utilsfuncs.cpp + i686-w64-mingw32-gcc -s -DNBEXEC_DLL='"/lib/nbexec.dll"' -DARCHITECTURE=32 -Wl,--nxcompat -Wl,--dynamicbase -Wl,--no-seh -mwindows app.cpp applauncher.cpp $(TMPFLD)app.res ../../../platform/o.n.bootstrap/launcher/windows/utilsfuncs.cpp ../../../nb/ide.launcher/windows/nblauncher.cpp -I ../../../platform/o.n.bootstrap/launcher/windows/ -o$(OFLD)app.exe -static -lstdc++ -static-libstdc++ -static-libgcc diff --git a/harness/apisupport.harness/windows-launcher-src/app.exe.manifest b/harness/apisupport.harness/windows-launcher-src/app.exe.manifest index c1843b229a94..789c48dce89d 100644 --- a/harness/apisupport.harness/windows-launcher-src/app.exe.manifest +++ b/harness/apisupport.harness/windows-launcher-src/app.exe.manifest @@ -20,7 +20,7 @@ --> - diff --git a/harness/apisupport.harness/windows-launcher-src/applauncher.cpp b/harness/apisupport.harness/windows-launcher-src/applauncher.cpp index 1fa9d4ee8165..f8163168ce66 100644 --- a/harness/apisupport.harness/windows-launcher-src/applauncher.cpp +++ b/harness/apisupport.harness/windows-launcher-src/applauncher.cpp @@ -21,8 +21,8 @@ */ #include "applauncher.h" -#include "../bootstrap/utilsfuncs.h" -#include "../bootstrap/argnames.h" +#include "../../../platform/o.n.bootstrap/launcher/windows/utilsfuncs.h" +#include "../../../platform/o.n.bootstrap/launcher/windows/argnames.h" using namespace std; diff --git a/harness/apisupport.harness/windows-launcher-src/applauncher.h b/harness/apisupport.harness/windows-launcher-src/applauncher.h index b6002fd95b7b..0801c8a316c1 100644 --- a/harness/apisupport.harness/windows-launcher-src/applauncher.h +++ b/harness/apisupport.harness/windows-launcher-src/applauncher.h @@ -27,7 +27,7 @@ #include #include "shlobj.h" -#include "../ide/nblauncher.h" +#include "../../../nb/ide.launcher/windows/nblauncher.h" class AppLauncher : public NbLauncher { diff --git a/nb/ide.launcher/windows/Makefile.mingw b/nb/ide.launcher/windows/Makefile.mingw index 6db2f87fc281..9f5db6340940 100644 --- a/nb/ide.launcher/windows/Makefile.mingw +++ b/nb/ide.launcher/windows/Makefile.mingw @@ -15,8 +15,8 @@ # specific language governing permissions and limitations # under the License. -TMPFLD = ../../../../target/tmp/ -OFLD = ../../../../target/ide/ +TMPFLD = ./build/ +OFLD = ./build/ all: prepfolder netbeans64.exe netbeans.exe @@ -30,11 +30,11 @@ clean: netbeans64.res: netbeans.rc netbeans64.exe.manifest x86_64-w64-mingw32-windres -o$(TMPFLD)netbeans64.res -Ocoff -DMANIFEST_FILE=netbeans64.exe.manifest netbeans.rc -netbeans64.exe: netbeans.cpp nblauncher.cpp netbeans64.res ../bootstrap/utilsfuncs.cpp - x86_64-w64-mingw32-gcc -s -DNBEXEC_DLL='"/lib/nbexec64.dll"' -DARCHITECTURE=64 -Wl,--nxcompat -Wl,--dynamicbase -Wl,--no-seh -mwindows netbeans.cpp nblauncher.cpp $(TMPFLD)netbeans64.res ../bootstrap/utilsfuncs.cpp -I ../bootstrap/ -o$(OFLD)netbeans64.exe -static -lstdc++ -static-libstdc++ -static-libgcc +netbeans64.exe: netbeans.cpp nblauncher.cpp netbeans64.res ../../../platform/o.n.bootstrap/launcher/windows/utilsfuncs.cpp + x86_64-w64-mingw32-gcc -s -DNBEXEC_DLL='"/lib/nbexec64.dll"' -DARCHITECTURE=64 -Wl,--nxcompat -Wl,--dynamicbase -Wl,--no-seh -mwindows netbeans.cpp nblauncher.cpp $(TMPFLD)netbeans64.res ../../../platform/o.n.bootstrap/launcher/windows/utilsfuncs.cpp -I ../../../platform/o.n.bootstrap/launcher/windows/ -o$(OFLD)netbeans64.exe -static -lstdc++ -static-libstdc++ -static-libgcc netbeans.res: netbeans.rc netbeans.exe.manifest i686-w64-mingw32-windres -o$(TMPFLD)netbeans.res -Ocoff -DMANIFEST_FILE=netbeans.exe.manifest netbeans.rc -netbeans.exe: netbeans.cpp nblauncher.cpp netbeans.res ../bootstrap/utilsfuncs.cpp - i686-w64-mingw32-gcc -s -DNBEXEC_DLL='"/lib/nbexec.dll"' -DARCHITECTURE=32 -Wl,--nxcompat -Wl,--dynamicbase -Wl,--no-seh -mwindows netbeans.cpp nblauncher.cpp $(TMPFLD)netbeans.res ../bootstrap/utilsfuncs.cpp -I ../bootstrap/ -o$(OFLD)netbeans.exe -static -lstdc++ -static-libstdc++ -static-libgcc +netbeans.exe: netbeans.cpp nblauncher.cpp netbeans.res ../../../platform/o.n.bootstrap/launcher/windows/utilsfuncs.cpp + i686-w64-mingw32-gcc -s -DNBEXEC_DLL='"/lib/nbexec.dll"' -DARCHITECTURE=32 -Wl,--nxcompat -Wl,--dynamicbase -Wl,--no-seh -mwindows netbeans.cpp nblauncher.cpp $(TMPFLD)netbeans.res ../../../platform/o.n.bootstrap/launcher/windows/utilsfuncs.cpp -I ../../../platform/o.n.bootstrap/launcher/windows/ -o$(OFLD)netbeans.exe -static -lstdc++ -static-libstdc++ -static-libgcc diff --git a/nb/ide.launcher/windows/nblauncher.cpp b/nb/ide.launcher/windows/nblauncher.cpp index 393e2cd81a27..743b078507db 100644 --- a/nb/ide.launcher/windows/nblauncher.cpp +++ b/nb/ide.launcher/windows/nblauncher.cpp @@ -27,9 +27,9 @@ #include #include #include "nblauncher.h" -#include "../bootstrap/utilsfuncs.h" -#include "../bootstrap/argnames.h" -#include "../bootstrap/nbexecloader.h" +#include "../../../platform/o.n.bootstrap/launcher/windows/utilsfuncs.h" +#include "../../../platform/o.n.bootstrap/launcher/windows/argnames.h" +#include "../../../platform/o.n.bootstrap/launcher/windows/nbexecloader.h" using namespace std; diff --git a/nb/ide.launcher/windows/netbeans.exe.manifest b/nb/ide.launcher/windows/netbeans.exe.manifest index 2dda7fb5081b..62225b2083d1 100644 --- a/nb/ide.launcher/windows/netbeans.exe.manifest +++ b/nb/ide.launcher/windows/netbeans.exe.manifest @@ -20,7 +20,7 @@ --> - diff --git a/nb/ide.launcher/windows/netbeans64.exe.manifest b/nb/ide.launcher/windows/netbeans64.exe.manifest index b1d9a5f31d98..16ce76e4c917 100644 --- a/nb/ide.launcher/windows/netbeans64.exe.manifest +++ b/nb/ide.launcher/windows/netbeans64.exe.manifest @@ -22,7 +22,7 @@ - diff --git a/nb/ide.launcher/windows/version.h b/nb/ide.launcher/windows/version.h index b1667b9caf7c..ad20a7537198 100644 --- a/nb/ide.launcher/windows/version.h +++ b/nb/ide.launcher/windows/version.h @@ -18,11 +18,11 @@ */ #define COMPANY "" -#define COMPONENT "NetBeans IDE" -#define VER "12.5.0.0" -#define FVER 12,5,0,0 -#define BUILD_ID "28062021" +#define COMPONENT "Apache NetBeans IDE Launcher" +#define VER "101.1.0.0" +#define FVER 101,1,0,0 +#define BUILD_ID "101100" #define INTERNAL_NAME "netbeans" #define COPYRIGHT "Based on Apache NetBeans from the Apache Software Foundation and is licensed under Apache License Version 2.0" -#define NAME "NetBeans IDE 12.5" +#define NAME "Apache NetBeans IDE Launcher" diff --git a/platform/o.n.bootstrap/launcher/windows/Makefile.mingw b/platform/o.n.bootstrap/launcher/windows/Makefile.mingw index 0fd8e394f75c..feaaec349ac1 100644 --- a/platform/o.n.bootstrap/launcher/windows/Makefile.mingw +++ b/platform/o.n.bootstrap/launcher/windows/Makefile.mingw @@ -15,8 +15,8 @@ # specific language governing permissions and limitations # under the License. -TMPFLD = ../../../../target/tmp/ -OFLD = ../../../../target/bootstrap/ +TMPFLD = ./build/ +OFLD = ./build/ all: prepfolder nbexec64.dll nbexec64.exe nbexec.dll nbexec.exe diff --git a/platform/o.n.bootstrap/launcher/windows/nbexec.exe.manifest b/platform/o.n.bootstrap/launcher/windows/nbexec.exe.manifest index 580bb41e424e..5f5d7e229bfc 100644 --- a/platform/o.n.bootstrap/launcher/windows/nbexec.exe.manifest +++ b/platform/o.n.bootstrap/launcher/windows/nbexec.exe.manifest @@ -20,7 +20,7 @@ --> - diff --git a/platform/o.n.bootstrap/launcher/windows/version.h b/platform/o.n.bootstrap/launcher/windows/version.h index 26b4461403ba..1639c7836c80 100644 --- a/platform/o.n.bootstrap/launcher/windows/version.h +++ b/platform/o.n.bootstrap/launcher/windows/version.h @@ -18,11 +18,11 @@ */ #define COMPANY "" -#define COMPONENT "NetBeans Platform Launcher" -#define VER "12.5.0.0" -#define FVER 12,5,0,0 -#define BUILD_ID "28062021" +#define COMPONENT "Apache NetBeans Platform Launcher" +#define VER "101.1.0.0" +#define FVER 101,1,0,0 +#define BUILD_ID "101100" #define INTERNAL_NAME "nbexec" #define COPYRIGHT "Based on Apache NetBeans from the Apache Software Foundation and is licensed under Apache License Version 2.0" -#define NAME "NetBeans Platform Launcher" +#define NAME "Apache NetBeans Platform Launcher"