forked from TiddlyWiki/TiddlyDesktop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bld.sh
executable file
·66 lines (51 loc) · 2.42 KB
/
bld.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#!/bin/bash
# build TiddlyDesktop
# Remove any old build
rm -Rf output
rm -Rf source/tiddlywiki
# Get the correct version of TiddlyWiki
# (Here we install from a sibling directory; use plain "npm install" to install the latest)
npm install ../TiddlyWiki5
pushd ./node_modules/tiddlywiki
./bin/clean.sh
popd
# Copy TiddlyWiki core files into the source directory
cp -R node_modules/tiddlywiki source/tiddlywiki
# Copy TiddlyDesktop plugin into the source directory
cp -R plugins/tiddlydesktop source/tiddlywiki/plugins/tiddlywiki
# Copy TiddlyDesktop version number from package.json to the plugin.info of the plugin and the tiddler $:/plugins/tiddlywiki/tiddlydesktop/version
node propagate-version.js
# Create the output directories
mkdir -p output
mkdir -p output/mac64
mkdir -p output/mac64/TiddlyDesktop-mac64-v0.0.12
mkdir -p output/win32
mkdir -p output/win32/TiddlyDesktop-win32-v0.0.12
mkdir -p output/win64
mkdir -p output/win64/TiddlyDesktop-win64-v0.0.12
mkdir -p output/linux32
mkdir -p output/linux32/TiddlyDesktop-linux32-v0.0.12
mkdir -p output/linux64
mkdir -p output/linux64/TiddlyDesktop-linux64-v0.0.12
# For each platform, copy the stock nw.js binaries overlaying the "source" directory (and icons and plist for the Mac)
# OS X 64-bit App
cp -R nwjs/nwjs-sdk-v0.27.4-osx-x64/nwjs.app output/mac64/TiddlyDesktop-mac64-v0.0.12/TiddlyDesktop.app
cp -R source output/mac64/TiddlyDesktop-mac64-v0.0.12/TiddlyDesktop.app/Contents/Resources/app.nw
cp icons/app.icns output/mac64/TiddlyDesktop-mac64-v0.0.12/TiddlyDesktop.app/Contents/Resources/nw.icns
cp Info.plist output/mac64/TiddlyDesktop-mac64-v0.0.12/TiddlyDesktop.app/Contents/Info.plist
for f in output/mac64/TiddlyDesktop-mac64-v0.0.12/TiddlyDesktop.app/Contents/Resources/*.lproj
do
cp "./strings/InfoPlist.strings" "$f/InfoPlist.strings"
done
# Windows 64-bit App
cp -R nwjs/nwjs-sdk-v0.27.4-win-x64/* output/win64/TiddlyDesktop-win64-v0.0.12
cp -R source/* output/win64/TiddlyDesktop-win64-v0.0.12
# Windows 32-bit App
cp -R nwjs/nwjs-sdk-v0.27.4-win-ia32/* output/win32/TiddlyDesktop-win32-v0.0.12
cp -R source/* output/win32/TiddlyDesktop-win32-v0.0.12
# Linux 64-bit App
cp -R nwjs/nwjs-sdk-v0.27.4-linux-x64/* output/linux64/TiddlyDesktop-linux64-v0.0.12
cp -R source/* output/linux64/TiddlyDesktop-linux64-v0.0.12
# Linux 32-bit App
cp -R nwjs/nwjs-sdk-v0.27.4-linux-ia32/* output/linux32/TiddlyDesktop-linux32-v0.0.12
cp -R source/* output/linux32/TiddlyDesktop-linux32-v0.0.12