From 45245a1ffcc5e20087cf3dbc5ab52131dc2fe156 Mon Sep 17 00:00:00 2001 From: Jack Andersen Date: Tue, 26 Dec 2017 14:51:02 -1000 Subject: [PATCH] Add --dlpackage flag --- Editor/CMakeLists.txt | 2 ++ Editor/main.cpp | 37 ++++++++++++++++++++++++------------- hecl-gui | 2 +- specter | 2 +- 4 files changed, 28 insertions(+), 15 deletions(-) diff --git a/Editor/CMakeLists.txt b/Editor/CMakeLists.txt index 9c716fe20..9950848ac 100644 --- a/Editor/CMakeLists.txt +++ b/Editor/CMakeLists.txt @@ -69,6 +69,8 @@ elseif(UNIX) set(PLAT_SRCS mainicon_netwm.c) endif() +set_source_files_properties(main.cpp PROPERTIES COMPILE_DEFINITIONS URDE_DLPACKAGE="${URDE_DLPACKAGE}") + add_executable(urde WIN32 MACOSX_BUNDLE main.cpp ${PLAT_SRCS} Space.hpp Space.cpp atdna_Space.cpp diff --git a/Editor/main.cpp b/Editor/main.cpp index e350a0397..be111eb25 100644 --- a/Editor/main.cpp +++ b/Editor/main.cpp @@ -23,27 +23,32 @@ static logvisor::Module Log{"URDE"}; static hecl::SystemString CPUFeatureString(const zeus::CPUInfo& cpuInf) { hecl::SystemString features; - if (cpuInf.AESNI) - features += _S("AES-NI"); - if (cpuInf.SSE1) + auto AddFeature = [&features](const hecl::SystemChar* str) { if (!features.empty()) - features += _S(", SSE1"); - else - features += _S("SSE1"); - } + features += _S(", "); + features += str; + }; + if (cpuInf.AESNI) + AddFeature(_S("AES-NI")); + if (cpuInf.SSE1) + AddFeature(_S("SSE")); if (cpuInf.SSE2) - features += _S(", SSE2"); + AddFeature(_S("SSE2")); if (cpuInf.SSE3) - features += _S(", SSE3"); + AddFeature(_S("SSE3")); if (cpuInf.SSSE3) - features += _S(", SSSE3"); + AddFeature(_S("SSSE3")); if (cpuInf.SSE4a) - features += _S(", SSE4a"); + AddFeature(_S("SSE4a")); if (cpuInf.SSE41) - features += _S(", SSE4.1"); + AddFeature(_S("SSE4.1")); if (cpuInf.SSE42) - features += _S(", SSE4.2"); + AddFeature(_S("SSE4.2")); + if (cpuInf.AVX) + AddFeature(_S("AVX")); + if (cpuInf.AVX2) + AddFeature(_S("AVX2")); return features; } @@ -160,6 +165,12 @@ int wmain(int argc, const boo::SystemChar** argv) int main(int argc, const boo::SystemChar** argv) #endif { + if (argc > 1 && !strcmp(argv[1], "--dlpackage")) + { + printf("%s\n", URDE_DLPACKAGE); + return 100; + } + SetupBasics(IsClientLoggingEnabled(argc, argv)); if (hecl::SystemChar* cwd = hecl::Getcwd(CwdBuf, 1024)) diff --git a/hecl-gui b/hecl-gui index 5e802b98d..467a3996a 160000 --- a/hecl-gui +++ b/hecl-gui @@ -1 +1 @@ -Subproject commit 5e802b98dcdd2485355526be8fa1aa4f3cfa5ca7 +Subproject commit 467a3996abbb56672c413cddf1c07f8e20f9c9be diff --git a/specter b/specter index 1100f5578..f5049df11 160000 --- a/specter +++ b/specter @@ -1 +1 @@ -Subproject commit 1100f55788199d353e7310ed4427a655c7965255 +Subproject commit f5049df11e37fafadbccde5c946fa07377ed375a