Skip to content

Commit

Permalink
pyFLTK fix for Windows using System libraries.
Browse files Browse the repository at this point in the history
  • Loading branch information
ggarra13 committed Apr 7, 2024
1 parent 1279b05 commit 914eee3
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
3 changes: 2 additions & 1 deletion cmake/Modules/BuildFLTK.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
include( ExternalProject )

#set( FLTK_GIT_TAG master )
set(FLTK_GIT_TAG 26f5b38a0113be817d13193387913580b5996d77) # Stable TAG
#set(FLTK_GIT_TAG 26f5b38a0113be817d13193387913580b5996d77) # Previous stable TAG
set(FLTK_GIT_TAG 31170c47314a8b71331dd7d63c898478edc98c84)

set( FLTK_BUILD_SHARED_LIBS ON ) # We no longer compile static.

Expand Down
2 changes: 1 addition & 1 deletion cmake/patches/pyFLTK-patch/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
lib_dir_list = [fltk_lib_dir, opengl_lib_dir]
win32_lib_list = ["kernel32", "user32", "gdi32", "winspool", "comdlg32", "Comctl32", "advapi32", "shell32", "ole32", "oleaut32", "uuid", "odbc32", "odbccp32", "wsock32", "gdiplus", "glu32", "opengl32"]
static_lib_list = [ "fltk", "fltk_images", "fltk_forms", "fltk_gl", "opengl32", "fltk_jpeg", "fltk_png", "fltk_z"] + win32_lib_list
shared_lib_list = ["fltk_dll", "fltk_jpeg_dll", "fltk_png_dll", "fltk_z_dll"] + win32_lib_list
shared_lib_list = ["fltk_dll"] + win32_lib_list
if doShared:
def_list = def_list + [('FL_DLL', 1)]
lib_list = shared_lib_list
Expand Down
10 changes: 9 additions & 1 deletion mrv2/lib/mrvPanels/mrvPythonPanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -725,7 +725,15 @@ from mrv2 import playlist, timeline, usd, session, settings
std::string command =
string::Format(editor).arg(line).arg(file);
LOG_INFO(command);
std::system(command.c_str());
int ret = std::system(command.c_str());
if (ret != 0)
{
const std::string msg =
tl::string::Format(
_("Could not open python editor: {0}"))
.arg(command);
LOG_ERROR(msg);
}
}
}
catch (const std::regex_error& e)
Expand Down

0 comments on commit 914eee3

Please sign in to comment.