Page 1 of 1

[SOLVED] Is there a variable to find out Tailbite is running

Posted: Wed May 28, 2008 7:15 am
by IceSoft
Is there a variable (constant is better) to find out Tailbite is running?

I have a userlib which has different variables settings if it compiling with Tailbite. At the moment I have to change this value by hand... a Compilerif check will be usefull. But for this I need a constant to check if the compiler starts by Tailbite or not.

Posted: Wed May 28, 2008 11:09 pm
by ABBKlaus
Not possible for now. Btw for what is this good for ?

Posted: Thu May 29, 2008 6:24 am
by IceSoft
ABBKlaus wrote:Not possible for now. Btw for what is this good for ?
Good for userlib debugging.

Before I creating an userlib I test it as an normal Procedure for the first time and after an successful test I make the test again with the generated userlib.

Example:

Code: Select all

CompilerIf #ICEDLL = 1
  ProcedureDLL ICE_GetFPS()
CompilerElse
  Procedure ICE_GetFPS()
CompilerEndIf

Posted: Thu May 29, 2008 10:56 am
by ABBKlaus
what about using the debugger directive :

Code: Select all

CompilerIf #PB_Compiler_Debugger = 1 
  MessageRequester("INFO","Now in debug mode")
CompilerElse 
  MessageRequester("INFO","Normal mode")
CompilerEndIf

Posted: Thu May 29, 2008 11:25 am
by IceSoft
ABBKlaus wrote:what about using the debugger directive :
Sorry, but this is not what I mean.

I have an own test environment which is running in realease mode of the userlib. But It is different between calling as Procedure and ProcedureDLL.

Posted: Thu May 29, 2008 11:29 am
by DarkDragon
IceSoft wrote:
ABBKlaus wrote:what about using the debugger directive :
Sorry, but this is not what I mean.

I have an own test environment which is running in realease mode of the userlib. But It is different between calling as Procedure and ProcedureDLL.
Btw.: You can use ProcedureDLL without creating a dll/userlib and run it like normal applications ;-) .

Code: Select all

ProcedureDLL Test()
  MessageRequester("Hello", "ProcedureDLL or Procedure?")
EndProcedure

Test()

Posted: Thu May 29, 2008 11:33 am
by IceSoft
DarkDragon wrote:Btw.: You can use ProcedureDLL without creating a dll/userlib and run it like normal applications ;-) .
Is this an official PureBasic feature? If yes I will use it.

Posted: Thu May 29, 2008 11:39 am
by DarkDragon
IceSoft wrote:
DarkDragon wrote:Btw.: You can use ProcedureDLL without creating a dll/userlib and run it like normal applications ;-) .
Is this an official PureBasic feature? If yes I will use it.
Well you can expect that it will run in all future versions, because in the assembler source you'll just see another label like a normal procedure and an export in the export table, but as you don't create a DLL you don't have an export table. As long as you don't use ProcedureCDLL it should work fine.