Package file on MS-Windows

I’m working on Document based app for macOS. User’s documents (images/pdf, etc.) are saved as package on macOS. Each package look like a single file for the end user. It contains a SQLiteDatabase file and it’s related files (images/pdf, etc.). I don’t want to store those user file directly in the database.

I’ve decide to put all files in a document package. It’s fine for my future user and easy to deal with my code. User see is document as one file but in fact it’s a folder with several documents on its.

In the future I’ll want to deploy my app in a MS-Windows environment. Does package exists in MS-Windows on the same way as it exist on macOS?

I really don’t want to store the user’s files in the SQLiteDatabase.

Microsoft did this kind of thing with OLE Documents, which were like mini filing systems with embedded project items. Tricky with Xojo.

The only things I know that ‘work’ like packages on Windows are archives: Zip, Rar, PKG for example.
You can of course change the extension so that they reflect your app.
So you can create a Zip file and call it mystuff.myextension , no problem.
It then is your job to unpack the contents as you need them, and to update the zip with any amended data.
Because SQLLite databases will not work when in a read-only location, it may be best to create a folder in ApplicationData, (or Temp), and unpack the file there.
Work on the values, and then compress them back into a new/updated file when you are done.

1 Like

Microsoft xlsx, docx and pptx are all zip files. I used to unzip them into a temp folder and deal with the contents.


One option on Windows is to put all the files into the hidden folder ProgramData inside an application specific folder that you create. That is where I usually put any SQLite database If an app requires one. You can certainly store additional application specific files there that you store in the Mac package.


See How to Customize Folders with Desktop.ini - Win32 apps | Microsoft Learn