-
Notifications
You must be signed in to change notification settings - Fork 81
/
Copy pathmake_bundle.bat
103 lines (86 loc) · 3.66 KB
/
make_bundle.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
@echo off
set CURR_DIR=%~dp0
set CURR_DIR=%CURR_DIR:~0,-1%
set VERSION_FILE_PATH=%CURR_DIR%\deploy\labeless\VERSION
set /p VERSION= <"%VERSION_FILE_PATH%"
set RELEASE_DIR=%CURR_DIR%\labeless_release_full_%VERSION%
set BIN_DIR=%CURR_DIR%\bin
mkdir %RELEASE_DIR%
echo DeFixed...
set DE_FIXED_OUT_DIR=%RELEASE_DIR%\DeFixed110\plugins\
mkdir "%DE_FIXED_OUT_DIR%"
xcopy /Y /F "%BIN_DIR%\labeless_olly_foff.dll" %DE_FIXED_OUT_DIR%
if %ERRORLEVEL% neq 0 (
echo [Failed] Unable to bundle DeFixed
goto end
)
echo Olly 1.10...
set OLLY1_OUT_DIR=%RELEASE_DIR%\OllyDbg110\
set OLLY1_SRC_DIR=%CURR_DIR%\test\
pushd "%OLLY1_SRC_DIR%"
for /f "tokens=*" %%G IN ('git ls-files') do (
echo %%G | findstr /C:.gitignore > nul || echo F | xcopy /Y /F "%OLLY1_SRC_DIR%\%%G" "%OLLY1_OUT_DIR%\%%G"
)
xcopy /Y /F "%BIN_DIR%\labeless_olly.dll" "%OLLY1_OUT_DIR%\plugins\"
popd
echo Olly 2.01...
set OLLY2_OUT_DIR=%RELEASE_DIR%\OllyDbg201\
set OLLY2_SRC_DIR=%CURR_DIR%\test2\
pushd "%OLLY2_SRC_DIR%"
for /f "tokens=*" %%G IN ('git ls-files') do (
echo %%G | findstr /C:.gitignore > nul || echo F | xcopy /Y /F "%OLLY2_SRC_DIR%\%%G" "%OLLY2_OUT_DIR%\%%G"
)
xcopy /Y /F "%BIN_DIR%\labeless_olly2.dll" "%OLLY2_OUT_DIR%\plugins\"
popd
echo x64dbg...
set X64DBG_OUT_DIR=%RELEASE_DIR%\x64dbg\
set X64DBG_SRC_DIR=%CURR_DIR%\test_x64dbg\
pushd %X64DBG_SRC_DIR%
for /f "tokens=*" %%G in ('git ls-files') do (
echo %%G | findstr /C:.gitignore > nul || echo F | xcopy /Y /F "%X64DBG_SRC_DIR%\%%G" "%X64DBG_OUT_DIR%\%%G"
)
popd
xcopy /Y /F "%BIN_DIR%\labeless_x64dbg.dp32" "%X64DBG_OUT_DIR%\x32\plugins\"
xcopy /Y /F "%BIN_DIR%\labeless_x64dbg.dp64" "%X64DBG_OUT_DIR%\x64\plugins\"
::echo IDA68...
::set IDA68_OUT_DIR=%RELEASE_DIR%\IDA68\plugins\
::xcopy /Y /F "%BIN_DIR%\labeless_ida_68.plw" "%IDA68_OUT_DIR%"
::xcopy /Y /F "%BIN_DIR%\labeless_ida_68.p64" "%IDA68_OUT_DIR%"
::echo IDA69X...
::set IDA69X_OUT_DIR=%RELEASE_DIR%\IDA69\plugins\
::xcopy /Y /F "%BIN_DIR%\labeless_ida_690.plw" "%IDA69X_OUT_DIR%"
::xcopy /Y /F "%BIN_DIR%\labeless_ida_690.p64" "%IDA69X_OUT_DIR%"
::if exist "%BIN_DIR%\labeless_ida_690.plx" xcopy /Y /F "%BIN_DIR%\labeless_ida_690.plx" "%IDA69X_OUT_DIR%"
::if exist "%BIN_DIR%\labeless_ida_690.plx64" xcopy /Y /F "%BIN_DIR%\labeless_ida_690.plx64" "%IDA69X_OUT_DIR%"
::if exist "%BIN_DIR%\libprotobuf.so.9" xcopy /Y /F "%BIN_DIR%\libprotobuf.so.9" "%IDA69X_OUT_DIR%\..\"
echo IDA7X...
set IDA7X_OUT_DIR=%RELEASE_DIR%\IDA7X\plugins\
xcopy /Y /F "%BIN_DIR%\labeless_ida_70.dll" "%IDA7X_OUT_DIR%"
xcopy /Y /F "%BIN_DIR%\labeless_ida_70_64.dll" "%IDA7X_OUT_DIR%"
echo IDA8X...
set IDA8X_OUT_DIR=%RELEASE_DIR%\IDA8X\plugins\
xcopy /Y /F "%BIN_DIR%\labeless_ida_83.dll" "%IDA8X_OUT_DIR%"
xcopy /Y /F "%BIN_DIR%\labeless_ida_83_64.dll" "%IDA8X_OUT_DIR%"
echo IDA9X...
set IDA9X_OUT_DIR=%RELEASE_DIR%\IDA9X\plugins\
xcopy /Y /F "%BIN_DIR%\labeless_ida_90_64.dll" "%IDA9X_OUT_DIR%"
echo README...
xcopy /Y /F "%CURR_DIR%\README.md" "%RELEASE_DIR%\"
echo Python package...
set DEPLOY_OUT_DIR=%RELEASE_DIR%\deploy\
set DEPLOY_SRC_DIR=%CURR_DIR%\deploy\
mkdir "%DEPLOY_OUT_DIR%"
xcopy /Y /F "%DEPLOY_SRC_DIR%\dist\labeless-%VERSION%-py2.py3-none-any.whl" "%DEPLOY_OUT_DIR%\"
xcopy /Y /F "%DEPLOY_SRC_DIR%\protobuf-3.20.3-py2.py3-none-any.whl" "%DEPLOY_OUT_DIR%\"
xcopy /Y /F "%DEPLOY_SRC_DIR%\deploy_labeless_to_vm.py" "%DEPLOY_OUT_DIR%\"
xcopy /Y /F "%DEPLOY_SRC_DIR%\deploy.conf" "%DEPLOY_OUT_DIR%\"
xcopy /Y /F "%DEPLOY_SRC_DIR%\get-pip.py" "%DEPLOY_OUT_DIR%\"
echo docs...
set DOCS_OUT_DIR=%RELEASE_DIR%\docs\
set DOCS_SRC_DIR=%CURR_DIR%\docs\
pushd "%DOCS_SRC_DIR%"
for /f "tokens=*" %%G in ('git ls-files --exclude-standard') do (
echo %%G | findstr /C:.gitignore > nul || echo F | xcopy /Y /F "%DOCS_SRC_DIR%\%%G" "%DOCS_OUT_DIR%\%%G"
)
popd
:end