Giter VIP home page Giter VIP logo

dfhack-qt's People

Contributors

cvuchener avatar

Stargazers

 avatar

Watchers

 avatar  avatar

dfhack-qt's Issues

Not working in Ubuntu

Hi
Tried your plugin. Compiled and installed
Screenshot_20190318_224840
But it says QApplication not started.
stderr.log and stdout.log don't say anything interesting.

Is there a way to debug this?.
I'm really, really interested in make this work

Cmake error: cannot specify include directories

I got the error below while compiling: https://github.com/ragundo/DwarfExplorer
Reference: ragundo/DwarfExplorer#1

I got this error while compiling with cmake (v 3.10.2, Linux):

CMake Error at plugins/DwarfExplorer/dfhack-qt/CMakeLists.txt:4 (target_include_directories):
  Cannot specify include directories for imported target "dfhack-qt-common".

Was an error with the https://github.com/cvuchener/dfhack-qt/blob/58225d74672e1f870cc9b23c8a4c747900d7f3df/CMakeLists.txt file:

target_include_directories(dfhack-qt-common INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/include)

gave that error. But fixed it with some searching and changing it to this line:

set_property(TARGET dfhack-qt-common APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
  $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
  )

Also one small compile warning:

../plugins/DwarfExplorer/dfhack-qt/qapplication/LogFilterProxyModel.cpp:104:33: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     if (ok && type >= 0 && type < accepted_types.size() && !accepted_types[type])
                            ~~~~~^~~~~~~~~~~~~~~~~~~~~~~

using pluginupdate

Hi there.

Short story.For my plugin, I need to hook up on DFHack onpluginupdate signal.

Long history. I want to change the Dwarf Fortress window to a specific coordinate every time the user selects a structure that contains a df::coord field.
If you call the dfhack methods to do that, it will not work because a CoreSuspender is already active, so the call doesn't have any effect until the CoreSuspender is resumed and the render thread updates the screen.

I've tried to call the dfhack methods, resume the CoreSuspender and sleep my thread a few milliseconds for render to update. Then I suspend again. This sometimes work, sometimes crashes.
The solution is to set the parameters, resume the CoreSuspender and use onpluginupdate to do the work

The problem is that this signal should be implemented in your main.cpp (where the Qt application is created), but I can't figure out how to implement that method using data from my plugin.
I tried to use global variables, but the linker complains.

How to do that?. Is it possible to implement some signal slot between your main.cpp and my plugin?

Thanks in advance

Working in ubuntu :)

Working beautifully.

dwarf_explorer

I need to do a lot of testing and try it in Windows, but this is promising.

Thanks for your work

How to deploy in linux?

Hi.
Right now I can deploy my plugin dwarfexplorer in windows.

Now, I'm trying to do the same in linux (Ubuntu 18.04).The machine is not a development machine, just a clean ubuntu virtual machine.
I downloaded the LNP for linux, Dwarf Fortress and dfhack works ok.

Now, I put the compiled plugins (your qapplication.plugin.so and my dwarfexplorer.plugin.so) in the plugins directory of dfhack.
I run dfhack, and logically dfhack doesn't load the plugins because is missing the required Qt5 libraries.

I know that linux doesn't work like windows. Even if you put the required .so files and the platforms Qt5 directory in the same directory as Dwarf Fortress, it will not work because of the rpath.

Fortunatelly, dfhack in linux is launched by a script that sets LD_LIBRARY_PATH, so, if you put the Qt5 libraries in the directory libs of Dwarf Fortress, dfhack can load boths plugins.

The problem is that as soon as I type enable qapplication, dfhack crashes with a core dump.

I was thinking that the problem is with the platforms Qt directory, so I put a copy of the directory in several places (hack/libs libs etc with no luck. I always get a core dump.

Have you tried to deploy your plugin in a linux machine?. What can I do?.

PD: Of course, in my development machine everything works.

Using QML?

Hi again

I'd like to use QML for my next project.
Do you think that is possible?.
I've tried to use QQuickWidget inside a QMainWindow but without success.

I'd like to have one solution that would be the same for all dfhat-qt plugins

Thanks in advance

Working in windows

Windows 10 - Qt 5.12.3
using qt5_add_resources works !!

dwarfexplorer_windows_2
There's hope that DFHack maintainer lethosor would try qapplications in MacOS as you requested in the forums.
As last resort , I have a MacOS VM, but my knowledge of Macs is zero :(. Anyway I could try it.

Again, thanks for your wonderful framework!.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.