forked from PicciMario/iPhone-Backup-Analyzer-2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
103 lines (86 loc) · 2.24 KB
/
Makefile
File metadata and controls
103 lines (86 loc) · 2.24 KB
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
DEBIAN_PACKAGES=python-dev \
python-qt4 python-qt4-dev python-qt4-doc \
python-pyside pyside-tools
# These are the input UI (XML) files
UI_FILES=about_window.ui \
hex_widget.ui \
image_widget.ui \
main_window.ui \
plist_widget.ui \
sqlite_widget.ui \
text_widget.ui \
ipba2-plugins/addressbook_ui.ui \
ipba2-plugins/callhistory_ui.ui \
ipba2-plugins/general_ui.ui \
ipba2-plugins/knownnetworks_ui.ui \
ipba2-plugins/networkident_ui.ui \
ipba2-plugins/note_ui.ui \
ipba2-plugins/safarihistory_ui.ui \
ipba2-plugins/safaristate_ui.ui \
ipba2-plugins/safbookmarks_ui.ui \
ipba2-plugins/skype_ui.ui \
ipba2-plugins/sms_ui.ui \
ipba2-plugins/thumbsbrowser_ui.ui \
ipba2-plugins/viber_ui.ui \
ipba2-plugins/whatsapp_ui.ui
# These are the compiled(generated) output files.
PY_UI_FILES=$(UI_FILES:.ui=.py)
# This is the input file
QRC_FILE=resources.qrc
# These is the output file (NOTE: the file name is different)
RC_FILE=resources_rc.py
# Would these work on windows?
PYSIDE_UIC=pyside-uic
PYSIDE_RCC=pyside-rcc
all: help
# Default target
# Show basic help to the user
.PHONY: help
help:
@echo ""
@echo "--== iPhone-Backup-Analyzer-2 ==--"
@echo "website: http://www.ipbackupanalyzer.com/"
@echo "source code: https://github.com/PicciMario/iPhone-Backup-Analyzer-2"
@echo ""
@echo "Options:"
@echo " $$ make debian - Installed required Python packages,"
@echo " on Debian and Ubuntu."
@echo " $$ make build - Build/Compile files"
@echo " $$ make run - Runs the iPhone Backup Explorer"
@echo " $$ make clean - Remove compiled files"
@echo ""
.PHONY: build
build: ui rc
##
## Compile UI files into Python
##
.PHONY: ui
ui: $(PY_UI_FILES)
$(PY_UI_FILES): %.py: %.ui
$(PYSIDE_UIC) -o "$@" "$<"
##
## Build Resource files.
##
.PHONY: rc
rc: $(RC_FILE)
$(RC_FILE): $(QRC_FILE)
$(PYSIDE_RCC) -o "$@" "$<"
##
## Clean up
##
.PHONY: clean
clean:
rm -f $(PY_UI_FILES) $(RC_FILE)
##
## Helper target to run the program
## (saves the little trouble of typing "python" or using "chmod")
.PHONY: run
run: build
python main.py
##
## Helper target to install required packages on debian
##
.PHONY: debian
debian:
@sudo -p "Enter SUDO passwod to install pyQT4/PySide packages: " \
apt-get install $(DEBIAN_PACKAGES)