-
Notifications
You must be signed in to change notification settings - Fork 47
/
Copy pathCreateDeliverables.cmd
66 lines (50 loc) · 1.51 KB
/
CreateDeliverables.cmd
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
59
60
61
62
63
64
65
66
REM Run from dev command line
@ECHO OFF
VERIFY ON
D:
cd \ProjectsPersonal\OnlyT
rd OnlyT\bin /q /s
rd OnlyTFirewallPorts\bin /q /s
rd Installer\Output /q /s
rd Installer\Staging /q /s
ECHO.
ECHO Publishing OnlyT
dotnet publish OnlyT\OnlyT.csproj -p:PublishProfile=FolderProfile -c:Release
IF %ERRORLEVEL% NEQ 0 goto ERROR
ECHO.
ECHO Publishing OnlyTFirewallPorts
dotnet publish OnlyTFirewallPorts\OnlyTFirewallPorts.csproj -p:PublishProfile=FolderProfile -c:Release
IF %ERRORLEVEL% NEQ 0 goto ERROR
md Installer\Staging
ECHO.
ECHO Copying OnlyTFirewallPorts items into staging area
xcopy OnlyTFirewallPorts\bin\Release\net8.0\publish\*.* Installer\Staging /q /s /y /d
IF %ERRORLEVEL% NEQ 0 goto ERROR
ECHO.
ECHO Copying OnlyT items into staging area
xcopy OnlyT\bin\Release\net8.0-windows\publish\*.* Installer\Staging /q /s /y /d
IF %ERRORLEVEL% NEQ 0 goto ERROR
ECHO.
ECHO Copying Sample task_schedule file into staging area
xcopy talk_schedule.xml Installer\Staging /q /y
IF %ERRORLEVEL% NEQ 0 goto ERROR
ECHO.
ECHO Removing unwanted x32 DLLs
del Installer\Staging\libmp3lame.32.dll
IF %ERRORLEVEL% NEQ 0 goto ERROR
ECHO.
ECHO Creating installer
"D:\Program Files (x86)\Inno Setup 6\iscc" Installer\onlytsetup.iss
IF %ERRORLEVEL% NEQ 0 goto ERROR
ECHO.
ECHO Creating portable zip
powershell Compress-Archive -Path Installer\Staging\* -DestinationPath Installer\Output\OnlyTPortable.zip
IF %ERRORLEVEL% NEQ 0 goto ERROR
goto SUCCESS
:ERROR
ECHO.
ECHO ******************
ECHO An ERROR occurred!
ECHO ******************
:SUCCESS
PAUSE