From b037eadb999d5925a97394b8b856502057eb81f1 Mon Sep 17 00:00:00 2001 From: cxykevin Date: Thu, 15 Feb 2024 07:00:11 +0000 Subject: [PATCH] =?UTF-8?q?=E5=90=88=E5=B9=B6=E4=B8=A4=E4=B8=AAmakefile?= =?UTF-8?q?=EF=BC=88linux=E6=9C=AA=E6=B5=8B=E8=AF=95=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: cxykevin --- Makefile | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..686bff5 --- /dev/null +++ b/Makefile @@ -0,0 +1,67 @@ +dist/PEinjector.7z: src/main.py src/log.py src/action.py src/hook.pyw src/makelnk.py src/regwrite.py src/config.py src/loader.py src/utils.py root/VentoyAutoRun.bat +ifeq ($(OS), Windows_NT) + mkdir tmp\pkg\PEinjector\env + mkdir tmp\pkg\PEinjector\src + mkdir tmp\pkg\PEinjector\tool + xcopy root .\tmp\pkg /C /Y /E + xcopy env .\tmp\pkg\PEinjector\env /C /Y /E + xcopy src .\tmp\pkg\PEinjector\src /C /Y /E + xcopy tool .\tmp\pkg\PEinjector\tool /C /Y /E + rmdir /S /Q dist + mkdir dist + 7z a -t7z dist\PEinjector.7z .\tmp\pkg\PEinjector -r -m0=BCJ -m1=LZMA:d=21 -ms -mmt + 7z a -t7z dist\PEinjector.7z .\tmp\pkg\VentoyAutoRun.bat -m0=BCJ -m1=LZMA:d=21 -ms -mmt + rmdir /S /Q tmp +else + mkdir tmp/pkg/PEinjector/env -p + mkdir tmp/pkg/PEinjector/src -p + mkdir tmp/pkg/PEinjector/tool -p + cp ./root/* ./tmp/pkg -rfp + cp ./env ./tmp/pkg/PEinjector/env -rfp + cp ./src ./tmp/pkg/PEinjector/src -rfp + cp ./tool ./tmp/pkg/PEinjector/tool -rfp + rm -rf dist + mkdir disk -p + 7z a -t7z dist/PEinjector.7z ./tmp/pkg/PEinjector -r -m0=BCJ -m1=LZMA:d=21 -ms -mmt + 7z a -t7z dist/PEinjector.7z ./tmp/pkg/VentoyAutoRun.bat -m0=BCJ -m1=LZMA:d=21 -ms -mmt + rm -rf tmp +endif +tmp/py/python.zip: +ifeq ($(OS), Windows_NT) + mkdir tmp\py + cd tmp\py + wget https://registry.npmmirror.com/-/binary/python/3.12.1/python-3.12.1-embed-amd64.zip -O tmp\py/python.zip +else + mkdir tmp/py -p + cd tmp/py + wget https://registry.npmmirror.com/-/binary/python/3.12.1/python-3.12.1-embed-amd64.zip -O tmp/py/python.zip +endif +env\python.exe: tmp/py/python.zip + 7z x -y -aos -oenv/ tmp/py/python.zip +install: dist/PEinjector.7z installer/install.py + python installer/install.py +build: dist/PEinjector.7z +prepare: env/python.exe +clean: +ifeq ($(OS), Windows_NT) + rmdir /S /Q tmp + rmdir /S /Q dist + mkdir dist +else + rm -rf tmp + rm -rf dist + mkdir dist -p +endif +debug: dist/PEinjector.7z + python installer/install.py +ifeq ($(OS), Windows_NT) + start_vm.cmd +else + start_vm.sh +endif +start: +ifeq ($(OS), Windows_NT) + start_vm.cmd +else + start_vm.sh +endif