Qbasicnews.com
May 26, 2020, 05:07:54 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Back to Qbasicnews.com | QB Online Help | FAQ | Chat | All Basic Code | QB Knowledge Base
 
   Home   Help Search Login Register  
Pages: [1] 2
  Print  
Author Topic: How I can Attachment images and sounds in the exe file?  (Read 5193 times)
x-bit
New Member

Posts: 11


« on: June 19, 2003, 12:27:51 AM »

Sorry, my english is bad, but i try to make myself clear...

I wanna make the program enclosing images and sounds only one file exe.

How can i store only one file exe?
And wich the commands i use to ready these images and sounds?
thanks
Logged
Agamemnus
x/ \z
*****
Posts: 3491



« Reply #1 on: June 19, 2003, 12:29:38 AM »

You can't. You can only open them from an exe. (unless you have one of those exe unzippers from the following 2 sources [I think they have those in options somewhere])

Download winzip from www.winzip.com.

A MUCH better program (compression-wise) is called winrar. Search for it on google.com. It's there somewhere. Not all people have winrar though.
Logged

Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."

Visit www.neobasic.net to see rubbish in all its finest.
x-bit
New Member

Posts: 11


« Reply #2 on: June 19, 2003, 01:13:51 AM »

Quote from: "Agamemnus"
You can't. You can only open them from an exe. (unless you have one of those exe unzippers from the following 2 sources [I think they have those in options somewhere])

Download winzip from www.winzip.com.

A MUCH better program (compression-wise) is called winrar. Search for it on google.com. It's there somewhere. Not all people have winrar though.


Hummm... I think that you didn't understand me.
I want put images and sounds in my exe file to I will be use it, later as a game, understand me?

...as... imagine, one program opened and show for you one picture on the right corner on screen and start to write the left corner on screen, this my example...

But i don't want put out  of exe file the picture that will be on screen.

I want make this, put the picture and sounds in exe file.

How can i make this?
Logged
seph
Na_th_an
*****
Posts: 1915



« Reply #3 on: June 19, 2003, 01:41:05 AM »

Think about it logically... Do you have any computer games?

Do they have any image/sound/data files outside of the actual main executable (EXE) file?

Are they made by majour companies?

If those companies knew of a way to add external files to the EXEs, and if they thought it was the best option, do you think they would?

Answer yourself with logic.
Logged

earn.
x-bit
New Member

Posts: 11


« Reply #4 on: June 19, 2003, 01:58:32 AM »

Quote from: "seph"
Think about it logically... Do you have any computer games?

Do they have any image/sound/data files outside of the actual main executable (EXE) file?

Are they made by majour companies?

If those companies knew of a way to add external files to the EXEs, and if they thought it was the best option, do you think they would?

Answer yourself with logic.


Seph, maybe  you're right. I forget currently Operation System...
I think if all could be in only file would be guarantee portability of file.

Maybe my idea could be better if exist qbasic for linux. Theres in linux packet running...

But i very hate this... i'm programmer, i'm commander of machine, why can i don't make it? I'm worried with the thought of others personals and big game's companies ...

anyway, thankx seph
Logged
Glenn
I hold this place together
*****
Posts: 786



WWW
« Reply #5 on: June 19, 2003, 02:13:13 AM »

