Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Compiling an Exe as a PCK EXE

Author
Message
DreamCodersRealm
23
Years of Service
User Offline
Joined: 23rd Oct 2002
Location: United States
Posted: 7th Apr 2003 23:54
Ok, It is my understanding that when you compile ur program as a PCK included file, ur code is compiled as an exe and is suppose to link to ur compiled media which is located in ur PCK file. However, Whenever I compile this way and run my exe (With the PCK file in the same directory), I get an error saying it can't find the media. What do I need to do to correct this problem? Is this like in C++ when we have to use a special command like MAKEINTRESOURCE(int value); to show where to locate ur file in the PCK? Can someone show me a working program's source that is compiled as a exe with the PCK file with it? Thanks in advance! By the way, check out my site (Been updated a lot!) and please join my forum!

http://www.DreamCodersRealm.com


Thanks and GOD Bless you Always my Friends!!!!!
I love GOD and Asian Girls! I am gonna marry and Asian girl one day!
Arrow
23
Years of Service
User Offline
Joined: 1st Jan 2003
Location: United States
Posted: 8th Apr 2003 04:13
Did you make sure to check the "Small EXE and PCK file" under Executable File Setting?

The Legend of Zelda IS NOT an RPG! It's an Adventure, just like Ico or Dark Cloud.
DreamCodersRealm
23
Years of Service
User Offline
Joined: 23rd Oct 2002
Location: United States
Posted: 8th Apr 2003 06:46
Yes. Of course.

I love GOD and Asian Girls! I am gonna marry and Asian girl one day!
Thialfi
23
Years of Service
User Offline
Joined: 19th Mar 2003
Location: Asgard
Posted: 8th Apr 2003 14:12
I completely understand the problem he's going through and wish to have a solution of some kind for it. When I try to include attached media into the EXE, I get all kinds of strange things. If I do simple "*.*" as the file, it won't include the files at all (or it includes them and just doesn't know it). If I put the names of the individual pictures I want, it seems to include them but can't use them properly. I'll get some images not showing at all, while others are stretched across the screen. If I put the images in the same directory as the exe, it'll suddenly work ok.

Because someone will ask:
1. I do "Add" the pictures to the "Media" section.
2. The names of the files do show up on the list.
3. The names I reference in the program are the same as the ones on the list.
4. Under "Settings"->"Executable File Settings" I use "EXE with Attached Media"
5. I copy the exe file into a completely seperate directory from the images to test it.
6. I use DarkBASIC Pro.

By Thors hammer
By the sons of Odin
I shall avenge thee
Ratty Rat
23
Years of Service
User Offline
Joined: 24th Sep 2002
Location:
Posted: 8th Apr 2003 14:31
I cannot help on this one, rather I will add my own 'it doesn`t work' as I get exactly the same problems as described above, I cannot get any of my media files to be correctly included in the PCK (or in the executable when its on 'Normal EXE'.

Anyone got any ideas on this one???
DreamCodersRealm
23
Years of Service
User Offline
Joined: 23rd Oct 2002
Location: United States
Posted: 8th Apr 2003 20:40
I am glad I am not the only one! Haha! Yeah I do all the exact same things you guys do and it doesn't work. =( Someone please help us!



GOD Bless you Always my Friends!!!!

I love GOD and Asian Girls! I am gonna marry and Asian girl one day!
OzBot
23
Years of Service
User Offline
Joined: 24th Feb 2003
Location: Sweden
Posted: 8th Apr 2003 21:05
Yep I can't do it either and I have tried all sorts, so we agree we are all hopeless

Australian living in Sweden, Go figure.
AndyUK
23
Years of Service
User Offline
Joined: 2nd Apr 2003
Location: United Kingdom
Posted: 8th Apr 2003 23:02 Edited at: 8th Apr 2003 23:02
i managed to include my bsp in my exe file by REadding the pk3 file under "add media". if i try any other setting like above not only does it crash saying cant find media but it also corrupts my original bsp file.. im sure this will be fixed. for now its the usual drill and our favorite word "workaround"

| P4 2.4(533) | 512DDR(333) | GF4Ti4200 64MB | WinXP Home Sp1 | Cup of CoffeE |
Andy Igoe
23
Years of Service
User Offline
Joined: 6th Oct 2002
Location: United Kingdom
Posted: 9th Apr 2003 03:13 Edited at: 9th Apr 2003 03:13
I know exactly what you are suffering from, and the cures for some

1) PCK files hold the .exe and not any media. I find this annoying and pointless too.

2) *.* Wildcards do not work because of shortfalls in the editor - but if you download the latest editor (1.09b) it does actually work, sadly i'm not sure of the link and it doesn't appear to be on the patch download page - and I think it should be...

3) 2D media seems to be unreliable, I only encounter this when I finish a project and i've only finished about 6 since I got DBPro - i've not really 'investigated' this issue. I will say that i've had no trouble with 3D media and textures associated with them, I suspect this is a complilation error.

4) Included media in DBPro is in no way secure from even a fairly novice user and bloats the size of your exe by more than the size of your media.

As this subject has been raised a few times recently I think I will write a few functions for rapid loading and saving of encrypted media. I'll do it as DBPro functions for two reasons, firstly so you can change the encryption algorythm for extra security (although i'll use a password system anyway so novices can still be secure) and secondly because I don't have the tools or skill to make a DLL!

