1
0

Build fixes

This commit is contained in:
Scott E. Graves
2017-03-18 02:17:14 -05:00
parent 95ce440bcb
commit 3a20472493
2 changed files with 7 additions and 9 deletions

View File

@@ -81,9 +81,9 @@ target_link_libraries(siadrive PRIVATE siadrive.api siadrive.dokan.api)
if (MSVC)
target_include_directories(siadrive PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/3rd_party/CEF/chromium_git/cef)
target_link_libraries(siadrive PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/3rd_party/CEF/chromium_git/chromium/src/out/${CMAKE_BUILD_TYPE}_GN_x64/libcef.dll.lib
${CMAKE_CURRENT_SOURCE_DIR}/3rd_party/CEF/chromium_git/chromium/src/out/${CMAKE_BUILD_TYPE}_GN_x64/obj/cef/libcef_dll_wrapper.lib
${CMAKE_CURRENT_SOURCE_DIR}/3rd_party/CEF/chromium_git/chromium/src/out/${CMAKE_BUILD_TYPE}_GN_x64/obj/cef/cef_sandbox.lib)
${CMAKE_CURRENT_SOURCE_DIR}/3rd_party/CEF/chromium_git/chromium/src/out/${CMAKE_BUILD_TYPE}_GN_x64/libcef.dll.lib
${CMAKE_CURRENT_SOURCE_DIR}/3rd_party/CEF/chromium_git/chromium/src/out/${CMAKE_BUILD_TYPE}_GN_x64/chrome_elf.dll.lib)
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
set_target_properties(siadrive PROPERTIES COMPILE_FLAGS "/MTd")

View File

@@ -5,6 +5,7 @@
#include <siacommon.h>
#include <siadriveapp.h>
#include <include/cef_app.h>
#include <include/cef_sandbox_win.h>
// Entry point function for all processes.
int APIENTRY wWinMain(HINSTANCE hInstance,
@@ -17,10 +18,6 @@ int APIENTRY wWinMain(HINSTANCE hInstance,
// Enable High-DPI support on Windows 7 or newer.
CefEnableHighDPISupport();
// Manage the life span of the sandbox information object. This is necessary
// for sandbox support on Windows. See cef_sandbox_win.h for complete details.
CefScopedSandboxInfo scopedSandbox;
void* sandboxInfo = scopedSandbox.sandboxInfo();
// Provide CEF with command-line arguments.
CefMainArgs mainArgs(hInstance);
@@ -28,19 +25,20 @@ int APIENTRY wWinMain(HINSTANCE hInstance,
// CEF applications have multiple sub-processes (render, plugin, GPU, etc)
// that share the same executable. This function checks the command-line and,
// if this is a sub-process, executes the appropriate logic.
int ret = CefExecuteProcess(mainArgs, NULL, sandboxInfo);
int ret = CefExecuteProcess(mainArgs, nullptr, nullptr);
if (ret < 0)
{
// Specify CEF global settings here.
CefSettings settings;
settings.no_sandbox = true;
// SimpleApp implements application-level callbacks for the browser process.
// It will create the first browser instance in OnContextInitialized() after
// CEF has initialized.
CefRefPtr<CSiaDriveApp> app(new CSiaDriveApp);
// CefRefPtr<CSiaDriveApp> app(new CSiaDriveApp);
// Initialize CEF.
CefInitialize(mainArgs, settings, app.get(), sandboxInfo);
//CefInitialize(mainArgs, settings, app.get(), sandboxInfo);
// Run the CEF message loop. This will block until CefQuitMessageLoop() is
// called.