FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
mac-tool.cpp/build_random.bat at main · suparious/mac-tool.cpp · GitHub
suparious
/
mac-tool.cpp
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Issues
0
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
mac-tool.cpp
/
build_random.bat
Copy path
More file actions
More file actions
Latest commit
History
History
History
65 lines (56 loc) · 1.8 KB
Breadcrumbs
mac-tool.cpp
/
build_random.bat
Copy path
File metadata and controls
65 lines (56 loc) · 1.8 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
@
echo
off
REM
Path to the g++ compiler
SET
PATH
=
%USERPROFILE%
\repos\mingw64\bin;
%PATH%
REM
Path to the repository and binary output directory
SET
REPO
=
%USERPROFILE%
\repos\mac-tool.cpp
SET
BIN
=
%USERPROFILE%
\bin
REM
Check if g++ is available
where
g++
>
nul
2
>
nul
if
%errorlevel%
neq
0
(
echo
ERROR: g++ compiler not found!
echo
Please install MinGW-w64 or another C++ compiler.
echo
.
echo
You can download MinGW-w64 from:
echo
https://www.mingw-w64.org/downloads/
echo
.
echo
After installation, make sure g++ is in your PATH.
pause
exit
/b
1
)
REM
Generate a random string for the binary name
setlocal
enabledelayedexpansion
set
"
chars
=
ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
"
set
"
random_string
=
"
for
/L
%%i
in
(1,1,16)
do
(
set
/a
"
rand_index
=
!
RANDOM
!
%%
62
"
for
%%j
in
(
!rand_index!
)
do
set
"
random_string
=
!random_string!!chars:~
%%j
,
1
!
"
)
echo
Random string generated:
!random_string!
REM
Create the binary output directory if it doesn't exist
if
not
exist
%BIN%
(
mkdir
%BIN%
)
REM
Pull the latest changes from the repository
cd
%REPO%
git pull
REM
Compile the program
echo
Compiling macro_tool.cpp to
%BIN%
\
%random_string%
.exe...
g++ -o
%BIN%
\
%random_string%
.exe macro_tool.cpp -luser32 -std=c++23 -O3 -Wall -static
if
%errorlevel%
neq
0
(
echo
.
echo
ERROR: Compilation failed!
echo
Please check the error messages above.
pause
exit
/b
1
)
echo
.
echo
================================
echo
Build successful!
echo
================================
echo
.
echo
Executable created:
%BIN%
\
%random_string%
.exe
echo
.
echo
To run the macro tool:
echo
%BIN%
\
%random_string%
.exe (uses macro.ini)
echo
%BIN%
\
%random_string%
.exe config.ini (uses custom config file)
echo
.
Back
|
FazBrowse Home
|
New Git URL