forked from ozone10/darkmodelib
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathBuildArc.cmd
More file actions
35 lines (25 loc) · 848 Bytes
/
BuildArc.cmd
File metadata and controls
35 lines (25 loc) · 848 Bytes
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
1cd /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 ARM64 || goto :eof
) else (
call :BuildArc %1 || goto :eof
)
goto :eof
:BuildArc
mkdir "%DISTDIR%\%1\darkmodelib" 2> NUL
copy Build\%1\Release\darkmodelib\darkmode.dll "%DISTDIR%\%1\darkmodelib\"
call :GET_DLL_VERSION %~dp0Build\%1\Release\darkmodelib\darkmode.dll
copy LICENSE.md "%DISTDIR%\%1\darkmodelib\"
7z.exe a -tzip "%DISTDIR%\darkmodelib-%DLL_VERSION%-%1.zip" "%DISTDIR%\%1\darkmodelib\"
goto :eof
:GET_DLL_VERSION
SET EXE_PATH=%1
powershell -NoLogo -NoProfile -Command "(Get-Item '%EXE_PATH%').VersionInfo.FileVersion" > _tmp_.txt
set /P DLL_VERSIONTMP=<_tmp_.txt
set DLL_VERSION=%DLL_VERSIONTMP: =%
del _tmp_.txt
goto :eof