Skip to content

Commit

Permalink
Version 1.0.0 alpha
Browse files Browse the repository at this point in the history
Signed-off-by: Ted Waine <[email protected]>
  • Loading branch information
tedwaine committed Dec 3, 2024
1 parent a4e0295 commit 778b6d9
Show file tree
Hide file tree
Showing 2,032 changed files with 151,467 additions and 116,600 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ python/src/xstudio.egg-info/
python/test/xstudio.log
docs/conf.py
python/src/xstudio/version.py
.vs/
.vs/
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "extern/otio/OpenTimelineIO"]
path = extern/otio/OpenTimelineIO
url = https://github.com/AcademySoftwareFoundation/OpenTimelineIO
1 change: 0 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@

38 changes: 16 additions & 22 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.12 FATAL_ERROR)
cmake_minimum_required(VERSION 3.26 FATAL_ERROR)

option(USE_VCPKG "Use Vcpkg for package management" OFF)
if(WIN32)
Expand All @@ -9,7 +9,7 @@ if (USE_VCPKG)
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/vcpkg.cmake)
endif()

set(XSTUDIO_GLOBAL_VERSION "0.11.2" CACHE STRING "Version string")
set(XSTUDIO_GLOBAL_VERSION "1.0.0" CACHE STRING "Version string")
set(XSTUDIO_GLOBAL_NAME xStudio)

project(${XSTUDIO_GLOBAL_NAME} VERSION ${XSTUDIO_GLOBAL_VERSION} LANGUAGES CXX)
Expand All @@ -25,10 +25,11 @@ option(ENABLE_CLANG_FORMAT "Enable clang format, ninja clangformat." OFF)
option(FORCE_COLORED_OUTPUT "Always produce ANSI-colored output (GNU/Clang only)." TRUE)
option(OPTIMIZE_FOR_NATIVE "Build with -march=native" OFF)
option(BUILD_RESKIN "Build xstudio reskin binary" ON)

option(OTIO_SUBMODULE "Automatically build OpenTimelineIO as a submodule" OFF)

if(WIN32)
set(CMAKE_CXX_FLAGS_DEBUG "/Zi /Ob0 /Od /Oy-")
set(OTIO_SUBMODULE ON)
add_compile_options($<$<CXX_COMPILER_ID:MSVC>:/MP>)
# enable UUID System Generator
add_definitions(-DUUID_SYSTEM_GENERATOR=ON)
Expand All @@ -38,7 +39,6 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")

set(STUDIO_PLUGINS "" CACHE STRING "Enable compilation of SITE plugins")


if (("${CMAKE_GENERATOR}" MATCHES "Makefiles" OR ("${CMAKE_GENERATOR}" MATCHES "Ninja" AND NOT WIN32)) AND NOT __CHECKED_CXX_FLAGS)
set(__CHECKED_CXX_FLAGS TRUE CACHE INTERNAL "Whether we checked the CXX flags already")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${COMMON_GCC}" CACHE STRING "" FORCE)
Expand Down Expand Up @@ -71,9 +71,8 @@ if (NOT ${GCC_MARCH_OVERRIDE} STREQUAL "")
endif()
endif()

if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fpic")
endif()

set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fpic")

set(TEST_RESOURCE "${CMAKE_CURRENT_SOURCE_DIR}/test_resource")
set(ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR})
Expand Down Expand Up @@ -166,6 +165,8 @@ if(WIN32)
# https://github.com/nlohmann/json/issues/3868#issuecomment-1563726354
add_definitions(-DJSON_HAS_THREE_WAY_COMPARISON=OFF)

add_subdirectory("extern/otio")

set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)

# When moving to Qt6 or greater, we might be able to use qt_generate_deploy_app_script
Expand Down Expand Up @@ -226,28 +227,21 @@ add_subdirectory(src)

if(INSTALL_XSTUDIO)


# add extern libs that are build-time dependencies of xstudio
if (UNIX)
add_subdirectory("extern/reproc")
endif()
add_subdirectory("extern/quickfuture")
add_subdirectory("extern/quickpromise")

add_subdirectory(share/preference)
add_subdirectory(share/snippets)
add_subdirectory(share/fonts)
# build quickpromise
add_subdirectory(extern/quickpromise)
add_subdirectory(extern/quickfuture)

install(DIRECTORY include/xstudio
DESTINATION include)

INSTALL(DIRECTORY extern/ DESTINATION extern)

add_subdirectory(share/preference)
add_subdirectory(share/snippets)
add_subdirectory(share/fonts)

