File tree Expand file tree Collapse file tree 6 files changed +20
-12
lines changed
Expand file tree Collapse file tree 6 files changed +20
-12
lines changed Original file line number Diff line number Diff line change 1+ # WIP
2+
3+ - Strip absolute paths from binaries #302
4+
15# 0.4.23 - Jan 18, 2025
26
37- Don't reset DirectContext on LayerGLSkija resize #301 via @dzaima
Original file line number Diff line number Diff line change @@ -36,6 +36,9 @@ endif()
3636target_include_directories (jwm PRIVATE ${CMAKE_CURRENT_LIST_DIR} /../shared/cc ${JAVA_HOME} /include ${JAVA_HOME} /include /linux)
3737set_target_properties (jwm PROPERTIES OUTPUT_NAME "jwm_${JWM_ARCH} " )
3838
39+ # https://github.com/HumbleUI/JWM/issues/302
40+ target_compile_options (jwm PRIVATE -ffile-prefix -map=${CMAKE_SOURCE_DIR} /=)
41+
3942
4043target_link_libraries (jwm PRIVATE X11::X11 X11::Xrandr X11::Xcursor X11::Xi)
4144target_link_libraries (jwm PRIVATE OpenGL::GL)
Original file line number Diff line number Diff line change @@ -18,6 +18,9 @@ add_library(jwm SHARED ${SOURCES_OBJC} ${SOURCES_CXX} ${SOURCES_CXX_IMPL})
1818target_include_directories (jwm PRIVATE ${CMAKE_CURRENT_LIST_DIR} /../shared/cc $ENV{JAVA_HOME} /include $ENV{JAVA_HOME} /include /darwin)
1919set_target_properties (jwm PROPERTIES OUTPUT_NAME "jwm_${JWM_ARCH} " )
2020
21+ # https://github.com/HumbleUI/JWM/issues/302
22+ target_compile_options (jwm PRIVATE -ffile-prefix -map=${CMAKE_SOURCE_DIR} /=)
23+
2124target_link_libraries (jwm
2225 "-framework AppKit"
2326 "-framework Cocoa"
Original file line number Diff line number Diff line change @@ -22,17 +22,8 @@ namespace jwm {
2222
2323 void notify (const LogEntry& entry) const {
2424 std::wstringstream finalMessageBuilder;
25- const std::string& file = entry.getFile ();
26-
27- #ifdef WIN32
28- const char sep[] = " \\ " ;
29- #else
30- const char sep[] = " /" ;
31- #endif
32-
33- auto pos = file.find_last_of (sep);
3425 finalMessageBuilder
35- << (pos == std::string::npos? file. c_str (): file. substr (pos + 1 ). c_str () ) << " :"
26+ << entry. getFile (). c_str () << " :"
3627 << entry.getLine () << " "
3728 << entry.getMessage ();
3829
Original file line number Diff line number Diff line change 11#pragma once
2+ #include < cstring>
23#include < string>
34#include < sstream>
45#include < vector>
@@ -79,14 +80,18 @@ namespace jwm {
7980#define JWM_LEVEL_VERBOSE true
8081#define JWM_LEVEL_LOG false
8182
83+ // https://github.com/HumbleUI/JWM/issues/302
84+ #define JWM_FILENAME (strrchr(__FILE__, ' /' ) ? strrchr(__FILE__, ' /' ) + 1 : \
85+ strrchr (__FILE__, ' \\ ' ) ? strrchr(__FILE__, ' \\ ' ) + 1 : __FILE__)
86+
8287// Macro to check if message can be logged, if can than
8388// create builder and assemble message
8489#define JWM_LOG_CAT (verbose, message ) \
8590 do { \
8691 auto & __log = ::jwm::Log::getInstance (); \
8792 if (__log.checkLevel (verbose)) { \
8893 ::jwm::LogBuilder __builder ( \
89- __FILE__, \
94+ JWM_FILENAME, \
9095 __FUNCTION__, \
9196 static_cast <unsigned long int >(__LINE__), \
9297 verbose, \
Original file line number Diff line number Diff line change @@ -102,8 +102,10 @@ target_compile_definitions(jwm
102102 PRIVATE _CRT_SECURE_NO_WARNINGS
103103 PRIVATE _SCL_SECURE_NO_WARNINGS)
104104
105+ # https://github.com/HumbleUI/JWM/issues/302
105106target_compile_options (jwm
106- PRIVATE /source -charset:utf-8)
107+ PRIVATE /source -charset:utf-8
108+ PRIVATE "/d1trimfile:${CMAKE_SOURCE_DIR} /" )
107109
108110target_link_options (jwm
109111 PRIVATE /INCREMENTAL:NO
You can’t perform that action at this time.
0 commit comments