diff --git a/.github/workflows/test-build-release.yml b/.github/workflows/test-build-release.yml index 535978b..0fb0e36 100644 --- a/.github/workflows/test-build-release.yml +++ b/.github/workflows/test-build-release.yml @@ -16,11 +16,13 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 + with: + lfs: true # Add this line to enable LFS support - name: Install Linux dependencies run: | sudo apt-get update - sudo apt-get install -y libasound2-dev libudev-dev pkg-config + sudo apt-get install -y libasound2-dev libudev-dev pkg-config libx11-dev libxcb-shape0-dev libxcb-xfixes0-dev libwayland-dev libxkbcommon-dev - name: Setup Rust uses: dtolnay/rust-toolchain@stable @@ -55,6 +57,8 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 + with: + lfs: true # Add this line to enable LFS support - name: Setup Rust uses: dtolnay/rust-toolchain@stable @@ -86,28 +90,23 @@ jobs: - name: Create game directory structure run: | - # Create base dist directory + # Create base dist directory WITH assets subdirectory mkdir -p dist + mkdir -p dist\assets # Copy executable Write-Host "Copying executable..." copy target\ci\my-rts-game.exe dist\ - # Copy assets to the correct structure - extract from assets/ to dist/ + # Copy all assets to dist/assets if (Test-Path -Path assets) { - Write-Host "Copying assets to distribution folder..." - # Get all files in assets directory - Get-ChildItem -Path assets -Recurse -File | ForEach-Object { - # Get relative path from assets directory - $relativePath = $_.FullName.Substring((Get-Item -Path "assets").FullName.Length + 1) - # Create target directory - $targetDir = Join-Path -Path "dist" -ChildPath (Split-Path -Path $relativePath) - if (-not (Test-Path -Path $targetDir)) { - New-Item -Path $targetDir -ItemType Directory | Out-Null - } - # Copy file - Copy-Item -Path $_.FullName -Destination (Join-Path -Path "dist" -ChildPath $relativePath) -Force - } + Write-Host "Copying complete assets folder to distribution..." + xcopy "assets\*" "dist\assets\" /E /I /Y + + # Verify the assets were copied + Write-Host "Verifying asset files..." + $assetCount = (Get-ChildItem -Path dist\assets -Recurse -File).Count + Write-Host "Copied $assetCount asset files" } # Copy documentation @@ -136,7 +135,7 @@ jobs: - name: Install Inno Setup using Chocolatey run: | - choco install -y innosetup + choco upgrade -y innosetup shell: powershell - name: Create Inno Setup Script diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 6d45c23..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "github-actions.workflows.pinned.workflows": [ - ".github/workflows/test-build-release.yml" - ] -} diff --git a/Cargo.lock b/Cargo.lock index 6a42e94..e924dc2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "ab_glyph" @@ -1858,7 +1858,7 @@ dependencies = [ "vec_map", "wasm-bindgen", "web-sys", - "windows 0.58.0", + "windows 0.52.0", ] [[package]] @@ -3877,18 +3877,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9252e5725dbed82865af151df558e754e4a3c2c30818359eb17465f1346a1b49" dependencies = [ "windows-core 0.54.0", - "windows-implement 0.53.0", - "windows-interface 0.53.0", - "windows-targets 0.52.6", -] - -[[package]] -name = "windows" -version = "0.58.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6" -dependencies = [ - "windows-core 0.58.0", + "windows-implement", + "windows-interface", "windows-targets 0.52.6", ] @@ -3907,20 +3897,7 @@ version = "0.54.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "12661b9c89351d684a50a8a643ce5f608e20243b9fb84687800163429f161d65" dependencies = [ - "windows-result 0.1.2", - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-core" -version = "0.58.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99" -dependencies = [ - "windows-implement 0.58.0", - "windows-interface 0.58.0", - "windows-result 0.2.0", - "windows-strings", + "windows-result", "windows-targets 0.52.6", ] @@ -3935,17 +3912,6 @@ dependencies = [ "syn 2.0.98", ] -[[package]] -name = "windows-implement" -version = "0.58.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.98", -] - [[package]] name = "windows-interface" version = "0.53.0" @@ -3957,17 +3923,6 @@ dependencies = [ "syn 2.0.98", ] -[[package]] -name = "windows-interface" -version = "0.58.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.98", -] - [[package]] name = "windows-result" version = "0.1.2" @@ -3977,25 +3932,6 @@ dependencies = [ "windows-targets 0.52.6", ] -[[package]] -name = "windows-result" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" -dependencies = [ - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-strings" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" -dependencies = [ - "windows-result 0.2.0", - "windows-targets 0.52.6", -] - [[package]] name = "windows-sys" version = "0.45.0" diff --git a/Cargo.toml b/Cargo.toml index de0fba8..68458e0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,12 +11,4 @@ codegen-units = 16 lto = "thin" [dependencies] -bevy = { version = "0.14.2", default-features = false, features = [ - "bevy_asset", - "bevy_sprite", - "bevy_ui", - "bevy_text", - "bevy_render", - "bevy_core_pipeline", - "default_font" # Note: singular "font", not "fonts" -]} +bevy = { version = "0.14.2" } diff --git a/TODO.md b/TODO.md index 349b5bb..5148b6a 100644 --- a/TODO.md +++ b/TODO.md @@ -6,6 +6,7 @@ - [x] Build an exe file for Windows - [x] Add a dependabot setup - [x] Setup test framework +- [x] Windows Installer based executable fails with invalid path to assets - [ ] Add complete unit tests for each .rs file - [ ] Add an icon for the game - [ ] Add a splash screen