in an archive (.ZIP file) and distribute just one file.  (That's the "usual" technique.)
Logged

ravelling Curmudgeon
(geocities sites require copying and pasting URLs.)
I liked spam better when it was something that came in a can.
Windows should be defenestrated.
x-bit
New Member

Posts: 11


« Reply #6 on: June 19, 2003, 02:44:53 AM »

Quote from: "Glenn"
in an archive (.ZIP file) and distribute just one file.  (That's the "usual" technique.)


Why don't understand me?

I want not distribute it...

I want to have all file ( pictures, sounds ) in execute file...

It's that all i want.
Logged
toonski84
__/--\__
*****
Posts: 2567



« Reply #7 on: June 19, 2003, 02:58:12 AM »

My best guess would to be append it and read from your own exe file after a certain point (you'd have to store it in a variable and change it after you compile it and check), but i have no earthly clue how not to get dos to read it as instructions
Logged

i]"I know what you're thinking. Did he fire six shots or only five? Well, to tell you the truth, in all this excitement, I've kinda lost track myself. But being as this is a .44 Magnum ... you've got to ask yourself one question: 'Do I feel lucky?' Well, do ya punk?"[/i] - Dirty Harry
Glenn
I hold this place together
*****
Posts: 786



WWW
« Reply #8 on: June 19, 2003, 03:12:25 AM »

not to interprete it as instructions.  The .EXE header tells DOS what to do with the file.  (But I'm going to perform an experiment in a minute.)

Well, it didn't work this time, but it did the last time I tried it.  The last time might have been dumb luck.  (And I don't get any kind of luck very often, and I guess I'm not due again yet.)
Logged

ravelling Curmudgeon
(geocities sites require copying and pasting URLs.)
I liked spam better when it was something that came in a can.
Windows should be defenestrated.
Sterling Christensen
Na_th_an
*****
Posts: 1328


« Reply #9 on: June 19, 2003, 03:40:32 AM »

If I recall correctly, the BWSB mod-playing library (Bells Whistles and Sound Boards) came with a utility to store a mod within an exe. I think the included setup.exe could play some mod music to test your settings without any external files.

I'm not sure how it works, but it shows that it is possible.
Logged
wildcard
*.*
Administrator
__/--\__
*****
Posts: 2370



« Reply #10 on: June 19, 2003, 03:43:31 AM »

Appending data to an exe is easily done. You can read from the exe header the length of the file or just go to the end of the file, either way. You can add any stuff you want to from the end of the file, the only thing is you need to code it in such a way that you know where different objects are within the appended data. There is a text reader maker in the ABC archives which shows you how this is done, it takes a normal .txt file and adds it on to the readers .exe which when executed displays the text that is appended to it.
Logged
Hard Rock
I hold this place together
*****
Posts: 775


WWW
« Reply #11 on: June 19, 2003, 12:13:19 PM »

Quote
Think about it logically... Do you have any computer games?

Do they have any image/sound/data files outside of the actual main executable (EXE) file?

Are they made by majour companies?

If those companies knew of a way to add external files to the EXEs, and if they thought it was the best option, do you think they would?

Answer yourself with logic.


Yes. To All Answers. And they do. Its called Using recourse files in windows. Pretty much every windows appliation in existence uses em some way or another. What do i win?

Under DOS i know allegro allows you to do it, See allegro Setup.exe, but i gave up trying to add it. It gave me a headace.(but if you know how to do it im sure it's a piece of cake) But yes you can, i'm, just trying to clarify this here. Since Several people said/or made the implication that it cannot be done.

But one final thing:  I dont think its a good idea under real mode dos, becuase well, memory limitations.
Logged

b]Hard Rock[/b]
[The Stars Dev Company] [Metal Qb flopped] [The Terror]
Stop Double Posts!
Whats better? HTML or Variables?
Joakim
Senior Member
**
Posts: 230



WWW
« Reply #12 on: June 19, 2003, 01:53:34 PM »

Of course it can be done!
Look at DATA statements in qb. There you have it - data in your exe.
And there are a program or a library @ qb45.net somewhere, afair, to append stuff to your exe.
Ever played a click'n'play game? They have all data in one exe.
But I have no idea how to do it. I may look into it soon though - I'm sure there's tutorials on it etc.
Logged
seph
Na_th_an
*****
Posts: 1915



« Reply #13 on: June 19, 2003, 01:59:08 PM »

Your best bet, buddy, is to use .pak files. That way, you can include the image and sound files within the .pak file and that way, you won't have a big mess of folders and files to deal with. You see, .pak file have no compression, they are simply a way of storing multiple files into one file so you can access them from your program. The only library I have seen so far that lets you access .pak files within the routines is UGL. Also, UGL comes with a pak-explorer, which you can use to add and remove files and directories from inside a .pak file Smiley
Logged

earn.
Glenn
I hold this place together
*****
Posts: 786



WWW
« Reply #14 on: June 19, 2003, 02:30:02 PM »

*did* compress data.  I'm wondering if it's a completely different thing.  But why wouldn't he want to compress his files?
Logged

ravelling Curmudgeon
(geocities sites require copying and pasting URLs.)
I liked spam better when it was something that came in a can.
Windows should be defenestrated.
Pages: [1] 2
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!