if(BUILD_DOCS)
if(NOT INSTALL_PYTHON_MODULE)
add_subdirectory(python)
endif ()
add_subdirectory(docs)
#add_subdirectory(docs)
else()
install(DIRECTORY share/docs/ DESTINATION share/xstudio/docs)
endif ()
Expand Down
2 changes: 1 addition & 1 deletion CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"cacheVariables": {
"CMAKE_TOOLCHAIN_FILE": "${sourceDir}/build/vcpkg/scripts/buildsystems/vcpkg.cmake",
"Qt5_DIR": "C:/Qt/5.15.2/msvc2019_64/lib/cmake/Qt5/",
"CMAKE_INSTALL_PREFIX": "C:/xstudio_install",
"CMAKE_INSTALL_PREFIX": "C:/Dev/xSTUDIO",
"X_VCPKG_APPLOCAL_DEPS_INSTALL": "ON",
"BUILD_DOCS": "OFF"
}
Expand Down
28 changes: 27 additions & 1 deletion NOTICE.TXT
Original file line number Diff line number Diff line change
Expand Up @@ -118,4 +118,30 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
SOFTWARE.

cpp-colors

Located in extern/cpp-colors/

The MIT License (MIT)

Copyright (c) 2014 Grigoriy Chudnov

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
# Welcome to xSTUDIO
# Welcome to xSTUDIO - v1.0.0 (alpha)

xSTUDIO is a media playback and review application designed for professionals working in the film and TV post production industries, particularly the Visual Effects and Feature Animation sectors. xSTUDIO is focused on providing an intuitive, easy to use interface with a high performance playback engine at its core and C++ and Python APIs for pipeline integration and customisation for total flexibility.

This codebase will build version 1.0.0 (alpha) of xstudio. There are some known issues that are currently being worked on:

* Moderate audio distortion on playback (Windows only)
* Ueser Documentation and API Documentation is badly out-of-date.
* Saved sessions might not restore media correctly (Windows only)

## Building xSTUDIO

This release of xSTUDIO can be built on various Linux flavours and Windows 10 and 11. MacOS compatibility is not available yet but this work is on the roadmap for 2024.
This release of xSTUDIO can be built on various Linux flavours and Windows 10 and 11. MacOS compatibility is not available yet but this work is on the roadmap for early 2025.

We provide comprehensive build steps for 4 of the most popular distributions.

Expand Down
79 changes: 64 additions & 15 deletions cmake/macros.cmake
Original file line number Diff line number Diff line change
@@ -1,29 +1,54 @@

macro(add_preference name path target)
add_custom_command(TARGET ${target}
COMMAND ${CMAKE_COMMAND} -E copy ${path}/${name}
${CMAKE_BINARY_DIR}/bin/preference/${name}
DEPENDS ${path}/${name})
if(INSTALL_XSTUDIO)
if(WIN32)
install(FILES
${path}/${name}
DESTINATION
${CMAKE_INSTALL_PREFIX}/preference)
else()
install(FILES
${path}/${name}
DESTINATION share/xstudio/preference)
endif()
endif ()

endmacro()

macro(default_compile_options name)
target_compile_options(${name}
# PRIVATE -fvisibility=hidden
PRIVATE $<$<AND:$<CONFIG:RelWithDebInfo>,$<PLATFORM_ID:Linux>>:-fno-omit-frame-pointer>
PRIVATE $<$<AND:$<CONFIG:RelWithDebInfo>,$<PLATFORM_ID:Windows>>:/Oy>
PRIVATE $<$<AND:$<CONFIG:RelWithDebInfo>,$<PLATFORM_ID:Windows>>:/showIncludes>
PRIVATE $<$<PLATFORM_ID:Linux>:-Wno-deprecated>
# PRIVATE $<$<CONFIG:Debug>:-Wno-unused-variable>
# PRIVATE $<$<CONFIG:Debug>:-Wno-unused-but-set-variable>
# PRIVATE $<$<CONFIG:Debug>:-Wno-unused-parameter>
PRIVATE $<$<AND:$<CONFIG:Debug>,$<PLATFORM_ID:Linux>>:-Wno-unused-function>
PRIVATE $<$<AND:$<CONFIG:Debug>,$<PLATFORM_ID:Linux>>:-Wextra>
PRIVATE $<$<AND:$<CONFIG:Debug>,$<PLATFORM_ID:Linux>>:-Wextra>
PRIVATE $<$<PLATFORM_ID:Linux>:-Wfatal-errors> # Stop after first error
PRIVATE $<$<AND:$<CONFIG:Debug>,$<PLATFORM_ID:Linux>>:-Wpedantic>
PRIVATE $<$<AND:$<CONFIG:Debug>,$<PLATFORM_ID:Windows>>:/wd4100>
# PRIVATE $<$<CONFIG:Debug>:-Wall>
# PRIVATE $<$<CONFIG:Debug>:-Werror>
# PRIVATE $<$<CONFIG:Debug>:-Wextra>
# PRIVATE $<$<CONFIG:Debug>:-Wpedantic>
# PRIVATE ${GTEST_CFLAGS}
)

