mirror of
https://github.com/zen-browser/surfer.git
synced 2025-07-10 02:05:31 +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",
|
"name": "@zen-browser/surfer",
|
||||||
"version": "1.2.2",
|
"version": "1.2.3",
|
||||||
"description": "Simplifying building firefox forks!",
|
"description": "Simplifying building firefox forks!",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"bin": {
|
"bin": {
|
||||||
|
|
|
@ -110,7 +110,7 @@ const applyConfig = async (os: string) => {
|
||||||
writeFileSync(join(ENGINE_DIR, 'browser/config/version_display.txt'), version)
|
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.info(`Building for "${os}"...`)
|
||||||
|
|
||||||
log.warning(
|
log.warning(
|
||||||
|
@ -129,7 +129,7 @@ const genericBuild = async (os: string, fast = false) => {
|
||||||
`Mach contents: \n ${readFileSync(join(ENGINE_DIR, 'mach'))}\n\n===END===`
|
`Mach contents: \n ${readFileSync(join(ENGINE_DIR, 'mach'))}\n\n===END===`
|
||||||
)
|
)
|
||||||
|
|
||||||
await configDispatch('./mach', {
|
return await configDispatch('./mach', {
|
||||||
args: buildOptions,
|
args: buildOptions,
|
||||||
cwd: ENGINE_DIR,
|
cwd: ENGINE_DIR,
|
||||||
killOnError: true,
|
killOnError: true,
|
||||||
|
@ -173,6 +173,7 @@ export const build = async (options: Options): Promise<void> => {
|
||||||
|
|
||||||
log.info('Starting build...')
|
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() {
|
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 appIni = join(ENGINE_DIR, 'build', 'application.ini.in');
|
||||||
const appIniContents = readFileSync(appIni).toString();
|
const appIniContents = readFileSync(appIni).toString();
|
||||||
const updatedAppIni = appIniContents.replace(/URL=.*update.xml/g, baseURL);
|
const updatedAppIni = appIniContents.replace(/URL=.*update.xml/g, baseURL);
|
||||||
|
|
|
@ -32,10 +32,7 @@ const ausPlatformsMap = {
|
||||||
'Darwin_x86_64-gcc3',
|
'Darwin_x86_64-gcc3',
|
||||||
],
|
],
|
||||||
macosArm: ['Darwin_aarch64-gcc3'],
|
macosArm: ['Darwin_aarch64-gcc3'],
|
||||||
win64: ['WINNT_x86_64-msvc', 'WINNT_x86_64-msvc-x64'],
|
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"]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function getPlatformConfig() {
|
export async function getPlatformConfig() {
|
||||||
|
@ -55,13 +52,13 @@ function getReleaseMarName(releaseInfo: ReleaseInfo): string | undefined {
|
||||||
|
|
||||||
switch ((process as any).surferPlatform) {
|
switch ((process as any).surferPlatform) {
|
||||||
case 'win32': {
|
case 'win32': {
|
||||||
return compatMode ? releaseInfo.archives["windows-x32"] : releaseInfo.archives["windows-x64"];
|
return compatMode ? releaseInfo.archives["windows-compat"] : releaseInfo.archives["windows"];
|
||||||
}
|
}
|
||||||
case 'darwin': {
|
case 'darwin': {
|
||||||
return compatMode ? releaseInfo.archives["macos-x64"] : releaseInfo.archives["macos-aarch64"];
|
return compatMode ? releaseInfo.archives["macos-x64"] : releaseInfo.archives["macos-aarch64"];
|
||||||
}
|
}
|
||||||
case 'linux': {
|
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(
|
const xmlPath = join(
|
||||||
DIST_DIR,
|
DIST_DIR,
|
||||||
'update',
|
'update',
|
||||||
'browser',
|
'browser',
|
||||||
target,
|
target,
|
||||||
channel,
|
channel + suffix,
|
||||||
'update.xml'
|
'update.xml'
|
||||||
)
|
)
|
||||||
const document = create(updateObject)
|
const document = create(updateObject)
|
||||||
|
@ -115,11 +113,11 @@ async function writeUpdateFileToDisk(
|
||||||
|
|
||||||
function getTargets(): string[] {
|
function getTargets(): string[] {
|
||||||
if ((process as any).surferPlatform == 'win32') {
|
if ((process as any).surferPlatform == 'win32') {
|
||||||
return compatMode ? ausPlatformsMap.win32 : ausPlatformsMap.win64
|
return ausPlatformsMap.win64
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((process as any).surferPlatform == 'linux') {
|
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
|
// Everything else will have to be darwin of some kind. So, for future possible
|
||||||
|
|
|
@ -62,13 +62,13 @@ export interface ReleaseInfo {
|
||||||
}
|
}
|
||||||
|
|
||||||
archives?: {
|
archives?: {
|
||||||
"windows-x64"?: string,
|
"windows"?: string,
|
||||||
"macos-aarch64"?: string,
|
"macos-aarch64"?: string,
|
||||||
"macos-x64"?: string,
|
"macos-x64"?: string,
|
||||||
"linux-x64"?: string,
|
"linux"?: string,
|
||||||
|
|
||||||
"windows-x32"?: string,
|
"windows-compat"?: string,
|
||||||
"linux-x32"?: string,
|
"linux-compat"?: string,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue