CEF changes
This commit is contained in:
7
3rd_party/CEF/create_debug.cmd
vendored
7
3rd_party/CEF/create_debug.cmd
vendored
@@ -2,8 +2,8 @@
|
||||
set ROOT=%~dp0%
|
||||
pushd %ROOT%
|
||||
|
||||
set PATH=%ROOT%\depot_tools;%PATH%
|
||||
REM call create_common.cmd
|
||||
set PATH=%ROOT%depot_tools;%PATH%
|
||||
call create_common.cmd
|
||||
|
||||
set CEF_USE_GN=1
|
||||
set GN_DEFINES=is_win_fastlink=true fatal_linker_warnings=false
|
||||
@@ -29,5 +29,4 @@ goto :END
|
||||
exit 1
|
||||
|
||||
:END
|
||||
popd
|
||||
exit 0
|
||||
popd
|
@@ -6,7 +6,7 @@ cmake_minimum_required(VERSION 3.3)
|
||||
#Common Configuration Pre-setup
|
||||
set(EXTERNAL_BUILD_ROOT ${CMAKE_BINARY_DIR}/external)
|
||||
set(EXTERNAL_BUILD_TYPE ${CMAKE_BUILD_TYPE})
|
||||
set(3RD_PARTY_INCLUDES ${CMAKE_CURRENT_SOURCE_DIR}/3rd_party/ttmath-0.9.3)
|
||||
set(3RD_PARTY_INCLUDES ${CMAKE_CURRENT_SOURCE_DIR}/3rd_party/ttmath-0.9.3 ${EXTERNAL_BUILD_ROOT}/include)
|
||||
set(COMMON_INCLUDES ${CMAKE_CURRENT_SOURCE_DIR}/include/siadrive_api)
|
||||
add_definitions(-DTTMATH_NOASM)
|
||||
|
||||
@@ -20,12 +20,8 @@ file(GLOB_RECURSE SIADRIVE_API_SOURCES
|
||||
add_library(siadrive.api SHARED ${SIADRIVE_API_SOURCES})
|
||||
set_target_properties(siadrive.api
|
||||
PROPERTIES COMPILE_FLAGS -DSIADRIVE_EXPORT_SYMBOLS
|
||||
)
|
||||
if (MSVC OR MINGW)
|
||||
set(3RD_PARTY_INCLUDES ${3RD_PARTY_INCLUDES} ${EXTERNAL_BUILD_ROOT}/include)
|
||||
target_link_libraries(siadrive.api Shlwapi.lib Ws2_32.lib crypt32.lib winmm.lib comctl32.lib)
|
||||
endif()
|
||||
|
||||
)
|
||||
|
||||
if (MSVC)
|
||||
ExternalProject_Add(curl_project
|
||||
URL https://github.com/curl/curl/archive/curl-7_53_1.tar.gz
|
||||
@@ -45,7 +41,7 @@ if (MSVC)
|
||||
${EXTERNAL_BUILD_ROOT}/builds/sqlitecpp/src/sqlitecpp_project/sqlite3
|
||||
${EXTERNAL_BUILD_ROOT}/builds/sqlitecpp/src/sqlitecpp_project/include/)
|
||||
|
||||
target_link_libraries(siadrive.api
|
||||
target_link_libraries(siadrive.api Shlwapi.lib Ws2_32.lib crypt32.lib winmm.lib comctl32.lib
|
||||
${EXTERNAL_BUILD_ROOT}/lib/libcurl.lib
|
||||
${EXTERNAL_BUILD_ROOT}/builds/sqlitecpp/src/sqlitecpp_project-build/sqlite3/${CMAKE_BUILD_TYPE}/sqlite3.lib
|
||||
${EXTERNAL_BUILD_ROOT}/builds/sqlitecpp/src/sqlitecpp_project-build/${CMAKE_BUILD_TYPE}/SQLiteCpp.lib)
|
||||
@@ -53,7 +49,7 @@ endif()
|
||||
|
||||
|
||||
#Sia Dokan
|
||||
if (MSVC OR MINGW)
|
||||
if (MSVC)
|
||||
file(GLOB_RECURSE SIADRIVE_DOKAN_API_SOURCES
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/siadrive_dokan_api/*.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/siadrive_dokan_api/*.cxx
|
||||
@@ -62,7 +58,7 @@ if (MSVC OR MINGW)
|
||||
add_library(siadrive.dokan.api SHARED ${SIADRIVE_DOKAN_API_SOURCES})
|
||||
add_dependencies(siadrive.dokan.api siadrive.api)
|
||||
set_target_properties(siadrive.dokan.api
|
||||
PROPERTIES COMPILE_FLAGS -DSIADRIVE_EXPORT_SYMBOLS
|
||||
PROPERTIES COMPILE_FLAGS -DSIADRIVE_DOKAN_EXPORT_SYMBOLS
|
||||
)
|
||||
target_include_directories(siadrive.dokan.api PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/3rd_party/Dokan\ Library-1.0.2/include/dokan
|
||||
@@ -82,7 +78,7 @@ add_dependencies(siadrive siadrive.api siadrive.dokan.api)
|
||||
target_include_directories(siadrive PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include/siadrive)
|
||||
target_link_libraries(siadrive PRIVATE siadrive.api siadrive.dokan.api)
|
||||
|
||||
if (MSVC OR MINGW)
|
||||
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
|
||||
@@ -94,9 +90,7 @@ if (MSVC OR MINGW)
|
||||
else()
|
||||
set_target_properties(siadrive PROPERTIES COMPILE_FLAGS "/MT")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (MSVC)
|
||||
|
||||
set(CEF_LIBS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/3rd_party/CEF/chromium_git/chromium/src/out/${CMAKE_BUILD_TYPE}_GN_x64/libcef.dll
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/3rd_party/CEF/chromium_git/chromium/src/out/${CMAKE_BUILD_TYPE}_GN_x64/chrome_elf.dll
|
||||
@@ -115,9 +109,9 @@ endif()
|
||||
|
||||
|
||||
# Windows installation
|
||||
if (MSVC OR MINGW)
|
||||
if (MSVC)
|
||||
install(FILES ${CEF_LIBS} DESTINATION ${SIADRIVE_INSTALL_FOLDER})
|
||||
install(TARGETS siadrive.api siadrive.dokan.api LIBRARY DESTINATION ${SIADRIVE_INSTALL_FOLDER})
|
||||
install(TARGETS siadrive.api siadrive.dokan.api DESTINATION ${SIADRIVE_INSTALL_FOLDER})
|
||||
install(TARGETS siadrive DESTINATION ${SIADRIVE_INSTALL_FOLDER})
|
||||
endif()
|
||||
|
||||
|
@@ -1,7 +1,9 @@
|
||||
@echo off
|
||||
pushd "%~dp0%"
|
||||
|
||||
set CUR_PATH=%PATH%
|
||||
call 3rd_party\CEF\create_debug.cmd
|
||||
set PATH=%CUR_PATH%
|
||||
|
||||
mkdir build
|
||||
mkdir build\debug
|
||||
|
@@ -1,7 +1,9 @@
|
||||
@echo off
|
||||
pushd "%~dp0%"
|
||||
|
||||
set CUR_PATH=%PATH%
|
||||
call 3rd_party\CEF\create_release.cmd
|
||||
set PATH=%CUR_PATH%
|
||||
|
||||
mkdir build
|
||||
mkdir build\release
|
||||
|
@@ -1,6 +1,17 @@
|
||||
#ifndef _SIADOKANDRIVE_H
|
||||
#define _SIADOKANDRIVE_H
|
||||
|
||||
#ifdef _WIN32
|
||||
// Import or export functions and/or classes
|
||||
#ifdef SIADRIVE_DOKAN_EXPORT_SYMBOLS
|
||||
#define SIADRIVE_DOKAN_EXPORTABLE __declspec(dllexport)
|
||||
#else
|
||||
#define SIADRIVE_DOKAN_EXPORTABLE __declspec(dllimport)
|
||||
#endif //SIADRIVE_DOKAN_EXPORT_SYMBOLS
|
||||
#else
|
||||
#define SIADRIVE_DOKAN_EXPORTABLE
|
||||
#endif
|
||||
|
||||
#include <siaapi.h>
|
||||
#include <mutex>
|
||||
|
||||
@@ -8,7 +19,7 @@ NS_BEGIN(Sia)
|
||||
NS_BEGIN(Api)
|
||||
NS_BEGIN(Dokan)
|
||||
|
||||
class SiaDokanDriveException :
|
||||
class SIADRIVE_DOKAN_EXPORTABLE SiaDokanDriveException :
|
||||
std::exception
|
||||
{
|
||||
public:
|
||||
@@ -19,7 +30,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
class SIADRIVE_EXPORTABLE CSiaDokanDrive
|
||||
class SIADRIVE_DOKAN_EXPORTABLE CSiaDokanDrive
|
||||
{
|
||||
public:
|
||||
// throws SiaDokenDriveException
|
||||
|
@@ -19,7 +19,7 @@ static SString StdConstructPath(const SString& part1, const SString& part2)
|
||||
// Files requested to be openned that are not cached will be downloaded first. If the file is not found in Sia, it will be treated as new.
|
||||
// Keeping cache and Sia in synch will be a bit of a hastle, so it's strongly suggested to treat the cache folder as if it doesn't exist;
|
||||
// however, simply deleting files in the cache folder should not be an issue as long as the drive is not mounted.
|
||||
class SIADRIVE_EXPORTABLE DokanImpl
|
||||
class SIADRIVE_DOKAN_EXPORTABLE DokanImpl
|
||||
{
|
||||
private:
|
||||
typedef struct
|
||||
|
Reference in New Issue
Block a user