2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2025-10-10 08:46:40 +00:00

chore: only set debug webview mode on debug compile

This commit is contained in:
Jan Laupetin
2025-10-07 01:27:40 +02:00
parent 33b50207cf
commit 71791abb59
5 changed files with 29 additions and 18 deletions

View File

@@ -1,12 +1,12 @@
#include "AssetHandlerEdge.h"
#if defined(WEBVIEW_PLATFORM_WINDOWS) && defined(WEBVIEW_EDGE)
#pragma warning(push, 0)
#include <webview/macros.h>
#include <webview/webview.h>
#pragma warning(pop)
#if defined(WEBVIEW_PLATFORM_WINDOWS) && defined(WEBVIEW_EDGE)
#include "Web/UiAssets.h"
#include <Windows.h>

View File

@@ -1,8 +1,6 @@
#pragma once
#pragma warning(push, 0)
#include <webview/macros.h>
#pragma warning(pop)
#if defined(WEBVIEW_PLATFORM_WINDOWS) && defined(WEBVIEW_EDGE)

View File

@@ -1,21 +1,18 @@
#include "AssetHandlerGtk.h"
#pragma warning(push, 0)
#if defined(WEBVIEW_PLATFORM_LINUX) && defined(WEBVIEW_GTK)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#include <webview/macros.h>
#include <webview/webview.h>
#pragma warning(pop)
#if defined(WEBVIEW_PLATFORM_LINUX) && defined(WEBVIEW_GTK)
#pragma GCC diagnostic pop
#include "Web/UiAssets.h"
#include <format>
#include <iostream>
#define G_SPAWN_ERROR g_spawn_error_quark()
G_DEFINE_QUARK(g - spawn - error - quark, g_spawn_error)
namespace
{
std::unordered_map<std::string, UiFile> assetLookup;

View File

@@ -1,14 +1,13 @@
#pragma once
#pragma warning(push, 0)
#include <webview/macros.h>
#pragma warning(pop)
#if defined(WEBVIEW_PLATFORM_LINUX) && defined(WEBVIEW_GTK)
#pragma warning(push, 0)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#include <webview/webview.h>
#pragma warning(pop)
#pragma GCC diagnostic pop
namespace gtk
{

View File

@@ -1,6 +1,17 @@
#pragma warning(push, 0)
#ifdef _MSC_VER
#pragma warning(push, 0)
#else
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif
#include "webview/webview.h"
#ifdef _MSC_VER
#pragma warning(pop)
#else
#pragma GCC diagnostic pop
#endif
#include "Web/Edge/AssetHandlerEdge.h"
#include "Web/Gtk/AssetHandlerGtk.h"
@@ -41,7 +52,13 @@ namespace
{
try
{
webview::webview w(true, nullptr);
webview::webview w(
#ifdef _DEBUG
true,
#else
false,
#endif
nullptr);
w.set_title("OpenAssetTools ModMan");
w.set_size(1280, 640, WEBVIEW_HINT_NONE);
w.set_size(480, 320, WEBVIEW_HINT_MIN);