Skip to content
This repository was archived by the owner on May 25, 2025. It is now read-only.

Commit 6b94694

Browse files
committed
refactor(build): Update branding references in build scripts for consistency
1 parent d50bf30 commit 6b94694

File tree

5 files changed

+29
-22
lines changed

5 files changed

+29
-22
lines changed

build.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ export const brandingName = "Floorp";
2828
const VERSION = process.platform === "win32" ? "001" : "000";
2929
const binExtractDir = "_dist/bin";
3030
const binDir = process.platform !== "darwin"
31-
? `_dist/bin/${brandingBaseName}`
32-
: `_dist/bin/${brandingBaseName}/${brandingName}.app/Contents/Resources`;
31+
? `_dist/bin/${brandingName}`
32+
: `_dist/bin/${brandingName}/${brandingName}.app/Contents/Resources`;
3333

3434
const _r = (dir: string) => {
3535
return pathe.resolve(import.meta.dirname as string, dir);
@@ -67,10 +67,10 @@ try {
6767
// ignore
6868
}
6969

70-
const binPath = pathe.join(binDir, brandingBaseName);
70+
const binPath = pathe.join(binDir, brandingName);
7171
const binPathExe = process.platform !== "darwin"
7272
? binPath + (process.platform === "win32" ? ".exe" : "")
73-
: `./_dist/bin/${brandingBaseName}/${brandingName}.app/Contents/MacOS/${brandingBaseName}`;
73+
: `./_dist/bin/${brandingName}/${brandingName}.app/Contents/MacOS/${brandingName}`;
7474

7575
const binVersion = pathe.join(binDir, "nora.version.txt");
7676

@@ -105,7 +105,7 @@ async function decompressBin() {
105105
try {
106106
const appDestBase = pathe.join(
107107
"./_dist/bin",
108-
brandingBaseName,
108+
brandingName,
109109
`${brandingName}.app`,
110110
);
111111
const destContents = pathe.join(appDestBase, macConfig.appDirName);
@@ -306,15 +306,15 @@ async function run(mode: "dev" | "test" | "release" = "dev") {
306306
await release("before");
307307
await injectManifest(binDir, "run-prod", "noraneko-dev");
308308
try {
309-
await Deno.remove(`_dist/bin/${brandingBaseName}/noraneko-dev`, {
309+
await Deno.remove(`_dist/bin/${brandingName}/noraneko-dev`, {
310310
recursive: true,
311311
});
312312
} catch {
313313
// ignore
314314
}
315315
await Deno.symlink(
316316
pathe.resolve(import.meta.dirname as string, "_dist/noraneko"),
317-
`_dist/bin/${brandingBaseName}/noraneko-dev`,
317+
`_dist/bin/${brandingName}/noraneko-dev`,
318318
{ type: "junction" },
319319
);
320320
}

gecko/branding/floorp-daylight/configure.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
44

55
MOZ_APP_DISPLAYNAME="Floorp Daylight"
6-
MOZ_APP_NAME="Floorp"
6+
MOZ_APP_NAME="floorp"
77
MOZ_APP_VENDOR="Ablaze"
88
MOZ_APP_REMOTINGNAME="floorp-daylight"

gecko/branding/floorp-official/configure.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
44

55
MOZ_APP_DISPLAYNAME="Floorp"
6-
MOZ_APP_NAME="Floorp"
6+
MOZ_APP_NAME="floorp"
77
MOZ_APP_VENDOR="Ablaze"
88
MOZ_APP_REMOTINGNAME="floorp-default"

scripts/git-patches/git-patches-manager.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/// <reference lib="deno.ns" />
2-
import { brandingBaseName, brandingName } from "../../build.ts";
2+
import { brandingName } from "../../build.ts";
33
import * as fs from "node:fs/promises";
44
import * as path from "node:path";
55
import { $ } from "zx";
@@ -9,8 +9,8 @@ import { existsSync } from "@std/fs";
99

1010
function getBinDir() {
1111
return process.platform !== "darwin"
12-
? `_dist/bin/${brandingBaseName}`
13-
: `_dist/bin/${brandingBaseName}/${brandingName}.app/Contents/Resources`;
12+
? `_dist/bin/${brandingName}`
13+
: `_dist/bin/${brandingName}/${brandingName}.app/Contents/Resources`;
1414
}
1515

1616
const PATCHES_DIR = "scripts/git-patches/patches";

scripts/launchDev/child-browser.ts

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { $, ProcessPromise } from "zx";
1+
import { $, type ProcessPromise } from "zx";
22
import chalk from "chalk";
33
import { usePwsh } from "zx";
44

@@ -66,8 +66,8 @@ function printFirefoxLog(lines: string[]) {
6666
}
6767
}
6868

69-
import { type LogEntry, log } from "zx/core";
70-
import { brandingBaseName, brandingName } from "../../build.ts";
69+
import { log, type LogEntry } from "zx/core";
70+
import { brandingName } from "../../build.ts";
7171

7272
$.log = (entry: LogEntry) => {
7373
// if the buffer is null, the process is on exit.
@@ -107,20 +107,26 @@ export async function runBrowser(port = 5180) {
107107
switch (Deno.build.os) {
108108
case "windows":
109109
processBrowser =
110-
$`./_dist/bin/${brandingBaseName}/${brandingBaseName}.exe --profile ./_dist/profile/test --remote-debugging-port ${port} --wait-for-browser --jsdebugger`
111-
.stdio("pipe");
110+
$`./_dist/bin/${brandingName}/${brandingName}.exe --profile ./_dist/profile/test --remote-debugging-port ${port} --wait-for-browser --jsdebugger`
111+
.stdio(
112+
"pipe",
113+
);
112114
break;
113115

114116
case "linux":
115117
processBrowser =
116-
$`./_dist/bin/${brandingBaseName}/${brandingBaseName} --profile ./_dist/profile/test --remote-debugging-port ${port} --wait-for-browser --jsdebugger`
117-
.stdio("pipe");
118+
$`./_dist/bin/${brandingName}/${brandingName} --profile ./_dist/profile/test --remote-debugging-port ${port} --wait-for-browser --jsdebugger`
119+
.stdio(
120+
"pipe",
121+
);
118122
break;
119123

120124
case "darwin":
121125
processBrowser =
122-
$`./_dist/bin/${brandingBaseName}/${brandingName}.app/Contents/MacOS/${brandingBaseName} --profile ./_dist/profile/test --remote-debugging-port ${port} --wait-for-browser --jsdebugger`
123-
.stdio("pipe");
126+
$`./_dist/bin/${brandingName}/${brandingName}.app/Contents/MacOS/${brandingName} --profile ./_dist/profile/test --remote-debugging-port ${port} --wait-for-browser --jsdebugger`
127+
.stdio(
128+
"pipe",
129+
);
124130
break;
125131
}
126132

@@ -167,7 +173,8 @@ export async function runBrowser(port = 5180) {
167173
}
168174
}
169175

170-
{ //* main
176+
{
177+
//* main
171178
const decoder = new TextDecoder();
172179
(async () => {
173180
for await (const chunk of Deno.stdin.readable) {

0 commit comments

Comments
 (0)