Skip to content

Commit a1eb2bf

Browse files
midway in fixing package step
1 parent 4bb641a commit a1eb2bf

File tree

2 files changed

+32
-13
lines changed

2 files changed

+32
-13
lines changed

forge.config.js

Lines changed: 31 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ module.exports = {
4646
console.log('Running afterCopyExtraResources hook...');
4747
console.log({ arch, buildPath, electronVersion, platform });
4848

49-
const chromiumDir = path.join(
49+
const localBrowsersDir = path.join(
5050
buildPath,
5151
'Loadmill.app',
5252
'Contents',
@@ -57,22 +57,41 @@ module.exports = {
5757
'.local-browsers',
5858
);
5959

60-
console.log({ chromiumDir });
60+
console.log({ localBrowsersDir });
6161

6262
try {
63-
const matches = glob.sync(
64-
path.join(chromiumDir, '**/gpu_shader_cache.bin'),
65-
{ nodir: true },
66-
);
63+
console.log('Attempting to remove .tbd files from .local-browsers...');
64+
// Check if the localBrowsers directory exists
65+
if (fs.existsSync(localBrowsersDir)) {
66+
console.log('.local-browsers directory found, searching for .tbd files...');
6767

68-
matches.forEach(file => {
69-
console.log(`Changing permissions for: ${file}`);
70-
fs.chmodSync(file, 0o644);
71-
});
68+
// Find all .tbd files recursively in the .local-browsers directory
69+
const tbdFiles = glob.sync('**/*.tbd', {
70+
absolute: true,
71+
cwd: localBrowsersDir,
72+
});
7273

73-
console.log('Permissions changed successfully.');
74+
console.log(`Found ${tbdFiles.length} .tbd files:`, tbdFiles);
75+
76+
let removedCount = 0;
77+
tbdFiles.forEach(tbdFile => {
78+
try {
79+
console.log(`Removing... ${tbdFile}`);
80+
fs.unlinkSync(tbdFile);
81+
console.log(`Removed: ${tbdFile}`);
82+
removedCount++;
83+
} catch (unlinkErr) {
84+
console.warn(`Failed to remove ${tbdFile}:`, unlinkErr.message);
85+
}
86+
});
87+
88+
console.log('Finished removing .tbd files');
89+
console.log(`Total .tbd files removed: ${removedCount}`);
90+
} else {
91+
console.log('.local-browsers directory not found, skipping .tbd file removal');
92+
}
7493
} catch (err) {
75-
console.warn('Permission fix failed (may be fine if files don’t exist):', err.message);
94+
console.warn('Removing .tbd files failed', err.message);
7695
}
7796

7897
callback();

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "desktop-app",
33
"productName": "Loadmill",
4-
"version": "3.7.3",
4+
"version": "3.7.3-safari.1",
55
"description": "The Loadmill desktop app",
66
"author": {
77
"name": "Loadmill Ltd.",

0 commit comments

Comments
 (0)