Skip to content

Commit

Permalink
[O] Refactor AquaMai.csproj to SDK style (#59)
Browse files Browse the repository at this point in the history
* SDK style

* Update CI

* remove extra code

* [F] CI build and add CI for PR

* [F] Assembly version info

* [F] Do not generate satellite assembly for locale

---------

Co-authored-by: Clansty <[email protected]>
  • Loading branch information
Menci and clansty authored Oct 13, 2024
1 parent a075de4 commit e67b68a
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 129 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/aquamai.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,20 @@ jobs:
min-retry-interval: 1
max-retry-interval: 5

- uses: microsoft/setup-msbuild@v2

- name: Build AquaMai
shell: cmd
run: |
copy /y build-assets\${{ matrix.target }}\* AquaMai\Libs
cd AquaMai
msbuild /t:Restore,Build /p:Configuration=Release /p:DefineConstants="${{ matrix.target }}" /p:RestorePackagesConfig=true
dotnet build -c Release /p:DefineConstants="${{ matrix.target }}"
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.target }}
path: AquaMai\Output\AquaMai.dll

- name: Send to Telegram
if: github.event_name != 'pull_request'
run: |
$Uri = "https://api.telegram.org/bot${{ secrets.TELEGRAM_BOT_TOKEN }}/sendDocument"
$Form = @{
Expand Down
18 changes: 0 additions & 18 deletions AquaMai/App.config

This file was deleted.

128 changes: 26 additions & 102 deletions AquaMai/AquaMai.csproj
Original file line number Diff line number Diff line change
@@ -1,46 +1,44 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="packages\ILMerge.Fody.1.24.0\build\ILMerge.Fody.props" Condition="Exists('packages\ILMerge.Fody.1.24.0\build\ILMerge.Fody.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{788BC472-59F7-46F6-B760-65C18BA74389}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>AquaMai</RootNamespace>
<AssemblyName>AquaMai</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<TargetFramework>net472</TargetFramework>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
<TargetFrameworkProfile />
<LangVersion>12</LangVersion>
<PlatformTarget>x64</PlatformTarget>
<OutputPath>$(SolutionDir)Output\</OutputPath>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<EnableDefaultEmbeddedResourceItems>false</EnableDefaultEmbeddedResourceItems>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugSymbols>false</DebugSymbols>
<DebugType>None</DebugType>
<Optimize>true</Optimize>
<OutputPath>$(SolutionDir)Output\</OutputPath>
<DefineConstants>
</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Prefer32Bit>false</Prefer32Bit>
<DebugSymbols>false</DebugSymbols>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'SDGA145|AnyCPU' ">
<OutputPath>Output\</OutputPath>
<DefineConstants>SDGA145</DefineConstants>
<Optimize>true</Optimize>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG</DefineConstants>
</PropertyGroup>

<ItemGroup>
<Reference Include="0Harmony">
<HintPath>Libs\0Harmony.dll</HintPath>
Expand Down Expand Up @@ -284,85 +282,7 @@
<HintPath>Libs\UnityEngine.XRModule.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Cheat\MapUnlock.cs" />
<Compile Include="Cheat\TicketUnlock.cs" />
<Compile Include="Cheat\UnlockUtage.cs" />
<Compile Include="Config.cs" />
<Compile Include="CustomKeyMap\Enable.cs" />
<Compile Include="CustomKeyMap\KeyCodeID.cs" />
<Compile Include="Fix\BasicFix.cs" />
<Compile Include="Fix\DebugFeature.cs" />
<Compile Include="Fix\DisableReboot.cs" />
<Compile Include="Fix\ExtendNotesPool.cs" />
<Compile Include="Fix\FixCharaCrash.cs" />
<Compile Include="Fix\FixCheckAuth.cs" />
<Compile Include="Fix\FixConnSlide.cs" />
<Compile Include="Fix\FixLevelDisplay.cs" />
<Compile Include="Fix\FontFix.cs" />
<Compile Include="Fix\ForceAsServer.cs" />
<Compile Include="Fix\ForceFreePlay.cs" />
<Compile Include="Fix\ForcePaidPlay.cs" />
<Compile Include="Fix\FrameRateLock.cs" />
<Compile Include="Fix\HanabiFix.cs" />
<Compile Include="Fix\I18nSingleAssemblyHook.cs" />
<Compile Include="Fix\RemoveEncryption.cs" />
<Compile Include="Fix\SkipVersionCheck.cs" />
<Compile Include="Fix\SlideAutoPlayTweak.cs" />
<Compile Include="Fix\SlideJudgeTweak.cs" />
<Compile Include="Helpers\GuiSizes.cs" />
<Compile Include="Helpers\MessageHelper.cs" />
<Compile Include="Helpers\MusicDirHelper.cs" />
<Compile Include="Helpers\SharedInstances.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Main.cs" />
<Compile Include="Resources\Locale.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>Locale.resx</DependentUpon>
</Compile>
<Compile Include="TimeSaving\ImproveLoadSpeed.cs" />
<Compile Include="TimeSaving\IWontTapOrSlideVigorously.cs" />
<Compile Include="TimeSaving\SkipEventInfo.cs" />
<Compile Include="TimeSaving\SkipGameOverScreen.cs" />
<Compile Include="TimeSaving\SkipToMusicSelection.cs" />
<Compile Include="TimeSaving\SkipTrackStart.cs" />
<Compile Include="TimeSaving\SkipWarningScreen.cs" />
<Compile Include="TouchSensitivity\Enable.cs" />
<Compile Include="Utils\FrameRateDisplay.cs" />
<Compile Include="Utils\JudgeAdjust.cs" />
<Compile Include="Utils\LogNetworkErrors.cs" />
<Compile Include="Utils\LogUserId.cs" />
<Compile Include="Utils\PractiseMode.cs" />
<Compile Include="Utils\PractiseModeUI.cs" />
<Compile Include="Utils\SelectionDetail.cs" />
<Compile Include="Utils\ShowNetErrorDetail.cs" />
<Compile Include="UX\CustomFont.cs" />
<Compile Include="UX\CustomLogo.cs" />
<Compile Include="UX\CustomNoteSkin.cs" />
<Compile Include="UX\CustomPlaceName.cs" />
<Compile Include="UX\CustomVersionString.cs" />
<Compile Include="UX\DemoMaster.cs" />
<Compile Include="UX\ExtendTimer.cs" />
<Compile Include="UX\HideHanabi.cs" />
<Compile Include="UX\HideMask.cs" />
<Compile Include="UX\HideSelfMadeCharts.cs" />
<Compile Include="UX\ImmediateSave.cs" />
<Compile Include="UX\LoadAssetsPng.cs" />
<Compile Include="UX\LoadAssetBundleWithoutManifest.cs" />
<Compile Include="UX\LoadLocalBga.cs" />
<Compile Include="UX\QuickSkip.cs" />
<Compile Include="UX\RandomBgm.cs" />
<Compile Include="UX\RunCommandOnEvents.cs" />
<Compile Include="UX\SinglePlayer.cs" />
<Compile Include="UX\TestProof.cs" />
<Compile Include="UX\TrackStartProcessTweak.cs" />
<Compile Include="WindowState\Enable.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
<None Include="packages.config" />
</ItemGroup>

<ItemGroup>
<EmbeddedResource Include="AquaMai.zh.toml" WithCulture="false" />
<EmbeddedResource Include="AquaMai.toml" />
Expand All @@ -374,16 +294,20 @@
<DependentUpon>Locale.resx</DependentUpon>
</EmbeddedResource>
</ItemGroup>

<ItemGroup>
<Content Include="FodyWeavers.xml" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="packages\Fody.6.8.1\build\Fody.targets" Condition="Exists('packages\Fody.6.8.1\build\Fody.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105.The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('packages\Fody.6.8.1\build\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Fody.6.8.1\build\Fody.targets'))" />
<Error Condition="!Exists('packages\ILMerge.Fody.1.24.0\build\ILMerge.Fody.props')" Text="$([System.String]::Format('$(ErrorText)', 'packages\ILMerge.Fody.1.24.0\build\ILMerge.Fody.props'))" />
</Target>

<ItemGroup>
<PackageReference Include="Fody" Version="6.8.1">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="ILMerge.Fody" Version="1.24.0">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Samboy063.Tomlet" Version="5.4.0" />
</ItemGroup>

</Project>
6 changes: 0 additions & 6 deletions AquaMai/packages.config

This file was deleted.

0 comments on commit e67b68a

Please sign in to comment.