mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-05-09 04:32:13 -05:00
Adapt to new plugin folder structure / location for Windows
This commit is contained in:
parent
4f3d9e3a00
commit
3adbaec5cc
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
if(BUILD_OUT_OF_TREE)
|
||||
if(OS_WINDOWS)
|
||||
set(OBS_PLUGIN_DESTINATION "obs-plugins/64bit")
|
||||
set(OBS_PLUGIN_DESTINATION "${CMAKE_PROJECT_NAME}/bin/64bit")
|
||||
else()
|
||||
set(OBS_PLUGIN_DESTINATION "${CMAKE_INSTALL_LIBDIR}/obs-plugins")
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -6,3 +6,9 @@ include_guard(GLOBAL)
|
|||
set(CMAKE_FIND_PACKAGE_TARGETS_GLOBAL TRUE)
|
||||
|
||||
include(buildspec)
|
||||
|
||||
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
|
||||
set(CMAKE_INSTALL_PREFIX
|
||||
"$ENV{ALLUSERSPROFILE}/obs-studio/plugins"
|
||||
CACHE STRING "Default plugin installation directory" FORCE)
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -30,13 +30,13 @@ function(set_target_properties_plugin target)
|
|||
|
||||
install(
|
||||
TARGETS ${target}
|
||||
RUNTIME DESTINATION bin/64bit
|
||||
LIBRARY DESTINATION obs-plugins/64bit)
|
||||
RUNTIME DESTINATION "${target}/bin/64bit"
|
||||
LIBRARY DESTINATION "${target}/bin/64bit")
|
||||
|
||||
install(
|
||||
FILES "$<TARGET_PDB_FILE:${target}>"
|
||||
CONFIGURATIONS RelWithDebInfo Debug Release
|
||||
DESTINATION obs-plugins/64bit
|
||||
DESTINATION "${target}/bin/64bit"
|
||||
OPTIONAL)
|
||||
|
||||
if(OBS_BUILD_DIR)
|
||||
|
|
@ -44,11 +44,11 @@ function(set_target_properties_plugin target)
|
|||
TARGET ${target}
|
||||
POST_BUILD
|
||||
COMMAND "${CMAKE_COMMAND}" -E make_directory
|
||||
"${OBS_BUILD_DIR}/obs-plugins/64bit"
|
||||
"${OBS_BUILD_DIR}/plugins/${target}/bin/64bit"
|
||||
COMMAND
|
||||
"${CMAKE_COMMAND}" -E copy_if_different "$<TARGET_FILE:${target}>"
|
||||
"$<$<CONFIG:Debug,RelWithDebInfo,Release>:$<TARGET_PDB_FILE:${target}>>"
|
||||
"${OBS_BUILD_DIR}/obs-plugins/64bit"
|
||||
"${OBS_BUILD_DIR}/plugins/${target}/bin/64bit"
|
||||
COMMENT "Copy ${target} to obs-studio directory ${OBS_BUILD_DIR}"
|
||||
VERBATIM)
|
||||
endif()
|
||||
|
|
@ -105,7 +105,7 @@ function(target_install_resources target)
|
|||
|
||||
install(
|
||||
DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/data/"
|
||||
DESTINATION data/obs-plugins/${target}
|
||||
DESTINATION "${target}/data"
|
||||
USE_SOURCE_PERMISSIONS)
|
||||
|
||||
if(OBS_BUILD_DIR)
|
||||
|
|
@ -113,11 +113,11 @@ function(target_install_resources target)
|
|||
TARGET ${target}
|
||||
POST_BUILD
|
||||
COMMAND "${CMAKE_COMMAND}" -E make_directory
|
||||
"${OBS_BUILD_DIR}/data/obs-plugins/${target}"
|
||||
"${OBS_BUILD_DIR}/plugins/${target}/data"
|
||||
COMMAND
|
||||
"${CMAKE_COMMAND}" -E copy_directory
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/data"
|
||||
"${OBS_BUILD_DIR}/data/obs-plugins/${target}"
|
||||
"${OBS_BUILD_DIR}/plugins/${target}/data"
|
||||
COMMENT "Copy ${target} resources to data directory"
|
||||
VERBATIM)
|
||||
endif()
|
||||
|
|
@ -133,7 +133,7 @@ function(target_add_resource target resource)
|
|||
|
||||
install(
|
||||
FILES "${resource}"
|
||||
DESTINATION data/obs-plugins/${target}
|
||||
DESTINATION "${target}/data"
|
||||
COMPONENT Runtime)
|
||||
|
||||
if(OBS_BUILD_DIR)
|
||||
|
|
@ -141,9 +141,9 @@ function(target_add_resource target resource)
|
|||
TARGET ${target}
|
||||
POST_BUILD
|
||||
COMMAND "${CMAKE_COMMAND}" -E make_directory
|
||||
"${OBS_BUILD_DIR}/data/obs-plugins/${target}"
|
||||
"${OBS_BUILD_DIR}/plugins/${target}/data"
|
||||
COMMAND "${CMAKE_COMMAND}" -E copy "${resource}"
|
||||
"${OBS_BUILD_DIR}/data/obs-plugins/${target}"
|
||||
"${OBS_BUILD_DIR}/plugins/${target}/data"
|
||||
COMMENT "Copy ${target} resource ${resource} to library directory"
|
||||
VERBATIM)
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ Compression=lzma
|
|||
SolidCompression=yes
|
||||
DirExistsWarning=no
|
||||
SetupIconFile=installer.ico
|
||||
UninstallDisplayIcon={app}\data\obs-plugins\advanced-scene-switcher\res\images\logo.ico
|
||||
UninstallDisplayIcon={app}\advanced-scene-switcher\data\res\images\logo.ico
|
||||
DisableDirPage=no
|
||||
|
||||
[Languages]
|
||||
|
|
@ -54,14 +54,7 @@ end;
|
|||
// credit where it's due :
|
||||
// following function come from https://github.com/Xaymar/obs-studio_amf-encoder-plugin/blob/master/%23Resources/Installer.in.iss#L45
|
||||
function GetDirName(Value: string): string;
|
||||
var
|
||||
InstallPath: string;
|
||||
begin
|
||||
// initialize default path, which will be returned when the following registry
|
||||
// key queries fail due to missing keys or for some different reason
|
||||
Result := '{autopf}\obs-studio';
|
||||
// query the first registry value; if this succeeds, return the obtained value
|
||||
if RegQueryStringValue(HKLM32, 'SOFTWARE\OBS Studio', '', InstallPath) then
|
||||
Result := InstallPath
|
||||
Result := ExpandConstant('{commonappdata}\obs-studio\plugins');
|
||||
end;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user