diff --git a/.gitignore b/.gitignore index 940794e..1084246 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,8 @@ ## ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore +/LocalDev/* + # User-specific files *.suo *.user diff --git a/Distribution/GameData/HoverCraft/Plugins/HoverCraft.dll b/Distribution/GameData/HoverCraft/Plugins/HoverCraft.dll new file mode 100644 index 0000000..1f3e59b Binary files /dev/null and b/Distribution/GameData/HoverCraft/Plugins/HoverCraft.dll differ diff --git a/HoverCraft/HoverCraft/HoverCraft.csproj b/HoverCraft.csproj similarity index 54% rename from HoverCraft/HoverCraft/HoverCraft.csproj rename to HoverCraft.csproj index ef39fd2..3f5e635 100644 --- a/HoverCraft/HoverCraft/HoverCraft.csproj +++ b/HoverCraft.csproj @@ -9,9 +9,10 @@ Properties HoverCraft HoverCraft - v4.5.2 + v3.5 512 true + AnyCPU @@ -36,24 +37,14 @@ - - False - ..\..\..\..\..\..\..\Program Files\Common Files\Kerbal Space Program\KSP_x64_Data\Managed\Assembly-CSharp.dll + + ..\KSP\1.3\Assembly-CSharp.dll + False - - - - - - - - - - - - False - ..\..\..\..\..\..\..\Program Files\Common Files\Kerbal Space Program\KSP_x64_Data\Managed\UnityEngine.dll + + ..\KSP\1.3\UnityEngine.dll + False @@ -67,6 +58,7 @@ True Resources.resx + True SettingsSingleFileGenerator @@ -78,7 +70,56 @@ True - + + + + + + + + + + + + $(PostBuildEventDependsOn); + PostBuildMacros; + + @echo $(Targetname) +SET ModName=HoverCraft +@echo ... +@echo set lpath vars from LocalDev storage... +set /p KSP_DIR=<"$(ProjectDir)LocalDev\ksp_dir.txt" +set /p PDB2MDB_EXE=<"$(ProjectDir)LocalDev\pdb2mdb_exe.txt" +set /p ZA_DIR=<"$(ProjectDir)LocalDev\7za_dir.txt" +set /p DIST_DIR=<"$(ProjectDir)LocalDev\dist_dir.txt" + +@echo distributing $(Targetname) files... +copy /Y "$(TargetPath)" "%25KSP_DIR%25\GameData\%25ModName%25\Plugins\" +copy /Y "$(TargetPath)" "$(ProjectDir)Distribution\GameData\%25ModName%25\Plugins\" +copy /Y "$(TargetPath)" "C:\Users\dlane\Dropbox\Kerbal\ModDevelopment\Release" + +if $(ConfigurationName) == Debug ( +@echo building $(Targetname).dll.mdb file... +cd "$(TargetDir)" +call "%25PDB2MDB_EXE%25" $(Targetname).dll +copy /Y "$(TargetDir)$(Targetname).dll.mdb" "%25KSP_DIR%25\GameData\%25ModName%25\Plugins\" +) + +@echo deleting previous build ... +if exist "%25DIST_DIR%25\%25ModName%25*.zip" del "%25DIST_DIR%25\%25ModName%25*.zip" +@echo packaging new build... +call "%25ZA_DIR%25\7za.exe" a -tzip -r "%25DIST_DIR%25\%25ModName%25.@(VersionNumber)_%25DATE:~4,2%25%25DATE:~7,2%25%25DATE:~10,4%25.zip" "$(ProjectDir)Distribution\*.*" + +@echo Deploy $(Targetname) Distribution files to test env: %25KSP_DIR%25\GameData... +@echo copying:"$(SolutionDir)Distribution\GameData" to "%25KSP_DIR%25\GameData" +xcopy /E /Y "$(SolutionDir)Distribution\GameData" "%25KSP_DIR%25\GameData" + +if $(ConfigurationName) == Debug ( +copy /Y "$(TargetDir)$(Targetname).pdb" "%25KSP_DIR%25\GameData\%25ModName%25\Plugins\" +) + +@echo Build/deploy complete! +