diff --git a/osu.Desktop.Deploy/Program.cs b/osu.Desktop.Deploy/Program.cs index e5e0702e6d..3c1451d555 100644 --- a/osu.Desktop.Deploy/Program.cs +++ b/osu.Desktop.Deploy/Program.cs @@ -16,8 +16,9 @@ namespace osu.Desktop.Deploy { internal static class Program { - private const string nuget_path = @"packages\NuGet.CommandLine.4.3.0\tools\NuGet.exe"; - private const string squirrel_path = @"packages\squirrel.windows.1.7.8\tools\Squirrel.exe"; + private static string packages => Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".nuget", "packages"); + private static string nugetPath => Path.Combine(packages, @"nuget.commandline\4.5.1\tools\NuGet.exe"); + private static string squirrelPath => Path.Combine(packages, @"squirrel.windows\1.7.8\tools\Squirrel.exe"); private const string msbuild_path = @"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe"; public static string StagingFolder = ConfigurationManager.AppSettings["StagingFolder"]; @@ -92,9 +93,6 @@ public static void Main(string[] args) codeSigningPassword = readLineMasked(); } - write("Restoring NuGet packages..."); - runCommand(nuget_path, "restore " + solutionPath); - write("Updating AssemblyInfo..."); updateCsprojVersion(version); @@ -103,7 +101,7 @@ public static void Main(string[] args) runCommand(msbuild_path, $"/v:quiet /m /t:{targetName.Replace('.', '_')} /p:OutputPath={stagingPath};Targets=\"Clean;Build\";Configuration=Release {SolutionName}.sln"); write("Creating NuGet deployment package..."); - runCommand(nuget_path, $"pack {NuSpecName} -Version {version} -Properties Configuration=Deploy -OutputDirectory {stagingPath} -BasePath {stagingPath}"); + runCommand(nugetPath, $"pack {NuSpecName} -Version {version} -Properties Configuration=Deploy -OutputDirectory {stagingPath} -BasePath {stagingPath}"); //prune once before checking for files so we can avoid erroring on files which aren't even needed for this build. pruneReleases(); @@ -111,7 +109,7 @@ public static void Main(string[] args) checkReleaseFiles(); write("Running squirrel build..."); - runCommand(squirrel_path, $"--releasify {stagingPath}\\{nupkgFilename(version)} --setupIcon {iconPath} --icon {iconPath} {codeSigningCmd} --no-msi"); + runCommand(squirrelPath, $"--releasify {stagingPath}\\{nupkgFilename(version)} --setupIcon {iconPath} --icon {iconPath} {codeSigningCmd} --no-msi"); //prune again to clean up before upload. pruneReleases(); diff --git a/osu.Desktop.Deploy/osu.Desktop.Deploy.csproj b/osu.Desktop.Deploy/osu.Desktop.Deploy.csproj index ccbf351bda..eab54bd10b 100644 --- a/osu.Desktop.Deploy/osu.Desktop.Deploy.csproj +++ b/osu.Desktop.Deploy/osu.Desktop.Deploy.csproj @@ -1,5 +1,5 @@ - + net461 Exe @@ -11,11 +11,12 @@ osu.Desktop.Deploy - + - - - + + + + \ No newline at end of file