-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathmakeit.bat
More file actions
60 lines (47 loc) · 1.63 KB
/
makeit.bat
File metadata and controls
60 lines (47 loc) · 1.63 KB
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
@echo off
setlocal
REM --- Configuration ---
REM Set the base path for your MASM64 installation if it's not in the system PATH
SET MASM_PATH=\masm64
REM Set the path to your Windows SDK libraries (adjust if necessary)
REM Common locations might be within Program Files (x86)\Windows Kits\10\Lib\
REM Or sometimes included with the assembler/linker distribution.
REM If PoLink finds them automatically, you might not need this explicit path.
SET SDK_LIB_PATH=%MASM_PATH%\lib64
REM Or potentially a full path like: "C:\Program Files (x86)\Windows Kits\10\Lib\10.0.22621.0\um\x64"
SET LIB_FILES=\masm64\lib64\kernel32.lib \masm64\lib64\user32.lib \masm64\lib64\msvcrt.lib \masm64\lib64\winmm.lib
REM --- Cleanup ---
if exist "InjectSpeed.obj" del "InjectSpeed.obj"
if exist "InjectSpeed.exe" del "InjectSpeed.exe"
REM --- Assemble ---
echo Assembling main.asm...
"%MASM_PATH%\bin64\ml64.exe" /c "main.asm" /Fo"main.obj"
if errorlevel 1 (
echo.
echo *** Assembly Error ***
pause
goto TheEnd
)
REM --- Link ---
echo Linking InjectSpeed.obj...
REM PoLink typically takes libraries directly. Add /LIBPATH if needed.
"%MASM_PATH%\bin64\PoLink.exe" /SUBSYSTEM:CONSOLE /ENTRY:main "InjectSpeed.obj" %LIB_FILES% /OUT:"main.exe"
REM If PoLink complains about /LIBPATH or finds libs automatically, you might remove /LIBPATH:"%SDK_LIB_PATH%"
REM Or if PoLink is different, check its documentation for library path syntax.
if errorlevel 1 (
echo.
echo *** Link Error ***
pause
goto TheEnd
)
REM --- Success ---
echo.
echo Build successful!
dir "main.*"
echo.
REM --- Optional: Copy and Run ---
echo Running main.exe...
main.exe
:TheEnd
echo.
endlocal