-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
77 lines (53 loc) · 1.75 KB
/
Makefile
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
# Makefile to package Kaamelott-Soundbard desktop application for Linux
# See https://GitHub.com/Naereen/kaamelott-soundboard-desktop-app
# main rule : package and test locally
quick: package test
all: package test install clean_app
all_and_clean: package test install clean_all
package: install_deps
electron-packager --no-prune --overwrite ./
package_all: install_deps
electron-packager --all --no-prune --overwrite ./
zip_all:
./zipall.sh
# Tests
localtest: install_bower
npm start
test:
./kaamelott-soundboard-desktop-app-linux-x64/kaamelott-soundboard-desktop-app
test_app:
kaamelott-soundboard-desktop-app
# Installers for dependencies
install_node_npm:
sudo apt install nodejs npm
sudo npm install -g electron electron-packager
# npm install electron electron-packager
install_deps: install_bower install_node
install_node:
npm install
install_bower:
-mv -vf ./js/bower_components /tmp/
bower install
-mv -vf ./bower_components ./js/
# Installer for the app
install_app:
cp -vf ./img/ks.jpg ~/.local/share/applications/kaamelott-soundboard.jpg
cp -rvf ./kaamelott-soundboard-desktop-app-linux-x64 ~/.local/share/
ln -fs ~/.local/share/kaamelott-soundboard-desktop-app-linux-x64/kaamelott-soundboard-desktop-app ~/.local/bin/
validate_desktop_app:
desktop-file-validate Kaamelott-Soundboard.desktop
register_app: validate_desktop_app
sudo desktop-file-install Kaamelott-Soundboard.desktop
install: package install_app register_app
# Cleaners
clean_all: clean clean_bower clean_zip
clean: clean_node clean_app clean_bower
clean_node:
rm -rfv ./node_modules
clean_zip:
rm -rfv ./zips/*.zip
clean_app:
rm -rfv ./kaamelott-soundboard-linux-x64
rm -rfv ./kaamelott-soundboard-desktop-app-linux-x64
clean_bower:
rm -rfv ./js/bower_components