-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
49 lines (36 loc) · 1.19 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
# Makefile for the Psi Installer
SRC_LANG=http://psi-im.org/download/lang
SRC_APP=http://www.kismith.co.uk/files/psi/windows/nightlies
.PHONY: all languages files build clean
all: languages files build
download_lang:
rm -rf app/psi_lang
mkdir -p app/psi_lang
wget -nv $(SRC_LANG)/listfiles.php -O _tmplist
@cat _tmplist | sed -e 's|<br/>| |g' | tr ' ' '\n' | while read l; do\
if [ "$$l " != " " ]; then\
wget -nv $(SRC_LANG)/$$l -O app/psi_lang/$$l;\
fi;\
done
rm -f _tmplist
download_psi_nightly:
rm -rf app/*.zip
mkdir -p app
wget -nv http://www.kismith.co.uk/files/psi/windows/nightlies/ -O _tmplist
@f=$$(cat _tmplist | grep .zip | tail -n1 | sed 's|.*HREF="\(.*\)">.*|\1|g'); wget $(SRC_APP)/$$f -O app/$$f
rm -f _tmplist
path_config:
sed -i.orig 's|!define INSTALLER_HOME.*|!define INSTALLER_HOME "$(CURDIR)"|g' config.nsh
rm config.nsh.orig
languages:
@cd tools; ./preplang ../app/psi_lang
files:
@# detect zip file in build dir and use it
@f=$$(ls -1 app/*.zip | head -n1); cd tools; ./prepfiles ../$$f
psi_installer:
rm -f psi_installler.zip
zip -r psi_installer.zip src/ build/ *.*
build: path_config
cd src; makensis psi.nsi
clean:
rm -rf build psi_installer.zip