You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+31-26Lines changed: 31 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,10 @@
1
1
# SwitchV
2
2
3
-
Use this to quickly open and switch VSCode projects.
3
+
Use this to quickly open and switch VS Code projects.
4
4
5
5
## Features
6
6
7
-
- use ~~command line~~ shortcut/tray menu to quickly launch a UI listing recent opened window with different project paths, then select one to open it in VSCode.
7
+
- use ~~command line~~ shortcut/tray menu to quickly launch a UI listing recent opened window with different project paths, then select one to open it in VS Code.
8
8
9
9
## Dev and package Note
10
10
@@ -16,16 +16,16 @@ Use this to quickly open and switch VSCode projects.
- For the first time or every time db scheme changes, execute `yarn db:migrate` to generate SQLite DB file (`./prisma/dev.db`) and generate TypeScript interface. `yarn db:view` can be used to view DB data.
22
-
-~~To generate TypeScript DB interface via `yarn db:type`~~ (db:migrate will also automatically do this part, `yarn install` will also include generated types in node_modules/.prisma/index.d.ts)
23
-
- F5 debug or `yarn start:debug`
24
-
- build: `yarn make`.
25
-
- desktop/electron
19
+
-~~server(moved into electron)~~
20
+
-~~`yarn install`~~
21
+
- electron (desktop app)
26
22
-`yarn install`
27
-
-`yarn start` (not set VSCode debugging yet)
28
-
- package as mac app: `yarn make`. It (Electron part) is about 196MB. Server vercel/pkg build is 119MB. Total it is 316MB. Try Tauri to reduce electron part?
23
+
- DB setup
24
+
- For the first time or every time db scheme changes, execute `yarn db:migrate` to generate SQLite DB file (`./prisma/dev.db`) and generate TypeScript interface. `yarn db:view` can be used to view DB data.
25
+
-~~To generate TypeScript DB interface via `yarn db:type`~~ (db:migrate will also automatically do this part, `yarn install` will also include generated types in node_modules/.prisma/index.d.ts)
26
+
-`yarn start` (not set VS Code debugging yet)
27
+
-~~F5 debug or `yarn start:debug`~~ (need fix since we have embed the server into electron)
28
+
- package as mac app: `yarn make`. It (Electron part) is about 196MB. ~~Server vercel/pkg build is 119MB. Total it is 316MB. Try Tauri to reduce electron part?~~
29
29
- build mas build: `yarn make_mas`. Then execute `sh ./sign.sh`.
30
30
31
31
@@ -38,7 +38,7 @@ Use this to quickly open and switch VSCode projects.
38
38
39
39
## issues/todos
40
40
41
-
1.[fixed] after click one window item, show VSCode, first time "cmd+ctrl+j" trigger does not effect and always need the second time.
41
+
1.[fixed] after click one window item, show VS Code, first time "cmd+ctrl+j" trigger does not effect and always need the second time.
42
42
43
43
2.[fixed] after using ctrl+w to close SwitchV, the window object will be destroyed and can not be used anymore (will throw exception)
44
44
@@ -50,6 +50,13 @@ Use this to quickly open and switch VSCode projects.
50
50
51
51
6.~~React App is called twice initially~~ (this is due to <React.StrictMode>). ref: https://github.com/facebook/react/issues/12856#issuecomment-390206425
52
52
53
+
54
+
7.[solved] how to use vercel/pkg bundle deb.db in nestjs, instead of manual copy????
55
+
1. Solved by using macOS application folder to store db file.
56
+
2. Eventually, using `vercel/pkg` was also gave up and server is embedded into electron to make the final packaging working.
57
+
8.[fixed] close the packaged app via cmd+q seems not close SwitchV-server-macos process? check by command: lsof -i:55688. Use ctrl+c to stop development (running via yarn start) is OK. (add close button on tray to help? I guess it is not helping).
58
+
1. Solved by electron sending kill server process in the before-quick event handler. Another person suggests to add one more step to handle SIGINT signal on server side, ref https://stackoverflow.com/questions/71523442/child-process-doesnt-exit.
59
+
53
60
### debugger issue
54
61
55
62
**To debug main process**
@@ -105,20 +112,18 @@ The drawback is you will see two copy of SwitchV. And attaching render process t
105
112
## notes about packaging a macOS app
106
113
107
114
steps:
108
-
1. bundle server
109
-
1. in server, execute `yarn build` to generate dist folder
110
-
2. (first time) `yarn global add pkg`
111
-
3.~~add `"version": "0.0.1"` field in `generated server/node_modules/.prisma/client/package.json`~~
6.[optional]`DEBUG_PKG=1 ./SwitchV-server-macos` for debugging
115
-
2. in electron, `yarn make` to generate out folder
116
-
117
-
two issues
118
-
1. x TODO: how to use vercel/pkg bundle deb.db in nestjs, instead of manual copy???? (use macOS application folder to store db file)
119
-
2. x TODO: close the packaged app via cmd+q seems not close SwitchV-server-macos process? check by command: lsof -i:55688. Use ctrl+c to stop development (running via yarn start) is OK. (add close button on tray to help? I guess it is not helping). Solved by electron send kill server process in the before-quick event handler. Another person suggests to add one more step to handle SIGINT signal on server side, ref https://stackoverflow.com/questions/71523442/child-process-doesnt-exit.
120
-
121
-
### server notes
115
+
1.~~bundle server~~
116
+
1.~~in server, execute `yarn build` to generate dist folder~~
117
+
2.~~(first time) `yarn global add pkg`~~
118
+
3.~~add `"version": "0.0.1"` field in `generated server/node_modules/.prisma/client/package.json`~~
6.~~[optional]`DEBUG_PKG=1 ./SwitchV-server-macos` for debugging~~
122
+
2. Follow [Prepare provisioning profile](https://www.electronjs.org/) section on https://www.electronjs.org/ to get `yourapp.provisionprofile` and download it as `electron/embedded.provisionprofile`.
123
+
3. in electron, `yarn make` to generate out folder
124
+
125
+
126
+
### server packaging notes (we had use vercel/pkg to package server but we have decided to embed server to electron)
0 commit comments