Merge branch 'mac_mac_great_again_lua_edition' into 'master'

modified builtin_scripts to be macOS aware; simplified things as the SHADER...

Closes #6459

See merge request OpenMW/openmw!1463
pull/3225/head
psi29a 3 years ago
commit ad492c5735

@ -445,9 +445,8 @@ if (APPLE)
"${APP_BUNDLE_DIR}/Contents/Resources/OpenMW.icns" COPYONLY)
endif (APPLE)
if (NOT APPLE)
set(OPENMW_MYGUI_FILES_ROOT ${OpenMW_BINARY_DIR})
set(OPENMW_SHADERS_ROOT ${OpenMW_BINARY_DIR})
if (NOT APPLE) # this is modified for macOS use later in "apps/open[mw|cs]/CMakeLists.txt"
set(OPENMW_RESOURCES_ROOT ${OpenMW_BINARY_DIR})
endif ()
add_subdirectory(files/)

@ -183,8 +183,7 @@ if(APPLE)
set(OPENCS_BUNDLE_NAME "OpenMW-CS")
set(OPENCS_BUNDLE_RESOURCES_DIR "${OpenMW_BINARY_DIR}/${OPENCS_BUNDLE_NAME}.app/Contents/Resources")
set(OPENMW_MYGUI_FILES_ROOT ${OPENCS_BUNDLE_RESOURCES_DIR})
set(OPENMW_SHADERS_ROOT ${OPENCS_BUNDLE_RESOURCES_DIR})
set(OPENMW_RESOURCES_ROOT ${OPENCS_BUNDLE_RESOURCES_DIR})
add_subdirectory(../../files/ ${CMAKE_CURRENT_BINARY_DIR}/files)

@ -179,8 +179,7 @@ endif()
if(APPLE)
set(BUNDLE_RESOURCES_DIR "${APP_BUNDLE_DIR}/Contents/Resources")
set(OPENMW_MYGUI_FILES_ROOT ${BUNDLE_RESOURCES_DIR})
set(OPENMW_SHADERS_ROOT ${BUNDLE_RESOURCES_DIR})
set(OPENMW_RESOURCES_ROOT ${BUNDLE_RESOURCES_DIR})
add_subdirectory(../../files/ ${CMAKE_CURRENT_BINARY_DIR}/files)

@ -1,8 +1,20 @@
file(GLOB_RECURSE BUILTIN_SCRIPTS LIST_DIRECTORIES false RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} CONFIGURE_DEPENDS "*")
foreach (f ${BUILTIN_SCRIPTS})
if (NOT ("CMakeLists.txt" STREQUAL "${f}"))
copy_resource_file("${CMAKE_CURRENT_SOURCE_DIR}/${f}" "${OpenMW_BINARY_DIR}" "resources/vfs/${f}")
if (NOT DEFINED OPENMW_RESOURCES_ROOT)
return()
endif()
endforeach (f)
# Copy resource files into the build directory
set(SDIR ${CMAKE_CURRENT_SOURCE_DIR})
set(DDIRRELATIVE resources/vfs)
copy_all_resource_files(${CMAKE_CURRENT_SOURCE_DIR} ${OPENMW_RESOURCES_ROOT} ${DDIRRELATIVE} "builtin.omwscripts")
set(DDIRRELATIVE resources/vfs/openmw_aux)
copy_all_resource_files(${CMAKE_CURRENT_SOURCE_DIR} ${OPENMW_RESOURCES_ROOT} ${DDIRRELATIVE} "openmw_aux/util.lua")
set(LUA_SCRIPTS_FILES
scripts/omw/camera.lua
scripts/omw/head_bobbing.lua
scripts/omw/third_person.lua
)
set(DDIRRELATIVE resources/vfs/scripts/omw)
copy_all_resource_files(${CMAKE_CURRENT_SOURCE_DIR} ${OPENMW_RESOURCES_ROOT} ${DDIRRELATIVE} "${LUA_SCRIPTS_FILES}")

@ -1,4 +1,4 @@
if (NOT DEFINED OPENMW_MYGUI_FILES_ROOT)
if (NOT DEFINED OPENMW_RESOURCES_ROOT)
return()
endif()
@ -97,4 +97,4 @@ set(MYGUI_FILES
)
copy_all_resource_files(${CMAKE_CURRENT_SOURCE_DIR} ${OPENMW_MYGUI_FILES_ROOT} ${DDIRRELATIVE} "${MYGUI_FILES}")
copy_all_resource_files(${CMAKE_CURRENT_SOURCE_DIR} ${OPENMW_RESOURCES_ROOT} ${DDIRRELATIVE} "${MYGUI_FILES}")

@ -1,4 +1,4 @@
if (NOT DEFINED OPENMW_SHADERS_ROOT)
if (NOT DEFINED OPENMW_RESOURCES_ROOT)
return()
endif()
@ -42,4 +42,4 @@ set(SHADER_FILES
softparticles.glsl
)
copy_all_resource_files(${CMAKE_CURRENT_SOURCE_DIR} ${OPENMW_SHADERS_ROOT} ${DDIRRELATIVE} "${SHADER_FILES}")
copy_all_resource_files(${CMAKE_CURRENT_SOURCE_DIR} ${OPENMW_RESOURCES_ROOT} ${DDIRRELATIVE} "${SHADER_FILES}")

@ -1,4 +1,4 @@
if (NOT DEFINED OPENMW_MYGUI_FILES_ROOT)
if (NOT DEFINED OPENMW_RESOURCES_ROOT)
return()
endif()
@ -15,4 +15,4 @@ set(TEXTURE_FILES
textures/omw_menu_scroll_center_v.dds
)
copy_all_resource_files(${CMAKE_CURRENT_SOURCE_DIR} ${OPENMW_MYGUI_FILES_ROOT} ${DDIRRELATIVE} "${TEXTURE_FILES}")
copy_all_resource_files(${CMAKE_CURRENT_SOURCE_DIR} ${OPENMW_RESOURCES_ROOT} ${DDIRRELATIVE} "${TEXTURE_FILES}")

Loading…
Cancel
Save