Skip to content

Commit 4642f98

Browse files
committed
Add Mistral.
First commit of a new fork.
1 parent e23ef7e commit 4642f98

File tree

309 files changed

+6305
-11971
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

309 files changed

+6305
-11971
lines changed

CMakeLists.txt

Lines changed: 50 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
cmake_minimum_required(VERSION 3.10)
1+
cmake_minimum_required(VERSION 3.21.0)
22

33
set(EnablePrecompiledHeaders 1 CACHE BOOL "Enable Precompiled Headers to reduce compile time")
4-
if(${CMAKE_VERSION} VERSION_LESS "3.16.0")
4+
if (${CMAKE_VERSION} VERSION_LESS "3.16.0")
55
unset(NativePrecompiledHeaders)
6-
else()
6+
else ()
77
set(NativePrecompiledHeaders 1)
88
unset(EnableCotire CACHE)
9-
endif()
9+
endif ()
1010

1111
# Ensure that only 32 bit libraries are used.
1212
set(CMAKE_TOOLCHAIN_FILE "${CMAKE_SOURCE_DIR}/Toolchain-cross-m32.cmake")
@@ -15,9 +15,9 @@ set(CMAKE_TOOLCHAIN_FILE "${CMAKE_SOURCE_DIR}/Toolchain-cross-m32.cmake")
1515
# Config stuff
1616
#
1717

18-
if(NOT CMAKE_BUILD_TYPE)
18+
if (NOT CMAKE_BUILD_TYPE)
1919
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Build type")
20-
endif()
20+
endif ()
2121
set(CMAKE_BUILD_TYPE_VALUES "Debug;Release" CACHE INTERNAL "List of supported build")
2222
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS ${CMAKE_BUILD_TYPE_VALUES})
2323

@@ -26,11 +26,6 @@ project(cathook VERSION 0.0.1)
2626
set(CMAKE_CXX_STANDARD 17)
2727
add_library(cathook SHARED "")
2828

29-
set(GameSpecific 1 CACHE BOOL "Build for specific target game (As opposed to universal, but slower, lib)")
30-
set(Game "tf2" CACHE STRING "Target game")
31-
set(GameValues "tf2;hl2dm;dab;tf2c;css;dynamic" CACHE INTERNAL "List of supported game types")
32-
set_property(CACHE Game PROPERTY STRINGS ${GameValues})
33-
3429
set(Visuals_DrawType "IMGUI" CACHE STRING "Target drawing api")
3530
set(DrawTypes "Textmode;No Visuals;Glez;Engine;IMGUI;IMGUI Streamproof" CACHE INTERNAL "Select the drawing api that cathook should use")
3631
set_property(CACHE Visuals_DrawType PROPERTY STRINGS ${DrawTypes})
@@ -43,24 +38,24 @@ set(EnableImGuiDrawing 0)
4338
set(ExternalDrawing 0)
4439
set(Textmode 0)
4540

46-
if(Visuals_DrawType STREQUAL "Textmode")
41+
if (Visuals_DrawType STREQUAL "Textmode")
4742
set(EnableVisuals 0)
4843
set(Textmode 1)
49-
elseif(Visuals_DrawType STREQUAL "No Visuals")
44+
elseif (Visuals_DrawType STREQUAL "No Visuals")
5045
set(EnableVisuals 0)
51-
elseif(Visuals_DrawType STREQUAL "Glez")
46+
elseif (Visuals_DrawType STREQUAL "Glez")
5247
set(EnableGlezDrawing 1)
53-
elseif(Visuals_DrawType STREQUAL "Engine")
48+
elseif (Visuals_DrawType STREQUAL "Engine")
5449
set(EnableEngineDrawing 1)
55-
elseif(Visuals_DrawType STREQUAL "IMGUI")
50+
elseif (Visuals_DrawType STREQUAL "IMGUI")
5651
set(EnableImGuiDrawing 1)
57-
elseif(Visuals_DrawType STREQUAL "IMGUI Streamproof")
52+
elseif (Visuals_DrawType STREQUAL "IMGUI Streamproof")
5853
set(EnableImGuiDrawing 1)
5954
set(ExternalDrawing 1)
60-
endif()
55+
endif ()
6156
if (NOT ExternalDrawing)
6257
set(Visuals_EnforceStreamSafety 0)
63-
endif()
58+
endif ()
6459

