Add manual

This commit is contained in:
DevilXD
2022-02-13 22:54:59 +01:00
parent fce1bfa380
commit 3fba155c68
5 changed files with 43 additions and 17 deletions

9
.gitignore vendored
View File

@@ -4,12 +4,11 @@ __pycache__
# Build files
/build
/*.spec
/Twitch Drops Miner
# Dist files
/dist
/7z.exe
/*.zip
/*.zip.tmp
/*.tmp
/Twitch Drops Miner
# Dev files
/cookies.jar
/settings.json
/log*.txt
cookies*

View File

@@ -1,5 +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
--add-data pickaxe.ico;. main.py
call pack.bat

View File

@@ -64,12 +64,13 @@ parser = argparse.ArgumentParser(
)
parser.add_argument("--version", action="version", version=f"v{__version__}")
parser.add_argument("-v", dest="_verbose", action="count", default=0)
parser.add_argument("--no-run-check", dest="no_run_check", action="store_true")
parser.add_argument("--debug-ws", dest="_debug_ws", action="store_true")
parser.add_argument("--debug-gql", dest="_debug_gql", action="store_true")
parser.add_argument("-g", "--game", default=None)
parser.add_argument("--tray", action="store_true")
parser.add_argument("--log", action="store_true")
# undocumented debug args
parser.add_argument("--no-run-check", dest="no_run_check", action="store_true")
parser.add_argument("--debug-ws", dest="_debug_ws", action="store_true")
parser.add_argument("--debug-gql", dest="_debug_gql", action="store_true")
options: ParsedArgs = parser.parse_args(namespace=ParsedArgs())
# check if we're not already running
try:

18
manual.txt Normal file
View File

@@ -0,0 +1,18 @@
###################################
# Twitch Drops Miner (by DevilXD) #
###################################
Available command line arguments:
• -g <name>; --game <name>
On application start, begin mining immedately for the `<name>` game. Case sensitive.
• --tray
Start application as minimised into tray.
• -v
Increase verbosity level. Can be stacked up to 3 times (-vv and -vvv) to show
increasingly more information during application runtime.
• --log
Enables logging of runtime information into a 'log.txt' file. Verbosity level of this logging
matches the level set by `-v`.
• --version
Show application version information

View File

@@ -1,13 +1,21 @@
@echo off
IF NOT EXIST 7z.exe GOTO NO7Z
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"
IF NOT EXIST "Twitch Drops Miner" mkdir "Twitch Drops Miner"
rem Prepare files
copy /y /v dist\*.exe "Twitch Drops Miner"
copy /y /v manual.txt "Twitch Drops Miner"
IF EXIST "Twitch Drops Miner.zip" (
rem Add action
set action=a
) ELSE (
rem Update action
set action=u
)
rem Pack and test
7z %action% "Twitch Drops Miner.zip" "Twitch Drops Miner/" -r
7z t "Twitch Drops Miner.zip" * -r
rem Cleanup
IF EXIST "Twitch Drops Miner" rmdir /s /q "Twitch Drops Miner"
GOTO EXIT
:NO7Z
echo No 7z.exe detected, skipping packaging!