Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Brendonovich committed Nov 13, 2024
1 parent 7246689 commit 2a16458
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 3 deletions.
22 changes: 21 additions & 1 deletion .github/prebuild.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const __dirname = path.dirname(__filename);

const __root = path.resolve(path.join(__dirname, ".."));
const nativeDeps = path.join(__root, "native-deps");
const srcTauri = path.join(__root, "apps/desktop/src-tauri");

async function main() {
await fs.mkdir(path.join(__root, ".cargo"), { recursive: true });
Expand Down Expand Up @@ -63,7 +64,7 @@ rustflags = [
});

await fs.writeFile(
`${__root}/apps/desktop/src-tauri/tauri.macos.conf.json`,
`${srcTauri}/tauri.macos.conf.json`,
JSON.stringify(
{
bundle: {
Expand All @@ -77,6 +78,25 @@ rustflags = [
)
);
} else if (os === "windows") {
const binFiles = await fs.readdir(path.join(nativeDeps, "bin"));

await fs.writeFile(
`${srcTauri}/tauri.windows.conf.json`,
JSON.stringify(
{
bundle: {
resources: binFiles.filter(
(f) =>
f.endsWith(".dll") && (f.startsWith("av") || f.startsWith("sw"))
),
},
},
null,
4
)
);

console.log();
}
}

Expand Down
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,6 @@ pnpm-lock.yaml
.zed
.output
.vinxi
native-deps
apps/storybook/storybook-static
native-deps*
apps/storybook/storybook-static
tauri.*.conf.json

0 comments on commit 2a16458

Please sign in to comment.