Skip to content

Commit

Permalink
updating install tools for Electron 32
Browse files Browse the repository at this point in the history
  • Loading branch information
agracio committed Sep 26, 2024
1 parent 39fd8c7 commit cba033b
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 28 deletions.
16 changes: 1 addition & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,20 +60,6 @@ jobs:
echo "test-version=32.1.2" >> $GITHUB_OUTPUT
fi
# - name: Resolve Node.js version
# id: node-version
# shell: bash
# run: |
# if [[ ${{ inputs.build-version }} == '29.0.0' ]]; then
# echo "node=20" >> $GITHUB_OUTPUT
# elif [[ ${{ inputs.build-version }} == '30.0.0' ]]; then
# echo "node=20" >> $GITHUB_OUTPUT
# elif [[ ${{ inputs.build-version }} == '31.0.0' ]]; then
# echo "node=20" >> $GITHUB_OUTPUT
# elif [[ ${{ inputs.build-version }} == '32.0.0' ]]; then
# echo "node=20" >> $GITHUB_OUTPUT
# fi

- name: Setup env
uses: ./.github/actions/setup-env
with:
Expand Down Expand Up @@ -101,7 +87,7 @@ jobs:
(Get-Content -Raw build/edge_coreclr.vcxproj) -replace 'std:c\+\+17', 'std:c++20' | Out-File -Encoding Utf8 build/edge_coreclr.vcxproj
(Get-Content -Raw build/edge_nativeclr.vcxproj) -replace 'std:c\+\+17', 'std:c++20' | Out-File -Encoding Utf8 build/edge_nativeclr.vcxproj
}
node-gyp build
cmd /c copy /y build\Release\edge_*.node release\ia32\${{ inputs.build-version }}
cmd /c rmdir /S /Q build
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-13, macos-14, ubuntu-22.04, windows-2022]
# os: [ windows-2022, ubuntu-22.04]
# electron: [30.5.0]
electron: [29.4.6, 30.5.1, 31.6.0]
# os: [macos-13, macos-14, ubuntu-22.04, windows-2022]
os: [ macos-13, macos-14, ubuntu-22.04]
electron: [32.1.2]
# electron: [29.4.6, 30.5.1, 31.6.0, 32.1.2]
# electron: [31.6.0, 32.1.0]

name: test-${{ matrix.os }}-v${{ matrix.electron }}
Expand Down
14 changes: 7 additions & 7 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"nan": "git://github.com/oc-soft/npm-nan"
},
"devDependencies": {
"electron": "=31.6.0",
"electron": "^32.0.0",
"mocha": "10.7.3",
"mochawesome": "^7.1.3",
"mochawesome-merge": "^4.3.0",
Expand Down
9 changes: 8 additions & 1 deletion tools/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,14 @@ else {
}
if (version !== null)
{
spawn('node-gyp', ['configure', 'build', '--target='+version, '--disturl=https://electronjs.org/headers'], { stdio: 'inherit' });
spawn('node-gyp', ['configure', '--target='+version, '--runtime=electron', '--disturl=https://electronjs.org/headers'], { stdio: 'inherit' });

if(version.startsWith('32')){
spawn("sed -i -e 's/std:c++17/std:c++20/g' build/build_managed.vcxproj", { stdio: 'inherit' });
spawn("sed -i -e 's/std:c++17/std:c++20/g' build/edge_coreclr.vcxproj", { stdio: 'inherit' });
spawn("sed -i -e 's/std:c++17/std:c++20/g' build/edge_nativeclr.vcxproj", { stdio: 'inherit' });
}
spawn('node-gyp', ['build'], { stdio: 'inherit' });
}
else
spawn('node-gyp', ['configure', 'build'], { stdio: 'inherit' });
Expand Down

0 comments on commit cba033b

Please sign in to comment.