mirror of
https://github.com/zen-browser/surfer.git
synced 2025-07-08 17:30:02 +02:00
Update browser.ts
This commit is contained in:
parent
060191f60d
commit
a13f794bb3
1 changed files with 76 additions and 25 deletions
|
@ -24,15 +24,22 @@ import {
|
||||||
* https://searchfox.org/mozilla-central/source/taskcluster/gecko_taskgraph/util/partials.py
|
* https://searchfox.org/mozilla-central/source/taskcluster/gecko_taskgraph/util/partials.py
|
||||||
*/
|
*/
|
||||||
const ausPlatformsMap = {
|
const ausPlatformsMap = {
|
||||||
linux64: ['Linux_x86_64-gcc3'],
|
linux: [
|
||||||
macosIntel: [
|
'Linux_x86_64-gcc3',
|
||||||
|
'Linux-aarch64-gcc3',
|
||||||
|
],
|
||||||
|
macos: [
|
||||||
'Darwin_x86_64-gcc3-u-i386-x86_64',
|
'Darwin_x86_64-gcc3-u-i386-x86_64',
|
||||||
'Darwin_x86-gcc3-u-i386-x86_64',
|
'Darwin_x86-gcc3-u-i386-x86_64',
|
||||||
'Darwin_x86-gcc3',
|
'Darwin_x86-gcc3',
|
||||||
'Darwin_x86_64-gcc3',
|
'Darwin_x86_64-gcc3',
|
||||||
|
'Darwin_aarch64-gcc3',
|
||||||
|
],
|
||||||
|
windows: [
|
||||||
|
'WINNT_x86_64-msvc',
|
||||||
|
'WINNT_x86_64-msvc-x64',
|
||||||
|
'WINNT_aarch64-msvc-aarch64',
|
||||||
],
|
],
|
||||||
macosArm: ['Darwin_aarch64-gcc3'],
|
|
||||||
win64: ['WINNT_x86_64-msvc', 'WINNT_x86_64-msvc-x64'],
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function getPlatformConfig() {
|
export async function getPlatformConfig() {
|
||||||
|
@ -52,19 +59,40 @@ function getReleaseMarName(releaseInfo: ReleaseInfo): string | undefined {
|
||||||
|
|
||||||
switch ((process as any).surferPlatform) {
|
switch ((process as any).surferPlatform) {
|
||||||
case 'win32': {
|
case 'win32': {
|
||||||
return compatMode
|
switch (compatMode) {
|
||||||
? releaseInfo.archives['windows-compat']
|
case 'x86_64': {
|
||||||
: releaseInfo.archives['windows']
|
releaseInfo.archives['windows-compat']
|
||||||
|
}
|
||||||
|
case 'x86_64-v3': {
|
||||||
|
releaseInfo.archives['windows']
|
||||||
|
}
|
||||||
|
case 'aarch64': {
|
||||||
|
releaseInfo.archives['windows-arm64']
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
case 'darwin': {
|
case 'darwin': {
|
||||||
return compatMode
|
switch (compatMode) {
|
||||||
? releaseInfo.archives['macos-x64']
|
case 'x86_64': {
|
||||||
: releaseInfo.archives['macos-aarch64']
|
releaseInfo.archives['macos-x64']
|
||||||
|
}
|
||||||
|
case 'aarch64': {
|
||||||
|
releaseInfo.archives['macos-aarch64']
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
case 'linux': {
|
case 'linux': {
|
||||||
return compatMode
|
switch (compatMode) {
|
||||||
? releaseInfo.archives['linux-compat']
|
case 'x86_64': {
|
||||||
: releaseInfo.archives['linux']
|
releaseInfo.archives['linux-compat']
|
||||||
|
}
|
||||||
|
case 'x86_64-v3': {
|
||||||
|
releaseInfo.archives['linux']
|
||||||
|
}
|
||||||
|
case 'aarch64': {
|
||||||
|
releaseInfo.archives['linux-aarch64']
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -107,8 +135,37 @@ async function writeUpdateFileToDisk(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
) {
|
) {
|
||||||
const suffix =
|
let suffix;
|
||||||
compatMode && (process as any).surferPlatform !== 'macos' ? '-generic' : ''
|
if ((process as any).surferPlatform == 'win32') {
|
||||||
|
if (compatMode == 'x86_64') {
|
||||||
|
suffix = '-generic';
|
||||||
|
}
|
||||||
|
else if (compatMode == 'x86_64-v3') {
|
||||||
|
suffix = '';
|
||||||
|
}
|
||||||
|
else if (compatMode == 'aarch64') {
|
||||||
|
suffix = '-aarch64';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ((process as any).surferPlatform == 'linux') {
|
||||||
|
if (compatMode == 'x86_64') {
|
||||||
|
suffix = '-generic';
|
||||||
|
}
|
||||||
|
else if (compatMode == 'aarch64') {
|
||||||
|
suffix = '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ((process as any).surferPlatform == 'linux') {
|
||||||
|
if (compatMode == 'x86_64') {
|
||||||
|
suffix = '-generic';
|
||||||
|
}
|
||||||
|
else if (compatMode == 'x86_64-v3') {
|
||||||
|
suffix = '';
|
||||||
|
}
|
||||||
|
else if (compatMode == 'aarch64') {
|
||||||
|
suffix = '-aarch64';
|
||||||
|
}
|
||||||
|
}
|
||||||
const xmlPath = join(
|
const xmlPath = join(
|
||||||
DIST_DIR,
|
DIST_DIR,
|
||||||
'update',
|
'update',
|
||||||
|
@ -125,23 +182,17 @@ async function writeUpdateFileToDisk(
|
||||||
|
|
||||||
function getTargets(): string[] {
|
function getTargets(): string[] {
|
||||||
if ((process as any).surferPlatform == 'win32') {
|
if ((process as any).surferPlatform == 'win32') {
|
||||||
return ausPlatformsMap.win64
|
return ausPlatformsMap.windows
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((process as any).surferPlatform == 'linux') {
|
if ((process as any).surferPlatform == 'linux') {
|
||||||
return ausPlatformsMap.linux64
|
return ausPlatformsMap.linux
|
||||||
}
|
}
|
||||||
|
|
||||||
// Everything else will have to be darwin of some kind. So, for future possible
|
if ((process as any).surferPlatform == 'macos') {
|
||||||
// Apple silicon support, we should chose between the two wisely
|
return ausPlatformsMap.macos
|
||||||
// TODO: This is a hack, fix it
|
|
||||||
if (!compatMode) {
|
|
||||||
return ausPlatformsMap.macosArm
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return ausPlatformsMap.macosIntel
|
|
||||||
}
|
|
||||||
|
|
||||||
export async function generateBrowserUpdateFiles() {
|
export async function generateBrowserUpdateFiles() {
|
||||||
log.info('Creating browser AUS update files')
|
log.info('Creating browser AUS update files')
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue