Closed ohlidalp closed 4 months ago
Still doesn't load though
o.O Well, that can only mean zziplib (which is behind Ogre::ZipArchive) can't do it. Let me see...
... well, no: https://github.com/OGRECave/ogre/blob/master/OgreMain/src/OgreZip.cpp#L106 - the file is opened via _openFileStream()
helper which exist specifically to resolve the windows unicode problem. I'm baffled.
o.O Well, that can only mean zziplib (which is behind Ogre::ZipArchive) can't do it. Let me see...
... well, no: https://github.com/OGRECave/ogre/blob/master/OgreMain/src/OgreZip.cpp#L106 - the file is opened via
_openFileStream()
helper which exist specifically to resolve the windows unicode problem. I'm baffled.
Wrong code though, we use 1.11.6, not latest OGRE master
Here you are https://github.com/OGRECave/ogre/blob/v1.11.6/OgreMain/src/OgreZip.cpp#L182
Wrong code, we use 1.11.6, not latest OGRE master
True, I should really 💤 instead. 😄
Well, I was right, it uses zzip (master uses assimp) https://github.com/OGRECave/ogre/blob/3fc7c8e8e95204894865576d2b45cd4606d6d262/OgreMain/src/OgreZip.cpp#L182
EDIT: Though zziplib has a complex system of custom file handlers: https://github.com/gdraheim/zziplib/blob/8e10dc825ba37b9a1c9faa684370f6271e33ecbc/zzip/zip.c#L834 ... it's possible I missed some override in OGRE.
Well, we need to move to latest ogre then, advanced a bit https://github.com/tritonas00/rigs-of-rods/commits/ogre-13, following your steps
Still bites like a mad dog though :laughing:
Wrong code, we use 1.11.6, not latest OGRE master
True, I should really zzz instead. smile
Well, I was right, it uses zzip (master uses assimp) https://github.com/OGRECave/ogre/blob/3fc7c8e8e95204894865576d2b45cd4606d6d262/OgreMain/src/OgreZip.cpp#L182
EDIT: Though zziplib has a complex system of custom file handlers: https://github.com/gdraheim/zziplib/blob/8e10dc825ba37b9a1c9faa684370f6271e33ecbc/zzip/zip.c#L834 ... it's possible I missed some override in OGRE.
Ogre 13 fixes it, just tried, folders/files created successfully
Closing as obsolete - all signifficant commits from this PR already made it's way to master.
Under MS Windows, you can't use naked
fopen()
orstd::fstream
as they don't accept UTF-8 encoded paths with special characters.As a solution, we use OGRE file system API exclusively.
Components reviewed in this audit:
Ogre::Codec::encodeToFile()
- STB image codec usesfstream
, FreeImage codec calls FreeImage_Save() which uses fopen().