🐛 Fix the browser name on macos

This commit is contained in:
trickypr 2022-06-17 14:21:41 +10:00
parent 83658f1b91
commit 41bb9e9561
5 changed files with 29 additions and 4 deletions

View file

@ -143,7 +143,7 @@ async function setupImages(configPath: string, outputPath: string) {
await addHash(join(configPath, 'MacOSInstaller.svg'))
}
function setupLocale(
async function setupLocale(
outputPath: string,
brandingConfig: {
backgroundColor: string
@ -154,10 +154,14 @@ function setupLocale(
brandingVendor: string
}
) {
readdirSync(join(templateDir, 'branding.optional'))
// eslint-disable-next-line @typescript-eslint/no-extra-semi
;(await walkDirectory(join(templateDir, 'branding.optional')))
.map((file) =>
file.replace(join(templateDir, 'branding.optional') + '/', '')
)
.map((file) => [
readFileSync(join(templateDir, 'branding.optional', file), 'utf-8'),
join(outputPath, 'locales/en-US', file),
join(outputPath, file),
])
.forEach(([contents, path]) => {
mkdirSync(dirname(path), { recursive: true })
@ -231,6 +235,6 @@ export async function apply(name: string): Promise<void> {
ensureEmpty(outputPath)
await setupImages(configPath, outputPath)
setupLocale(outputPath, brandingConfig)
await setupLocale(outputPath, brandingConfig)
await copyMozFiles(outputPath, brandingConfig)
}

View file

@ -0,0 +1,21 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
MOZ_APP_DISPLAYNAME="${brandFullName}"
if test "$DEVELOPER_OPTIONS"; then
if test "$MOZ_DEBUG"; then
# Local debug builds
MOZ_HANDLER_CLSID="398ffd8d-5382-48f7-9e3b-19012762d39a"
MOZ_IHANDLERCONTROL_IID="a218497e-8b10-460b-b668-a92b7ee39ff2"
MOZ_ASYNCIHANDLERCONTROL_IID="ca18b9ab-04b6-41be-87f7-d99913d6a2e8"
MOZ_IGECKOBACKCHANNEL_IID="231c4946-4479-4c8e-aadc-8a0e48fc4c51"
else
# Local non-debug builds
MOZ_HANDLER_CLSID="ce573faf-7815-4fc2-a031-b092268ace9e"
MOZ_IHANDLERCONTROL_IID="2b715cce-1790-4fe1-aef5-48bb5acdf3a1"
MOZ_ASYNCIHANDLERCONTROL_IID="8e089670-4f57-41a7-89c0-37f17482fa6f"
MOZ_IGECKOBACKCHANNEL_IID="18e2488d-310f-400f-8339-0e50b513e801"
fi
fi