Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
Noxalus committed Jun 26, 2024
2 parents de16021 + db1cb4f commit f1a7bdc
Show file tree
Hide file tree
Showing 9 changed files with 288 additions and 297 deletions.
32 changes: 8 additions & 24 deletions .github/workflows/dotnet-desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ jobs:
run: Install-Module 7Zip4PowerShell -Force -Verbose

- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
lfs: 'true'

- name: Get the version
uses: kzrnm/get-net-sdk-project-versions-action@v1
- name: Get the project's version
uses: kzrnm/get-net-sdk-project-versions-action@v2.0.0
id: get-version
with:
proj-path: KHFM-VF-Patch/KHFM-VF-Patch.csproj
Expand All @@ -32,30 +32,14 @@ jobs:
shell: cmd
run: call .\CI\CreateArtifact.cmd

- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: KHFM-VF-Patch
path: .\KHFM-VF-Patch\bin\x86\Release\net5.0-windows
- name: Rename Artifact with project version
shell: cmd
run: mv ./KHFM-VF-Patch/KHFM-VF-Patch.zip ./KHFM-VF-Patch/KHFM-VF-Patch-${{ steps.get-version.outputs.version }}.zip

- name: Create Release
id: create_release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.get-version.outputs.version }}
release_name: v${{ steps.get-version.outputs.version }}
files: ./KHFM-VF-Patch/KHFM-VF-Patch-${{ steps.get-version.outputs.version }}.zip
draft: true
prerelease: true

- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./KHFM-VF-Patch/KHFM-VF-Patch.zip
asset_name: KHFM-VF-Patch-${{ steps.get-version.outputs.version }}.zip
asset_content_type: application/zip
16 changes: 8 additions & 8 deletions CI/CreateArtifact.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ pushd "%~dp0"
cd ..\KHFM-VF-Patch

@REM Create Patches directory
powershell New-Item -Path "bin\x86\Release\net5.0-windows\Resources\Patches" -ItemType Directory
powershell New-Item -Path "bin\x86\Release\net8.0-windows7.0\Resources\Patches" -ItemType Directory

@REM Zip all sub-patches in the proper directory with the proper extension
powershell Compress-7Zip "Resources\Patches\KH1FM-Magic-EN" -ArchiveFileName "bin\x86\Release\net5.0-windows\Resources\Patches\KH1FM-Magic-EN.patch" -Format Zip
powershell Compress-7Zip "Resources\Patches\KH1FM-Magic-FR" -ArchiveFileName "bin\x86\Release\net5.0-windows\Resources\Patches\KH1FM-Magic-FR.patch" -Format Zip
powershell Compress-7Zip "Resources\Patches\KH1FM-Stranger" -ArchiveFileName "bin\x86\Release\net5.0-windows\Resources\Patches\KH1FM-Stranger.patch" -Format Zip
powershell Compress-7Zip "Resources\Patches\KH1FM-Textures" -ArchiveFileName "bin\x86\Release\net5.0-windows\Resources\Patches\KH1FM-Textures.patch" -Format Zip
powershell Compress-7Zip "Resources\Patches\KH1FM-Voices" -ArchiveFileName "bin\x86\Release\net5.0-windows\Resources\Patches\KH1FM-Voices.patch" -Format Zip
powershell Compress-7Zip "Resources\Patches\KH1FM-Videos" -ArchiveFileName "bin\x86\Release\net5.0-windows\Resources\Patches\KH1FM-Videos.patch" -Format Zip
powershell Compress-7Zip "Resources\Patches\KH1FM-Magic-EN" -ArchiveFileName "bin\x86\Release\net8.0-windows7.0\Resources\Patches\KH1FM-Magic-EN.patch" -Format Zip
powershell Compress-7Zip "Resources\Patches\KH1FM-Magic-FR" -ArchiveFileName "bin\x86\Release\net8.0-windows7.0\Resources\Patches\KH1FM-Magic-FR.patch" -Format Zip
powershell Compress-7Zip "Resources\Patches\KH1FM-Stranger" -ArchiveFileName "bin\x86\Release\net8.0-windows7.0\Resources\Patches\KH1FM-Stranger.patch" -Format Zip
powershell Compress-7Zip "Resources\Patches\KH1FM-Textures" -ArchiveFileName "bin\x86\Release\net8.0-windows7.0\Resources\Patches\KH1FM-Textures.patch" -Format Zip
powershell Compress-7Zip "Resources\Patches\KH1FM-Voices" -ArchiveFileName "bin\x86\Release\net8.0-windows7.0\Resources\Patches\KH1FM-Voices.patch" -Format Zip
powershell Compress-7Zip "Resources\Patches\KH1FM-Videos" -ArchiveFileName "bin\x86\Release\net8.0-windows7.0\Resources\Patches\KH1FM-Videos.patch" -Format Zip