target_compile_features(${name}
PUBLIC cxx_std_17
PUBLIC cxx_std_20
)

target_compile_definitions(${name}
PUBLIC $<$<BOOL:${BUILD_TESTING}>:test_private=public>
PUBLIC $<$<NOT:$<BOOL:${BUILD_TESTING}>>:test_private=private>
PRIVATE -DSPDLOG_FMT_EXTERNAL
$<$<CXX_COMPILER_ID:GNU>:_GNU_SOURCE> # Define _GNU_SOURCE for Linux
$<$<PLATFORM_ID:Linux>:__linux__> # Define __linux__ for Linux
$<$<PLATFORM_ID:Windows>:_WIN32> # Define _WIN32 for Windows
Expand All @@ -33,8 +58,8 @@ macro(default_compile_options name)
PUBLIC BINARY_DIR=\"${CMAKE_BINARY_DIR}/bin\"
PRIVATE TEST_RESOURCE=\"${TEST_RESOURCE}\"
PRIVATE ROOT_DIR=\"${ROOT_DIR}\"
$<$<PLATFORM_ID:Windows>:WIN32_LEAN_AND_MEAN>
PRIVATE $<$<CONFIG:Debug>:XSTUDIO_DEBUG=1>
$<$<PLATFORM_ID:Windows>:WIN32_LEAN_AND_MEAN>
)
endmacro()

Expand All @@ -43,15 +68,16 @@ if (BUILD_TESTING)
target_compile_options(${name}
# PRIVATE -fvisibility=hidden
PRIVATE $<$<CONFIG:RelWithDebInfo>:-fno-omit-frame-pointer>
PRIVATE -Wno-deprecated
# PRIVATE $<$<CONFIG:Debug>:-Wno-unused-variable>
# PRIVATE $<$<CONFIG:Debug>:-Wno-unused-but-set-variable>
# PRIVATE $<$<CONFIG:Debug>:-Wno-unused-parameter>
$<$<PLATFORM_ID:Linux>:PRIVATE $<$<CONFIG:Debug>:-Wno-unused-function>>
PRIVATE $<$<AND:$<CONFIG:Debug>,$<PLATFORM_ID:Linux>>:-Wno-unused-function>
# PRIVATE $<$<CONFIG:Debug>:-Wall>
# PRIVATE $<$<CONFIG:Debug>:-Werror>
$<$<PLATFORM_ID:Linux>:PRIVATE $<$<CONFIG:Debug>:-Wextra>>
$<$<PLATFORM_ID:Linux>:PRIVATE $<$<CONFIG:Debug>:-Wpedantic>>
$ PRIVATE ${GTEST_CFLAGS}
PRIVATE $<$<AND:$<CONFIG:Debug>,$<PLATFORM_ID:Linux>>:-Wextra>
PRIVATE $<$<AND:$<CONFIG:Debug>,$<PLATFORM_ID:Linux>>:-Wpedantic>
PRIVATE ${GTEST_CFLAGS}
)

target_compile_features(${name}
Expand Down Expand Up @@ -89,6 +115,7 @@ macro(default_options_local name)
${CMAKE_CURRENT_SOURCE_DIR}/src
SYSTEM PUBLIC
$<BUILD_INTERFACE:${ROOT_DIR}/extern/include>
$<BUILD_INTERFACE:${ROOT_DIR}/extern/otio/OpenTimelineIO/src>
)
set_target_properties(${name}
PROPERTIES
Expand All @@ -103,8 +130,10 @@ macro(default_options name)
target_include_directories(${name} INTERFACE
$<BUILD_INTERFACE:${ROOT_DIR}/include>
$<BUILD_INTERFACE:${ROOT_DIR}/extern/include>
$<BUILD_INTERFACE:${ROOT_DIR}/extern/otio/OpenTimelineIO/src>
$<INSTALL_INTERFACE:include>
$<INSTALL_INTERFACE:extern/include>)
$<INSTALL_INTERFACE:extern/include>
)
endmacro()

