Skip to content

Commit 943ee25

Browse files
authored
Merge branch 'main' into maint-cmake-move-vars-to-cy-files
Signed-off-by: Michael Oliver <[email protected]>
2 parents b33ee20 + 93819da commit 943ee25

File tree

1,766 files changed

+113943
-238958
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,766 files changed

+113943
-238958
lines changed

.clang-format

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ BreakConstructorInitializers: BeforeComma
4141
BreakInheritanceList: BeforeComma
4242
BreakStringLiterals: true
4343
BreakTemplateDeclarations: MultiLine
44-
ColumnLimit: 80
44+
ColumnLimit: 140
4545
CommentPragmas: '^ IWYU pragma:'
4646
CompactNamespaces: false
4747
ConstructorInitializerIndentWidth: 4

.clang-format-ignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1+
./src/pub/*
2+
./src/lib/files/WFObj/*
13
./src/lib/mu/MuQt5/templates/*
2-
./src/lib/mu/MuQt6/templates/*
4+
./src/lib/mu/MuQt6/templates/*

cmake/dependencies/python3.cmake

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ SET(RV_DEPS_PYTHON_VERSION_SHORT
3030
"${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}"
3131
)
3232

33+
# This version is used for:
34+
# 1. Building OpenTimelineIO from source for Windows debug builds
35+
# 2. Generating src/build/requirements.txt from requirements.txt.in template
36+
# (used by all other platforms/builds to install from PyPI)
3337
SET(_opentimelineio_version
3438
"${RV_DEPS_OTIO_VERSION}"
3539
)
@@ -249,8 +253,18 @@ ELSE() # Not WINDOWS
249253
)
250254
ENDIF()
251255

252-
SET(_requirements_file
253-
"${PROJECT_SOURCE_DIR}/src/build/requirements.txt"
256+
# Generate requirements.txt from template with the OpenTimelineIO version substituted
257+
SET(_requirements_input_file
258+
"${PROJECT_SOURCE_DIR}/src/build/requirements.txt.in"
259+
)
260+
SET(_requirements_output_file
261+
"${CMAKE_BINARY_DIR}/requirements.txt"
262+
)
263+
264+
CONFIGURE_FILE(
265+
${_requirements_input_file}
266+
${_requirements_output_file}
267+
@ONLY
254268
)
255269

256270
IF(RV_TARGET_WINDOWS)
@@ -269,18 +283,18 @@ IF(RV_TARGET_WINDOWS)
269283
${CMAKE_COMMAND} -E env
270284
"OTIO_CXX_DEBUG_BUILD=1"
271285
"CMAKE_ARGS=-DPYTHON_LIBRARY=${_python3_implib} -DPYTHON_INCLUDE_DIR=${_include_dir} -DPYTHON_EXECUTABLE=${_python3_executable}"
272-
"${_python3_executable}" -m pip install --upgrade -r "${_requirements_file}"
286+
"${_python3_executable}" -m pip install --upgrade -r "${_requirements_output_file}"
273287
)
274288
ELSE()
275289
SET(_requirements_install_command
276290
${CMAKE_COMMAND} -E env
277291
"CMAKE_ARGS=-DPYTHON_LIBRARY=${_python3_implib} -DPYTHON_INCLUDE_DIR=${_include_dir} -DPYTHON_EXECUTABLE=${_python3_executable}"
278-
"${_python3_executable}" -m pip install --upgrade -r "${_requirements_file}"
292+
"${_python3_executable}" -m pip install --upgrade -r "${_requirements_output_file}"
279293
)
280294
ENDIF()
281295
ELSE()
282296
SET(_requirements_install_command
283-
"${_python3_executable}" -m pip install --upgrade -r "${_requirements_file}"
297+
"${_python3_executable}" -m pip install --upgrade -r "${_requirements_output_file}"
284298
)
285299
ENDIF()
286300

@@ -364,11 +378,11 @@ SET(${_python3_target}-requirements-flag
364378
)
365379

366380
ADD_CUSTOM_COMMAND(
367-
COMMENT "Installing requirements from ${_requirements_file}"
381+
COMMENT "Installing requirements from ${_requirements_output_file}"
368382
OUTPUT ${${_python3_target}-requirements-flag}
369383
COMMAND ${_requirements_install_command}
370384
COMMAND cmake -E touch ${${_python3_target}-requirements-flag}
371-
DEPENDS ${_python3_target} ${_requirements_file}
385+
DEPENDS ${_python3_target} ${_requirements_output_file} ${_requirements_input_file}
372386
)
373387

374388
IF(RV_TARGET_WINDOWS
@@ -380,7 +394,7 @@ IF(RV_TARGET_WINDOWS
380394
POST_BUILD
381395
COMMENT "Copying Debug Python lib as a unversionned file for Debug"
382396
COMMAND cmake -E copy_if_different ${_python3_implib} ${_python_release_libpath}
383-
COMMAND cmake -E copy_if_different ${_python3_implib} ${_python_release_in_bin_libpath} DEPENDS ${_python3_target} ${_requirements_file}
397+
COMMAND cmake -E copy_if_different ${_python3_implib} ${_python_release_in_bin_libpath} DEPENDS ${_python3_target} ${_requirements_output_file} ${_requirements_input_file}
384398
)
385399
ENDIF()
386400

src/bin/apps/rv/main.cpp

Lines changed: 34 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -159,10 +159,7 @@ void setEnvVar(const string& var, const string& val)
159159
#endif
160160
}
161161

162-
void setEnvVar(const string& var, const QFileInfo& val)
163-
{
164-
setEnvVar(var, val.absoluteFilePath().toUtf8().data());
165-
}
162+
void setEnvVar(const string& var, const QFileInfo& val) { setEnvVar(var, val.absoluteFilePath().toUtf8().data()); }
166163

167164
void addToEnvVar(const string& var, const string& val)
168165
{
@@ -189,8 +186,7 @@ string scarfFile(const string& fileName)
189186
#define EXECUTABLE_SHORT_NAME "rv"
190187
#define EXECUTABLE_SHORT_NAME_CAPS "RV"
191188

192-
TwkApp::QTBundle bundle(EXECUTABLE_SHORT_NAME, MAJOR_VERSION, MINOR_VERSION,
193-
REVISION_NUMBER);
189+
TwkApp::QTBundle bundle(EXECUTABLE_SHORT_NAME, MAJOR_VERSION, MINOR_VERSION, REVISION_NUMBER);
194190

195191
#ifdef PLATFORM_LINUX
196192
extern "C" int XInitThreads();
@@ -295,8 +291,7 @@ int utf8Main(int argc, char* argv[])
295291
getrlimit(RLIMIT_NOFILE, &rlim);
296292
if (rlim.rlim_cur < rlim.rlim_max)
297293
{
298-
cerr << "WARNING: unable to increase open file limit above "
299-
<< rlim.rlim_cur << endl;
294+
cerr << "WARNING: unable to increase open file limit above " << rlim.rlim_cur << endl;
300295
}
301296
#else
302297
_setmaxstdio(2048);
@@ -311,8 +306,7 @@ int utf8Main(int argc, char* argv[])
311306
//
312307
HANDLE hand = GetStdHandle(STD_OUTPUT_HANDLE);
313308

314-
if ((hand == INVALID_HANDLE_VALUE || GetFileType(hand) == FILE_TYPE_UNKNOWN)
315-
&& AttachConsole(ATTACH_PARENT_PROCESS))
309+
if ((hand == INVALID_HANDLE_VALUE || GetFileType(hand) == FILE_TYPE_UNKNOWN) && AttachConsole(ATTACH_PARENT_PROCESS))
316310
{
317311
freopen("CON", "w", stdout);
318312
freopen("CON", "w", stderr);
@@ -335,9 +329,7 @@ int utf8Main(int argc, char* argv[])
335329
else
336330
#endif
337331
{
338-
cerr
339-
<< "ERROR: $HOME is not set in the environment and is required."
340-
<< endl;
332+
cerr << "ERROR: $HOME is not set in the environment and is required." << endl;
341333
exit(-1);
342334
}
343335
}
@@ -449,9 +441,7 @@ int utf8Main(int argc, char* argv[])
449441
// Call the deploy functions
450442
//
451443

452-
TWK_DEPLOY_APP_OBJECT dobj(MAJOR_VERSION, MINOR_VERSION, REVISION_NUMBER,
453-
argc, argv, RELEASE_DESCRIPTION,
454-
"HEAD=" GIT_HEAD);
444+
TWK_DEPLOY_APP_OBJECT dobj(MAJOR_VERSION, MINOR_VERSION, REVISION_NUMBER, argc, argv, RELEASE_DESCRIPTION, "HEAD=" GIT_HEAD);
455445

456446
Imf::staticInitialize();
457447

@@ -482,26 +472,17 @@ int utf8Main(int argc, char* argv[])
482472
char* prefsPath = 0;
483473
int sleepTime = 0;
484474

485-
if (arg_parse(
486-
argc, argv, "", "", RV_ARG_EXAMPLES, "", "", RV_ARG_SEQUENCE_HELP,
487-
"", "", RV_ARG_SOURCE_OPTIONS(opts), "", "", "",
488-
ARG_SUBR(Rv::RvApplication::parseInFiles),
489-
"Input sequence patterns, images, movies, or directories ",
490-
RV_ARG_PARSE_OPTIONS(opts), "-strictlicense",
491-
ARG_FLAG(&strictlicense),
492-
"Exit rather than consume an RV license if no rvsolo licenses are "
493-
"available",
494-
"-prefsPath %S", &prefsPath,
495-
"Alternate path to preferences directory",
475+
if (arg_parse(argc, argv, "", "", RV_ARG_EXAMPLES, "", "", RV_ARG_SEQUENCE_HELP, "", "", RV_ARG_SOURCE_OPTIONS(opts), "", "", "",
476+
ARG_SUBR(Rv::RvApplication::parseInFiles), "Input sequence patterns, images, movies, or directories ",
477+
RV_ARG_PARSE_OPTIONS(opts), "-strictlicense", ARG_FLAG(&strictlicense),
478+
"Exit rather than consume an RV license if no rvsolo licenses are "
479+
"available",
480+
"-prefsPath %S", &prefsPath, "Alternate path to preferences directory",
496481
#if defined(PLATFORM_LINUX)
497-
"-scheduler %S", &opts.schedulePolicy,
498-
"Thread scheduling policy (may require root)", "-priorities %d %d",
499-
&opts.displayPriority, &opts.audioPriority,
500-
"Set display and audio thread priorities (may require root)",
482+
"-scheduler %S", &opts.schedulePolicy, "Thread scheduling policy (may require root)", "-priorities %d %d",
483+
&opts.displayPriority, &opts.audioPriority, "Set display and audio thread priorities (may require root)",
501484
#endif
502-
"-sleep %d", &sleepTime,
503-
"Sleep (in seconds) before starting to allow attaching debugger",
504-
NULL)
485+
"-sleep %d", &sleepTime, "Sleep (in seconds) before starting to allow attaching debugger", NULL)
505486
< 0)
506487
{
507488
exit(-1);
@@ -525,8 +506,7 @@ int utf8Main(int argc, char* argv[])
525506

526507
if (opts.showVersion)
527508
{
528-
cout << MAJOR_VERSION << "." << MINOR_VERSION << "." << REVISION_NUMBER
529-
<< endl;
509+
cout << MAJOR_VERSION << "." << MINOR_VERSION << "." << REVISION_NUMBER << endl;
530510
exit(0);
531511
}
532512

@@ -594,9 +574,7 @@ int utf8Main(int argc, char* argv[])
594574
}
595575
else
596576
{
597-
Imf::setGlobalThreadCount(TwkUtil::SystemInfo::numCPUs() > 1
598-
? (TwkUtil::SystemInfo::numCPUs() - 1)
599-
: 1);
577+
Imf::setGlobalThreadCount(TwkUtil::SystemInfo::numCPUs() > 1 ? (TwkUtil::SystemInfo::numCPUs() - 1) : 1);
600578
}
601579

602580
//
@@ -618,8 +596,7 @@ int utf8Main(int argc, char* argv[])
618596

619597
QTranslator* translator = new QTranslator();
620598
QLocale locale = QLocale(getenv("ORIGINALLOCAL"));
621-
if (translator->load(locale, QLatin1String("i18n"), "_",
622-
QLatin1String(":/translations")))
599+
if (translator->load(locale, QLatin1String("i18n"), "_", QLatin1String(":/translations")))
623600
{
624601
app->installTranslator(translator);
625602
}
@@ -669,22 +646,15 @@ int utf8Main(int argc, char* argv[])
669646
bundle.setEnvVar("RV_APP_RV_SHORT_NAME", EXECUTABLE_SHORT_NAME);
670647
bundle.setEnvVar("RV_APP_RV", bundle.executableFile(EXECUTABLE_SHORT_NAME));
671648
bundle.setEnvVar("RV_APP_MANUAL", bundle.resource("rv_manual", "pdf"));
672-
bundle.setEnvVar("RV_APP_MANUAL_HTML",
673-
bundle.resource("rv_manual", "html"));
674-
bundle.setEnvVar("RV_APP_SDI_MANUAL",
675-
bundle.resource("rvsdi_manual", "pdf"));
676-
bundle.setEnvVar("RV_APP_SDI_MANUAL_HTML",
677-
bundle.resource("rvsdi_manual", "html"));
678-
bundle.setEnvVar("RV_APP_REFERENCE_MANUAL",
679-
bundle.resource("rv_reference", "pdf"));
680-
bundle.setEnvVar("RV_APP_REFERENCE_MANUAL_HTML",
681-
bundle.resource("rv_reference", "html"));
649+
bundle.setEnvVar("RV_APP_MANUAL_HTML", bundle.resource("rv_manual", "html"));
650+
bundle.setEnvVar("RV_APP_SDI_MANUAL", bundle.resource("rvsdi_manual", "pdf"));
651+
bundle.setEnvVar("RV_APP_SDI_MANUAL_HTML", bundle.resource("rvsdi_manual", "html"));
652+
bundle.setEnvVar("RV_APP_REFERENCE_MANUAL", bundle.resource("rv_reference", "pdf"));
653+
bundle.setEnvVar("RV_APP_REFERENCE_MANUAL_HTML", bundle.resource("rv_reference", "html"));
682654
bundle.setEnvVar("RV_APP_MU_MANUAL", bundle.resource("mu", "pdf"));
683655
bundle.setEnvVar("RV_APP_GTO_REFERENCE", bundle.resource("gto", "pdf"));
684-
bundle.setEnvVar("RV_APP_RELEASE_NOTES",
685-
bundle.resource("rv_release_notes", "html"));
686-
bundle.setEnvVar("RV_APP_LICENSES_NOTES",
687-
bundle.resource("rv_client_licenses", "html"));
656+
bundle.setEnvVar("RV_APP_RELEASE_NOTES", bundle.resource("rv_release_notes", "html"));
657+
bundle.setEnvVar("RV_APP_LICENSES_NOTES", bundle.resource("rv_client_licenses", "html"));
688658
bundle.addPathToEnvVar("OIIO_LIBRARY_PATH", bundle.appPluginPath("OIIO"));
689659

690660
//
@@ -731,14 +701,12 @@ int utf8Main(int argc, char* argv[])
731701
DWORD proClass1 = GetPriorityClass(GetCurrentProcess());
732702
if (0 == SetPriorityClass(GetCurrentProcess(), targetClass))
733703
{
734-
cerr << "ERROR: SetPriorityClass failed, error " << GetLastError()
735-
<< endl;
704+
cerr << "ERROR: SetPriorityClass failed, error " << GetLastError() << endl;
736705
}
737706
DWORD proClass2 = GetPriorityClass(GetCurrentProcess());
738707
if (proClass2 != targetClass)
739708
{
740-
cerr << "WARNING: failed to set Priority Class, class " << hex
741-
<< showbase << int(proClass1) << " -> " << int(proClass2)
709+
cerr << "WARNING: failed to set Priority Class, class " << hex << showbase << int(proClass1) << " -> " << int(proClass2)
742710
<< noshowbase << dec << endl;
743711
}
744712
#endif
@@ -766,16 +734,11 @@ int utf8Main(int argc, char* argv[])
766734
QString qcss = QString(s.c_str());
767735
// Always apply font size parameters - Qt handles missing placeholders
768736
// safely
769-
csstext = qcss.arg(opts.fontSize1)
770-
.arg(opts.fontSize2)
771-
.arg(opts.fontSize2 - 1);
737+
csstext = qcss.arg(opts.fontSize1).arg(opts.fontSize2).arg(opts.fontSize2 - 1);
772738
}
773739
else
774740
{
775-
csstext = QString(rv_linux_dark)
776-
.arg(opts.fontSize1)
777-
.arg(opts.fontSize2)
778-
.arg(opts.fontSize2 - 1);
741+
csstext = QString(rv_linux_dark).arg(opts.fontSize1).arg(opts.fontSize2).arg(opts.fontSize2 - 1);
779742
}
780743

781744
if (!opts.qtstyle || !strcmp(opts.qtstyle, "RV"))
@@ -803,11 +766,9 @@ int utf8Main(int argc, char* argv[])
803766
exit(-1);
804767
}
805768

806-
TwkApp::initWithFile(TwkApp::muContext(), TwkApp::muProcess(),
807-
TwkApp::muModuleList(), muInitFile.c_str());
769+
TwkApp::initWithFile(TwkApp::muContext(), TwkApp::muProcess(), TwkApp::muModuleList(), muInitFile.c_str());
808770

809-
TwkApp::pyInitWithFile(pyInitFile.c_str(), Rv::pyRvAppCommands(),
810-
Rv::pyUICommands());
771+
TwkApp::pyInitWithFile(pyInitFile.c_str(), Rv::pyRvAppCommands(), Rv::pyUICommands());
811772
}
812773
catch (const exception& e)
813774
{
@@ -823,11 +784,9 @@ int utf8Main(int argc, char* argv[])
823784
//
824785

825786
#ifdef PLATFORM_WINDOWS
826-
TwkGLF::FBOVideoDevice* dummyDev =
827-
new TwkGLF::FBOVideoDevice(0, 10, 10, false);
787+
TwkGLF::FBOVideoDevice* dummyDev = new TwkGLF::FBOVideoDevice(0, 10, 10, false);
828788
IPCore::ImageRenderer::queryGL();
829-
const char* glVersion =
830-
(const char*)glGetString(GL_SHADING_LANGUAGE_VERSION);
789+
const char* glVersion = (const char*)glGetString(GL_SHADING_LANGUAGE_VERSION);
831790
IPCore::Shader::Function::useShadingLanguageVersion(glVersion);
832791
#endif
833792

@@ -871,8 +830,7 @@ int utf8Main(int argc, char* argv[])
871830
}
872831
catch (const exception& e)
873832
{
874-
cerr << "ERROR: Unhandled exception during execution: " << e.what()
875-
<< endl;
833+
cerr << "ERROR: Unhandled exception during execution: " << e.what() << endl;
876834

877835
exit(-1);
878836
}

0 commit comments

Comments
 (0)