I'll do this over the next few days.

Pneumatic Dryll, Outrageous epic cleric of EQ/Xev
God made the world in 7 days, but we're still waiting for the patch.
Ratty Rat
23
Years of Service
User Offline
Joined: 24th Sep 2002
Location:
Posted: 9th Apr 2003 13:22
That function would be nice, but if there are any C/Delphi coders listening who are looking for a DLL idea then how about this - add functions to create/add to/save/reload/extract/remove media to/from a CAB (cabinet) type file.

The CAB file(s) could be loaded as one into memory and the contents extracted as needed. I am actually not too bothered about them being compressed or encrypted, but this could be added.

Not only would this make including all the media files allot neater it would also get round the problems with Clone Object (as you could just extract a second copy of the same object, without having to go back to the drive).
TheCyborg
23
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Denmark
Posted: 9th Apr 2003 13:42
It works for me.... Did you remember to put a cross in the "Include Media" box. This is not only to include it into exe's but also the PCK file.

TheCyborg Development.
http://TheCyborg.Amok.dk
The Ultimate Source To DarkBASIC Programming.
Rob K
Retired Moderator
23
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 9th Apr 2003 17:47
"4) Included media in DBPro is in no way secure from even a fairly novice user and bloats the size of your exe by more than the size of your media."

There IS an encrypt media option, but how secure that is, I have no idea.

" add functions to create/add to/save/reload/extract/remove media to/from a CAB (cabinet) type file."

What about Guy Savoie's RGT Zip Tools, which let you extract media from a zip file (although you can only create zip files if you have the special version which is only available to RGT customers).

http://www.realgametools.net/forums

Current Project: Retro Compo. Entry.
MrTAToad
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 9th Apr 2003 17:57
And dont forget my RAR plug-in...

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
Ratty Rat
23
Years of Service
User Offline
Joined: 24th Sep 2002
Location:
Posted: 9th Apr 2003 19:14
I wondered if they would do it, do they hold the archive in memory or extract from disk??

"Don`t try to engage my enthusiasm, I don`t have one"
Rob K
Retired Moderator
23
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 9th Apr 2003 19:21
The ZIPs can be extracted to files or straight into memblocks.

Current Project: Retro Compo. Entry.
Ratty Rat
23
Years of Service
User Offline
Joined: 24th Sep 2002
Location:
Posted: 9th Apr 2003 19:25
Not what I meant I mean does it hold the archive in memory as it would then be quicker to get multiple copies of one file.

Not to worry though, I will try them out and see what happens.

Ta for the advice.

RR

"Don`t try to engage my enthusiasm, I don`t have one"
rapscaLLion
23
Years of Service
User Offline
Joined: 29th Aug 2002
Location: Canada
Posted: 10th Apr 2003 00:07
You could try Guy's ZIP file tools...

Alex Wanuch
aka rapscaLLion
Kousen Dev Progress >> Currently Working On Editors
DreamCodersRealm
23
Years of Service
User Offline
Joined: 23rd Oct 2002
Location: United States
Posted: 10th Apr 2003 10:07
No, We payed for a working Dark Basic Pro that includes media in Pack files. That's what I payed for and that's what I want.

I love GOD and Asian Girls! I am gonna marry and Asian girl one day!
Andy Igoe
23
Years of Service
User Offline
Joined: 6th Oct 2002
Location: United Kingdom
Posted: 10th Apr 2003 11:23
I would like to see more included media options and variations on the default options now. I too did believe DBPro included media in PCK files when I was considering purchasing but that may be my miss-understanding in reading the literature.

However as i've progressed my skill with DB i've realised that included media in this way is still no more secure because of the method in which DBPro compiled exe's access their media.

Therefor you can ask for PCK media if you choose for cosmetic reasons, or use an alternative method that gives you the media security which I believe is the real reason behind your post.

Of course DB can secure your media with the encryption option, but personally I find that it takes far too long to compile in this manner and typically I loose patience after an hour of waiting and abort.

The fact that DB can, does not meen it is the best way. I can use input "Enter name: ";name$ or I can write a realtime input routine, I know which I preffer...

Pneumatic Dryll, Outrageous epic cleric of EQ/Xev
God made the world in 7 days, but we're still waiting for the patch.
indi
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 10th Apr 2003 12:43
I have found that an included mp3 file stutters terribly.

can someone verify

is it because the mp3 is already compressed and the attachment feature tries to compress/uncompress and play on the fly?

or does it copy the file incorrectly and creates pops and ticks?

TheCyborg
23
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Denmark
Posted: 10th Apr 2003 14:08
if you have installed another sound codec (like I did) that could be the reason. If you have installed some DivX codecs the sound codecs most likely came together with those. To test if this is the case do the following:

1) Press Start
2) Press Run...
3) Enter "mplayer2"
4) Play your mp3 file in this player

If the music contain pops and ticks here then your sound codec is the problem.

TheCyborg Development.
http://TheCyborg.Amok.dk
The Ultimate Source To DarkBASIC Programming.
indi
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 10th Apr 2003 14:21

Login to post a reply

Server time is: 2026-07-10 16:22:59
Your offset time is: 2026-07-10 16:22:59