Skip to content

Commit

Permalink
chore: specify compilation of csproj
Browse files Browse the repository at this point in the history
  • Loading branch information
emako committed Jan 8, 2025
1 parent 902f2c0 commit 0770b7c
Showing 1 changed file with 10 additions and 20 deletions.
30 changes: 10 additions & 20 deletions build/tools_build.cmd
Original file line number Diff line number Diff line change
@@ -1,46 +1,37 @@
cd /d %~dp0

@echo [prepare]
del MicaSetup.exe
for /f "usebackq tokens=*" %%i in (`"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationPath`) do set "path=%path%;%%i\MSBuild\Current\Bin;%%i\Common7\IDE"

echo [build app]
cd ..\src\
echo [building]
dotnet restore
dotnet publish -c Release -p:PublishProfile=FolderProfile
cd /d %~dp0

dotnet publish MicaSetup.Tools\FetchVer\FetchVer.csproj -c Release -p:PublishProfile=FolderProfile
dotnet publish MicaSetup.Tools\MakeIcon\MakeIcon.csproj -c Release -p:PublishProfile=FolderProfile
dotnet publish MicaSetup.Tools\MakeIcon.Cli\MakeIcon.Cli.csproj -c Release -p:PublishProfile=FolderProfile
dotnet publish MicaSetup.Tools\MakeMica.Cli\MakeMica.Cli.csproj -c Release -p:PublishProfile=FolderProfile
dotnet publish MicaSetup.Tools\MakeMui\MakeMui.csproj -c Release -p:PublishProfile=FolderProfile
dotnet publish MicaSetup.Tools\MICA\MICA.csproj -c Release -p:PublishProfile=FolderProfile

echo [copying]
rd /s /q .\Build\

mkdir .\Build\
mkdir .\Build\bin\

copy /y .\MicaSetup.Tools\MICA\bin\Release\publish\MICA.exe .\Build\

copy /y .\MicaSetup.Tools\FetchVer\bin\Release\publish\FetchVer.exe .\Build\
ren .\Build\FetchVer.exe fetchver.exe

@REM copy /y .\MicaSetup.Tools\MakeMica\bin\Release\publish\MakeMica.exe .\Build\
@REM del .\Build\makemicaw.exe
@REM ren .\Build\MakeMica.exe makemicaw.exe

copy /y .\MicaSetup.Tools\MakeMica.Cli\bin\Release\publish\MakeMica.Cli.exe .\Build\
del .\Build\makemica.exe
ren .\Build\MakeMica.Cli.exe makemica.exe

copy /y .\MicaSetup.Tools\MakeIcon\bin\Release\publish\MakeIcon.exe .\Build\
del .\Build\makeiconw.exe
ren .\Build\MakeIcon.exe makeiconw.exe

copy /y .\MicaSetup.Tools\MakeIcon.Cli\bin\Release\publish\MakeIcon.Cli.exe .\Build\
del .\Build\makeicon.exe
ren .\Build\MakeIcon.Cli.exe makeicon.exe

copy /y .\MicaSetup.Tools\7-Zip\7z.dll .\Build\bin\7z.dll
copy /y .\MicaSetup.Tools\7-Zip\7z.exe .\Build\bin\7z.exe

echo [template]

echo [creating]
rd /s /q .\MicaSetup\obj
rd /s /q .\MicaSetup\bin
del .\MicaSetup\MicaSetup.csproj.user
Expand All @@ -52,7 +43,6 @@ mkdir .\Build\template
move default.7z .\Build\template\default.7z

echo [pack]

MicaSetup.Tools\7-Zip\7z a micasetup.7z .\Build\* -t7z -mx=5 -mf=BCJ2 -r -y
Build\makemica micasetup.json

Expand Down

0 comments on commit 0770b7c

Please sign in to comment.