-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
11 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,27 @@ | ||
@ECHO OFF | ||
|
||
:: === publish.bat === | ||
:: Builds x86 and x64, copies them to rainmeter Vault (that's in .csproj), | ||
:: copies plugins to /dist and packages the example skin and plugins with mond. | ||
:: Usage: publish.bat | ||
:: ===================== | ||
:: Changelog | ||
:: 2023-07-18: Initial version | ||
|
||
if exist dist ( | ||
rd /S /Q dist | ||
) | ||
|
||
:: Build first so we can then get the version from the x64 dll | ||
ECHO Building... | ||
"C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\MSBuild.exe" /p:Configuration=Release /p:Platform=x86 /t:Build /restore > nul | ||
"C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\MSBuild.exe" /p:Configuration=Release /p:Platform=x64 /t:Build /restore > nul | ||
|
||
:: Get the version from the x64 dll | ||
ECHO Getting version... | ||
for /f "usebackq delims=" %%G in (`powershell -Command "[System.Reflection.Assembly]::LoadFrom('%~dp0\x64\Release\WebNowPlaying.dll').GetName().Version.ToString()"`) do ( | ||
set "version=%%~G" | ||
) | ||
:: 1.2.3.0 -> 1.2.3 | ||
set "version=%version:~0,-2%" | ||
ECHO Building... | ||
"C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\MSBuild.exe" /p:Configuration=Release /p:Platform=x86 /t:Build /restore > nul | ||
"C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\MSBuild.exe" /p:Configuration=Release /p:Platform=x64 /t:Build /restore > nul | ||
|
||
:: Move files to /dist | ||
mkdir dist | ||
xcopy /Y /I x64\Release\WebNowPlaying.dll dist\WebNowPlaying-x64.dll* > nul | ||
xcopy /Y /I x86\Release\WebNowPlaying.dll dist\WebNowPlaying-x86.dll* > nul | ||
|
||
:: Package with MonD | ||
ECHO Packaging... | ||
mond package -Skin WebNowPlayingRedux -Author "keifufu, tjhrulz" -PackageVersion %version% -MinimumRainmeter 4.5.0 -MinimumWindows 10.0 -OutPath %~dp0\dist\WebNowPlayingRedux_%version%.rmskin > nul |