Commit 3cf2bc02 authored by Rye Mutt's avatar Rye Mutt 🍞

Clean up helper app generation and copying

parent 5e852183
......@@ -113,6 +113,9 @@ pushd "$DULLAHAN_DIR"
# build projects
xcodebuild -project dullahan.xcodeproj -target dullahan -configuration 'Release'
xcodebuild -project dullahan.xcodeproj -target DullahanHelper -configuration 'Release'
xcodebuild -project dullahan.xcodeproj -target DullahanHelperGPU -configuration 'Release'
xcodebuild -project dullahan.xcodeproj -target DullahanHelperPlugin -configuration 'Release'
xcodebuild -project dullahan.xcodeproj -target DullahanHelperRenderer -configuration 'Release'
# copy files to staging ready to be packaged
mkdir -p "$stage/include/cef"
......@@ -120,12 +123,9 @@ pushd "$DULLAHAN_DIR"
mkdir -p "$stage/LICENSES"
cp "Release/libdullahan.a" "$stage/lib/release/"
cp -R "Release/DullahanHelper.app" "$stage/lib/release"
cp -R "Release/DullahanHelper.app" "$stage/lib/release/DullahanHelper (GPU).app"
mv "$stage/lib/release/DullahanHelper (GPU).app/Contents/MacOS/DullahanHelper" "$stage/lib/release/DullahanHelper (GPU).app/Contents/MacOS/DullahanHelper (GPU)"
cp -R "Release/DullahanHelper.app" "$stage/lib/release/DullahanHelper (Renderer).app"
mv "$stage/lib/release/DullahanHelper (Renderer).app/Contents/MacOS/DullahanHelper" "$stage/lib/release/DullahanHelper (Renderer).app/Contents/MacOS/DullahanHelper (Renderer)"
cp -R "Release/DullahanHelper.app" "$stage/lib/release/DullahanHelper (Plugin).app"
mv "$stage/lib/release/DullahanHelper (Plugin).app/Contents/MacOS/DullahanHelper" "$stage/lib/release/DullahanHelper (Plugin).app/Contents/MacOS/DullahanHelper (Plugin)"
cp -R "Release/DullahanHelper (GPU).app" "$stage/lib/release"
cp -R "Release/DullahanHelper (Renderer).app" "$stage/lib/release"
cp -R "Release/DullahanHelper (Plugin).app" "$stage/lib/release"
cp "$stage/packages/lib/release/libcef_dll_wrapper.a" "$stage/lib/release"
cp -R "$stage/packages/bin/release/Chromium Embedded Framework.framework" "$stage/lib/release"
......
......@@ -167,23 +167,41 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
${CEF_INCLUDE_DIR}/..
)
elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
add_executable(
DullahanHelper
MACOSX_BUNDLE
src/host/dullahan_host.cpp
)
# define which include directories to pull in
target_include_directories(
DullahanHelper
PUBLIC
${CEF_INCLUDE_DIR}
${CEF_INCLUDE_DIR}/..
)
# Info.plist.in template adds a new key called "LSUIElement" with value "true"
# to surpress the appearance of the DullahanHelper app icon in the dock
set_target_properties(DullahanHelper PROPERTIES
MACOSX_BUNDLE_BUNDLE_NAME "DullahanHelper"
MACOSX_BUNDLE_INFO_PLIST "${PROJECT_SOURCE_DIR}/src/host/Info.plist.in")
set(CEF_HELPER_APP_SUFFIXES
"::"
" (GPU):GPU:.gpu"
" (Plugin):Plugin:.plugin"
" (Renderer):Renderer:.renderer"
)
# Create the multiple Helper app bundle targets.
foreach(_suffix_list ${CEF_HELPER_APP_SUFFIXES})
# Convert to a list and extract the suffix values.
string(REPLACE ":" ";" _suffix_list ${_suffix_list})
list(GET _suffix_list 0 _name_suffix)
list(GET _suffix_list 1 _target_suffix)
list(GET _suffix_list 2 _plist_suffix)
# Define Helper target and output names.
set(_helper_target "DullahanHelper${_target_suffix}")
set(_helper_output_name "DullahanHelper${_name_suffix}")
# Create Helper executable target.
add_executable(${_helper_target} MACOSX_BUNDLE src/host/dullahan_host.cpp)
target_include_directories(
${_helper_target}
PUBLIC
${CEF_INCLUDE_DIR}
${CEF_INCLUDE_DIR}/..
)
target_link_libraries(${_helper_target} ${CEF_DLL_LIBRARY} ${CEF_FRAMEWORK})
set_target_properties(${_helper_target} PROPERTIES
MACOSX_BUNDLE_INFO_PLIST "${PROJECT_SOURCE_DIR}/src/host/Info.plist.in"
MACOSX_BUNDLE_BUNDLE_NAME ${_helper_output_name}
MACOSX_BUNDLE_GUI_IDENTIFIER "org.alchemyviewer.dullahan.helper${_plist_suffix}"
OUTPUT_NAME ${_helper_output_name}
)
endforeach()
endif()
# define which libs to link against
......
......@@ -3,33 +3,23 @@
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<string>en</string>
<key>CFBundleExecutable</key>
<string>${MACOSX_BUNDLE_EXECUTABLE_NAME}</string>
<key>CFBundleGetInfoString</key>
<string>${MACOSX_BUNDLE_INFO_STRING}</string>
<key>CFBundleIconFile</key>
<string>${MACOSX_BUNDLE_ICON_FILE}</string>
<key>CFBundleIdentifier</key>
<string>${MACOSX_BUNDLE_GUI_IDENTIFIER}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleLongVersionString</key>
<string>${MACOSX_BUNDLE_LONG_VERSION_STRING}</string>
<key>CFBundleName</key>
<string>${MACOSX_BUNDLE_BUNDLE_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>${MACOSX_BUNDLE_SHORT_VERSION_STRING}</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>${MACOSX_BUNDLE_BUNDLE_VERSION}</string>
<key>CSResourcesFileMapped</key>
<true/>
<key>NSHumanReadableCopyright</key>
<string>${MACOSX_BUNDLE_COPYRIGHT}</string>
<key>LSFileQuarantineEnabled</key>
<true/>
<key>LSUIElement</key>
<true/>
</dict>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment