Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merging changes from branch 34 #179

Merged
merged 4 commits into from
Jan 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .github/workflows/build-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,33 @@ jobs:
node tools/getVersion.js 33
echo "electron=$(cat electron.txt)" >> $GITHUB_OUTPUT

build-34:
runs-on: windows-2022
timeout-minutes: 20
strategy:
fail-fast: false
outputs:
electron: ${{ steps.electron-version.outputs.electron }}

name: build electron-34.0.0
steps:

- name: Checkout code
uses: actions/checkout@v4

- name: Build Electron 34.0.0
uses: ./.github/actions/build-electron
with:
electron: 34
os: ${{ runner.os }}

- name: Get latest Electron version for 34.0.0
id: electron-version
shell: bash
run: |
node tools/getVersion.js 34
echo "electron=$(cat electron.txt)" >> $GITHUB_OUTPUT

test-29:
strategy:
fail-fast: false
Expand Down Expand Up @@ -250,3 +277,24 @@ jobs:
electron: ${{ needs.build-33.outputs.electron }}
os: ${{ matrix.os }}

test-34:
strategy:
fail-fast: false
matrix:
os: [windows-2022]
runs-on: ${{ matrix.os }}
timeout-minutes: 10
needs: build-34

name: test ${{ matrix.os }}-v${{needs.build-34.outputs.electron}}
steps:

- name: Checkout code
uses: actions/checkout@v4

- name: Test build
uses: ./.github/actions/test-build
with:
electron: ${{ needs.build-34.outputs.electron }}
os: ${{ matrix.os }}

1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ on:
- 31
- 32
- 33
- 34
# test-version:
# description: 'Electron version to test build'
# required: true
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-13, macos-14, ubuntu-22.04, windows-2022]
os: [macos-13, macos-14, ubuntu-22.04, ubuntu-22.04-arm, windows-2022]
# os: [ macos-14, ubuntu-22.04]
# electron: [32.1.2]
electron: [29.4.6, 30.5.1, 31.7.5, 32.2.6, 33.2.1]
electron: [29.4.6, 30.5.1, 31.7.7, 32.2.8, 33.3.1, 34.0.0]

name: test-${{ matrix.os }}-v${{ matrix.electron }}
steps:
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
| Electron 31.x | v20.x | :heavy_check_mark: | :heavy_check_mark: |
| Electron 32.x | v20.x | :heavy_check_mark: | :heavy_check_mark: |
| Electron 33.x | v20.x | :heavy_check_mark: | :heavy_check_mark: |
| Electron 34.x | v20.x | :heavy_check_mark: | :heavy_check_mark: |

