How to use filesystem boost copy_file with qrc resources?
- sirherrbatka
- Posts: 2159
- Joined: 07 Aug 2011, 17:21
Re: How to use filesystem boost copy_file with qrc resources
heh, great. I'm not sure how to store anything in mCfgMgr, and no idea how to read from it. I think I will pass this time. Sorry for wasted time.
Re: How to use filesystem boost copy_file with qrc resources
You don't store anything the the configuration manager. I guess the easiest method would be to add a member variable to Editor that stores the resources path.
- sirherrbatka
- Posts: 2159
- Joined: 07 Aug 2011, 17:21
Re: How to use filesystem boost copy_file with qrc resources
heh, actually i did this (modeling after engine.cpp).
Ok, if so:
a) I have a switch that appears to work for help.
b) I can store path with it (works just like in engine).
c) I should initalize this variable with default value when not using switch.
d) I should make a public method to return path.
if (a && b && c && d)
{
herrbatka.facepalm();
}
PS
I can't help, being noob is no fun!
Ok, if so:
a) I have a switch that appears to work for help.
b) I can store path with it (works just like in engine).
c) I should initalize this variable with default value when not using switch.
d) I should make a public method to return path.
if (a && b && c && d)
{
herrbatka.facepalm();
}
PS
I can't help, being noob is no fun!
Re: How to use filesystem boost copy_file with qrc resources
I assume you mean "resources" instead of "help".a) I have a switch that appears to work for help.
The default value would be an empty path, which is what you get anyway. Nothing to do here.c) I should initalize this variable with default value when not using switch.
Not really, since no other part of OpenCS is using the Editor class. Instead you should pass the value down through the constructors of those members of Editor that need it (that would be the DocumentManager in this case).I should make a public method to return path.
Re: How to use filesystem boost copy_file with qrc resources
Oops. No you can't do that. Instead add a setResourcesPath function to DocumentManager, that is called from Editor.
- sirherrbatka
- Posts: 2159
- Joined: 07 Aug 2011, 17:21
Re: How to use filesystem boost copy_file with qrc resources
DocumentManager or Document? I ask just to be sure
PS
NVM, I got it.
PS
NVM, I got it.
- sirherrbatka
- Posts: 2159
- Joined: 07 Aug 2011, 17:21
Re: How to use filesystem boost copy_file with qrc resources
Ok, program works. It took ages . I didn't touched cmake just yet.
Anyway I think that:
a) --resources sounds a bit cryptic for a simply default filters. Do we want to implement any other "resources"?
b) we can make content dir switch in the editor.
Anyway I think that:
a) --resources sounds a bit cryptic for a simply default filters. Do we want to implement any other "resources"?
b) we can make content dir switch in the editor.
Re: How to use filesystem boost copy_file with qrc resources
These are the global resources, used in both OpenMW and OpenCS. We use this switch, so we can easily pull them from the installed software or locally (running without installing). I don't see what is cryptic about that.a) --resources sounds a bit cryptic for a simply default filters. Do we want to implement any other "resources"?
I have no idea what you mean by that.b) we can make content dir switch in the editor.
- sirherrbatka
- Posts: 2159
- Joined: 07 Aug 2011, 17:21
Re: How to use filesystem boost copy_file with qrc resources
Right. Mind if I add a little bit of description in OpenCS? Just explaining what this switch does in case of this application.These are the global resources, used in both OpenMW and OpenCS. We use this switch, so we can easily pull them from the installed software or locally (running without installing). I don't see what is cryptic about that.
Sorry. I meant the:I have no idea what you mean by that.
--data arg (=data) set data directories (later have higher priority)
My impression is that it allow to choose alternative "data files" path.
Re: How to use filesystem boost copy_file with qrc resources
The --resources switch dose exactly the same in OpenCS as it does in OpenMW. Therefore it should have the same description in both programs. If you want expand it a bit, that is fine with me.Right. Mind if I add a little bit of description in OpenCS? Just explaining what this switch does in case of this application.
Already implemented.Sorry. I meant the:
--data arg (=data) set data directories (later have higher priority)
My impression is that it allow to choose alternative "data files" path.