Skip to content

Commit

Permalink
win32 details
Browse files Browse the repository at this point in the history
Signed-off-by: falkTX <falktx@falktx.com>
  • Loading branch information
falkTX committed Mar 14, 2024
1 parent 80b684a commit b0af934
Show file tree
Hide file tree
Showing 6 changed files with 192 additions and 38 deletions.
22 changes: 17 additions & 5 deletions src/plugin/ChildProcess.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,17 +60,29 @@ class ChildProcess
if (i != 0)
cmd += " ";

// TODO quoted
cmd += args[i];
if (std::strchr(args[i], ' ') != nullptr)
{
cmd += "\"";
cmd += args[i];
cmd += "\"";
}
else
{
cmd += args[i];
}
}

STARTUPINFOA si = {};
wchar_t wcmd[PATH_MAX];
if (MultiByteToWideChar(CP_UTF8, 0, cmd.data(), -1, wcmd, PATH_MAX) <= 0)
return false;

STARTUPINFOW si = {};
si.cb = sizeof(si);

d_stdout("will start process with args '%s'", cmd.data());

return CreateProcessA(nullptr, // lpApplicationName
&cmd[0], // lpCommandLine
return CreateProcessW(nullptr, // lpApplicationName
wcmd, // lpCommandLine
nullptr, // lpProcessAttributes
nullptr, // lpThreadAttributes
TRUE, // bInheritHandles
Expand Down
4 changes: 2 additions & 2 deletions src/plugin/DesktopPlugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ class DesktopPlugin : public Plugin,
bool run() override
{
#ifdef DISTRHO_OS_WINDOWS
#define APP_EXT ".ext"
#define APP_EXT ".exe"
#else
#define APP_EXT ""
#endif
Expand All @@ -121,7 +121,7 @@ class DesktopPlugin : public Plugin,
"-S",
"-n", servernameStr.buffer(),
"-C", jacksessionStr.buffer(),
"-d", "desktop",
"-d", "mod-desktop",
"-r", sampleRateStr.buffer(),
nullptr
};
Expand Down
7 changes: 6 additions & 1 deletion src/plugin/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ FILES_UI = DesktopUI.cpp NanoButton.cpp

ifeq ($(MACOS),true)
FILES_UI += WebView.mm
else ifeq ($(LINUX),true)
else ifeq ($(WINDOWS),true)
FILES_UI += WebViewWin32.cpp
else
FILES_UI += WebViewX11.cpp
endif

Expand All @@ -33,6 +35,9 @@ include ../DPF/Makefile.plugins.mk

BUILD_CXX_FLAGS += -DVERSION='"$(shell cat ../../VERSION)"'

BUILD_CXX_FLAGS += -pthread
LINK_FLAGS += -pthread

ifeq ($(MACOS),true)
LINK_FLAGS += -framework IOKit -framework WebKit
else ifeq ($(WINDOWS),true)
Expand Down
29 changes: 29 additions & 0 deletions src/plugin/WebViewWin32.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// SPDX-FileCopyrightText: 2023-2024 MOD Audio UG
// SPDX-License-Identifier: AGPL-3.0-or-later

#include "WebView.hpp"

START_NAMESPACE_DISTRHO

// -----------------------------------------------------------------------------------------------------------

void* addWebView(const uintptr_t parentWinId, const uint port)
{
return nullptr;
}

void destroyWebView(void* const webviewptr)
{
}

void reloadWebView(void* const webviewptr)
{
}

void resizeWebView(void* const webviewptr, const uint offset, const uint width, const uint height)
{
}

// -----------------------------------------------------------------------------------------------------------

END_NAMESPACE_DISTRHO
Loading

0 comments on commit b0af934

Please sign in to comment.