RSN is a popular method for packaging together a bunch of SPCs (ie. anything on SnesMusic.org). I want to be able to work with these in STD. Don’t tell me why people decided to use RAR for a standard SPC compressed format. It’s proprietary :[
Fortunately, the usage rights of Unrar seem pretty liberal.
I’m considering compiling externally the unrar application, and including as part of the SNES Tracker package. SNES Tracker / STD will call it upon it from source manually — but can that be done in a portable manner?? This is the golden question… Alternatively, would it be easier to learn the source level of the unrar application and incorporate it directly into the SNES Tracker application? Are there still portability issues with this??
I feel that I can probably keep the application external, and probably have some simple preprocessor logic to do the right thing based on *nix / Windows based system..
I don’t know the traditional approach, so I’m thinking of the following approach..
Use SDL_GetPrefPath to get a portable base path, then create a tmp folder inside it.
Extract a rsn into that tmp folder and proceed to open all files inside it…
Remove the contents of the tmp directory at program cleanup/exit.
I just read this on a forum: “Prefer ‘/’ over ‘\\’. ‘/’ works on Windows and pretty much everything else. ‘\\’ works only on Windows and on nothing else. Also ‘/’ tends to be less error prone because \ is the escape character.” — How true is this??? Or rather, how old a version of Windows does apply?? Seems safe, I’ll rely on this.