Closed Aldaviva closed 2 years ago
I was able to get the build working on a standalone VM with the following PowerShell script. Daniel15.Sharpamp.dll
was saved to the .\packages\
directory in the repo.
del -force -ErrorAction Ignore Sharpamp.exe,Sharpamp.log,WinampNowPlayingToFile\Daniel15.Sharpamp.dll
msbuild -t:clean
rmdir -Recurse -force -ErrorAction Ignore .\artifact\,.\gen_WinampNowPlayingToFile\Release,.\WinampNowPlayingToFile\bin,.\WinampNowPlayingToFile\obj
# Copy the dependency to a location where the C# build can find it.
# This build directory doesn't exist before the build is run, so create it early.
mkdir -force -ErrorAction Ignore .\WinampNowPlayingToFile\bin\Release\
copy .\packages\Daniel15.Sharpamp.dll .\WinampNowPlayingToFile\bin\Release\
Write-Output "Building plugins"
# Building the C++ plugin will transitively build the C# plugin. Unlike building the entire solution, this lets us skip the Test project for now, which is broken with some weird NuGet xUnit error.
msbuild /m /p:Configuration=Release gen_WinampNowPlayingToFile -restore
Write-Output "Preparing artifact"
mkdir .\artifact\
# The output directory is different based on whether the sln or vcxproj was built for some reason.
copy gen_WinampNowPlayingToFile\Release\*.dll .\artifact\
mkdir .\artifact\plugins\
move .\artifact\gen_WinampNowPlayingToFile.dll .\artifact\plugins\
I don't like checking dependencies into repos, but I think it's the best option here because
Daniel15.Sharpamp.dll
does not exist in NuGet/SUPPRESSMSGBOXES
flag always picks the Abort option.