Page 1 of 1
Posted: Wed Mar 06, 2002 1:05 pm
by BackupUser
Restored from previous forum. Originally posted by chr1sb.
hi,
it would be nice to bundle all the graphics, sounds etc. I use into my main executable for easier distribution of a single file + also so other people can't redistribute my app. with changed graphics, sounds etc.
The simplest way (well, simple for me to use but probably a lot of work to implement) is something like as follows:
A command similar to include binary where I specify the file to incorporate into my executable:
IncludeResource("filename")
and then the current commands for loading stuff from disk (sounds, modules, sprites etc.) are 'overloaded' so as well as the usual:
LoadSound("filename")
I could also use:
LoadSound(LoadFromResource("filename"))
Posted: Wed Mar 06, 2002 2:45 pm
by BackupUser
Restored from previous forum. Originally posted by Rings.
Search for 'xtract' on Pauls-site.This is a solution without(or less)
changes for your sourcecode.Ist packs all files in a directory into one file.
This version will been updated within next 4 weeks and the source will been released too.Have fun
http://www.reelmediaproductions.com/pb/
search application for 'xtract'
Getting better with a little help from my friends....thx Siggi
Posted: Wed Mar 06, 2002 6:05 pm
by BackupUser
Restored from previous forum. Originally posted by MrVainSCL.
Hi chr1sb
Welcome to PureBasic... Have a look to the forum and you will see that this topic was posted and discused very often... Fred has planed (maybe for the next release - PB3.0 !?) such a stuff like...
as it work at the moment and then you should should be able to decode it from your label:
Code: Select all
LoadSprite(0,?MySprite)
;
MySprite:
IncludeBinary d:\test.bmp
That would be ofcourse fine and more profssional instead to save all the stuff temp to youd hd before... Hope Fred will modify all original *load* commands so we can decode/handle the included stuff direct without any saving to your hd... Anyway i would prefer to see commands like on BlitzBasic Amiga i.e....:
Code: Select all
DecodeSound(#num,?label)
DecodeSprite(#num,?label)
DecodeImage(#num,?label)
and so on...
Mhhhh btw i dont really understand why do you want something like LoadSound(LoadFromResource("filename")) When we want use our included stuff directly, we dont need any filename for this to get the adress/handle the stuff... We only need a label name where the stuff has been stored...
You can just inlcude your stuff and save it temp to your hd and load it with the standard PureBasic *load* commands... Good luck and happy coding...
PIII450, 256MB Ram, 6GB HD, RivaTNT, DirectX8.1, SB AWE64, Win98SE + Updates...
greetz
MrVainSCL! aka Thorsten
Posted: Wed Mar 06, 2002 9:01 pm
by BackupUser
Restored from previous forum. Originally posted by PB.
> it would be nice to bundle all the graphics, sounds etc. I use into my main
> executable for easier distribution of a single file + also so other people
> can't redistribute my app. with changed graphics, sounds etc.
While I sympathise (regarding redistribution with changed data), I would suggest
checking the integrity of the data files via another method, simply because the
most successful apps are those which can be customised by the user...
And most importantly: Even sound/graphics inside an executable can be replaced
with any good resource hacking program (such as ResHacker). So you may think
the data is safe inside, but in reality it's not.
PB - Registered PureBasic Coder
Edited by - PB on 06 March 2002 21:04:09
Posted: Wed Mar 06, 2002 10:08 pm
by BackupUser
Restored from previous forum. Originally posted by cor.
And most importantly: Even sound/graphics inside an executable can be replaced
with any good resource hacking program (such as ResHacker). So you may think
the data is safe inside, but in reality it's not.
I always use aspack to compress the executeable, it even makes PB smaller as it already is..
It cannot be used then like programs such as ResHacker, exescope etc. to change resources.
Using Windows 98 SE
Registered PB version : 2.90 (Windows)
--------------------------
C. de Visser
Author of Super Guitar Chord Finder
http://www.ready4music.com
Posted: Wed Mar 06, 2002 10:39 pm
by BackupUser
Restored from previous forum. Originally posted by MrVainSCL.
PB wrote
And most importantly: Even sound/graphics inside an executable can be replaced
with any good resource hacking program (such as ResHacker). So you may think
the data is safe inside, but in reality it's not.
Hi PB
You may be right, there a some good resource hacking programs around but as i know, they all work ONLY if the program you want to hack - was written using C/C++ i.e. and it does not work on a program, if you used assembler only...!?
cor wrote
I always use aspack to compress the executeable, it even makes PB smaller as it already is..
It cannot be used then like programs such as ResHacker, exescope etc. to change resources.
Hi cor
To pack your executeables with any packer will ofourse make samller files, because its a packer! When packing your program, most times your text in your executeable will no longer be readable when showing to the packed executeable with a hex-editor i.e! There are so called fileprotectors but there are EVER ways, how to unprotect and unpack your files to get the original file and hack in it if you want...
Hi @ all
Sorry... i think this topic is related how to include stuff to an executeable and have direct access to it without saving temp to hd and not how to protect/crypt your executeables

bye
PIII450, 256MB Ram, 6GB HD, RivaTNT, DirectX8.1, SB AWE64, Win98SE + Updates...
greetz
MrVainSCL! aka Thorsten
Posted: Thu Mar 07, 2002 10:03 am
by BackupUser
Restored from previous forum. Originally posted by PB.
> I always use aspack to compress the executeable,
> It cannot be used then like programs such as ResHacker, exescope etc.
> to change resources.
Yes, but a dedicated user can always unpack a packed exe. There's a whole
bunch of exe unpackers here:
http://www.protools.cjb.net/
MrVain: I don't know about resource hackers only working with C/C++ apps...
I was able to change the icon of one of my PureBasic apps with Restorator...
I haven't tried changing IncludeBinary'ed files though...
PB - Registered PureBasic Coder
Edited by - PB on 07 March 2002 10:05:38
Posted: Thu Mar 07, 2002 6:07 pm
by BackupUser
Restored from previous forum. Originally posted by DarkUni.
This is a topic of discussion OFTEN in Blitz Basic land too.
The bottom of the truth is;
-If someone wants your resources bad enough, they are going to get them.
-If someone wants to CHANGE your resources and redistribute (turning your brilliant video game into ELF BOWLING) bad enough, they will find a way to do it.
If you understand that a dedicated hacker CAN and WILL get your stuff if they want it, then you can look at it easier as 'how can I keep John Q. AOLer from changing my planet background into some naked chick'.
A simple file checksum routine on resource loading can solve that easily. Lightweight, simple, and doesn't require you to run a gauntlet every time you want to make a minor change/update.
If someone wants your planet background to use as their desktop - you cannot stop them. There are screen grabbers and rippers available even to AOL users. If it appears on the screen, it can be taken.
That's my .02 on it.
Shane R. Monroe, Dark Unicorn Productions
Pure Basic Basement
http://pb.darkunicornproductions.com
Posted: Fri Mar 08, 2002 4:34 am
by BackupUser
Restored from previous forum. Originally posted by Motu.
I think the points in using a singel sound.pak instead of alot of Files are simple:
- It looks more professional (most importantly to me)
- Normal users don't need to see all the subdirectorys. They just move something and the program crashes. Poor support (just like me)
- The installation is a littel faster, while the windows system handels the movement of one large file faster than many short files. (not very important, but somehow I dislike programs that have a size of 10 MB and take 30 min to install)
any other predivide I forgot ?
Motu
Posted: Fri Mar 08, 2002 4:42 am
by BackupUser
Restored from previous forum. Originally posted by Motu.
- Well, at least if any other application is running while installing there will be no file fragmentation...
Motu
-----------------
Martin Jässing
master creating (R)
Braamkamp 76
22297 Hamburg
[url]mailto:
mjaessing@master-creating.com">
mjaessing@master-creating.com
<a href="
http://www.master-creating.com[/url]
Posted: Fri Mar 08, 2002 10:16 am
by BackupUser
Restored from previous forum. Originally posted by chr1sb.
Firstly thanks all for feedback on this post - it has been most helpful to me.
xtract looks like it will be ideal. looking forward to updated version.
Regarding security of files: this isn't really my primary concern - I'd just prefer a single .exe for reasons like Motu says: more professional and less 'fragile' to casual or accidental damage.
MrVainSCL: You're right, the way you describe decoding from label is much nicer - my coding experience is fairly limited in some respects so I don't always know the best syntax to convey my thoughts
PB: your point about successful apps being customizable is noted, I am now inspired to incorporate modifcation facilities into my project...
who knows, maybe the Elf Bowling version of my app that someone creates will be better than my original version
Posted: Fri Mar 08, 2002 4:41 pm
by BackupUser
Restored from previous forum. Originally posted by Franco.
I suppose the best would be to compress the bin file with PureBasic before including it to the exe.
After that when the Application is running you have to pick the bin file and unpack it.
Because you have to know the right size to unpack it, you can be aware that nobody changes anything (he needs the right compress/uncompress algorithm and the right packed size). The uncompress function of PureBasic is really fast!
And in addition to that - make a crc32 check right after starting your application.
Just a thought.
But I don't know if all this is really possible with version 2.95.
AFAIK you can't load an image from memory right now (always have to write it to disk first - that must change in the future).
Have a nice day...
Franco
Sometimes you have to go a lonely way to accomplish genius things.
Posted: Sat Mar 09, 2002 7:18 am
by BackupUser
Restored from previous forum. Originally posted by TronDoc.
yep, if somebody wants your stuff bad enough, they will get it.
there are even utilities to unpack/unecrypt/decode and dissassemble.
just search the web a little.. ..you'll see.
I still want the ability to include the resources and use them
without extracting them to disk (in the manner discussed here)
and for other reasons discussed here; but not for security.

Joe B.
elecTRONics DOCtor
{registeredPB}P150 32Mb w98/DOS/Linux NO DirX NO IE
