diff --git a/CMakeLists.txt b/CMakeLists.txt index f544729..f97e36a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,18 +1,29 @@ cmake_minimum_required(VERSION 3.20) project(aya-cef-subprocess) +if(WIN32) + set(CEF_PLATFORM "windows64") +elseif(UNIX) + set(CEF_PLATFORM "linux64") +endif() + set(CMAKE_CXX_STANDARD 20) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin") -# JACKDS DOING BELOW: <== You smell like poop set(CEF_USE_SANDBOX TRUE CACHE BOOL "Force turning off of sandbox") set(CEF_VERSION 123.0.13+gfc703fb+chromium-123.0.6312.124) -set(cefName cef_binary_${CEF_VERSION}_windows64) +set(cefName cef_binary_${CEF_VERSION}_${CEF_PLATFORM}) include(cef_cmake.cmake) add_subdirectory(cef_cmake) link_directories(${CMAKE_SOURCE_DIR}/cef_cmake/${cefName}/Release/) link_directories(${CMAKE_SOURCE_DIR}/build/cef_cmake/) -add_executable(aya-cef-subprocess WIN32 main.cpp) -target_link_libraries(aya-cef-subprocess libcef cefdll_wrapper) \ No newline at end of file +if (WIN32) + add_executable(aya-cef-subprocess WIN32 main.cpp resources/win32.rc) +else() + add_executable(aya-cef-subprocess main.cpp) +endif() + +target_link_libraries(aya-cef-subprocess libcef cefdll_wrapper) +set_target_properties(aya-cef-subprocess PROPERTIES OUTPUT_NAME "Aya.WebHelper") \ No newline at end of file diff --git a/README.md b/README.md index 2515bdd..a54e834 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,8 @@ -# aya-cef-subprocess +# Aya.WebHelper + Used internally for [CEF](https://cef-builds.spotifycdn.com/docs/124.2/index.html) subprocesses within the Aya client, loosely based off of [BlocklandCEFSubProcess](https://github.com/ShockFromBL/BlocklandCEF/tree/master/BlocklandCEFSubProcess). -## dependencies +## Dependencies + - [cef-cmake](https://github.com/iboB/cef-cmake) - [cef 123.0.13+gfc703fb+chromium-123.0.6312.124](https://cef-builds.spotifycdn.com/index.html) -- [cmake](https://cmake.org/) diff --git a/resources/aya-chromium-branded.ico b/resources/aya-chromium-branded.ico new file mode 100644 index 0000000..577b5f3 Binary files /dev/null and b/resources/aya-chromium-branded.ico differ diff --git a/resources/information.h b/resources/information.h new file mode 100644 index 0000000..47b9dc1 --- /dev/null +++ b/resources/information.h @@ -0,0 +1,22 @@ +#pragma once + +#define VERSION_MAJOR_MINOR_STR "1.0" +#define VERSION_MAJOR_MINOR_PATCH_STR "1.0.0" +#define VERSION_FULL_STR "1.0.0.0" +#define VERSION_RESOURCE 1, 0, 0, 0 +#define VERSION_RESOURCE_STR VERSION_FULL_STR "\0" + +/* + * These properties are part of VarFileInfo. + * For more information, please see: + * https://learn.microsoft.com/en-us/windows/win32/menurc/varfileinfo-block + */ +#define PRODUCT_LANGUAGE 0x0409 // en-US +#define PRODUCT_CHARSET 1200 // Unicode + +#define APP_ICON "aya-chromium-branded.ico" + +#define APP_NAME "Aya.WebHelper\0" +#define APP_DESCRIPTION "Aya Web Helper\0" +#define APP_ORGANIZATION "Aya Project\0" +#define APP_COPYRIGHT "This program is licensed under the MIT License.\0" \ No newline at end of file diff --git a/resources/win32.rc b/resources/win32.rc new file mode 100644 index 0000000..38da382 --- /dev/null +++ b/resources/win32.rc @@ -0,0 +1,49 @@ +#include "information.h" + +#if defined(__MINGW64__) || defined(__MINGW32__) + // MinGW-w64, MinGW + #if defined(__has_include) && __has_include() + #include + #else + #include + #include + #endif +#else + // MSVC, Windows SDK + #include +#endif + +IDI_ICON1 ICON APP_ICON + +LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT + +VS_VERSION_INFO VERSIONINFO + FILEVERSION VERSION_RESOURCE + PRODUCTVERSION VERSION_RESOURCE + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x1L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", APP_ORGANIZATION + VALUE "FileDescription", APP_DESCRIPTION + VALUE "FileVersion", VERSION_RESOURCE_STR + VALUE "LegalCopyright", APP_COPYRIGHT + VALUE "ProductName", APP_NAME + VALUE "ProductVersion", VERSION_RESOURCE_STR + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", PRODUCT_LANGUAGE, PRODUCT_CHARSET + END +END \ No newline at end of file