Skip to content

Commit 5c01778

Browse files
committedDec 15, 2024
Remove mimalloc
1 parent b43778d commit 5c01778

File tree

3 files changed

+4
-48
lines changed

3 files changed

+4
-48
lines changed
 

‎Builds/Package/Package.wapproj

-2
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,6 @@
174174
</ItemGroup>
175175
<ItemGroup>
176176
<None Include="DA08D2E73A0E4751340035CBAA17DC9C4DCC647D.pfx" />
177-
<Content Include="mcview\mimalloc-redirect.dll" />
178-
<Content Include="mcview\mimalloc.dll" />
179177
<Content Include="Images\SplashScreen.scale-200.png" />
180178
<Content Include="Images\LockScreenLogo.scale-200.png" />
181179
<Content Include="Images\Square150x150Logo.scale-200.png" />

‎CMakeLists.txt

+4-39
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ if (MSVC)
2121
/wd4100 # Suppress "unreferenced formal parameter" warnings
2222
)
2323
add_compile_options(
24-
$<$<CONFIG:Debug>:/MDd>
25-
$<$<CONFIG:Release>:/MD>
26-
$<$<CONFIG:RelWithDebInfo>:/MD>
27-
$<$<CONFIG:MinSizeRel>:/MD>
24+
$<$<CONFIG:Debug>:/MTd>
25+
$<$<CONFIG:Release>:/MT>
26+
$<$<CONFIG:RelWithDebInfo>:/MT>
27+
$<$<CONFIG:MinSizeRel>:/MT>
2828
/MP
2929
)
3030
elseif(APPLE)
@@ -40,16 +40,6 @@ CPMAddPackage(
4040
GIT_TAG 7c86f4f83b23b53ac464d80fbc7f17fabb4984be
4141
)
4242

43-
CPMAddPackage(
44-
NAME mimalloc
45-
GITHUB_REPOSITORY microsoft/mimalloc
46-
VERSION 2.1.7
47-
OPTIONS "MI_OVERRIDE ON"
48-
"MI_BUILD_TESTS OFF"
49-
"MI_BUILD_OBJECT OFF"
50-
"MI_BUILD_STATIC OFF"
51-
"MI_WIN_REDIRECT ON")
52-
5343
add_subdirectory(ext/je2be-core)
5444
add_subdirectory(ext/JUCE)
5545

@@ -204,9 +194,6 @@ target_link_libraries(mcview
204194
juce::juce_recommended_config_flags
205195
juce::juce_recommended_lto_flags
206196
)
207-
if (MSVC)
208-
target_link_libraries(mcview PRIVATE mimalloc)
209-
endif()
210197

211198
target_include_directories(mcview
212199
PRIVATE
@@ -228,25 +215,3 @@ configure_file(
228215
${CMAKE_CURRENT_SOURCE_DIR}/Builds/Package/Package.appxmanifest.in
229216
${CMAKE_CURRENT_SOURCE_DIR}/Builds/Package/Package.appxmanifest
230217
)
231-
232-
if (MSVC)
233-
add_custom_command(TARGET mcview POST_BUILD
234-
COMMAND "${CMAKE_COMMAND}" -E copy "${mimalloc_BINARY_DIR}/\$(Configuration)/mimalloc.dll" "$<TARGET_FILE_DIR:mcview>/"
235-
COMMAND "${CMAKE_COMMAND}" -E copy "${mimalloc_BINARY_DIR}/\$(Configuration)/mimalloc-redirect.dll" "$<TARGET_FILE_DIR:mcview>/"
236-
COMMENT "Copy mimalloc dlls to output directory")
237-
238-
add_custom_command(TARGET mcview POST_BUILD
239-
COMMAND
240-
"$<$<CONFIG:Release>:${CMAKE_COMMAND}>"
241-
"$<$<CONFIG:Release>:-E>"
242-
"$<$<CONFIG:Release>:copy>"
243-
"$<$<CONFIG:Release>:${mimalloc_BINARY_DIR}/Release/mimalloc.dll>"
244-
"$<$<CONFIG:Release>:${CMAKE_CURRENT_SOURCE_DIR}/Builds/Package/mcview/>"
245-
COMMAND
246-
"$<$<CONFIG:Release>:${CMAKE_COMMAND}>"
247-
"$<$<CONFIG:Release>:-E>"
248-
"$<$<CONFIG:Release>:copy>"
249-
"$<$<CONFIG:Release>:${mimalloc_BINARY_DIR}/Release/mimalloc-redirect.dll>"
250-
"$<$<CONFIG:Release>:${CMAKE_CURRENT_SOURCE_DIR}/Builds/Package/mcview/>"
251-
COMMENT "Copy mimalloc dlls to package output directory")
252-
endif()

‎Source/Application.cpp

-7
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22
#include <juce_gui_extra/juce_gui_extra.h>
33
#include <juce_opengl/juce_opengl.h>
44
#include <leveldb/env.h>
5-
#if !defined(__APPLE__)
6-
#include <mimalloc.h>
7-
#endif
85
#include <minecraft-file.hpp>
96
#include <nlohmann/json.hpp>
107

@@ -100,10 +97,6 @@ class Application : public juce::JUCEApplication {
10097
void initialise(juce::String const &) override {
10198
using namespace juce;
10299

103-
#if !defined(__APPLE__)
104-
(void)mi_version();
105-
#endif
106-
107100
#if MCVIEW_ENABLE_PALETTE_PREP
108101
// 1. Execute the line below.
109102
// Palette::ResearchJava("mcview-missing-block");

0 commit comments

Comments
 (0)
Please sign in to comment.