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 / Sending Files to the DBPCompiler.exe - How?

Author
Message
nonZero
14
Years of Service
User Offline
Joined: 10th Jul 2011
Location: Dark Empire HQ, Otherworld, Silent Hill
Posted: 21st Oct 2012 20:31 Edited at: 22nd Oct 2012 11:36
Okay, I really have searched these forums thoroughly and found nothing useful on it. I know I asked this question in the DBE thread a moment ago, but I thought I'd start a thread on it for the following reasons:

1) I'll get more responses

2) Because it'll make it easier for anybody to find this info in the future.

3) It is rather off-topic in the DBE thread and I don't wanna seem like a thread-jacker.

And with point 2 in mind, I shall post any information I dig up on this matter (and credit the source) here, including the results of various methods/suggestions and eventually what got it to work. I'm hoping to get down to the real technical details of this so it'll serve as a useful reference to others.

Anyway, hit me some info and/or examples

EDIT:

Okay, thanks to Sergey K, this problem is resolved. The reason one can't simply pass a file to the compiler is it needs a "working directory" too. It will not grab that from the filepath passed, this must be specified manually. So the command and arguments are:


MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 21st Oct 2012 22:50
Max P may be able to help here...

But I recall that there is a STYX or IANMs plugin command that handles this... or even an internal one... just cannot recall it, so maybe look at IANMs plugin command set... for now...

Sergey K
22
Years of Service
User Offline
Joined: 4th Jan 2004
Location:
Posted: 21st Oct 2012 23:12 Edited at: 21st Oct 2012 23:17
if you mean by "sending files to compiler" make the compiler.exe to compile your code, then its not the way it works..

1st, u making a .dbpro file with all the includes and all the source files, then you opening the compiler.exe and giving him your .dbpro file full path.

thats how compiler works..

its something like

execute file "<DBP Path>\compiler.exe","<.dbpro source file>","<own project folder>"

Advanced Updater for your games!
nonZero
14
Years of Service
User Offline
Joined: 10th Jul 2011
Location: Dark Empire HQ, Otherworld, Silent Hill
Posted: 21st Oct 2012 23:20
Nah, MrV, I'm getting at something outside of DBP here. For example, let's say I had ran this from the command-line:
DBPCompiler C:/blah/myGame.dba
I'd want to see "myGame.exe"in "C:/blah/". Instead I get a brief thinking...thinking...nope, stuff you pal, go compile somewhere else so what I'm basically wanting to know is where those IDE makers are getting their info on how to pass stuff to the compiler (For the record, I'm not making an IDE as such, so I am NOT any competition to you guys, I promise; cross my heart and hope to die - well, if I had a heart or could die) and make the thing spit out and executable.

nonZero
14
Years of Service
User Offline
Joined: 10th Jul 2011
Location: Dark Empire HQ, Otherworld, Silent Hill
Posted: 21st Oct 2012 23:24
Tks, Sergey K, I shall try this tomorrow (abt to go to bed, lol) as I didn't pass the "working directory" as I assumed the compiler grabbed it from the path of the source dba.

MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 21st Oct 2012 23:27
Quote: "DBPCompiler.exe "


I accidently misread the title... my bad...

Sergey K
22
Years of Service
User Offline
Joined: 4th Jan 2004
Location:
Posted: 21st Oct 2012 23:29
well thats solvable too
i made some time ago an IDE.. http://forum.thegamecreators.com/?m=forum_view&t=77691&b=8
but i made it in delphi,

So, to respond to a WM_USER message you need to declare a procedure like this in Delphi. First at the top of your code in the interface:


And then in the implementation this is what I have:


CompilerError is a private variable to the class, so when it happens to be false, I know that the compiler should quit executing and tell the user the error message. Here's how my IDE shows the error message when it runs into it:



originally posted by one pro delphi coder hyrichter.
but thats the method basicly.

delphi is pretty easy to understand,
who ever knows C++ will understand that too.

Advanced Updater for your games!
nonZero
14
Years of Service
User Offline
Joined: 10th Jul 2011
Location: Dark Empire HQ, Otherworld, Silent Hill
Posted: 22nd Oct 2012 11:28
@Sergey K:
Tks a lot, you really made my day! I feel stupid because I wasn't passing a working directory.
Basically I did this:

Instead of this:

Which caused the problem. I assumed the compiler would get the working directory from the file path. I feel like such an idiot for missing that . It never even occurred to me ("Assumption is the mother of all..."). Anyhow, this is great!!!

@MODs:
Could anyone, if they have time, rename this thread to "[RESOLVED] - Sending Files to the DBPCompiler.exe - How?" for the sake of anybody searching the forums in the future? Cheers.

[SIDENOTE}
@MrV:
Quote: "Quote: "DBPCompiler.exe ""

lol, typos in bold as always
[/SIDENOTE]

MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 22nd Oct 2012 14:49
Busted

Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 23rd Oct 2012 02:58
Yep.
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 23rd Oct 2012 03:21
LMAO

Login to post a reply

Server time is: 2026-07-08 06:45:51
Your offset time is: 2026-07-08 06:45:51