Posts: 522
Threads: 55
Joined: Jul 2022
Reputation:
48
Hi Boys!
do you have/use a tool for packaging a game/app with its used resources into a folder for distribution/condivision among staff/collaboration members?
Or do you have made one?
I talk about a tool that scans source code and collects the file loaded (Images, sound, music, font) then it creates a folder tree with this resources (or similar tool) .
ie
MainFolder|--->Assets|---->Images|--->SplashScreens
| | |--->SpritesSheets
| | |--->GraphicImageFonts
| | |--->GUI images
| | |--> ICO
| |
| |-----> Sounds|-->Sound & Noise
| | |--> Music
| | |--> Voices
| |
| |----> OS compatible Fontfiles
|
|---> Source Code
Posts: 2,910
Threads: 305
Joined: Apr 2022
Reputation:
167
That is certainly something someone could build, but you'd have to deal with all the nuances for calling images, paths, etc. For instance, if I use: _LOADIMAGE("c:\qb64\space-invaders\mypic.jpg", 32) I could easily find the path to create the directory if it didn't already exist, but if I use: _LOADIMAGE(dir1$ +"mypic.jpg", 32) then my routine would have to examine the software and figure out what path dir1$ was used for... and it gets worse; what if I use dir1$ for more than one path and I don't use a progressive top to bottom flow in my program? Now I essentially have to make my routine read and determine the entire code flow, to see what dir1$ assignment was used for this image to unpack it into the correct folder.
So no, I haven't made one of these nor do I use one.
What I did make 20+ years ago was a pseudo-zip file. It put all my routines together as one big exe file. The files were joined in such a way that when they were copied back with BINARY read/write, a header was read at the beginning of the file to determine the number of bytes of each file and the path and name, so each path could be made and each file could be copied to the correct folder in its exact size, and the remaining would look to the next set of header entries to begin unpacking the next file, and so on.
Pete
Posts: 3,446
Threads: 376
Joined: Apr 2022
Reputation:
345
The easiest way to do this is set up your folders as so:
QB64 ---> MY PROJECT FOLDER --> SUBFOLDERS
Now keep the source code and compiled EXE in MY PROJECT FOLDER (one folder for each project use as "SPACE INVADERS" or "ASTEROIDS" or "TENTACLE PORN DOWNLOADER".... Or whatever your needs might be.
Now, if you ever need to share that project, just 7zip or winrar or tar or whatever file compression routine you use, use it on MY PROJECT FOLDER and include subfolders with that compression.
PRESTO!! One simple file ready to extract with all resources intact and file structure maintained. It really doesn't get any simpler than this.
Sure, somebody could write a program to do this. I used to have one back in the day -- SAC (Steve's Anexoric Code), which "ate" files and then later "barfed" them back up later from the single file they made, but it was amature grade workmanship. It *worked*, but I certainly can't compare to the compression amount or speed or efficiency of 7ZIP or any of those other softwares dedicated to the process. It ended up being just a lot easier to use the proper tool for the job, than to try to make and maintain my own.
Posts: 4,692
Threads: 222
Joined: Apr 2022
Reputation:
322
09-16-2025, 04:15 PM
(This post was last modified: 09-16-2025, 04:22 PM by bplus.)
The only thing different that I do from what Steve said is that I keep all my work and others in a QB Files folder separate from the current QB Folder that contains QB64pe.exe and all its stuff. That way when QB64pe gets updated I dont have to move all my QB64 files to a new place. It also makes it easier to backup all those files onto flash drive (you don't need to backup QB64pe files just get another download).
I also tell my QB64pe shortcut to start in my QB Files Folder after each new QB64pe update.
My QB Files folder is also divided into Major sub category Folders along with all the project Name folders like: Graphics, DeskTop apps, Test Code for working Subs and Functions, Games, Math, Interpreters, GUI...
724 855 599 923 575 468 400 206 147 564 878 823 652 556 bxor cross forever
Posts: 522
Threads: 55
Joined: Jul 2022
Reputation:
48
Hi friends
yeah I thank all of you! These are all good advices... I must refine this idea