Skip to content

Commit c2f6db6

Browse files
authored
Merge pull request #19 from the-dev-tools/fix/windows-build-name
Fix/windows build name
2 parents e294da8 + 2f37717 commit c2f6db6

4 files changed

Lines changed: 14 additions & 6 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
desktop: patch
3+
---
4+
5+
Fix Windows binary path

‎apps/desktop/build.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ const config: Configuration = {
88
artifactName: '${productName}-${version}-${platform}-${arch}.${ext}',
99
asarUnpack: [
1010
'resources/**',
11-
'**/node_modules/@the-dev-tools/server/dist/server',
12-
'**/node_modules/@the-dev-tools/cli/dist/cli',
11+
'**/node_modules/@the-dev-tools/server/dist/server*',
12+
'**/node_modules/@the-dev-tools/cli/dist/cli*',
1313
],
1414
extraMetadata: {
1515
name: 'DevTools',

‎apps/desktop/src/main/index.ts‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ const server = pipe(
109109
);
110110

111111
yield* pipe(
112-
path.join(dist, 'server'),
112+
path.join(dist, os.platform() === 'win32' ? 'server.exe' : 'server'),
113113
String.replaceAll('app.asar', 'app.asar.unpacked'),
114114
Command.make,
115115
Command.env({
@@ -261,7 +261,10 @@ const cli = pipe(
261261
Effect.flatMap(path.fromFileUrl),
262262
);
263263

264-
const bin = pipe(path.join(dist, 'cli'), String.replaceAll('app.asar', 'app.asar.unpacked'));
264+
const bin = pipe(
265+
path.join(dist, os.platform() === 'win32' ? 'cli.exe' : 'cli'),
266+
String.replaceAll('app.asar', 'app.asar.unpacked'),
267+
);
265268

266269
yield* pipe(Command.make(bin, ...args), Command.stdout('inherit'), Command.stderr('inherit'), Command.exitCode);
267270

‎packages/server/project.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"cache": false,
1414
"options": {
1515
"cwd": "{projectRoot}",
16-
"command": "go build -o dist/server cmd/server/server.go",
16+
"command": "go build -o dist/ cmd/server/server.go",
1717
"env": {
1818
"CGO_ENABLED": "0"
1919
}
@@ -25,7 +25,7 @@
2525
"cache": true,
2626
"options": {
2727
"cwd": "{projectRoot}",
28-
"command": "go build -o dist/server cmd/server/server.go",
28+
"command": "go build -o dist/ cmd/server/server.go",
2929
"env": {
3030
"CGO_ENABLED": "0"
3131
}

0 commit comments

Comments
 (0)