macro(default_options_static name)
Expand All @@ -123,6 +152,7 @@ macro(default_options_static name)
${CMAKE_CURRENT_SOURCE_DIR}/src
SYSTEM PUBLIC
$<BUILD_INTERFACE:${ROOT_DIR}/extern/include>
$<BUILD_INTERFACE:${ROOT_DIR}/extern/otio/OpenTimelineIO/src>
)
set_target_properties(${name}
PROPERTIES
Expand All @@ -135,7 +165,7 @@ macro(default_plugin_options name)
find_package(CAF COMPONENTS core io)
endif (NOT CAF_FOUND)

find_package(spdlog REQUIRED)
find_package(spdlog CONFIG REQUIRED)
default_compile_options(${name})
target_include_directories(${name}
PUBLIC
Expand All @@ -145,6 +175,7 @@ macro(default_plugin_options name)
${CMAKE_CURRENT_SOURCE_DIR}/src
SYSTEM PUBLIC
$<BUILD_INTERFACE:${ROOT_DIR}/extern/include>
$<BUILD_INTERFACE:${ROOT_DIR}/extern/otio/OpenTimelineIO/src>
)
set_target_properties(${name}
PROPERTIES
Expand Down Expand Up @@ -177,7 +208,7 @@ if (BUILD_TESTING)
if (NOT CAF_FOUND)
find_package(CAF COMPONENTS core io)
endif (NOT CAF_FOUND)
find_package(spdlog REQUIRED)
find_package(spdlog CONFIG REQUIRED)
default_compile_options_gtest(${name})
target_include_directories(${name}
PUBLIC
Expand All @@ -187,6 +218,7 @@ if (BUILD_TESTING)
${CMAKE_CURRENT_SOURCE_DIR}/src
SYSTEM PUBLIC
$<BUILD_INTERFACE:${ROOT_DIR}/extern/include>
$<BUILD_INTERFACE:${ROOT_DIR}/extern/otio/OpenTimelineIO/src>
)
endmacro()
endif (BUILD_TESTING)
Expand All @@ -196,7 +228,7 @@ macro(default_options_qt name)
if (NOT CAF_FOUND)
find_package(CAF COMPONENTS core io)
endif (NOT CAF_FOUND)
find_package(spdlog REQUIRED)
find_package(spdlog CONFIG REQUIRED)
default_compile_options(${name})
target_include_directories(${name}
PUBLIC
Expand Down Expand Up @@ -239,6 +271,17 @@ macro(add_src_and_test NAME)
endif()
endmacro()

macro(add_python_plugin NAME)

install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${NAME} DESTINATION share/xstudio/plugin-python)

add_custom_target(COPY_PY_PLUGIN_${NAME} ALL)

add_custom_command(TARGET COPY_PY_PLUGIN_${NAME} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E
copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/${NAME} ${CMAKE_BINARY_DIR}/bin/plugin-python/${NAME})

endmacro()

macro(create_plugin NAME VERSION DEPS)
create_plugin_with_alias(${NAME} xstudio::${NAME} ${VERSION} "${DEPS}")
Expand All @@ -250,7 +293,6 @@ macro(create_plugin_with_alias NAME ALIASNAME VERSION DEPS)

file(GLOB SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)


add_library(${PROJECT_NAME} SHARED ${SOURCES})
add_library(${ALIASNAME} ALIAS ${PROJECT_NAME})
default_plugin_options(${PROJECT_NAME})
Expand Down Expand Up @@ -396,7 +438,6 @@ macro(create_qml_component_with_alias NAME ALIASNAME VERSION DEPS EXTRAMOC)
# Generate export header
include(GenerateExportHeader)
generate_export_header(${PROJECT_NAME} EXPORT_FILE_NAME "${ROOT_DIR}/include/xstudio/ui/qml/${PROJECT_NAME}_export.h")

target_link_libraries(${PROJECT_NAME}
PUBLIC ${DEPS}
)
Expand All @@ -409,8 +450,6 @@ macro(create_qml_component_with_alias NAME ALIASNAME VERSION DEPS EXTRAMOC)
# PUBLIC ${CMAKE_BINARY_DIR} # Include the build directory
#)



endmacro()

macro(build_studio_plugins STUDIO)
Expand All @@ -423,6 +462,16 @@ macro(build_studio_plugins STUDIO)
if(IS_DIRECTORY ${DIR})
get_filename_component(PLUGINNAME ${DIR} NAME)
add_src_and_test(${STUDIO}/${PLUGINNAME})
if(IS_DIRECTORY ${DIR}/share/preference)
file(GLOB PREFFILES ${DIR}/share/preference/*.json)

add_custom_target(${STUDIO}_${PLUGINNAME}_PREFERENCES ALL)
foreach(PREFFile ${PREFFILES})
get_filename_component(PREFNAME ${PREFFile} NAME)
add_preference(${PREFNAME} ${DIR}/share/preference ${STUDIO}_${PLUGINNAME}_PREFERENCES)
endforeach()

endif ()
endif()
endforeach()

Expand Down
2 changes: 1 addition & 1 deletion cmake/modules/FindCAF.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -152,4 +152,4 @@ if (CAF_test_FOUND AND NOT TARGET caf::test)
set_target_properties(caf::test PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${CAF_INCLUDE_DIR_TEST}"
INTERFACE_LINK_LIBRARIES "caf::core")
endif ()
endif ()
Loading

0 comments on commit 778b6d9

Please sign in to comment.