|
1 | | -NODE-WEBKIT = v0.3.4 |
| 1 | +NODE-WEBKIT=v0.3.4 |
2 | 2 |
|
3 | 3 | .PHONY: osx |
4 | 4 | osx: |
5 | | - @rm -rf svgo-gui.app |
| 5 | + @rm -rf osx/svgo-gui.app |
6 | 6 | @echo downloading node-webkit engine… |
7 | 7 | @curl -sSO http://s3.amazonaws.com/node-webkit/${NODE-WEBKIT}/node-webkit-${NODE-WEBKIT}-osx-ia32.zip |
8 | 8 | @echo unpacking, renaming and copying files… |
9 | 9 | @unzip -qq node-webkit-${NODE-WEBKIT}-osx-ia32.zip |
10 | 10 | @rm node-webkit-${NODE-WEBKIT}-osx-ia32.zip |
11 | | - @mv node-webkit.app svgo-gui.app |
12 | | - @mkdir svgo-gui.app/Contents/Resources/app.nw/ |
13 | | - @ln app.nw/index.html svgo-gui.app/Contents/Resources/app.nw/index.html |
14 | | - @ln app.nw/styles.css svgo-gui.app/Contents/Resources/app.nw/styles.css |
15 | | - @ln app.nw/script.js svgo-gui.app/Contents/Resources/app.nw/script.js |
16 | | - @ln app.nw/package.json svgo-gui.app/Contents/Resources/app.nw/package.json |
17 | | - @ln -f osx/app.icns svgo-gui.app/Contents/Resources/app.icns |
18 | | - @ln -f osx/Info.plist svgo-gui.app/Contents/Info.plist |
| 11 | + @mv node-webkit.app osx/svgo-gui.app |
| 12 | + @mkdir osx/svgo-gui.app/Contents/Resources/app.nw/ |
| 13 | + @ln app.nw/index.html osx/svgo-gui.app/Contents/Resources/app.nw/index.html |
| 14 | + @ln app.nw/styles.css osx/svgo-gui.app/Contents/Resources/app.nw/styles.css |
| 15 | + @ln app.nw/script.js osx/svgo-gui.app/Contents/Resources/app.nw/script.js |
| 16 | + @ln app.nw/package.json osx/svgo-gui.app/Contents/Resources/app.nw/package.json |
| 17 | + @ln -f osx/app.icns osx/svgo-gui.app/Contents/Resources/app.icns |
| 18 | + @ln -f osx/Info.plist osx/svgo-gui.app/Contents/Info.plist |
19 | 19 | @echo installing svgo module… |
20 | | - @cd svgo-gui.app/Contents/Resources/app.nw/; npm install &>/dev/null |
| 20 | + @cd osx/svgo-gui.app/Contents/Resources/app.nw/; npm install &>/dev/null |
21 | 21 | @echo done! |
22 | | - @echo svgo-gui.app is ready, changes in ./app.nw/ will affect it. |
| 22 | + @echo osx/svgo-gui.app is ready, changes in ./app.nw/ will automatically it. |
| 23 | + |
| 24 | +.PHONY: linux |
| 25 | +linux: |
| 26 | + @rm -rf linux/ |
| 27 | + @echo downloading node-webkit engine… |
| 28 | + @curl -sSO http://s3.amazonaws.com/node-webkit/${NODE-WEBKIT}/node-webkit-${NODE-WEBKIT}-linux-ia32.tar.gz |
| 29 | + @echo unpacking, renaming and copying files… |
| 30 | + @mkdir linux |
| 31 | + @cd linux; tar -xvf ../node-webkit-${NODE-WEBKIT}-linux-ia32.tar.gz --strip 1 > /dev/null 2>&1 |
| 32 | + @rm node-webkit-${NODE-WEBKIT}-linux-ia32.tar.gz |
| 33 | + @echo installing svgo module… |
| 34 | + @cd app.nw/; npm install > /dev/null 2>&1 |
| 35 | + @echo making application… |
| 36 | + @cd app.nw/; zip -0yrq ../linux/app.nw *.* node_modules/ |
| 37 | + @cat linux/nw linux/app.nw > linux/svgo-gui |
| 38 | + @chmod +x linux/svgo-gui |
| 39 | + @rm linux/libffmpegsumo.so linux/nw linux/app.nw |
| 40 | + @echo done! |
| 41 | + @echo linux/svgo-gui app is ready, nw.pak must be shipped along with it. |
0 commit comments