hm, right.
Also: I don't quite think that this belongs to the editor itself. I shouldn't change whole resources path based on the existance (or lack) of the single file. I'm wonder if I can move this to the document.cpp instead.
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
Huh? You got something wrong there. You are not supposed to change the resources path.
Just look if there is a file in the user location. If it is, use it. Otherwise use the file in the resources path location.
Just look if there is a file in the user location. If it is, use it. Otherwise use the file in the resources path location.
- sirherrbatka
- Posts: 2159
- Joined: 07 Aug 2011, 17:21
Re: How to use filesystem boost copy_file with qrc resources
Nothing new ^_^'You got something wrong there.
- sirherrbatka
- Posts: 2159
- Joined: 07 Aug 2011, 17:21
Re: How to use filesystem boost copy_file with qrc resources
Ok, once again about defaultfilters vs *.omwaddon.project.
I don't think we should get rid of extension. This way it will be easy to see for every user that he is free to open this file with editor.
I don't think we should get rid of extension. This way it will be easy to see for every user that he is free to open this file with editor.
Re: How to use filesystem boost copy_file with qrc resources
Actually, that is not the case. The user should not open this file manually. If the user wants to modify the default filters all he has to do is to create a new addon or (preferably) a new game. This will automatically pull in the old default filters.
- sirherrbatka
- Posts: 2159
- Joined: 07 Aug 2011, 17:21
Re: How to use filesystem boost copy_file with qrc resources
Ok, done.
I still need to properly edit cmake file, I guess that:
Is not what I should do, clearly.
I still need to properly edit cmake file, I guess that:
Code: Select all
configure_file(${OpenMW_SOURCE_DIR}/files/opencs/defaultfilters.omwaddon.project
"${OpenMW_BINARY_DIR}/resources/defaultfilters" COPYONLY)
Re: How to use filesystem boost copy_file with qrc resources
I suggest to also change the file name in the source directory. And I think you also need an INSTALL line in the cmake file.
- sirherrbatka
- Posts: 2159
- Joined: 07 Aug 2011, 17:21
Re: How to use filesystem boost copy_file with qrc resources
ok.I suggest to also change the file name in the source directory
I'm just exploring the topic.And I think you also need an INSTALL line in the cmake file.
- sirherrbatka
- Posts: 2159
- Joined: 07 Aug 2011, 17:21
Re: How to use filesystem boost copy_file with qrc resources
Ok, I think that everything works. I didn't have to add install inside cmake because:
is already here.
Can somebody confirm that this will work fine, please? I tested only on my own machine.
Code: Select all
# Install resources
INSTALL(DIRECTORY "${OpenMW_BINARY_DIR}/resources" DESTINATION "${DATADIR}" FILE_PERMISSIONS OWNER_READ GROUP_READ WORLD_READ COMPONENT "Resources")
INSTALL(DIRECTORY DESTINATION "${DATADIR}/data" COMPONENT "Resources")
Can somebody confirm that this will work fine, please? I tested only on my own machine.