- You do not need to use the same version of Node.js in your project as Electron Node.js version
- On Linux and macOS `npm install` will compile binaries with correct Node.Js headers for a given Electron version.
Expand Down
Binary file added lib/native/win32/arm64/34.0.0/edge_coreclr.node
Binary file not shown.
Binary file not shown.
Binary file added lib/native/win32/ia32/34.0.0/edge_coreclr.node
Binary file not shown.
Binary file added lib/native/win32/ia32/34.0.0/edge_nativeclr.node
Binary file not shown.
Binary file added lib/native/win32/x64/34.0.0/edge_coreclr.node
Binary file not shown.
Binary file added lib/native/win32/x64/34.0.0/edge_nativeclr.node
Binary file not shown.
32 changes: 16 additions & 16 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"url": "http://tomasz.janczuk.org",
"twitter": "tjanczuk"
},
"version": "33.0.5",
"version": "34.0.0",
"description": "Edge.js: run .NET and Node.js in-process on Electron",
"tags": [
"owin",
Expand Down Expand Up @@ -45,9 +45,9 @@
"nan": "^2.22.0"
},
"devDependencies": {
"electron": "^33.2.1",
"electron": "^34.0.0",
"follow-redirects": "^1.15.9",
"isomorphic-git": "^1.27.2",
"isomorphic-git": "^1.29.0",
"mocha": "11.0.1",
"mochawesome": "^7.1.3",
"mochawesome-merge": "^4.3.0",
Expand Down
65 changes: 18 additions & 47 deletions tools/build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -19,61 +19,32 @@ if not exist "%NODEEXE%" (
)
for %%i in ("%NODEEXE%") do set NODEDIR=%%~dpi
SET DESTDIRROOT=%SELF%\..\lib\native\win32
set VERSIONS=
:harvestVersions
if "%1" neq "" (
set VERSIONS=%VERSIONS% %1
shift
goto :harvestVersions
)
if "%VERSIONS%" equ "" set VERSIONS=20.14.0


set VERSION=%1

pushd %SELF%\..

if "%ARCH%" == "arm64" (
for %%V in (%VERSIONS%) do call :build arm64 arm64 %%V
) else (
for %%V in (%VERSIONS%) do call :build ia32 x86 %%V
for %%V in (%VERSIONS%) do call :build x64 x64 %%V
call :build ia32 ia32 %VERSION%
call :build x64 x64 %VERSION%
call :build arm64 arm64 %VERSION%

)
popd

exit /b 0

:build

if "%3" equ "29.0.0" (
SET target=20.9.0
) else if "%3" equ "30.0.0" (
SET target=20.16.0
) else if "%3" equ "31.0.0" (
SET target=20.18.0
) else if "%3" equ "32.0.0" (
SET target=20.18.0
) else if "%3" equ "33.0.0" (
SET target=20.18.0
) else (
echo edge-electron-js does not support Electron %3.
exit /b -1
)

set ELECTRONV=%3
set "ELECTRONV=%ELECTRONV:~,2%"
set NODEV=%target%
set "NODEV=%NODEV:~,2%"

set DESTDIR=%DESTDIRROOT%\%1\%3
@REM if exist "%DESTDIR%\node.exe" goto gyp
if not exist "%DESTDIR%\NUL" mkdir "%DESTDIR%"
echo Downloading node.exe %2 %target%...
node "%SELF%\download.js" %2 %target% "%DESTDIR%"
if %ERRORLEVEL% neq 0 (
echo Cannot download node.exe %2 v%target%
exit /b -1
)

:gyp

echo Building edge.node %FLAVOR% for node.js %2 v%target%
echo Building edge.node %FLAVOR% for node.js %2 %3
set NODEEXE=%DESTDIR%\node.exe
FOR /F "tokens=* USEBACKQ" %%F IN (`npm config get prefix`) DO (SET NODEBASE=%%F)
set GYP=%NODEBASE%\node_modules\node-gyp\bin\node-gyp.js
Expand All @@ -82,34 +53,34 @@ if not exist "%GYP%" (
exit /b -1
)

"%NODEEXE%" "%GYP%" configure --msvs_version=2022 --target=%3 --runtime=electron --dist-url=https://electronjs.org/headers --%FLAVOR% --openssl_fips=''
node "%GYP%" configure --msvs_version=2022 --target=%3 --arch=%2 --runtime=electron --disturl=https://electronjs.org/headers --%FLAVOR%
if %ERRORLEVEL% neq 0 (
echo Error building edge.node %FLAVOR% for node.js %2 v%target%
exit /b -1
)

REM Conflict when building arm64 binaries
if "%ARCH%" == "arm64" (
@REM Conflict when building arm64 binaries
if "%2" == "arm64" (
FOR %%F IN (build\*.vcxproj) DO (
echo Patch /fp:strict in %%F
powershell -Command "(Get-Content -Raw %%F) -replace '<FloatingPointModel>Strict</FloatingPointModel>', '<!-- <FloatingPointModel>Strict</FloatingPointModel> -->' | Out-File -Encoding Utf8 %%F"
)
)

@REM Conflict when building Electron v32+
if %ELECTRONV% GEQ 32 (
if %NODEV% LSS 22 (
FOR %%F IN (build\*.vcxproj) DO (
echo Replace std:c++17 with std:c++20 in %%F
powershell -Command "(Get-Content -Raw %%F) -replace 'std:c\+\+17', 'std:c++20' | Out-File -Encoding Utf8 %%F"
)
FOR %%F IN (build\*.vcxproj) DO (
echo Replace std:c++17 with std:c++20 in %%F
powershell -Command "(Get-Content -Raw %%F) -replace 'std:c\+\+17', 'std:c++20' | Out-File -Encoding Utf8 %%F"
)
)

if %ELECTRONV% GEQ 33 (
echo Patch nan.h
powershell -Command "(Get-Content -Raw node_modules/nan/nan.h) -replace '#include \"nan_scriptorigin.h\"', '// #include \"nan_scriptorigin.h\"' | Out-File -Encoding Utf8 node_modules/nan/nan.h"
)

"%NODEEXE%" "%GYP%" build
node "%GYP%" build

echo %DESTDIR%
copy /y .\build\%FLAVOR%\edge_*.node "%DESTDIR%"
Expand Down
Loading