mirror of
https://github.com/TurboWarp/packager.git
synced 2024-11-25 16:35:59 +08:00
Update Electron to 22.3.27 and add ARM support (#768)
This commit is contained in:
parent
47e5690445
commit
c5e3a475fc
@ -10,7 +10,7 @@ const crypto = require('crypto');
|
||||
|
||||
const {electronVersion} = require('./version.json');
|
||||
|
||||
const newIconPath = path.join(__dirname, '..', 'src', 'packager', 'images', 'default-icon.ico');
|
||||
const newIconPath = path.join(__dirname, '../src/packager/images/default-icon.ico');
|
||||
|
||||
const download = (arch) => downloadArtifact({
|
||||
version: electronVersion,
|
||||
@ -19,7 +19,7 @@ const download = (arch) => downloadArtifact({
|
||||
arch
|
||||
});
|
||||
|
||||
const getTempFile = (name) => path.join(__dirname, 'temp', 'windows', name);
|
||||
const getTempFile = (name) => path.join(__dirname, 'temp/windows', name);
|
||||
|
||||
const extract = async (from, name) => {
|
||||
const to = getTempFile(name);
|
||||
@ -74,6 +74,7 @@ const run = async (arch) => {
|
||||
|
||||
run('ia32')
|
||||
.then(() => run('x64'))
|
||||
.then(() => run('arm64'))
|
||||
.catch((err) => {
|
||||
console.error(err);
|
||||
process.exit(1);
|
||||
|
@ -1,3 +1,3 @@
|
||||
{
|
||||
"electronVersion": "21.2.3"
|
||||
"electronVersion": "22.3.27"
|
||||
}
|
@ -464,6 +464,10 @@
|
||||
"string": "{type} Windows application (64-bit only, not recommended)",
|
||||
"context": "type will become something like 'NW.js' or 'Electron'. Do not translate 'Windows'."
|
||||
},
|
||||
"application-win-arm": {
|
||||
"string": "{type} Windows application for ARM",
|
||||
"context": "type will become something like 'NW.js' or 'Electron'. Do not translate 'Windows' or 'ARM'."
|
||||
},
|
||||
"application-mac": {
|
||||
"string": "{type} macOS application",
|
||||
"context": "type will become something like 'NW.js' or 'Electron'. Do not translate 'macOS'."
|
||||
@ -472,6 +476,14 @@
|
||||
"string": "{type} Linux application (64-bit only)",
|
||||
"context": "type will become something like 'NW.js' or 'Electron'. Do not translate 'Linux'."
|
||||
},
|
||||
"application-linux-arm32": {
|
||||
"string": "{type} Linux application for ARM (32-bit)",
|
||||
"context": "type will become something like 'NW.js' or 'Electron'. Do not translate 'Linux' or 'ARM'."
|
||||
},
|
||||
"application-linux-arm64": {
|
||||
"string": "{type} Linux application for ARM (64-bit)",
|
||||
"context": "type will become something like 'NW.js' or 'Electron'. Do not translate 'Linux' or 'ARM'."
|
||||
},
|
||||
"otherEnvironments": {
|
||||
"string": "Other environments (Click to open)",
|
||||
"context": "Text that can be clicked to expand list of environments to include some unrecommended ones."
|
||||
|
@ -832,11 +832,24 @@
|
||||
<input type="radio" name="environment" bind:group={$options.target} value="electron-win64">
|
||||
{$_('options.application-win64').replace('{type}', 'Electron')}
|
||||
</label>
|
||||
<label class="option">
|
||||
<input type="radio" name="environment" bind:group={$options.target} value="electron-win-arm">
|
||||
{$_('options.application-win-arm').replace('{type}', 'Electron')}
|
||||
</label>
|
||||
<label class="option">
|
||||
<input type="radio" name="environment" bind:group={$options.target} value="electron-mac">
|
||||
{$_('options.application-mac').replace('{type}', 'Electron')}
|
||||
</label>
|
||||
<label class="option">
|
||||
<input type="radio" name="environment" bind:group={$options.target} value="electron-linux-arm32">
|
||||
{$_('options.application-linux-arm32').replace('{type}', 'Electron')}
|
||||
</label>
|
||||
<label class="option">
|
||||
<input type="radio" name="environment" bind:group={$options.target} value="electron-linux-arm64">
|
||||
{$_('options.application-linux-arm64').replace('{type}', 'Electron')}
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="group">
|
||||
<label class="option">
|
||||
<input type="radio" name="environment" bind:group={$options.target} value="nwjs-win32">
|
||||
@ -935,7 +948,6 @@
|
||||
<div>
|
||||
<h2>Linux</h2>
|
||||
<p>Linux support is still experimental.</p>
|
||||
<p>Linux support in the packager is limited to 64-bit x86 apps (which will run on most desktops and laptops). 32-bit systems and ARM devices such as Raspberry Pis unfortunately are not supported yet.</p>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
@ -944,15 +956,15 @@
|
||||
<h2>Electron</h2>
|
||||
<p>The Electron environment works by embedding a copy of Chromium (the open source part of Google Chrome) along with your project, which means the app will be very large.</p>
|
||||
|
||||
{#if $options.target.includes('mac')}
|
||||
{#if $options.target.includes('win')}
|
||||
{#if $options.target.includes('32')}
|
||||
<p>Note: You have selected the 32-bit or 64-bit mode. This maximizes device compatibility but limits the amount of memory the app can use. If you encounter crashes, try going into "Other environments" and using the 64-bit only mode instead.</p>
|
||||
{/if}
|
||||
{:else if $options.target.includes('mac')}
|
||||
<p>On macOS, the app will run natively on both Intel Silicon and Apple Silicon Macs.</p>
|
||||
{:else if $options.target.includes('linux')}
|
||||
<p>On Linux, the application can be started by running <code>start.sh</code></p>
|
||||
{/if}
|
||||
|
||||
{#if $options.target.includes('32')}
|
||||
<p>Note: You have selected the 32-bit or 64-bit mode. This maximizes device compatibility but limits the amount of memory the app can use. If you encounter crashes, try going into "Other environments" and using the 64-bit only mode instead.</p>
|
||||
{/if}
|
||||
</div>
|
||||
{:else if $options.target.includes('nwjs')}
|
||||
<div>
|
||||
|
@ -42,24 +42,39 @@ export default {
|
||||
estimatedSize: 135854818
|
||||
},
|
||||
'electron-win32': {
|
||||
src: externalFile('electron-v21.2.3-win32-ia32.zip'),
|
||||
sha256: 'ee813a8dc4050c7d3a3cc80233bf5f4ddd0483e1c934eb69d735a3b3563ce3bf',
|
||||
estimatedSize: 89317110
|
||||
src: externalFile('electron-v22.3.27-win32-ia32.zip'),
|
||||
sha256: '47bd498e5513529c5e141394fc9fd610cba1dcdea9e6dbb165edf929cbfd9af2',
|
||||
estimatedSize: 90856612
|
||||
},
|
||||
'electron-win64': {
|
||||
src: externalFile('electron-v21.2.3-win32-x64.zip'),
|
||||
sha256: 'b1695f0528567ecc1f7e667520c7770321df35d058841e24c4e9793f4e43e56a',
|
||||
estimatedSize: 95073928
|
||||
src: externalFile('electron-v22.3.27-win32-x64.zip'),
|
||||
sha256: '1a02c0f7af9664696f790dcce05948f0458a2f4f2d48c685f911d2eb99a4c9da',
|
||||
estimatedSize: 96605498
|
||||
},
|
||||
'electron-win-arm': {
|
||||
src: externalFile('electron-v22.3.27-win32-arm64.zip'),
|
||||
sha256: '0e4ad218018c0881ef4de363107a94dd2ced40367a0e18ca7d0dde1f40da0531',
|
||||
estimatedSize: 94065344
|
||||
},
|
||||
'electron-mac': {
|
||||
src: externalFile('electron-v21.0.1-macos-universal.zip'),
|
||||
sha256: 'c31d1ef26f7b6230881a11308ebf8f4487a1a3fb7a151da0972fad77bc9e6acf',
|
||||
estimatedSize: 154789837
|
||||
src: externalFile('electron-v22.3.27-macos-universal.zip'),
|
||||
sha256: '598b35f9030fe30f81b4041be048cd0374f675bd1bc0f172c26cf2808e80a3d9',
|
||||
estimatedSize: 160882083
|
||||
},
|
||||
'electron-linux64': {
|
||||
src: externalFile('electron-v21.0.1-linux-x64.zip'),
|
||||
sha256: '4fd6d7b5a65f44a43165ae77d0484db992b30d6efba478a192e984506fbd52b6',
|
||||
estimatedSize: 90635371
|
||||
src: externalFile('electron-v22.3.27-linux-x64.zip'),
|
||||
sha256: '631d8eb08098c48ce2b29421e74c69ac0312b1e42f445d8a805414ba1242bf3a',
|
||||
estimatedSize: 93426892
|
||||
},
|
||||
'electron-linux-arm32': {
|
||||
src: externalFile('electron-v22.3.27-linux-armv7l.zip'),
|
||||
sha256: '9f8372606e5ede83cf1c73a3d8ff07047e4e3ef614aa89a76cd497dc06cf119d',
|
||||
estimatedSize: 82722572
|
||||
},
|
||||
'electron-linux-arm64': {
|
||||
src: externalFile('electron-v22.3.27-linux-arm64.zip'),
|
||||
sha256: '60279395a5ce4eaf3c08f1e717771b203830902d3fe3a7c311bc37deb1a0e15e',
|
||||
estimatedSize: 93932512
|
||||
},
|
||||
'webview-mac': {
|
||||
src: externalFile('WebView-macos-5.zip'),
|
||||
|
Loading…
Reference in New Issue
Block a user