-
Notifications
You must be signed in to change notification settings - Fork 23
/
NppExec_zip_src_dll.bat
49 lines (37 loc) · 1.67 KB
/
NppExec_zip_src_dll.bat
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
@echo off
set ARC_EXE=7z.exe
for /f "tokens=1-3 delims=/.- " %%a in ('DATE /T') do set ARC_DATE=%%c%%b%%a
set ARC_SRC_NAME=NppExec%ARC_DATE%_src
set ARC_DLL_NAME=NppExec%ARC_DATE%_dll
set ARC_DLL_NAME_64=NppExec%ARC_DATE%_dll_x64
REM 1. NppExec src archive...
%ARC_EXE% u -tzip %ARC_SRC_NAME%.zip @NppExec_src.txt -mx5
%ARC_EXE% t %ARC_SRC_NAME%.zip
REM 2. NppExec dll archives...
if not exist NppExec\doc mkdir NppExec\doc
if not exist NppExec\doc\NppExec mkdir NppExec\doc\NppExec
sfk copy README.md NppExec\doc\NppExec\README.txt -yes
sfk replace NppExec\doc\NppExec\README.txt /\*/*/ -yes
copy /Y docs\NppExec*.txt NppExec\doc\NppExec\
copy /Y docs\NppExec_Manual.chm NppExec\doc\NppExec\
copy /Y docs\fparser.html NppExec\doc\NppExec\
copy /Y docs\*.css NppExec\doc\NppExec\
if not exist NppExec\Release\NppExec.dll goto no_dll_file_exit
cd NppExec\Release
%ARC_EXE% u -tzip ..\..\%ARC_DLL_NAME%.zip NppExec.dll NppExec\*.h -mx5
cd ..
%ARC_EXE% u -tzip ..\%ARC_DLL_NAME%.zip doc\NppExec\README.txt doc\NppExec\NppExec*.txt doc\NppExec\NppExec*.chm doc\NppExec\*.html doc\NppExec\*.css -mx5
cd ..
%ARC_EXE% t %ARC_DLL_NAME%.zip
:no_dll_file_exit
if not exist NppExec\x64\Release\NppExec.dll goto no_dll_file_x64_exit
cd NppExec\x64\Release
%ARC_EXE% u -tzip ..\..\..\%ARC_DLL_NAME_64%.zip NppExec.dll -mx5
cd ..\..\Release
%ARC_EXE% u -tzip ..\..\%ARC_DLL_NAME_64%.zip NppExec\*.h -mx5
cd ..
%ARC_EXE% u -tzip ..\%ARC_DLL_NAME_64%.zip doc\NppExec\README.txt doc\NppExec\NppExec*.txt doc\NppExec\NppExec*.chm doc\NppExec\*.html doc\NppExec\*.css -mx5
cd ..
%ARC_EXE% t %ARC_DLL_NAME_64%.zip
:no_dll_file_x64_exit
sfk deltree NppExec\doc -yes