6560
set(EnableProfiler 0 CACHE BOOL "Enable Profiler")
6661
set(EnableGUI 1 CACHE BOOL "Enable GUI")
@@ -73,18 +68,18 @@ set(EnableNullNexus 1 CACHE BOOL "Enable NullNexus chat and other features")
7368
set(EnableLogging 1 CACHE BOOL "Enable logging to /tmp/")
7469
set(EnableClip 1 CACHE BOOL "Enable anti electron/chromium freezing")
7570
set(Unity_ZeroKernel 1 CACHE BOOL "Use a unity build for zerokernel files")
76-
if(NOT EnableVisuals)
71+
if (NOT EnableVisuals)
7772
set(EnableGUI 0)
78-
endif()
73+
endif ()
7974

8075
# Internal variables
8176
# INTERNAL implies "FORCE" by default, so don't set if already set
8277
if (NOT DEFINED Internal_Binarymode)
8378
set(Internal_Binarymode 0 CACHE INTERNAL "Build cathook to be used in 'binary mode'")
84-
endif()
79+
endif ()
8580
if (NOT DEFINED Internal_Symbolized)
8681
set(Internal_Symbolized 0 CACHE INTERNAL "Build cathook with symbols so crashes can be sent")
87-
endif()
82+
endif ()
8883

8984
#
9085
# End of config stuff
@@ -96,8 +91,8 @@ if (EnableVisuals)
9691
find_package(Freetype REQUIRED)
9792
target_include_directories(cathook PRIVATE "${FREETYPE_INCLUDE_DIRS}")
9893
target_link_libraries(cathook ${FREETYPE_LIBRARIES})
99-
endif()
100-
endif()
94+
endif ()
95+
endif ()
10196

10297
find_package(Git REQUIRED)
10398
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/external")
@@ -106,10 +101,10 @@ find_package(Boost 1.70.0)
106101
if (NOT ${Boost_FOUND})
107102
set(BOOST_LIBS_OPTIONAL "" CACHE STRING "Boost libs to be compiled")
108103
add_subdirectory(external/boost-cmake)
109-
SET (BOOST_ROOT ${CMAKE_BINARY_DIR}/_deps/boost-src)
104+
SET(BOOST_ROOT ${CMAKE_BINARY_DIR}/_deps/boost-src)
110105
find_package(Boost 1.70 REQUIRED)
111106
include_directories(${Boost_INCLUDE_DIRS})
112-
endif()
107+
endif ()
113108

