🎨 Copy the rest of the directory structore from engine

This commit is contained in:
trickypr 2021-10-02 11:24:33 +10:00
parent b92ee0451f
commit 2d771c10fa
2 changed files with 9 additions and 9 deletions

View file

@ -10,7 +10,7 @@ import {
rmSync, rmSync,
statSync, statSync,
} from 'fs-extra' } from 'fs-extra'
import { join, resolve } from 'path' import { dirname, join, resolve } from 'path'
import readline from 'readline' import readline from 'readline'
import sharp from 'sharp' import sharp from 'sharp'
import { log } from '..' import { log } from '..'
@ -266,13 +266,14 @@ export class BrandingPatch extends PatchBase implements IPatchApplier {
await sharp(branding).resize(64, 64).toFile(join(dest, 'firefox64.ico')) await sharp(branding).resize(64, 64).toFile(join(dest, 'firefox64.ico'))
// Copy everything else from the default firefox branding directory // Copy everything else from the default firefox branding directory
;(await walkDirectory(BRANDING_DIR)) ;(await walkDirectory(join(ENGINE_DIR, 'branding', 'unofficial')))
.filter( .filter(
(file) => !existsSync(join(dest, file.replace(BRANDING_DIR, ''))) (file) => !existsSync(join(dest, file.replace(BRANDING_DIR, '')))
) )
.forEach((file) => .forEach((file) => {
mkdirpSync(dirname(join(dest, file.replace(BRANDING_DIR, ''))))
copyFileSync(file, join(dest, file.replace(BRANDING_DIR, ''))) copyFileSync(file, join(dest, file.replace(BRANDING_DIR, '')))
) })
this.done = true this.done = true
} catch (e) { } catch (e) {

View file

@ -1,17 +1,16 @@
# Browser branding # Browser branding
ac_add_options --enable-update-channel=release ac_add_options --enable-update-channel=release
# TODO: Setup a branding generator ac_add_options --with-branding=${brandingDir}
# ac_add_options --with-branding=dot/branding
ac_add_options --with-app-name=dot ac_add_options --with-app-name=dot
export MOZ_USER_DIR="${name}" export MOZ_USER_DIR="${name}"
export MOZ_APP_VENDOR="${vendor}" export MOZ_APP_VENDOR="${vendor}"
export MOZ_APP_BASENAME=Dot export MOZ_APP_BASENAME=Dot
export MOZ_APP_PROFILE=dot export MOZ_APP_PROFILE=dot
export MOZ_APP_DISPLAYNAME="${name}" export MOZ_APP_DISPLAYNAME="${name}"
# export MOZ_BRANDING_DIRECTORY=dot/branding export MOZ_BRANDING_DIRECTORY=${brandingDir}
# export MOZ_OFFICIAL_BRANDING_DIRECTORY=dot/branding export MOZ_OFFICIAL_BRANDING_DIRECTORY=${brandingDir}
export MOZ_MACBUNDLE_ID=%{appId} export MOZ_MACBUNDLE_ID=${appId}
export MOZ_DISTRIBUTION_ID=${appId} export MOZ_DISTRIBUTION_ID=${appId}
# Uncomment if builds are too resource hungry # Uncomment if builds are too resource hungry