mirror of
https://github.com/zen-browser/surfer.git
synced 2025-07-08 01:10:03 +02:00
chore: Update package.json version to 1.2.3 and optimize platform flags
This commit is contained in:
parent
0150f260bf
commit
abcd9d1a80
5 changed files with 18 additions and 18 deletions
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@zen-browser/surfer",
|
||||
"version": "1.2.2",
|
||||
"version": "1.2.3",
|
||||
"description": "Simplifying building firefox forks!",
|
||||
"main": "index.js",
|
||||
"bin": {
|
||||
|
|
|
@ -110,7 +110,7 @@ const applyConfig = async (os: string) => {
|
|||
writeFileSync(join(ENGINE_DIR, 'browser/config/version_display.txt'), version)
|
||||
}
|
||||
|
||||
const genericBuild = async (os: string, fast = false) => {
|
||||
const genericBuild = async (os: string, fast = false): Promise<boolean> => {
|
||||
log.info(`Building for "${os}"...`)
|
||||
|
||||
log.warning(
|
||||
|
@ -129,7 +129,7 @@ const genericBuild = async (os: string, fast = false) => {
|
|||
`Mach contents: \n ${readFileSync(join(ENGINE_DIR, 'mach'))}\n\n===END===`
|
||||
)
|
||||
|
||||
await configDispatch('./mach', {
|
||||
return await configDispatch('./mach', {
|
||||
args: buildOptions,
|
||||
cwd: ENGINE_DIR,
|
||||
killOnError: true,
|
||||
|
@ -173,6 +173,7 @@ export const build = async (options: Options): Promise<void> => {
|
|||
|
||||
log.info('Starting build...')
|
||||
|
||||
await genericBuild(prettyHost, options.ui).then(() => success(d))
|
||||
let exit = await genericBuild(prettyHost, options.ui);
|
||||
process.exit(exit ? 0 : 1);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -353,7 +353,8 @@ function configureBrandingNsis(brandingNsis: string, brandingConfig: {
|
|||
}
|
||||
|
||||
function setUpdateURLs() {
|
||||
const baseURL = `URL=https://@MOZ_APPUPDATE_HOST@/updates/browser/%BUILD_TARGET%/%CHANNEL%/update.xml`;
|
||||
const sufix = compatMode ? '-compat' : '';
|
||||
const baseURL = `URL=https://@MOZ_APPUPDATE_HOST@/updates/browser/%BUILD_TARGET%/%CHANNEL%${sufix}/update.xml`;
|
||||
const appIni = join(ENGINE_DIR, 'build', 'application.ini.in');
|
||||
const appIniContents = readFileSync(appIni).toString();
|
||||
const updatedAppIni = appIniContents.replace(/URL=.*update.xml/g, baseURL);
|
||||
|
|
|
@ -32,10 +32,7 @@ const ausPlatformsMap = {
|
|||
'Darwin_x86_64-gcc3',
|
||||
],
|
||||
macosArm: ['Darwin_aarch64-gcc3'],
|
||||
win64: ['WINNT_x86_64-msvc', 'WINNT_x86_64-msvc-x64'],
|
||||
|
||||
linux32: ["Linux_x86-gcc3"],
|
||||
win32: ["WINNT_x86-msvc", "WINNT_x86-msvc-x86", "WINNT_x86-msvc-x64"]
|
||||
win64: ['WINNT_x86_64-msvc', 'WINNT_x86_64-msvc-x64']
|
||||
}
|
||||
|
||||
export async function getPlatformConfig() {
|
||||
|
@ -55,13 +52,13 @@ function getReleaseMarName(releaseInfo: ReleaseInfo): string | undefined {
|
|||
|
||||
switch ((process as any).surferPlatform) {
|
||||
case 'win32': {
|
||||
return compatMode ? releaseInfo.archives["windows-x32"] : releaseInfo.archives["windows-x64"];
|
||||
return compatMode ? releaseInfo.archives["windows-compat"] : releaseInfo.archives["windows"];
|
||||
}
|
||||
case 'darwin': {
|
||||
return compatMode ? releaseInfo.archives["macos-x64"] : releaseInfo.archives["macos-aarch64"];
|
||||
}
|
||||
case 'linux': {
|
||||
return compatMode ? releaseInfo.archives["linux-x32"] : releaseInfo.archives["linux-x64"];
|
||||
return compatMode ? releaseInfo.archives["linux-compat"] : releaseInfo.archives["linux"];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -99,12 +96,13 @@ async function writeUpdateFileToDisk(
|
|||
}
|
||||
}
|
||||
) {
|
||||
const suffix = compatMode ? '-compat' : ''
|
||||
const xmlPath = join(
|
||||
DIST_DIR,
|
||||
'update',
|
||||
'browser',
|
||||
target,
|
||||
channel,
|
||||
channel + suffix,
|
||||
'update.xml'
|
||||
)
|
||||
const document = create(updateObject)
|
||||
|
@ -115,11 +113,11 @@ async function writeUpdateFileToDisk(
|
|||
|
||||
function getTargets(): string[] {
|
||||
if ((process as any).surferPlatform == 'win32') {
|
||||
return compatMode ? ausPlatformsMap.win32 : ausPlatformsMap.win64
|
||||
return ausPlatformsMap.win64
|
||||
}
|
||||
|
||||
if ((process as any).surferPlatform == 'linux') {
|
||||
return compatMode ? ausPlatformsMap.linux32 : ausPlatformsMap.linux64
|
||||
return ausPlatformsMap.linux64
|
||||
}
|
||||
|
||||
// Everything else will have to be darwin of some kind. So, for future possible
|
||||
|
|
|
@ -62,13 +62,13 @@ export interface ReleaseInfo {
|
|||
}
|
||||
|
||||
archives?: {
|
||||
"windows-x64"?: string,
|
||||
"windows"?: string,
|
||||
"macos-aarch64"?: string,
|
||||
"macos-x64"?: string,
|
||||
"linux-x64"?: string,
|
||||
"linux"?: string,
|
||||
|
||||
"windows-x32"?: string,
|
||||
"linux-x32"?: string,
|
||||
"windows-compat"?: string,
|
||||
"linux-compat"?: string,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue