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 / parse the source code to the compiler

Author
Message
mr Handy
18
Years of Service
User Offline
Joined: 7th Sep 2007
Location: out of TGC
Posted: 18th Dec 2012 14:57 Edited at: 18th Dec 2012 17:50
Hi. I was searching the forums but did not find any info on topic. As you know, there is a lot of user-made source editors. Like CodeSurge, Indigo and others. But I've never seen an instruction on how to parse the source code to the compiler. Where did THEY got instructions?

So what's the point? There are lots of universal free powerful source editors. But they don't work with dbrpo project file (yeah, uncommon stuff). I want to try to make them parse the source code to the DBP compiler. It's just experiment, but I have no information to work with...

Any help appreciated.

...
I don't mean I want to write my own compiler, I just want to know how local editors are using original DBP compiler.
Zotoaster
21
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 19th Dec 2012 04:35
I've never used the DBP compiler, but my guess is that it takes a command line for the input source file. It will take care of the parsing and compiling, all it needs is the file name.

"everyone forgets a semi-colon sometimes." - Phaelax
mr Handy
18
Years of Service
User Offline
Joined: 7th Sep 2007
Location: out of TGC
Posted: 19th Dec 2012 07:15
Hmm... I should try.

*** Merry Chuckmas! ***
Phaelax
DBPro Master
23
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 19th Dec 2012 08:15
I believe I've only linked to the DBC compiler, which is handled differently. I'm sure there's a post about DBP somewhere on this, I may have even asked it before. But with a quick search I didn't find anything.

"You're not going crazy. You're going sane in a crazy world!" ~Tick
mr Handy
18
Years of Service
User Offline
Joined: 7th Sep 2007
Location: out of TGC
Posted: 19th Dec 2012 11:05
So do I! I've only seen posts about help on writing own compiler.

*** Merry Chuckmas! ***
Max P
16
Years of Service
User Offline
Joined: 23rd Jan 2010
Location:
Posted: 19th Dec 2012 17:09
The easiest way to do this is to create two files: a .dba file with all the source code and a standard .dbpro file with the project settings (these should be in the same folder). Then execute the DBPro compiler (C:\Program Files (x86)\The Game Creators\Dark Basic Professional Online\Compiler\DBPCompiler.exe) with the path to the .dbpro file passed in the command line:


mr Handy
18
Years of Service
User Offline
Joined: 7th Sep 2007
Location: out of TGC
Posted: 19th Dec 2012 17:18
Thanks, I will try this as soon as i get to my PC.

*** Merry Chuckmas! ***
mr Handy
18
Years of Service
User Offline
Joined: 7th Sep 2007
Location: out of TGC
Posted: 20th Dec 2012 09:00
That's my line:
Quote: "execute file "DBPCompiler.exe", "F:\123\123.dbpro", "C:\Program Files\The Game Creators\Dark Basic Professional\Compiler""

...and nothing happens. No exe.

*** Merry Chuckmas! ***
mr Handy
18
Years of Service
User Offline
Joined: 7th Sep 2007
Location: out of TGC
Posted: 20th Dec 2012 11:21 Edited at: 20th Dec 2012 11:28
I found out that it needs "_Temp.dbsource" file. Codesurge leaved it after compilation. But it's just the copy of my "hello world" with other name. Hmm.

I have played with .dbpro file:
Original editor always writes VerProductNumber=v1.0 and ignores some values from .dbpro
That's why any IDE is better than an official new one. What Lee was thinking?! *Facepalm* Nevermind.

Also I failed to add icon to the exe: i have 128x128 icon and final exe shows default DB icon, my icon shows only in "file list mode" in explorer... That's odd.

Here is how media encryption works:

Here is the answer:

Cheap symbol substitution. Bleh.

P.S. Although could somebody tell me why old "official" IDE compiles application with few colors? AFAIR, though.
If the compiling process is just parsing a project file to compiler,
then compiler should take icon as is, without any color conversion. How did old IDE changed that?

*** Merry Chuckmas! ***

Login to post a reply

Server time is: 2026-07-07 03:23:06
Your offset time is: 2026-07-07 03:23:06