|
From: TheFGFSEagle <the...@gm...> - 2023-03-27 10:11:51
|
And the new element can be tested with the following Nasal code, after checking out the canvas_pangotext branch from git.code.sf.net/u/thefgfseagle/fgdata: w = canvas.Window.new([200, 200], "dialog"); c = w.createCanvas(); g = c.createGroup(); t = g.createChild("pangotext"); t.setMarkup("<b>bold</b>"); w.show(); Am Mo., 27. März 2023 um 12:01 Uhr schrieb TheFGFSEagle < the...@gm...>: > I'm making progress now - I've successfully subclassed Pango::Renderer, > and I'm also successfully showing an osg::Texture2D as element on the > canvas, but when I try to copy an osgText::Glyph onto that texture, instead > of a glyph I get a noise texture instead … the other issue I'm having is > some ponter problem (a smart pointer of one CanvasPangoText instance only > getting deleted upon the creation of the next instance, which leads to it > wanting to delete something that was already deleted !?). > On both problems I'm somewhat stuck, so it would be great if @James Turner > <ja...@fl...> or @Hooray could take a look - the latest code is > available at git.code.sf.net/u/thefgfseagle/simgear.git / branch > canvas_pangotext, in > simgear/canvas/elements/{CanvasPangoText,PangoRendererCanvas}.cxx > > Am Di., 21. März 2023 um 03:04 Uhr schrieb TheFGFSEagle < > the...@gm...>: > >> Solved - one needs to recreate the target PkgConfig::PANGOMM by copying >> the pkg_check_modules call to SimGearConfig.cmake ! :) >> >> Am Mo., 20. März 2023 um 21:14 Uhr schrieb TheFGFSEagle < >> the...@gm...>: >> >>> I need some help with CMake, I think. I've successfully added the >>> necessary setup to be able to build SimGear with PangoMM, but at the point >>> of using the resulting SimGear build with FlightGear I've got some problems. >>> >>> This is in the top-level $SG_SOURCE/CMakeLists.txt: >>> >>> find_package(PkgConfig) >>> pkg_check_modules(PANGOMM REQUIRED IMPORTED_TARGET pangomm-1.4) >>> >>> Then in the $SG_SOURCE/simgear/CMakeLists.txt: >>> >>> target_include_directories(SimGearScene PRIVATE PkgConfig::PANGOMM) >>> target_link_libraries(SimGearScene PRIVATE PkgConfig::PANGOMM) >>> >>> In the files for the new CanvasPangoText (which will have the markup and >>> selection support) I can now >>> >>> #include <pangomm/renderer.h> >>> >>> without problems, SimGear compiles and installs without problems. Then I >>> continued with FlightGear, and already the cmake build files generation >>> step failed: >>> >>> /home/user/fgsource/simgear/build$ cmake .. >>> CMAKE Build type: RelWithDebInfo >>> -- System is: Linux >>> -- Linux distro is: Ubuntu >>> -- Web browser launcher command is: xdg-open >>> -- Using explicit data directory for base package: >>> /usr/local/lib/FlightGear >>> -- libudev stable: 1 >>> -- Found UDev: /usr/lib/x86_64-linux-gnu/libudev.so >>> -- include: /usr/include >>> -- event-based input enabled. Using /usr/lib/x86_64-linux-gnu/libudev.so >>> -- Enabling HID-API input >>> -- SWIFT support enabled >>> -- VR support disabled, OpenXR not found >>> -- Couldn't find translations data, will not include translated string >>> in the executable >>> -- Qt GUI enabled, found Qt at: /usr/lib/x86_64-linux-gnu/qt5 >>> -- QtGui private headers not available. >>> -- Min Simgear version is 2020.4.0 >>> -- Data Distribution Service support: DISBLED >>> -- SSE/SSE2 support: ENABLED >>> -- libudev stable: 1 >>> -- Found UDev: /usr/lib/x86_64-linux-gnu/libudev.so >>> -- include: /usr/include >>> -- Enabling legacy joystick code (from PLIB) >>> -- CppUnit: Building the FlightGear supplied CppUnit library >>> -- Configuring done >>> CMake Error at utils/fgelev/CMakeLists.txt:1 (add_executable): >>> Target "fgelev" links to target "PkgConfig::PANGOMM" but the target >>> was not >>> found. Perhaps a find_package() call is missing for an IMPORTED >>> target, or >>> an ALIAS target is missing? >>> >>> >>> CMake Error at utils/fgviewer/CMakeLists.txt:45 (add_executable): >>> Target "fgviewer" links to target "PkgConfig::PANGOMM" but the target >>> was >>> not found. Perhaps a find_package() call is missing for an IMPORTED >>> target, or an ALIAS target is missing? >>> >>> >>> CMake Error at src/Sound/CMakeLists.txt:32 (add_library): >>> Target "fgvoicesynth" links to target "PkgConfig::PANGOMM" but the >>> target >>> was not found. Perhaps a find_package() call is missing for an >>> IMPORTED >>> target, or an ALIAS target is missing? >>> >>> >>> CMake Error at src/Main/CMakeLists.txt:81 (add_executable): >>> Target "fgfs" links to target "PkgConfig::PANGOMM" but the target was >>> not >>> found. Perhaps a find_package() call is missing for an IMPORTED >>> target, or >>> an ALIAS target is missing? >>> >>> >>> CMake Error at src/Main/CMakeLists.txt:111 (add_executable): >>> Target "nasal" links to target "PkgConfig::PANGOMM" but the target was >>> not >>> found. Perhaps a find_package() call is missing for an IMPORTED >>> target, or >>> an ALIAS target is missing? >>> >>> >>> CMake Error at src/Main/CMakeLists.txt:119 (add_executable): >>> Target "metar" links to target "PkgConfig::PANGOMM" but the target was >>> not >>> found. Perhaps a find_package() call is missing for an IMPORTED >>> target, or >>> an ALIAS target is missing? >>> >>> >>> CMake Error at test_suite/CMakeLists.txt:124 (add_executable): >>> Target "fgfs_test_suite" links to target "PkgConfig::PANGOMM" but the >>> target was not found. Perhaps a find_package() call is missing for an >>> IMPORTED target, or an ALIAS target is missing? >>> >>> >>> -- Generating done >>> CMake Generate step failed. Build files cannot be regenerated correctly. >>> gmake: *** [Makefile:15062: cmake_check_build_system] Error 1 >>> >>> I need to do something like this: >>> https://cmake.org/cmake/help/latest/guide/tutorial/Adding%20Export%20Configuration.html >>> but I don't quite know what to insert / change where - maybe someone could >>> provide some pointers on this ? >>> >>> Am Sa., 18. März 2023 um 17:59 Uhr schrieb TheFGFSEagle < >>> the...@gm...>: >>> >>>> Thanks Florent, but I hadn't committed at all yet, and I'm using Gedit ! >>>> >>>> Am Sa., 18. März 2023 um 17:52 Uhr schrieb Florent Rougon < >>>> f.r...@fr...>: >>>> >>>>> TheFGFSEagle <the...@gm...> wrote: >>>>> >>>>> > Well, the choice has been made - it's going to be Pango or nothing, >>>>> because >>>>> > I accidentally deleted my uncommitted markup work ! :wail: >>>>> >>>>> If you use Emacs, maybe you have a backup file somewhere—but I believe >>>>> you would know. If you committed the work at some point and simply >>>>> rewound the branch or rebased it so that the commits are not visible >>>>> anymore, they most likely still exist internally and can be found with >>>>> 'git reflog'. If you didn't commit at all... well, sorry. >>>>> >>>>> When I have to stop in the middle of a long-running change, I often do >>>>> a >>>>> 'git ci -am tmp' where 'git ci' is an alias for 'git commit'. Then I >>>>> either: >>>>> - amend the commit, or; >>>>> - add new ones on top of it, and in the end squash them using >>>>> 'git rebase -i ...'. >>>>> >>>>> Regards >>>>> >>>>> -- >>>>> Florent >>>>> >>>>> >>>>> _______________________________________________ >>>>> Flightgear-devel mailing list >>>>> Fli...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/flightgear-devel >>>>> >>>> |