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 Discussion / Compiled EXE's are large, is smaller possible?

Author
Message
Kohaku
21
Years of Service
User Offline
Joined: 3rd May 2004
Location: The not very United Kingdom
Posted: 19th Jun 2004 20:38
I was just wondering if theres a way to make the compiled EXE's file size smaller. Is it normal for 20 lines to be 1.5mb?

Infra-Dark
David T
Retired Moderator
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 19th Jun 2004 20:39
All of the interpreter code is packed in there aswell, with Pro it only compiles the DLLs it needs but in DB everything is lumped in there

Two strings walk into a bar. I'll have a pint says the first$%ASLDJ09920D"$"$D. Excuse my friend says the second, he isn't null terminated.
Kohaku
21
Years of Service
User Offline
Joined: 3rd May 2004
Location: The not very United Kingdom
Posted: 19th Jun 2004 20:54
*Takes note, 'buy Pro...'*

Till then though, am I stuck with big EXE's?

Infra-Dark
empty
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: 3 boats down from the candy
Posted: 19th Jun 2004 22:40 Edited at: 19th Jun 2004 23:04
Quote: " *Takes note, 'buy Pro...'*
Till then though, am I stuck with big EXE's?"

Actually the average size of a DBPro compiled exe is more than 1.5MB (currently)

There's a tool that allows you to use UPX to compress you exe file. I'll see if I have a link somewhere.


Edit:
Here's the link
http://atd-group.narod.ru/eng/coding.htm

Play Nice! Play Basic!
Kohaku
21
Years of Service
User Offline
Joined: 3rd May 2004
Location: The not very United Kingdom
Posted: 19th Jun 2004 23:11 Edited at: 19th Jun 2004 23:35
Ah, nice one. Cheers I'll look into that.

Wow! Thats the most handy tool I have for DBC. From 1.5mb to 12.6kb. Incredible, its a must for everyone! Thanks man!

Infra-Dark
Shadow Robert
22
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 20th Jun 2004 14:55
yeah a must but only for DarkBasic Standard/Enhanced, for Professional it'll kill your exe, or fail to compress... sometimes you get lucky.

DarkBasic Standard/Enhanced really do benifit ALOT from it in size terms
Remember that the exe's are Interpreter + Ascii Code Size; as compiled dbp technically just makes the exe and not compile any code itself.

So if your project is 40KB in size, the exe will be 1.40MB + 40KB. The UPX compressor will alter all of that to pure machine code though, which means it'll really compress it extremely

empty
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: 3 boats down from the candy
Posted: 20th Jun 2004 14:59
Well the DBC compiler doesn't append the source code to the executable, it compiles it to tokens before. And UPX will not compress this area, just the regular exe.

Play Nice! Play Basic!
Kohaku
21
Years of Service
User Offline
Joined: 3rd May 2004
Location: The not very United Kingdom
Posted: 21st Jun 2004 06:40 Edited at: 21st Jun 2004 06:42
*takes another note, 'buy dictionary...'*

Raven... She's hypnotic... Camera wont stop... AHH!!!...

Infra-Dark
Drew Cameron
21
Years of Service
User Offline
Joined: 30th Jan 2004
Location: Scotland
Posted: 21st Jun 2004 19:18
Thanks for that link by the way

The Old Remedy 3D Skateboarding - http://www.ddrw.dbspot.com
* * * Coming December 1st - "Dumbo"...
David T
Retired Moderator
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 21st Jun 2004 19:33
Quote: "Well the DBC compiler doesn't append the source code to the executable, it compiles it to tokens before"


I've seen a screen of somebody who decompiled an EXE to show thw source

Two strings walk into a bar. I'll have a pint says the first$%ASLDJ09920D"$"$D. Excuse my friend says the second, he isn't null terminated.
empty
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: 3 boats down from the candy
Posted: 21st Jun 2004 22:01
Yup, keyword here is "decompile".

Play Nice! Play Basic!
David T
Retired Moderator
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 21st Jun 2004 22:03
I thought that opening ResHack and finding the data there gave you an accurate representation of what was in the EXE - did this person change all of the tokens back again in order to get it to display the code? I'm sure it was just a screen of ResHack.

Two strings walk into a bar. I'll have a pint says the first$%ASLDJ09920D"$"$D. Excuse my friend says the second, he isn't null terminated.
empty
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: 3 boats down from the candy
Posted: 21st Jun 2004 22:44
Quote: "did this person change all of the tokens back again in order to get it to display the code?"

Yes.


Quote: "I'm sure it was just a screen of ResHack."

No, the tokens are appended to the exe, and thus not visible in ResHack (they're not part of the resource section).

Play Nice! Play Basic!
BearCDPOLD
21
Years of Service
User Offline
Joined: 16th Oct 2003
Location: AZ,USA
Posted: 22nd Jun 2004 22:16 Edited at: 22nd Jun 2004 22:28
I've noticed on the unrar site though is that it says exes made with the MAKE EXE option can be compressed, does this mean we can't compile our media into it and still get a stable compression?

[EDIT]
Didn't read the whole thing....well I guess what this utility needs now is documentation....anybody know of any?

Crazy Donut Productions, Current Project: KillZone
Web Site Button Does Not Work, Visit Here: http://www.geocities.com/crazydonutproductions/index.html
empty
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: 3 boats down from the candy
Posted: 23rd Jun 2004 01:24 Edited at: 23rd Jun 2004 01:25
The site offers three different things (there are more but well, these are the most important ones):
1) a snipptet showing how tp use a rar compressed file as an archive file.

2) a tool to make UPX (an exe compressor) work with DBC exes.

3) a tool to seperate compiled tokens from DB's VM/Interpreter.

Play Nice! Play Basic!
megamanx
20
Years of Service
User Offline
Joined: 17th Jun 2004
Location: Kentucky, USA
Posted: 23rd Jun 2004 02:20
You can use such tools with DBC? Now I feel like I've been ripped off with DBP. I tried using ASPack on a DBP project and it ruined it, but it would've worked had I been using DBC? Grrrr...

Login to post a reply

Server time is: 2025-05-27 19:02:35
Your offset time is: 2025-05-27 19:02:35