forked from WinMerge/frhed
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBuildArc.cmd
40 lines (30 loc) · 1.09 KB
/
BuildArc.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
cd /d "%~dp0"
set DISTDIR=.\Dist
set path="%ProgramFiles%\7-zip";"%ProgramFiles(x86)%\7-zip";%path%
if "%1" == "" (
call :BuildArc x86 || goto :eof
call :BuildArc x64 || goto :eof
call :BuildArc ARM || goto :eof
call :BuildArc ARM64 || goto :eof
) else (
call :BuildArc %1 || goto :eof
)
goto :eof
:BuildArc
mkdir "%DISTDIR%\%1\frhed\Docs" 2> NUL
mkdir "%DISTDIR%\%1\frhed\Languages" 2> NUL
copy Build\%1\Release\FRHED\frhed.exe "%DISTDIR%\%1\frhed\"
copy Build\%1\Release\FRHED\hekseditU.dll "%DISTDIR%\%1\frhed\"
copy Build\%1\Release\FRHED\Docs\*.* "%DISTDIR%\%1\frhed\Docs\"
copy Build\%1\Release\FRHED\Languages\*.* "%DISTDIR%\%1\frhed\Languages\"
call :GET_EXE_VERSION %~dp0Build\%1\Release\FRHED\frhed.exe
copy GPL.txt "%DISTDIR%\%1\frhed\""
7z.exe a -tzip "%DISTDIR%\frhed-%EXE_VERSION%-%1.zip" "%DISTDIR%\%1\frhed\"
goto :eof
:GET_EXE_VERSION
SET EXE_PATH=%1
WMIC Path CIM_DataFile WHERE Name='%EXE_PATH:\=\\%' Get Version | findstr /v Version > _tmp_.txt
set /P EXE_VERSIONTMP=<_tmp_.txt
set EXE_VERSION=%EXE_VERSIONTMP: =%
del _tmp_.txt
goto :eof