@@ -14,28 +14,31 @@ public static void Main(string[] args) {
1414 Thread . Sleep ( 500 ) ;
1515
1616 DialogResult result = Dialog . FileOpen ( ) ;
17- string directory = result . Path . Replace ( "\\ Rogue Legacy 2.exe" , "" ) ;
18- string DataPath = directory + "\\ Rogue Legacy 2_Data" ;
19- string ManagedPath = DataPath + "\\ Managed" ;
2017
21- if ( ! File . Exists ( directory + " \\ Rogue Legacy 2.exe") ) {
18+ if ( ! result . Path . EndsWith ( " Rogue Legacy 2.exe") ) {
2219 Console . WriteLine ( "The provided path is incorrect" ) ;
23- Console . WriteLine ( "The selected folder should contain the 'Rogue Legacy 2.exe' file" ) ;
20+ Console . WriteLine ( "Please select the 'Rogue Legacy 2.exe' file" ) ;
2421 return ;
2522 }
2623
24+ string directory = result . Path . Replace ( "\\ Rogue Legacy 2.exe" , "" ) ;
25+ string DataPath = directory + "\\ Rogue Legacy 2_Data" ;
26+ string ManagedPath = DataPath + "\\ Managed" ;
27+
28+
2729 File . WriteAllText ( OutputPath + "\\ RL2.ModLoader.targets" , $ """
2830 <Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2931 <!-- MSBuild variables -->
3032 <PropertyGroup>
31- <RL2_Path>{ directory } </RL2_Path>
32- <RL2_DataPath>{ DataPath } </RL2_DataPath>
33- <RL2_LibPath>{ ManagedPath } </RL2_LibPath>
33+ <RL2_Path>{ directory } \</RL2_Path>
34+ <RL2_DataPath>{ DataPath } \</RL2_DataPath>
35+ <RL2_LibPath>{ ManagedPath } \</RL2_LibPath>
36+ <RL2_ModsPath>{ DataPath } \Mods\</RL2_ModsPath>
3437 </PropertyGroup>
3538
3639 <!-- Shared references -->
3740 <ItemGroup>
38- <Reference Include="{ ManagedPath } \ *.dll">
41+ <Reference Include="$(RL2_LibPath) *.dll">
3942 <Private>false</Private>
4043 </Reference>
4144 </ItemGroup>
0 commit comments