• Dear Cerberus X User!

    As we prepare to transition the forum ownership from Mike to Phil (TripleHead GmbH), we need your explicit consent to transfer your user data in accordance with our amended Terms and Rules in order to be compliant with data protection laws.

    Important: If you accept the amended Terms and Rules, you agree to the transfer of your user data to the future forum owner!

    Please read the new Terms and Rules below, check the box to agree, and click "Accept" to continue enjoying your Cerberus X Forum experience. The deadline for consent is April 5, 2024.

    Do not accept the amended Terms and Rules if you do not wish your personal data to be transferred to the future forum owner!

    Accepting ensures:

    - Continued access to your account with a short break for the actual transfer.

    - Retention of your data under the same terms.

    Without consent:

    - You don't have further access to your forum user account.

    - Your account and personal data will be deleted after April 5, 2024.

    - Public posts remain, but usernames indicating real identity will be anonymized. If you disagree with a fictitious name you have the option to contact us so we can find a name that is acceptable to you.

    We hope to keep you in our community and see you on the forum soon!

    All the best

    Your Cerberus X Team

Pack executable file?

Wingnut

Well-known member
3rd Party Module Dev
Tutorial Author
Joined
Jan 2, 2020
Messages
1,414
Is there a way to pack resources folder into the .exe on the Windows platform? I would like to have only one exeutable with all the
textfiles, images and sounds inside it.
 
No. The only image you can store in a Windows exe is the icon.
 
No. The only image you can store in a Windows exe is the icon.
But of course that's wrong, Iv'e used standalone executables forever. You can embed whatever you want.
I have a technique so I can hide everything but I need to unpack it into a folder which they don't do either to my knowledge
maybe there's a way to use temporary hidden places but it feels a bit adhoc to solve it like that.
 
But of course that's wrong, Iv'e used standalone executables forever. You can embed whatever you want.
For Cerberus only the icon can be embedded. A Windows executable requires a resource file to embed other data. Cerberus doesn't have the code for a Windows specific application to handle resources in that way.
 
Okay an software installer might do the trick, or, I guess you could also make the game into a portable app.

My current solution is to create everything in cerberus code, the problem then is that the exe will create a folder called appname.data beside the executable the first time you run it. It's kinda ugly. I am not sure I can direct the folder to any name and any place but if that is out of the question then an Install-maker or portable-mkaer might be good choices.
 
On macOS I can actually write inside the "exe", and put the files you want inside there. I usually use the CX standard folder for internal files somewhere in that .app folderstructure. That way you have one single .app file that is permanently protected will all resoureces. But you can't do this for LInux and Windows to my knowledge. I really want to find a solution dfor Windows.
 
Or.. maybe it's possible, you just use internal to unpack them and CX knows where it puts those in whatever platform.

Come to think of it I think I've dones this, I feel stupid now. I will put up some code later if someone wants to know how after I have done that. In a year or two. I think I did it with sound on the forum already, there is working code.
 
Here's the relevant code I have already made to embed text graphics and sound inside executables on any platform

(windows macos Linux Android I think ios works too but i have not tries ios)


 
Thanks for NSIS installer tip, that's good to know!
 
You can always use stuff like UPX or molebox to pack everything into an exe - but usually anti-virus software will raise all sorts of flags and alarms about it.

I miss something like the zipstream module we had in Blitzmax. But the multiplatform nature of Cerberus make it impossible to work everywhere.
 
Back
Top Bottom