pbcompiler with /commented without executing the program ??

Everything else that doesn't fall into one of the other PB categories.
josku_x
Addict
Addict
Posts: 997
Joined: Sat Sep 24, 2005 2:08 pm

pbcompiler with /commented without executing the program ??

Post by josku_x »

Hello!

I am sure some of you are using the PBCompiler with the /COMMENTED switch to produce the PureBasic.asm file. However, I am creating a tool which allows viewing the ASM output, but I have a minor problem. Everytime I run the PBCompiler with the /COMMENTED switch, it creates the PureBasic.asm file, but then it executes the executable. How do I run the PBCompiler with the /COMMENTED switch WITHOUT executing the program?

There seems to be no switch for this.

Thanks!
User avatar
Deeem2031
Enthusiast
Enthusiast
Posts: 216
Joined: Sat Sep 20, 2003 3:57 pm
Location: Germany
Contact:

Post by Deeem2031 »

One way would be start the compiler in standby-mode and set the NOEXECUTE-flag on compiling. Another way would be using the api-hook lib to hook CreateProcess_() to filter the Purebasic[...].exe.
irc://irc.freenode.org/#purebasic
josku_x
Addict
Addict
Posts: 997
Joined: Sat Sep 24, 2005 2:08 pm

Post by josku_x »

Deeem2031 wrote:One way would be start the compiler in standby-mode and set the NOEXECUTE-flag on compiling. Another way would be using the api-hook lib to hook CreateProcess_() to filter the Purebasic[...].exe.
Do you have an example to show how would I use CreateProcess_() with this? Thanks!
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post by Trond »

Yes this is very annoying.
josku_x
Addict
Addict
Posts: 997
Joined: Sat Sep 24, 2005 2:08 pm

Post by josku_x »

Trond wrote:Yes this is very annoying.
I agree. If I remember right, the compiler of PB 3.94 didn't launch the program if you used the /COMMENTED switch. But I am maybe wrong.

However, if there is a solution to use CreateProcess_() to filter the PBCompiler that it won't execute anything it would be very appreciated if someone could give an example.

thanks
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post by Trond »

Call it with the /exe switch.
josku_x
Addict
Addict
Posts: 997
Joined: Sat Sep 24, 2005 2:08 pm

Post by josku_x »

Trond wrote:Call it with the /exe switch.
The /EXE switch doesn't help at all.
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post by Trond »

josku_x wrote:
Trond wrote:Call it with the /exe switch.
The /EXE switch doesn't help at all.
Yes it does, you just need to specify a filename.
josku_x
Addict
Addict
Posts: 997
Joined: Sat Sep 24, 2005 2:08 pm

Post by josku_x »

Ok, is this command right?

shell> PBCompiler.exe MyFile.pb /COMMENTED /EXE MyExe.exe
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post by Trond »

yes.
josku_x
Addict
Addict
Posts: 997
Joined: Sat Sep 24, 2005 2:08 pm

Post by josku_x »

Trond wrote:yes.
Thanks. I got my viewer ready, now it comes to the GUI part. :D
User avatar
flaith
Enthusiast
Enthusiast
Posts: 704
Joined: Mon Apr 25, 2005 9:28 pm
Location: $300:20 58 FC 60 - Rennes
Contact:

Post by flaith »

“Fear is a reaction. Courage is a decision.” - WC
josku_x
Addict
Addict
Posts: 997
Joined: Sat Sep 24, 2005 2:08 pm

Post by josku_x »

flaith wrote:only in French : http://home.tele2.fr/erix14/PureASM.htm :wink:
A nice program, but looks awful. I hate that skin. I am creating a tool BTW, not french software :wink: (EDIT: Now I see PureASM is also a tool)

Sorry for the rough comments, but the "IDE" of PureASM looks pretty awful and the text is a bit hard to read.
User avatar
flaith
Enthusiast
Enthusiast
Posts: 704
Joined: Mon Apr 25, 2005 9:28 pm
Location: $300:20 58 FC 60 - Rennes
Contact:

Post by flaith »

no problemo :wink:
“Fear is a reaction. Courage is a decision.” - WC
Post Reply