fix windows build, remove console window

This commit is contained in:
Anthony Rabine 2023-12-25 13:16:58 +01:00
parent 3d146dc38c
commit 5d158e4ffd
3 changed files with 10 additions and 3 deletions

View file

@ -168,9 +168,16 @@ if(WIN32)
) )
endif() endif()
if(WIN32)
add_executable(${STORY_EDITOR_PROJECT} add_executable(${STORY_EDITOR_PROJECT}
WIN32
${SRCS} ${SRCS}
) )
else()
add_executable(${STORY_EDITOR_PROJECT}
${SRCS}
)
endif()
target_include_directories(${STORY_EDITOR_PROJECT} PUBLIC target_include_directories(${STORY_EDITOR_PROJECT} PUBLIC
${imgui_SOURCE_DIR} ${imgui_SOURCE_DIR}
@ -205,7 +212,7 @@ target_link_libraries(${STORY_EDITOR_PROJECT}
) )
elseif(WIN32) elseif(WIN32)
target_compile_features("-Wl,-subsystem,windows") #target_compile_features("-Wl,-subsystem,windows")
target_link_libraries(${STORY_EDITOR_PROJECT} target_link_libraries(${STORY_EDITOR_PROJECT}
OpenGL::GL OpenGL::GL

View file

@ -631,7 +631,7 @@ void MainWindow::NewProjectPopup()
if (valid) if (valid)
{ {
auto p = std::filesystem::path(projdir) / std::filesystem::path("project.json"); auto p = std::filesystem::path(projdir) / std::filesystem::path("project.json");
m_project.Initialize(p.generic_string()); m_story.Initialize(p.generic_string());
if (display_item_current_idx == 0) if (display_item_current_idx == 0)
{ {

View file

@ -44,7 +44,7 @@ void ResourcesWindow::ChooseFile()
std::filesystem::path p(filePathName); std::filesystem::path p(filePathName);
std::filesystem::path p2 = m_project.BuildFullAssetsPath( p.filename().generic_string()); std::filesystem::path p2 = m_story.BuildFullAssetsPath( p.filename().generic_string());
std::filesystem::copy(p, p2, std::filesystem::copy_options::overwrite_existing); std::filesystem::copy(p, p2, std::filesystem::copy_options::overwrite_existing);
auto res = std::make_shared<Resource>(); auto res = std::make_shared<Resource>();