-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathCreateDeliverables.cmd
More file actions
67 lines (50 loc) · 1.28 KB
/
CreateDeliverables.cmd
File metadata and controls
67 lines (50 loc) · 1.28 KB
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
67
REM Run from dev command line
@ECHO OFF
setlocal
VERIFY ON
set "ROOT=%~dp0"
if "%ROOT:~-1%"=="\" set "ROOT=%ROOT:~0,-1%"
pushd "%ROOT%"
IF %ERRORLEVEL% NEQ 0 goto ERROR
set "ISCC=%INNO_ISCC%"
if not defined ISCC (
for /f "delims=" %%I in ('where iscc.exe 2^>nul') do (
set "ISCC=%%I"
goto ISCC_FOUND
)
)
:ISCC_FOUND
if not defined ISCC set "ISCC=%ProgramFiles(x86)%\Inno Setup 6\iscc.exe"
if not exist "%ISCC%" (
ECHO.
ECHO Inno Setup compiler not found.
ECHO Set INNO_ISCC to your iscc.exe path or add iscc.exe to PATH.
goto ERROR
)
rd OnlyR\bin /q /s
rd Installer\Output /q /s
ECHO.
ECHO Publishing OnlyR
dotnet publish OnlyR\OnlyR.csproj -p:PublishProfile=FolderProfile -c:Release
IF %ERRORLEVEL% NEQ 0 goto ERROR
ECHO.
ECHO Removing unwanted x64 DLLs
del OnlyR\bin\Release\net10.0-windows\publish\win-x86\libmp3lame.64.dll
ECHO.
ECHO Creating installer
"%ISCC%" Installer\onlyrsetup.iss
IF %ERRORLEVEL% NEQ 0 goto ERROR
ECHO.
ECHO Creating portable zip
powershell Compress-Archive -Path OnlyR\bin\Release\net10.0-windows\publish\win-x86\* -DestinationPath Installer\Output\OnlyRPortable.zip
IF %ERRORLEVEL% NEQ 0 goto ERROR
goto SUCCESS
:ERROR
ECHO.
ECHO ******************
ECHO An ERROR occurred!
ECHO ******************
:SUCCESS
popd
endlocal
PAUSE