forked from Youssef1313/ChessSharp
-
Notifications
You must be signed in to change notification settings - Fork 1
/
create-pack.cmd
41 lines (30 loc) · 987 Bytes
/
create-pack.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
rem
rem This script packs together a ChessKnocker_...zip package.
rem It takes the version number from ChessKnocker.csproj.
rem To work, this script needs tclsh.exe and 7za.exe in PATH.
@echo off
set projfile=src\ChessUI\ChessKnocker.csproj
rem The following seems to be the way to go to put the result of a command into
rem a variable in cmd-scripts. It is truly astonishing.
for /f usebackq %%i in (`tclsh extract-vers.tcl %projfile%`) do (
set vers=%%i
)
set temp0=C:\tmp\ckno\
set packname=ChessKnocker_%vers%
set tempdir=%temp0%%packname%
md %tempdir%
del /Q %tempdir%\*.*
del /Q %tempdir%\..\*.zip
xcopy preconf-pzls\*.* %tempdir%
copy part-gzs\lic_part_puzzle-20000.csv.gz %tempdir%
cd src\ChessUI\bin\Debug\netcoreapp3.1
xcopy *.exe %tempdir%
xcopy *.dll %tempdir%
xcopy *.json %tempdir%
cd %tempdir%\..
7za a -tzip cpp %packname%
rename cpp.zip %packname%.zip
del /Q %tempdir%\*.*
rd %tempdir%
echo off
echo "%packname%.zip created in %temp0%"