File tree 8 files changed +79
-3
lines changed
8 files changed +79
-3
lines changed Original file line number Diff line number Diff line change
1
+ name : Build
2
+ on : [push, pull_request]
3
+
4
+ jobs :
5
+ build_on_linux :
6
+ runs-on : ubuntu-latest
7
+ steps :
8
+ - uses : actions/checkout@v2
9
+ - uses : actions/setup-node@master
10
+ with :
11
+ node-version : 16
12
+ - name : install electron dependencies
13
+ run : npm install
14
+ - name : install frontend dependencies
15
+ run : |
16
+ cd frontend
17
+ npm install
18
+ - name : build-frontend
19
+ run : npm run build
20
+ - name : build-app
21
+ run : npm run electron:build
22
+
23
+ build_on_mac :
24
+ runs-on : macos-latest
25
+ steps :
26
+ - uses : actions/checkout@v2
27
+ - uses : actions/setup-node@master
28
+ with :
29
+ node-version : 16
30
+ - name : install electron dependencies
31
+ run : npm install
32
+ - name : install frontend dependencies
33
+ run : |
34
+ cd frontend
35
+ npm install
36
+ - name : build-frontend
37
+ run : npm run build
38
+ - name : build-app
39
+ run : npm run electron:build
40
+
41
+ build_on_win :
42
+ runs-on : windows-latest
43
+ steps :
44
+ - uses : actions/checkout@v2
45
+ - uses : actions/setup-node@master
46
+ with :
47
+ node-version : 16
48
+ - name : install electron dependencies
49
+ run : npm install
50
+ - name : install frontend dependencies
51
+ run : |
52
+ cd frontend
53
+ npm install
54
+ - name : build-frontend
55
+ run : npm run build
56
+ - name : build-app
57
+ run : npm run electron:build
Original file line number Diff line number Diff line change @@ -81,7 +81,12 @@ Oversnip is open source and powered by Electron. Hop in and make it your own!
81
81
82
82
```
83
83
git clone https://github.com/AskingQuestions/oversnip.git
84
+
84
85
cd oversnip
85
86
npm install
87
+ cd oversnip/frontend
88
+ npm install
89
+
90
+ cd ../
86
91
npm run dev
87
92
```
Original file line number Diff line number Diff line change @@ -92,10 +92,24 @@ function handleSquirrelEvent() {
92
92
93
93
const path = require ( "path" ) ;
94
94
const fs = require ( "fs" ) ;
95
+ const os = require ( "os" ) ;
95
96
const got = require ( "got" ) ;
96
97
97
- const ICON_PATH = path . join ( __dirname , "images" , "icon.ico" ) ;
98
- const TRAY_ICON_PATH = path . join ( __dirname , "images" , "iconTemplate.png" ) ;
98
+ let ICON_PATH = "" ;
99
+ let TRAY_ICON_PATH = path . join ( __dirname , "images" , "iconTemplate.png" ) ;
100
+
101
+ switch ( os . platform ( ) ) {
102
+ case "darwin" :
103
+ ICON_PATH = path . join ( __dirname , "images" , "icon.icns" ) ;
104
+ break ;
105
+ case "win32" :
106
+ ICON_PATH = path . join ( __dirname , "images" , "icon.ico" ) ;
107
+ TRAY_ICON_PATH = path . join ( __dirname , "images" , "iconTemplate.ico" ) ;
108
+ break ;
109
+ default :
110
+ ICON_PATH = path . join ( __dirname , "images" , "icon.png" ) ;
111
+ break ;
112
+ }
99
113
100
114
const Jimp = require ( "jimp" ) ;
101
115
Original file line number Diff line number Diff line change 37
37
"config" : {
38
38
"forge" : {
39
39
"packagerConfig" : {
40
- "icon" : " images/icon.ico " ,
40
+ "icon" : " images/icon" ,
41
41
"ignore" : [
42
42
" frontend" ,
43
43
" images/examples"
You can’t perform that action at this time.
0 commit comments