forked from AntonyCorbett/JWLMerge
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCreateDeliverables.cmd
64 lines (48 loc) · 1.52 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
REM Run from dev command line
@ECHO OFF
VERIFY ON
REM To override copy the next 3 lines into a file called CreateDeliverables.user and change values as required.
SET "CODE_DRIVE=D:"
SET "CODE_DIRECTORY=\ProjectsPersonal\JWLMerge"
SET "INNO_SETUP_PATH=D:\Program Files (x86)\Inno Setup 6"
IF EXIST CreateDeliverables.user (
FOR /f "tokens=* delims=" %%x IN (CreateDeliverables.user) DO (
%%x
)
)
%CODE_DRIVE%
cd %CODE_DIRECTORY%
rd JWLMerge\bin /q /s
rd JWLMergeCLI\bin /q /s
rd Installer\Output /q /s
rd Installer\Staging /q /s
ECHO.
ECHO Publishing JWLMerge
dotnet publish JWLMerge\JWLMerge.csproj -p:PublishProfile=FolderProfile -c:Release
IF %ERRORLEVEL% NEQ 0 goto ERROR
ECHO.
ECHO Publishing JWLMergeCLI
dotnet publish JWLMergeCLI\JWLMergeCLI.csproj -p:PublishProfile=FolderProfile -c:Release
IF %ERRORLEVEL% NEQ 0 goto ERROR
md Installer\Staging
ECHO.
ECHO Copying JWLMergeCLI items into staging area
xcopy JWLMergeCLI\bin\Release\net9.0\publish\*.* Installer\Staging /q /s /y /d
ECHO Copying JWLMerge items into staging area
xcopy JWLMerge\bin\Release\net9.0-windows\publish\*.* Installer\Staging /q /s /y /d
ECHO.
ECHO Creating installer
"%INNO_SETUP_PATH%\iscc" Installer\jwlmergesetup.iss
IF %ERRORLEVEL% NEQ 0 goto ERROR
ECHO.
ECHO Creating portable zip
powershell Compress-Archive -Path Installer\Staging\* -DestinationPath Installer\Output\JWLMergePortable.zip
IF %ERRORLEVEL% NEQ 0 goto ERROR
goto SUCCESS
:ERROR
ECHO.
ECHO ******************
ECHO An ERROR occurred!
ECHO ******************
:SUCCESS
PAUSE