Application - Marc Bouvier

Join the team. This area is for people who want to participate in OpenMW's development in one way or another.
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Application - Marc Bouvier

Post by Zini »

Option 2, please. Don't want to go down the Qt5 route yet.
CramitDeFrog
Posts: 20
Joined: 18 Aug 2013, 00:29

Re: Application - Marc Bouvier

Post by CramitDeFrog »

I am having some trouble with the OpenCS CMakeLists.txt file. Here is my current build. OpenCS will not build with that branch. swick helped me get this far, but I am unable to figure out the problem.
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Application - Marc Bouvier

Post by Zini »

"Will not build" is a particular unhelpful error description.

Obvious issues I see:

- The WIN32 if clause is way too big. It should cover only a the required file, not the whole directory.
- You really should use the opencs_units macro instead of adding the files manually to the source directory list (your current method will cause problems for some people who use an IDE).
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Application - Marc Bouvier

Post by Zini »

I looked at the code and I don't like what I see. The QtSingleApplication source looks broken. At least there is a namespace problem. Also, it is using a lock file, which is a terrible idea IMHO. Way to easy to have a leftover lock file (after a crash), that then requires manual cleanup, before OpenCS can be run again.

I suggest to forgot about QtSingleApplication and roll your own solution.
CramitDeFrog
Posts: 20
Joined: 18 Aug 2013, 00:29

Re: Application - Marc Bouvier

Post by CramitDeFrog »

Sorry for being vague. I knew my issue is with the CMakeLists.txt file so I just sent you a link to what I had. I'm still getting used to the code base and I'm unfamiliar with CMake, so I didn't want the added complexity of using the macros till I can get the files to successfully link together (makes the documentation on Qt and CMake more helpful).

I agree that adding QtSingleApplication is bulky for only one task. I will see about building my own.
User avatar
psi29a
Posts: 5357
Joined: 29 Sep 2011, 10:13
Location: Belgium
Gitlab profile: https://gitlab.com/psi29a/
Contact:

Re: Application - Marc Bouvier

Post by psi29a »

There is a boost lib that allows you to look through the process list, you could probably use that during startup to validate that no other process is running with the same name.

http://www.highscore.de/boost/process/
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Application - Marc Bouvier

Post by Zini »

Not part of boost AFAIK. So we would again have to carry around with us additional stuff. I am fairly sure that the task can be done with Qt alone. QSharedMemory might be one option. Or you could look into DBus, which we need to do eventually anyway (for hooking up OpenMW to the CS during content debugging sessions).
CramitDeFrog
Posts: 20
Joined: 18 Aug 2013, 00:29

Re: Application - Marc Bouvier

Post by CramitDeFrog »

Boost.Process is an add-on. I think you are right Zini, QtSingleApplication uses a client-server relationship meaning that there wasn't an easy/clean way to do it. If Qt can do it, then it's going to be in QtCore. Has anyone used DBus on Windows? I only see that there is a port made and it's still in development. There are no recent mentions of using it.
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Application - Marc Bouvier

Post by Zini »

No idea. Not a Windows user (beyond a partition I keep for gaming). If you want to investigate the situation, please feel free to do so. But if you want to go for a quick solution (or DBus proves to be problematic), you can as well just go with basic QSharedMemory.
CramitDeFrog
Posts: 20
Joined: 18 Aug 2013, 00:29

Re: Application - Marc Bouvier

Post by CramitDeFrog »

I am not a Windows user either. I only asked because cross-platform is a goal of this project. If DBus will be used later for content debugging, then it will be the best option. What are the development plans for content debugging?
Post Reply