Thanks Hooman.
Sounds like embedding resources would be carried out by the specific compiler/IDE.
In the context of OP2Archive, we could look at defining a function that took a resource key and returned a stream of the resource. This function would need separate bodies, one for Linux and one for Windows. The returned stream would be platform agnostic allowing the rest of the code to handle it regardless of platform concerns.
This function could be an interface or abstract function that was implemented for each platform. Or the body of the function could be a preprocessor directive redirect to the platform specific code.
Then the Archive code would need modifiying to include a constructor that takes a Stream.
I think the different StreamReaders in OP2Utility are already platform agnostic.
The rest of the Archive code would still be platform specific, but at least we wouldn't be adding to the problem.
I took a look at the Windows side of the function. No problem embedding the VolTemplate.vol as a custom resource. I understand the code to get a handle to the resource. I don't understand handles enough to figure out how to get a Stream from the resource handle.
We would just need to make sure the resource is referenced to the same key for both the Linux and Windows build. (If this is possible?)
-Brett