Skip to content

Commit

Permalink
Improve build process
Browse files Browse the repository at this point in the history
  • Loading branch information
YummyBacon5 authored Nov 22, 2024
1 parent 6aec7c5 commit a2c1f1c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/buildexe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ jobs:
env:
UV_SYSTEM_PYTHON: 1

- name: Build with Pyinstaller
run: pyinstaller -F src/main.py --add-data src/resources/:./resources/ --name AdventureSoft-Cave-of-Shadows
- name: Build with PyInstaller
run: pyinstaller -F src/main.py --hidden-import sys --add-data src/resources/:./resources/ --name AdventureSoft-Cave-of-Shadows

- name: Publish
uses: softprops/[email protected]
Expand Down
4 changes: 2 additions & 2 deletions src/main.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import json, pathlib, shlex
from sys import exit # This is needed for PyInstaller
from io import TextIOWrapper
from typing import TypedDict
from datetime import datetime
from inputs import get_valid_input, get_valid_arr_input
from colorama import Fore, Style
from colorama import Fore, Style, init

RESOURCE_PATH = pathlib.Path(__file__).parent.resolve()
GAME_WORLD = {
Expand Down Expand Up @@ -295,6 +294,7 @@ def _save_game(self, override: list[PlayerDataType] | None = None):
json.dump(all_player_datas, f)

if __name__ == "__main__":
init()
with open(f"{RESOURCE_PATH}/resources/AdventureSoft_logo.txt", "r") as f:
print(f"{Fore.CYAN}Welcome to...\n{Style.BRIGHT}{f.read()}{Style.RESET_ALL}")

Expand Down

0 comments on commit a2c1f1c

Please sign in to comment.