-
Notifications
You must be signed in to change notification settings - Fork 593
/
publish.bat
58 lines (34 loc) · 2.21 KB
/
publish.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
rem Release Debug
set config=Release
set msbuild="D:\Applications\VS2022\MSBuild\Current\Bin\amd64\MSBuild.exe"
set publish=%CD%\bin\publish
rmdir /q /s "%publish%"
if errorlevel 1 (pause)
rmdir /q /s bin\launcher
if errorlevel 1 (pause)
set platform=x64
call :publish
set platform=x86
call :publish
copy bin\launcher\BCU-launcher.exe %publish%\BCUninstaller.exe
copy "%target%\BCU_manual.html" "%publish%\BCU_manual.html"
copy "%target%\Licence.txt" "%publish%\Licence.txt"
copy "%target%\PrivacyPolicy.txt" "%publish%\PrivacyPolicy.txt"
copy "%target%\NOTICE" "%publish%\NOTICE"
rmdir /q /s bin\launcher
IF %config%==Release (del /f /s /q "%publish%\*.pdb")
rem --- AnyCPU --------------------------------------------------
set target=%CD%\bin\publish-AnyCPU-net6.0
rmdir /q /s "%target%"
if errorlevel 1 (pause)
%msbuild% "source\BulkCrapUninstaller.sln" /m /p:filealignment=512 /t:Publish /p:DeployOnBuild=true /p:PublishSingleFile=False /p:SelfContained=False /p:PublishProtocol=FileSystem /p:Configuration=%config% /p:Platform="Any CPU" /p:TargetFrameworks=net6.0-windows10.0.18362.0 /p:PublishDir="%target%" /p:PublishReadyToRun=false /p:PublishTrimmed=False /verbosity:minimal
pause
exit
rem -------------------------------------------------------------
:publish
set identifier=win-%platform%
set target=%CD%\bin\publish\%identifier%
%msbuild% "source\BulkCrapUninstaller.sln" /m /p:filealignment=512 /t:Restore;Rebuild /p:DeployOnBuild=true /p:PublishSingleFile=False /p:SelfContained=True /p:PublishProtocol=FileSystem /p:Configuration=%config% /p:Platform=%platform% /p:TargetFrameworks=net6.0-windows10.0.18362.0 /p:PublishDir="%target%" /p:RuntimeIdentifier=%identifier% /p:PublishReadyToRun=false /p:PublishTrimmed=False /verbosity:minimal
%msbuild% "source\BulkCrapUninstaller.sln" /m /p:filealignment=512 /t:Publish /p:DeployOnBuild=true /p:PublishSingleFile=False /p:SelfContained=True /p:PublishProtocol=FileSystem /p:Configuration=%config% /p:Platform=%platform% /p:TargetFrameworks=net6.0-windows10.0.18362.0 /p:PublishDir="%target%" /p:RuntimeIdentifier=%identifier% /p:PublishReadyToRun=false /p:PublishTrimmed=False /verbosity:minimal
goto :eof
rem -------------------------------------------------------------