Compare commits

..

1 Commits

Author SHA1 Message Date
c9941629d8 Fix build in release mode. 2025-12-18 21:28:17 -05:00
5 changed files with 46 additions and 14 deletions

View File

@ -49,3 +49,12 @@ endif()
add_executable(${EXE_NAME} ${SRC_FILES}) add_executable(${EXE_NAME} ${SRC_FILES})
target_include_directories(${EXE_NAME} PRIVATE ${INCLUDE_DIRS}) target_include_directories(${EXE_NAME} PRIVATE ${INCLUDE_DIRS})
target_link_libraries(${EXE_NAME} PRIVATE ${LINK_LIBS_DIRS}) target_link_libraries(${EXE_NAME} PRIVATE ${LINK_LIBS_DIRS})
message(STATUS "Build type: $<CONFIG>")
add_custom_command(TARGET ${EXE_NAME} POST_BUILD
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
COMMAND ${CMAKE_COMMAND} -E echo "Running post-build script..."
COMMAND cmd.exe /c "${CMAKE_SOURCE_DIR}/copy_files.cmd" $<CONFIG>
COMMENT "Running custom post-build script."
)

View File

@ -10,9 +10,14 @@ This project uses CMake to configure and build. Currently only Win32 is supporte
cmake -S . -B build cmake -S . -B build
``` ```
## Build ## Build
To build in debug mode:
``` ```
cmake --build build --config Debug cmake --build build --config Debug
``` ```
To build in release mode:
```
cmake --build build --config Release
```
## Roadmap for Supporting Other platforms ## Roadmap for Supporting Other platforms

17
copy_files.cmd Normal file
View File

@ -0,0 +1,17 @@
@echo off
set CONFIG=%1
echo Build configuration is: %CONFIG%
if /i "%CONFIG%"=="Debug" (
echo Copying files to debug directory
copy /Y "extras\fonts\RobotoMono-Regular.ttf" "build\Debug\RobotoMono-Regular.ttf"
copy /Y "extras\icons\tmp.ico" "build\Debug\tmp.ico"
copy /Y "extras\icons\tmp_min.ico" "build\Debug\tmp_min.ico"
:: #TODO: Copy DLLs: Varjo
rem copy /Y "third_party\bin\some_dll.dll" "build/Debug\some_dll.dll"
) else if /i "%CONFIG%"=="Release" (
echo Copying files to release directory
copy /Y "extras\fonts\RobotoMono-Regular.ttf" "build\Release\RobotoMono-Regular.ttf"
copy /Y "extras\icons\tmp.ico" "build\Release\tmp.ico"
copy /Y "extras\icons\tmp_min.ico" "build\Release\tmp_min.ico"
)

View File

@ -26,12 +26,12 @@ Collapsed=0
[Window][WindowOverViewport_11111111] [Window][WindowOverViewport_11111111]
Pos=0,0 Pos=0,0
Size=4533,1681 Size=3391,1672
Collapsed=0 Collapsed=0
[Window][Font Settings] [Window][Font Settings]
Pos=0,1565 Pos=0,1556
Size=3372,116 Size=1371,116
Collapsed=0 Collapsed=0
DockId=0x00000001,0 DockId=0x00000001,0
@ -41,30 +41,30 @@ Size=691,540
Collapsed=0 Collapsed=0
[Window][Debug Panel] [Window][Debug Panel]
Pos=3374,0 Pos=1374,0
Size=1159,816 Size=2017,1269
Collapsed=0 Collapsed=0
DockId=0x00000005,0 DockId=0x00000005,0
[Window][Control Panel] [Window][Control Panel]
Pos=3374,818 Pos=1374,1272
Size=1159,863 Size=2017,400
Collapsed=0 Collapsed=0
DockId=0x00000006,0 DockId=0x00000006,0
[Window][Enumerated Data Workspace] [Window][Enumerated Data Workspace]
Pos=0,0 Pos=0,0
Size=3372,1563 Size=1371,1672
Collapsed=0 Collapsed=0
DockId=0x00000002,0 DockId=0x00000002,0
[Docking][Data] [Docking][Data]
DockSpace ID=0x08BD597D Window=0x1BBC0F80 Pos=294,254 Size=4533,1681 Split=X Selected=0x1FC7AC8C DockSpace ID=0x08BD597D Window=0x1BBC0F80 Pos=225,261 Size=3391,1672 Split=X Selected=0x1FC7AC8C
DockNode ID=0x00000003 Parent=0x08BD597D SizeRef=3372,1672 Split=Y DockNode ID=0x00000003 Parent=0x08BD597D SizeRef=1371,1672 Split=Y
DockNode ID=0x00000002 Parent=0x00000003 SizeRef=1582,1553 CentralNode=1 Selected=0x671FC263 DockNode ID=0x00000002 Parent=0x00000003 SizeRef=1582,1553 CentralNode=1 Selected=0x671FC263
DockNode ID=0x00000001 Parent=0x00000003 SizeRef=1582,116 Selected=0x355F9D19 DockNode ID=0x00000001 Parent=0x00000003 SizeRef=1582,116 Selected=0x355F9D19
DockNode ID=0x00000004 Parent=0x08BD597D SizeRef=1159,1672 Split=Y Selected=0xD2C573A7 DockNode ID=0x00000004 Parent=0x08BD597D SizeRef=2017,1672 Split=Y Selected=0xD2C573A7
DockNode ID=0x00000005 Parent=0x00000004 SizeRef=1351,536 Selected=0xD2C573A7 DockNode ID=0x00000005 Parent=0x00000004 SizeRef=1351,1269 Selected=0xD2C573A7
DockNode ID=0x00000006 Parent=0x00000004 SizeRef=1351,567 Selected=0xF930105C DockNode ID=0x00000006 Parent=0x00000004 SizeRef=1351,400 Selected=0xF930105C
DockSpace ID=0xC0DFADC4 Pos=0,51 Size=2560,1511 CentralNode=1 Selected=0x5E5F7166 DockSpace ID=0xC0DFADC4 Pos=0,51 Size=2560,1511 CentralNode=1 Selected=0x5E5F7166

View File

@ -82,7 +82,8 @@ struct Ex1_Workspace {
RadixSort dir_modtime_radix; RadixSort dir_modtime_radix;
bool sort_completed; bool sort_completed;
// Reordered strings: // Reordered strings: #note: these are NOT required to save in memory, better to search and
// sort the filtered strings using the solved radices
ArrayView<string> files_sorted_by_size; ArrayView<string> files_sorted_by_size;
ArrayView<string> files_sorted_by_modtime; ArrayView<string> files_sorted_by_modtime;
}; };