@REM Zip all patch files to upload them for release
powershell Compress-7Zip "bin\x86\Release\net5.0-windows" -ArchiveFileName "KHFM-VF-Patch.zip" -Format Zip
powershell Compress-7Zip "bin\x86\Release\net8.0-windows7.0" -ArchiveFileName "KHFM-VF-Patch.zip" -Format Zip

:exit
popd
Expand Down
4 changes: 2 additions & 2 deletions KHFM-VF-Patch/KHFM-VF-Patch.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net5.0-windows</TargetFramework>
<TargetFramework>net8.0-windows7.0</TargetFramework>
<RootNamespace>KHFM_VF_Patch</RootNamespace>
<UseWPF>true</UseWPF>
<UseWindowsForms>true</UseWindowsForms>
Expand All @@ -18,7 +18,7 @@
<AssemblyVersion>1.2.2.0</AssemblyVersion>
<FileVersion>1.2.2.0</FileVersion>
<Platforms>AnyCPU;x86;x64</Platforms>
<Version>1.2.2</Version>
<Version>1.3.0</Version>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion KHFM-VF-Patch/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
<TextBlock x:Name="GameFoundMessage" Grid.Column="0" Grid.Row="1" TextWrapping="Wrap" Padding="5" FontWeight="Bold" TextAlignment="Center" Foreground="#FF56BF5F">Le dossier du jeu semble correct et est prêt à être patché ! Cliquez sur le bouton ci-dessous lorsque vous êtes prêt.</TextBlock>
<TextBlock x:Name="PatchProgressionMessage" Grid.Column="0" Grid.Row="1" TextWrapping="Wrap" Padding="5" FontWeight="Normal" TextAlignment="Center" Foreground="#FF56BF5F">[Progression du patch]</TextBlock>
<ProgressBar x:Name="PatchProgressBar" Grid.Column="0" Grid.Row="2" Minimum="0" Maximum="100" Height="42" Value="{Binding PatchState}" Visibility="Visible" />
<Button Grid.Column="0" Grid.Row="3" x:Name="BrowseButton" Width="450" Height="100" Content="Chercher le dossier du jeu" Click="BrowsFolderButtonClick" Visibility="Visible" Background="#FFD32626" Foreground="White" FontWeight="Bold" FontSize="20"/>
<Button Grid.Column="0" Grid.Row="3" x:Name="BrowseButton" Width="450" Height="100" Content="Chercher le dossier du jeu" Click="BrowseFolderButtonClick" Visibility="Visible" Background="#FFD32626" Foreground="White" FontWeight="Bold" FontSize="20"/>
<Button Grid.Column="0" Grid.Row="3" x:Name="PatchButton" Width="450" Height="50" Content="Patcher le jeu" Click="PatchGameButtonClick" Visibility="Collapsed" Background="#FF43B133" Foreground="White" FontWeight="Bold" FontSize="20" />
<TextBlock x:Name="Credits" Grid.Column="0" Grid.Row="2" TextWrapping="Wrap" Padding="5" FontWeight="Normal" TextAlignment="Center" VerticalAlignment="Stretch" Foreground="Black">
<TextBlock FontSize="25" FontWeight="Bold" TextAlignment="Center" VerticalAlignment="Stretch" Foreground="Black">Crédits</TextBlock>
Expand Down
Loading

0 comments on commit f1a7bdc

Please sign in to comment.