* create an empty example file on build

* don't strip spaces for login data

* build temp data inside same folder as regular build
This commit is contained in:
otavepto 2024-02-17 05:17:04 +02:00
parent e62ec772c3
commit df2f38f589
4 changed files with 7 additions and 4 deletions

1
.gitignore vendored
View File

@ -14,7 +14,6 @@ tools/generate_emu_config/.env*/
tools/generate_emu_config/.vscode/
tools/generate_emu_config/backup/
tools/generate_emu_config/bin/
tools/generate_emu_config/build/
tools/generate_emu_config/login_temp/
tools/generate_emu_config/output/
tools/generate_emu_config/**/__pycache__/

View File

@ -581,7 +581,7 @@ def main():
filedata = ['']
with open(my_login_file, "r", encoding="utf-8") as f:
filedata = f.readlines()
filedata = list(map(lambda s: s.strip().replace("\r", "").replace("\n", ""), filedata))
filedata = list(map(lambda s: s.replace("\r", "").replace("\n", ""), filedata))
filedata = [l for l in filedata if l]
if len(filedata) == 2:
USERNAME = filedata[0]

View File

@ -3,7 +3,7 @@
venv=".env-linux"
out_dir="bin/linux"
build_temp_dir="build/tmp/linux"
build_temp_dir="bin/tmp/linux"
tool_name="generate_emu_config"
main_file="generate_emu_config.py"
@ -22,6 +22,8 @@ pyinstaller "$main_file" --distpath "$out_dir" -y --clean --onedir --name "$tool
cp -f "steam_default_icon_locked.jpg" "$out_dir/$tool_name"
cp -f "steam_default_icon_unlocked.jpg" "$out_dir/$tool_name"
cp -f "README.md" "$out_dir/$tool_name"
echo "Check the README" > "$out_dir/$tool_name/my_login.EXAMPLE.txt"
echo "Check the README" > "$out_dir/$tool_name/top_owners_ids.EXAMPLE.txt"
echo;
echo =============

View File

@ -5,7 +5,7 @@ pushd "%~dp0"
set "venv=.env-win"
set "out_dir=bin\win"
set "build_temp_dir=build\tmp\win"
set "build_temp_dir=bin\tmp\win"
set "tool_name=generate_emu_config"
set "icon_file=icon\Froyoshark-Enkel-Steam.ico"
set "main_file=generate_emu_config.py"
@ -43,6 +43,8 @@ for /f "usebackq tokens=* delims=" %%A in ('"%main_file%"') do (
copy /y "steam_default_icon_locked.jpg" "%out_dir%\%tool_name%\"
copy /y "steam_default_icon_unlocked.jpg" "%out_dir%\%tool_name%\"
copy /y "README.md" "%out_dir%\%tool_name%\"
1>"%out_dir%\%tool_name%\my_login.EXAMPLE.txt" echo Check the README
1>"%out_dir%\%tool_name%\top_owners_ids.EXAMPLE.txt" echo Check the README
echo:
echo =============