Skip to content

Commit

Permalink
CAM-39 Migrated to MD_DIRECTORY for MSBuild for compatibility with ot…
Browse files Browse the repository at this point in the history
…her mods, added warning message for those who have not migrated.
  • Loading branch information
SB15-MD committed Jan 22, 2024
1 parent 4c51c77 commit ed4d3ec
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 11 deletions.
5 changes: 5 additions & 0 deletions CustomAlbums.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,10 @@

<Target Name="ILRepackCopy" AfterTargets="ILRepacker" Condition="'$(WORKER)' != 'GitHub'">
<Copy SourceFiles="$(OutputPath)\$(AssemblyName).dll" DestinationFolder="$(GameFolder)\Mods" />
<Message Text="Copied DLL -&gt; $(GameFolder)\Mods\$(ProjectName).dll" Importance="High" />
</Target>

<Target Name="WarnDeprecatedPath" AfterTargets="Build" Condition="!Exists('$(MD_DIRECTORY)')">
<Message Text="Warning: MD_NET6_DIRECTORY is no longer in use. Please remove the environment variable and run SetPath.cmd again." Importance="High" />
</Target>
</Project>
17 changes: 9 additions & 8 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,32 @@
<PropertyGroup>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<ClearOutputDirectory>False</ClearOutputDirectory>
<GameFolder>$(MD_NET6_DIRECTORY)</GameFolder>
<MelonLoader>$(GameFolder)/MelonLoader/</MelonLoader>
<MelonNET6>$(MelonLoader)/net6/</MelonNET6>
<MelonAssemblies>$(MelonLoader)/Il2CppAssemblies/</MelonAssemblies>
<GameFolder Condition="Exists('$(MD_NET6_DIRECTORY)')">$(MD_NET6_DIRECTORY)</GameFolder>
<GameFolder Condition="Exists('$(MD_DIRECTORY)')">$(MD_DIRECTORY)</GameFolder>
<MelonLoader>$(GameFolder)\MelonLoader\</MelonLoader>
<MelonNET6>$(MelonLoader)\net6\</MelonNET6>
<MelonAssemblies>$(MelonLoader)\Il2CppAssemblies\</MelonAssemblies>
</PropertyGroup>
<ItemGroup>
<Reference Include="Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
<SpecificVersion>false</SpecificVersion>
<Private>false</Private>
<HintPath>$(MelonAssemblies)/Assembly-CSharp.dll</HintPath>
<HintPath>$(MelonAssemblies)\Assembly-CSharp.dll</HintPath>
</Reference>
<Reference Include="Assembly-CSharp-firstpass, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
<SpecificVersion>false</SpecificVersion>
<Private>false</Private>
<HintPath>$(MelonAssemblies)/Assembly-CSharp-firstpass.dll</HintPath>
<HintPath>$(MelonAssemblies)\Assembly-CSharp-firstpass.dll</HintPath>
</Reference>
<Reference Include="Il2CppPeroString, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
<SpecificVersion>false</SpecificVersion>
<Private>false</Private>
<HintPath>$(MelonAssemblies)/Il2CppPeroString.dll</HintPath>
<HintPath>$(MelonAssemblies)\Il2CppPeroString.dll</HintPath>
</Reference>
<Reference Include="Il2CppGoogle.Protobuf, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
<SpecificVersion>false</SpecificVersion>
<Private>false</Private>
<HintPath>$(MelonAssemblies)/Il2CppGoogle.Protobuf.dll</HintPath>
<HintPath>$(MelonAssemblies)\Il2CppGoogle.Protobuf.dll</HintPath>
</Reference>
<Reference Include="Il2Cppmscorlib, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
<SpecificVersion>false</SpecificVersion>
Expand Down
6 changes: 3 additions & 3 deletions SetPath.cmd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@ECHO OFF
@REM This script must run as administrator, let user elevate
NET SESSION >nul 2>&1
NET SESSION >NUL 2>&1
IF %ERRORLEVEL% EQU 0 (
GOTO AUTH
) ELSE (
Expand All @@ -11,8 +11,8 @@ IF %ERRORLEVEL% EQU 0 (

@REM Sets the environment variable so we can use Directory.Build.Props
:AUTH
SET /p "directory=Enter your Muse Dash directory in quotations (should end in \Muse Dash): "
SETX MD_NET6_DIRECTORY %directory%
SET /P "directory=Enter your Muse Dash directory in quotations (should end in \Muse Dash): "
SETX MD_DIRECTORY %directory%
IF %ERRORLEVEL% NEQ 0 (
ECHO An error occurred.
) ELSE (
Expand Down

0 comments on commit ed4d3ec

Please sign in to comment.