diff options
| author | Martin Ridgers <[email protected]> | 2024-09-18 15:31:39 +0200 |
|---|---|---|
| committer | Martin Ridgers <[email protected]> | 2024-09-24 10:57:34 +0200 |
| commit | 5c3ece141c337dd34c3c11a74b8760ac1d20969b (patch) | |
| tree | 59af35defa3eaed8ed454148cb5cb33f8bba679a /src/zenserver/frontend/frontend.cpp | |
| parent | Updated changelog (diff) | |
| download | zen-5c3ece141c337dd34c3c11a74b8760ac1d20969b.tar.xz zen-5c3ece141c337dd34c3c11a74b8760ac1d20969b.zip | |
Only use embedded frontend content in release builds
Diffstat (limited to 'src/zenserver/frontend/frontend.cpp')
| -rw-r--r-- | src/zenserver/frontend/frontend.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/zenserver/frontend/frontend.cpp b/src/zenserver/frontend/frontend.cpp index 9bc408711..96b680174 100644 --- a/src/zenserver/frontend/frontend.cpp +++ b/src/zenserver/frontend/frontend.cpp @@ -14,9 +14,11 @@ ZEN_THIRD_PARTY_INCLUDES_START #endif ZEN_THIRD_PARTY_INCLUDES_END +#if ZEN_BUILD_RELEASE static unsigned char gHtmlZipData[] = { #include <html.zip.h> }; +#endif namespace zen { //////////////////////////////////////////////////////////////////////////////// @@ -25,8 +27,10 @@ HttpFrontendService::HttpFrontendService(std::filesystem::path Directory) : m_Di std::filesystem::path SelfPath = GetRunningExecutablePath(); // Locate a .zip file appended onto the end of this binary +#if ZEN_BUILD_RELEASE IoBuffer HtmlZipDataBuffer(IoBuffer::Wrap, gHtmlZipData, sizeof(gHtmlZipData) - 1); m_ZipFs = ZipFs(std::move(HtmlZipDataBuffer)); +#endif if (m_Directory.empty() && !m_ZipFs) { |