-
Notifications
You must be signed in to change notification settings - Fork 1
/
Build.bat
42 lines (35 loc) · 1.23 KB
/
Build.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
@echo off
echo ========== initialize Visual Studio environment ==========
if "%VisualStudio%" == "" (
echo environment variable "VisualStudio" is not set
exit /b 1
)
call "%VisualStudio%\VC\Auxiliary\Build\vcvars64.bat"
echo ================= clean builder old files ================
rd /S /Q "builder\Release"
rd /S /Q "builder\x64"
rd /S /Q "Release"
rd /S /Q "x64"
echo ==================== generate builder ====================
MSBuild.exe Gleam-RT.sln /t:builder /p:Configuration=Release /p:Platform=x64
MSBuild.exe Gleam-RT.sln /t:builder /p:Configuration=Release /p:Platform=x86
echo ================ extract runtime shellcode ===============
del /S /Q dist
cd builder
echo --------extract shellcode for x64--------
"..\x64\Release\builder.exe"
echo --------extract shellcode for x86--------
"..\Release\builder.exe"
cd ..
echo ================ clean builder output files ==============
rd /S /Q "builder\Release"
rd /S /Q "builder\x64"
rd /S /Q "Release"
rd /S /Q "x64"
echo ================ generate assembly module ================
cd script
call asm_mod.bat
cd ..
echo ==========================================================
echo build shellcode finish!
echo ==========================================================