manuel.gysin Posted April 2, 2011 Posted April 2, 2011 Hello I currently developing a torrent based launcher for updating local game files. Now I search a way to write into the UNG-Archive but I don't know how I can access this file from C++. At the time the launcher is running the unigine engine is not loaded. What I want is to update or add new files to the archive without replace the whole archive file. The launcher is written in C++ (qt4 and libtorrent-rasterbar). Someone have an idea how to solve this? Thanks a lot Manuel
ulf.schroeter Posted April 2, 2011 Posted April 2, 2011 Now I search a way to write into the UNG-Archive but I don't know how I can access this file from C++. Hi Manuel, I think without UNIGINE source code this will be hard to achive
manuel.gysin Posted April 3, 2011 Author Posted April 3, 2011 Hi Manuel, I think without UNIGINE source code this will be hard to achive Hello Ulf I thought that I face this fact. Then the way to go seems to download it to a temporally location and try to update the content while engine is loaded. I hope the file class provides such actions. (As much as I know ZIP with password protection is not supported so this is no alternative)
ulf.schroeter Posted April 3, 2011 Posted April 3, 2011 Then the way to go seems to download it to a temporally location and try to update the content while engine is loaded. I hope the file class provides such actions. (As much as I know ZIP with password protection is not supported so this is no alternative) I had a look into source code. At the moment Archiver class is NOT accessible both via C++ and UNIGINE script. I think you have to ask UNIGINE for a such feature exposure. Also internal archiver class does not provide functionallity for updating (or deleting old/writing new) an existing archive file at the moment. Nevertheless a workaround would be to create a new archive as a combination of the client existing full archive and newly downloaded incremental change archive and finally rename updated full archive. BTW I would guess that incremental game code and data update downloads are a quite common customern requirement. Maybe UNIGINE already has some ideas/plans for a more general engine-provide solution to this.
manuel.gysin Posted April 4, 2011 Author Posted April 4, 2011 I had a look into source code. At the moment Archiver class is NOT accessible both via C++ and UNIGINE script. I think you have to ask UNIGINE for a such feature exposure. Also internal archiver class does not provide functionallity for updating (or deleting old/writing new) an existing archive file at the moment. Nevertheless a workaround would be to create a new archive as a combination of the client existing full archive and newly downloaded incremental change archive and finally rename updated full archive. BTW I would guess that incremental game code and data update downloads are a quite common customern requirement. Maybe UNIGINE already has some ideas/plans for a more general engine-provide solution to this. Hi Ulf Thanks for your effort! I post later under suggestions this topic. If I understood the workaround right, everything is temporarily unpacked and then repacked with the new content. I think in this time frame it should be very easy to dump the stuff and get access to all files. (Ok, it would be possible to create an encrypted container and extract everything there for the time frame but hey I just want to update an archive.)
Recommended Posts