Implement automatic zip dist creation

This commit is contained in:
DevilXD
2022-01-28 23:07:53 +01:00
parent 61a3d6560c
commit be4c443836
4 changed files with 28 additions and 0 deletions

3
.gitignore vendored
View File

@@ -5,6 +5,9 @@ __pycache__
/build
/*.spec
/Twitch Drops Miner
# Dist files
/7z.exe
/Twitch Drops Miner.zip
# Dev files
/cookies.jar
/settings.json

9
.vscode/tasks.json vendored
View File

@@ -15,6 +15,15 @@
"presentation": {
"showReuseMessage": false
}
},
{
"label": "Pack App",
"type": "shell",
"command": "pack.bat",
"problemMatcher": [],
"presentation": {
"showReuseMessage": false
}
}
]
}

View File

@@ -1,2 +1,5 @@
@echo off
cls
pyinstaller --onefile --noconsole --name "Twitch Drops Miner (by DevilXD)" --icon pickaxe.ico ^
--add-data pickaxe.ico;. --distpath "./Twitch Drops Miner" main.py
call pack.bat

13
pack.bat Normal file
View File

@@ -0,0 +1,13 @@
@echo off
IF NOT EXIST 7z.exe GOTO EXIT
IF NOT EXIST "Twitch Drops Miner.zip" GOTO NEW
7z u "Twitch Drops Miner.zip" "Twitch Drops Miner/" -r -x!"Twitch Drops Miner/cookies.*"
GOTO TEST
:NEW
7z a "Twitch Drops Miner.zip" "Twitch Drops Miner/" -r -x!"Twitch Drops Miner/cookies.*"
GOTO TEST
:TEST
7z t "Twitch Drops Miner.zip"
GOTO EXIT
:EXIT
exit %errorlevel%