114109
execute_process(COMMAND
115110
"${GIT_EXECUTABLE}" log -1 --pretty=\"%h\"
@@ -123,50 +118,50 @@ execute_process(COMMAND
123118
OUTPUT_VARIABLE GIT_COMMITTER_DATE
124119
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
125120

126-
set( CMAKE_SKIP_RPATH true )
121+
set(CMAKE_SKIP_RPATH true)
127122
find_library(ValveLibraryVStdLib NAMES vstdlib PATHS "${PROJECT_SOURCE_DIR}/lib" NO_DEFAULT_PATH)
128123

129-
if(EnableIPC)
124+
if (EnableIPC)
130125
add_subdirectory(external/simple-ipc)
131126
target_link_libraries(cathook SimpleIPC)
132-
endif()
127+
endif ()
133128

134-
if(EnableNullNexus)
129+
if (EnableNullNexus)
135130
add_subdirectory(external/libnullnexus)
136131
target_link_libraries(cathook libnullnexus)
137-
endif()
132+
endif ()
138133

139-
if(EnableVisuals)
134+
if (EnableVisuals)
140135
if (EnableGlezDrawing)
141136
add_subdirectory(external/libglez)
142-
endif()
137+
endif ()
143138
target_include_directories(cathook PRIVATE include/visual)
144139
find_package(SDL2 REQUIRED)
145-
if(ExternalDrawing)
140+
if (ExternalDrawing)
146141
add_subdirectory(external/libxoverlay)
147142
target_link_libraries(cathook xoverlay)
148143
target_include_directories(cathook PRIVATE external/libxoverlay/include)
149-
endif()
144+
endif ()
150145
target_include_directories(cathook PRIVATE "${SDL2_INCLUDE_DIR}")
151146
if (EnableGlezDrawing)
152147
target_link_libraries(cathook glez)
153-
endif()
148+
endif ()
154149
if (EnableGlezDrawing)
155150
find_package(GLEW REQUIRED)
156151
target_link_libraries(cathook ${GLEW_LIBRARIES})
157-
endif()
158-
endif()
152+
endif ()
153+
endif ()
159154

160155
configure_file(include/config.h.in ${CMAKE_SOURCE_DIR}/include/config.h @ONLY)
161156
configure_file(include/version.h.in ${CMAKE_SOURCE_DIR}/include/version.h @ONLY)
162157

163-
set(CMAKE_CXX_FLAGS "-m32 -march=native -fexceptions -fno-gnu-unique -DNDEBUG")
164-
set(CMAKE_CXX_FLAGS_DEBUG "-rdynamic -ggdb -Og")
158+
set(CMAKE_CXX_FLAGS "-m32 -mavx2 -O3 -fexceptions -fno-gnu-unique -DNDEBUG")
159+
set(CMAKE_CXX_FLAGS_DEBUG "-m32 -mavx2 -Og -rdynamic -ggdb")
165160
if (Internal_Symbolized)
166-
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -ggdb -fvisibility=hidden -fvisibility-inlines-hidden")
167-
else()
168-
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -s -fvisibility=hidden -fvisibility-inlines-hidden")
169-
endif()
161+
set(CMAKE_CXX_FLAGS_RELEASE "-m32 -mavx2 -O3 -ggdb -fvisibility=hidden -fvisibility-inlines-hidden")
162+
else ()
163+
set(CMAKE_CXX_FLAGS_RELEASE "-m32 -mavx2 -O3 -s -fvisibility=hidden -fvisibility-inlines-hidden")
164+
endif ()
170165

171166
target_compile_definitions(cathook PRIVATE
172167
_GLIBCXX_USE_CXX11_ABI=0
@@ -189,14 +184,14 @@ target_include_directories(cathook SYSTEM PRIVATE
189184
"external/source-sdk-2013-headers/mp/src/tier1"
190185
"external/source-sdk-2013-headers/mp/src")
191186

192-
if(EnableWarnings)
187+
if (EnableWarnings)
193188
target_compile_options(cathook PRIVATE -Wall -Wextra -Wno-unused-parameter -Wno-class-memaccess -Wno-strict-aliasing -Wno-sign-compare)
194-
else()
189+
else ()
195190
target_compile_options(cathook PRIVATE -w)
196-
endif()
197-
if(Internal_Binarymode)
191+
endif ()
192+
if (Internal_Binarymode)
198193
target_compile_options(cathook PRIVATE -march=x86-64)
199-
endif()
194+
endif ()
200195

201196

202197
target_include_directories(cathook PRIVATE include include/hooks)
@@ -215,14 +210,14 @@ add_subdirectory(include)
215210
add_subdirectory(external)
216211
add_subdirectory(modules)
217212

218-
if(EnablePrecompiledHeaders AND NativePrecompiledHeaders)
213+
if (EnablePrecompiledHeaders AND NativePrecompiledHeaders)
219214
target_precompile_headers(cathook PRIVATE "${CMAKE_SOURCE_DIR}/include/common.hpp")
220-
endif()
215+
endif ()
221216

222217
if (NOT Internal_Symbolized)
223218
add_custom_command(TARGET cathook POST_BUILD
224-
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:cathook> "${CMAKE_SOURCE_DIR}/bin/$<TARGET_FILE_NAME:cathook>")
225-
else()
219+
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:cathook> "${CMAKE_SOURCE_DIR}/bin/$<TARGET_FILE_NAME:cathook>")
220+
else ()
226221
message("Symbolized build")
227222
set(Internal_Symbolized 0 CACHE INTERNAL "Build cathook with symbols so crashes can be sent" FORCE)
228-
endif()
223+
endif ()

CODE_OF_CONDUCT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Contributor Code of Conduct
22

3-
This project adheres to No Code of Conduct. We are all adults. We accept anyone's contributions. Nothing else matters.
3+
This project adheres to No Code of Conduct. We are all adults. We accept anyone's contributions. Nothing else matters.
44

55
For more information please visit the [No Code of Conduct](https://github.com/domgetter/NCoC) homepage.
66

CONTRIBUTING.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,31 @@
55
- A working up-to-date cathook installation
66
- C++ knowledge
77
- Git knowledge
8-
- Ability to ask for help (Feel free to create empty pull-request or PM a maintainer in [Telegram](https://t.me/nullworks))
8+
- Ability to ask for help (Feel free to create empty pull-request or PM a maintainer
9+
in [Telegram](https://t.me/nullworks))
910

1011
### Setting up cathook
1112

12-
Cathook reduces its git repository size automatically by using a "shallow repository". This makes developing difficult by not providing branches and omitting the commit history.
13+
Cathook reduces its git repository size automatically by using a "shallow repository". This makes developing difficult
14+
by not providing branches and omitting the commit history.
1315

1416
The easiest way to undo this is by running the `developer` script located in `scripts`.
1517

1618
### Pull requests and Branches
1719

18-
In order to send code back to the official cathook repository, you must first create a copy of cathook on your github account ([fork](https://help.github.com/articles/creating-a-pull-request-from-a-fork/)) and then [create a pull request](https://help.github.com/articles/creating-a-pull-request-from-a-fork/) back to cathook.
20+
In order to send code back to the official cathook repository, you must first create a copy of cathook on your github
21+
account ([fork](https://help.github.com/articles/creating-a-pull-request-from-a-fork/)) and
22+
then [create a pull request](https://help.github.com/articles/creating-a-pull-request-from-a-fork/) back to cathook.
1923

20-
Cathook developement is performed on multiple branches. Changes are then pull requested into master. By default, changes merged into master will not roll out to stable build users unless the `stable` tag is updated.
24+
Cathook developement is performed on multiple branches. Changes are then pull requested into master. By default, changes
25+
merged into master will not roll out to stable build users unless the `stable` tag is updated.
2126

2227
### Code-Style
2328

2429
The nullworks code-style can be found in `code-style.md`.
2530

2631
### Building
2732

28-
Cathook has already created the directory `build` where cmake files are located. By default, you can build cathook by running `cmake .. && make -j$(grep -c '^processor' /proc/cpuinfo)` in the `build` directory. You can then test your changes by using one of the attach scripts at your disposal.
33+
Cathook has already created the directory `build` where cmake files are located. By default, you can build cathook by
34+
running `cmake .. && make -j$(grep -c '^processor' /proc/cpuinfo)` in the `build` directory. You can then test your
35+
changes by using one of the attach scripts at your disposal.

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Cathook Training Software
2+
23
![banner](http://i.imgur.com/w96wdtE.png)
34
[![CircleCI](https://circleci.com/gh/nullworks/cathook.svg?style=svg)](https://circleci.com/gh/nullworks/cathook)
45

@@ -10,7 +11,6 @@ The software could be detected by VAC in the future. Only use it on accounts you
1011

1112
Cathook is a training software designed for Team Fortress 2 for Linux. Cathook includes some joke features like
1213

13-
* Ignore Hoovy
1414
* Encrypted chat
1515
* Nullnexus Support (Find other Cathook users in-game automatically)
1616
* Sandvich aimbot
@@ -35,8 +35,11 @@ and a lot of useful features, including
3535
[View our short guide to installing and using cathook](https://cathook.club/wikis/Installing,-Attaching-And-General-Infos)
3636

3737
## Community
38-
You can chat with other cathook users in [our official Telegram group](https://t.me/nullworks) and the [cathook announcements channel](https://t.me/cathook_cheat).
39-
If you don't have Telegram, you can chat with other cathook users in our official Matrix room, however, you will have to ask TotallyNotElite or BenCat07 for an invite to said room.
38+
39+
You can chat with other cathook users in [our official Telegram group](https://t.me/nullworks) and
40+
the [cathook announcements channel](https://t.me/cathook_cheat). If you don't have Telegram, you can chat with other
41+
cathook users in our official Matrix room, however, you will have to ask TotallyNotElite or BenCat07 for an invite to
42+
said room.
4043

4144
## Reporting Issues
4245

Toolchain-cross-m32.cmake

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,51 @@
1-
SET(CMAKE_C_FLAGS "-m32" CACHE STRING "C compiler flags" FORCE)
2-
SET(CMAKE_CXX_FLAGS "-m32" CACHE STRING "C++ compiler flags" FORCE)
1+
SET(CMAKE_C_FLAGS "-m32" CACHE STRING "C compiler flags" FORCE)
2+
SET(CMAKE_CXX_FLAGS "-m32" CACHE STRING "C++ compiler flags" FORCE)
33

44
SET(LIB32 /usr/lib) # Fedora
55

6-
IF(EXISTS /usr/lib32)
6+
IF (EXISTS /usr/lib32)
77
SET(LIB32 /usr/lib32) # Arch, Solus
8-
ENDIF()
8+
ENDIF ()
99

1010
SET(CMAKE_SYSTEM_LIBRARY_PATH ${LIB32} CACHE STRING "system library search path" FORCE)
11-
SET(CMAKE_LIBRARY_PATH ${LIB32} CACHE STRING "library search path" FORCE)
11+
SET(CMAKE_LIBRARY_PATH ${LIB32} CACHE STRING "library search path" FORCE)
1212

1313
# this is probably unlikely to be needed, but just in case
14-
SET(CMAKE_EXE_LINKER_FLAGS "-m32 -L${LIB32}" CACHE STRING "executable linker flags" FORCE)
14+
SET(CMAKE_EXE_LINKER_FLAGS "-m32 -L${LIB32}" CACHE STRING "executable linker flags" FORCE)
1515
SET(CMAKE_SHARED_LINKER_FLAGS "-m32 -L${LIB32}" CACHE STRING "shared library linker flags" FORCE)
16-
SET(CMAKE_MODULE_LINKER_FLAGS "-m32 -L${LIB32}" CACHE STRING "module linker flags" FORCE)
16+
SET(CMAKE_MODULE_LINKER_FLAGS "-m32 -L${LIB32}" CACHE STRING "module linker flags" FORCE)
1717

1818
# find Wx config script on Fedora for the highest version of 32 bit Wx installed
19-
IF(EXISTS ${LIB32}/wx/config)
19+
IF (EXISTS ${LIB32}/wx/config)
2020
FILE(GLOB WX_INSTALLS ${LIB32}/wx/config/*)
2121

2222
SET(MAX_WX_VERSION 0.0)
23-
FOREACH(WX_INSTALL ${WX_INSTALLS})
23+
FOREACH (WX_INSTALL ${WX_INSTALLS})
2424
STRING(REGEX MATCH "[0-9]+(\\.[0-9]+)+" WX_VERSION ${WX_INSTALL})
2525

26-
IF(WX_VERSION VERSION_GREATER MAX_WX_VERSION)
26+
IF (WX_VERSION VERSION_GREATER MAX_WX_VERSION)
2727
SET(MAX_WX_VERSION ${WX_VERSION})
28-
ENDIF()
29-
ENDFOREACH()
28+
ENDIF ()
29+
ENDFOREACH ()
3030

3131
FILE(GLOB WX_INSTALL_CONFIGS "${LIB32}/wx/config/*${MAX_WX_VERSION}*")
3232
LIST(GET WX_INSTALL_CONFIGS 0 WX_INSTALL_CONFIG)
3333

3434
SET(WX_CONFIG_TRANSFORM_SCRIPT_LINES
35-
""
36-
)
35+
""
36+
)
3737
FILE(WRITE ${CMAKE_BINARY_DIR}/wx-config-wrapper
38-
"#!/bin/sh
38+
"#!/bin/sh
3939
${WX_INSTALL_CONFIG} \"\$@\" | sed 's!/emul32/!/usr/!g'
4040
")
4141
EXECUTE_PROCESS(COMMAND chmod +x ${CMAKE_BINARY_DIR}/wx-config-wrapper)
4242

4343
SET(wxWidgets_CONFIG_EXECUTABLE ${CMAKE_BINARY_DIR}/wx-config-wrapper)
44-
ENDIF()
44+
ENDIF ()
4545

4646
# on Fedora and Arch and similar, point pkgconfig at 32 bit .pc files. We have
4747
# to include the regular system .pc files as well (at the end), because some
4848
# are not always present in the 32 bit directory
49-
IF(EXISTS ${LIB32}/pkgconfig)
49+
IF (EXISTS ${LIB32}/pkgconfig)
5050
SET(ENV{PKG_CONFIG_LIBDIR} ${LIB32}/pkgconfig:/usr/share/pkgconfig:/usr/lib/pkgconfig:/usr/lib64/pkgconfig)
51-
ENDIF()
51+
ENDIF ()

0 commit comments

Comments
 (0)