forked from rotki/rotki
-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.bat
83 lines (76 loc) · 2.48 KB
/
package.bat
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
Rem Install the rotkehlchen package and pyinstaller. Needed by the pyinstaller
pip install -e .
pip install pyinstaller
if %errorlevel% neq 0 (
echo "ERROR - Pip install step failed"
exit /b %errorlevel%
)
Rem Use pyinstaller to package the python app
IF EXIST build rmdir build /s /Q
IF EXIST rotkehlchen_py_dist rmdir rotkehlchen_py_dist /s /Q
pyinstaller --noconfirm --clean --distpath rotkehlchen_py_dist rotkehlchen.spec
if %errorlevel% neq 0 (
echo "ERROR - pyinstaller step failed"
exit /b %errorlevel%
)
Rem npm stuff
IF EXIST node_modules rmdir node_modules /s /Q
call npm config set python python2.7
call npm ci
call npm rebuild zeromq --runtime=electron --target=3.0.0
if %errorlevel% neq 0 (
echo "ERROR - npm ci step failed"
exit /b %errorlevel%
)
call node_modules/.bin/electron-rebuild
if %errorlevel% neq 0 (
echo "ERROR - electron rebuild step failed"
exit /b %errorlevel%
)
call npm run build
if %errorlevel% neq 0 (
echo "ERROR - npm build step failed"
exit /b %errorlevel%
)
call node_modules/.bin/electron-packager . --overwrite ^
--ignore="rotkehlchen$" ^
--ignore="rotkehlchen.egg-info" ^
--ignore="^/tools$" ^
--ignore="^/docs$" ^
--ignore="^/build$" ^
--ignore="appveyor*" ^
--ignore="^/.eggs" ^
--ignore="^/.github" ^
--ignore="^/.coverage" ^
--ignore="^/.gitignore" ^
--ignore="^/.ignore" ^
--ignore=".nvmrc" ^
--ignore="^/package-lock.json" ^
--ignore="requirements*" ^
--ignore="^/rotki_config.json" ^
--ignore="^/rotkehlchen.spec" ^
--ignore="setup.cfg" ^
--ignore="^/stubs" ^
--ignore="^/.mypy_cache" ^
--ignore=".travis*" ^
--ignore="tsconfig*" ^
--ignore="tsfmt.json" ^
--ignore="tslint.json" ^
--ignore="^/.bumpversion.cfg" ^
--ignore="^/.mypy_cache/" ^
--ignore="^/.coveragerc" ^
--ignore="^/.coverage" ^
--ignore="^/.env" ^
--ignore="^/README.md" ^
--ignore="rotkehlchen.log" ^
--ignore=".*\.sh" ^
--ignore=".*\.py" ^
--ignore=".*\.bat" ^
--ignore="^/CONTRIBUTING.md" ^
--ignore="^/Makefile" ^
--icon="ui/images/rotki.ico"
if %errorlevel% neq 0 (
echo "ERROR - electron-packager step failed"
exit /b %errorlevel%
)
echo "SUCCESS - rotkehlchen is now packaged for windows!"