Skip to content

Commit

Permalink
v0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
sumeet-chand committed Jun 9, 2024
1 parent 890ee21 commit 018f610
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 13 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,11 @@ jobs:

- name: Package Windows artifacts
run: |
mkdir -p dist/windows
cp dist/Heroes3MapLiker.exe dist/windows/
cp -r assets LICENSE dist/windows/
powershell -Command "Compress-Archive -Path dist/windows/* -DestinationPath dist/Heroes3MapLiker-windows.zip"
New-Item -ItemType Directory -Force -Path "dist/windows"
Copy-Item -Path "dist/Heroes3MapLiker.exe" -Destination "dist/windows/"
Copy-Item -Path "assets" -Destination "dist/windows/" -Recurse
Copy-Item -Path "README.md" -Destination "dist/windows/"
Compress-Archive -Path "dist/windows/*" -DestinationPath "dist/Heroes3MapLiker-windows.zip"
- name: Upload Windows artifact
uses: actions/upload-artifact@v2
Expand All @@ -62,7 +63,7 @@ jobs:
- name: Build for macOS
run: |
pyinstaller --onefile --noconsole --icon=assets/view_earth.ico --name=Heroes3MapLiker_macos Heroes3MapLiker.py # outputs binary to /dist
pyinstaller --onefile --noconsole --icon=assets/view_earth.ico --name=Heroes3MapLiker Heroes3MapLiker.py # outputs binary to /dist
chmod -R +rwx dist
ls -l dist
Expand Down Expand Up @@ -103,7 +104,7 @@ jobs:
- name: Build for Linux
run: |
pyinstaller --onefile --noconsole --icon=assets/view_earth.ico --name=Heroes3MapLiker_linux Heroes3MapLiker.py # outputs binary to /dist
pyinstaller --onefile --noconsole --icon=assets/view_earth.ico --name=Heroes3MapLiker Heroes3MapLiker.py # outputs binary to /dist
- name: Run Linux Tests
run: python tests.py
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# files to exclude in Git repo
# Directories and Files named below will be excluded in up in remote Git (Github) repository (repo)

# python build files
__pycache__
.mypy_cache
build
iOS_build
android_build
dist

# user files
Expand Down
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,15 @@ If you see a missing feature please suggest by contacting author Sumeet Singh @
# Setup

1. No Installation required. Start the software/program/application: ```Heroes3MapLiker```
2. Click ```rescan images``` the first time and wait for all the map images to download.
3. Your ready to start using filters to find maps, like them, mark as won, enter notes, and more
2. Click ```rescan images``` the first time and wait for all the map images to download then wait for images to download and done.


# Modding | Building | Testing
# Building

There are 2 options to build

1. Manual (locally): by running command with python installed: ```pyinstaller --onefile --noconsole --icon=assets/view_earth.ico --distpath=. Heroes3MapLiker.py``` then test with ```tests.py```
2. Automatic (CI/CD): If making changes to this codebase and pushing a Github CI/CD pipeline ```.github\workflows\actions.yml``` pushes changes, builds binaries, tests using ./tests.py, if all tests pass branch protection publishes commit.
2. Automatic (CI/CD): If making changes to this codebase and pushing a Github CI/CD pipeline ```.github\workflows\actions.yml``` pushes changes, builds binaries, tests using ./tests.py, if all tests pass, creates releases for each OS


# License
Expand Down
4 changes: 2 additions & 2 deletions tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ def test_binary_execution(self):
if sys.platform == 'win32' and not running_headless: # Check if running on Windows
binary_path = 'dist/Heroes3MapLiker.exe'
elif sys.platform == 'darwin' and not running_headless: # Check if running on macOS
binary_path = 'dist/Heroes3MapLiker_macos'
binary_path = 'dist/Heroes3MapLiker'
elif sys.platform.startswith('linux') and not running_headless: # Check if running on Linux and not headless
binary_path = 'dist/Heroes3MapLiker_linux'
binary_path = 'dist/Heroes3MapLiker'
else:
self.skipTest("Skipping test cannot find Operating System")
return
Expand Down

0 comments on commit 018f610

Please sign in to comment.