-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
35 lines (28 loc) · 945 Bytes
/
Copy pathMakefile
File metadata and controls
35 lines (28 loc) · 945 Bytes
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
# Makefile for Diablo II Character Editor
VERSION := 1.0.0
SEVENZIP := "C:\Program Files\7-Zip\7z.exe"
SFX_MODULE := "C:\Program Files\7-Zip\7z.sfx"
.PHONY: tests
tests:
python -m pytest tests/ -v
.PHONY: test_bits
test_bits:
python -m pytest tests/test_bits_stream.py -v
.PHONY: test_struct
test_struct:
python -m pytest tests/test_d2s_struct.py -v
.PHONY: clean
clean:
@find . -name '__pycache__' -type d -print -exec rm -rf {} \;
@rm -rf build/ dist/
.PHONY: build
build:
pyinstaller d2savior.spec --noconfirm
.PHONY: installer
installer: build
@rm -rf dist/sfx_temp
@mkdir -p dist/sfx_temp
$(SEVENZIP) a -mx9 dist/sfx_temp/archive.7z ./dist/D2Savior/*
powershell -Command "Get-Content $(SFX_MODULE),'sfx_config.txt','dist\sfx_temp\archive.7z' -Encoding Byte -ReadCount 0 | Set-Content 'dist\D2Savior_$(VERSION)_Setup.exe' -Encoding Byte"
@rm -rf dist/sfx_temp
@echo "Installer created: dist/D2Savior_$(VERSION)_Setup.exe"