Tailbite 1.4.17 with PB 5.73 (Windows)

TailBite specific forum

Moderators: gnozal, ABBKlaus, lexvictory

mpz
Enthusiast
Enthusiast
Posts: 494
Joined: Sat Oct 11, 2008 9:07 pm
Location: Germany, Berlin > member German forum

Tailbite 1.4.17 with PB 5.73 (Windows)

Post by mpz »

Hello,

Here is a small tutorial on how to use Tailbite under Windows with PB 5.73LTE (and higher). With Tailbite you can create and use additional programs as pb lib.


Installation:
1) Download with exe files but also source codes here:
https://c.web.de/@334971174352067001/oc ... xEm8IuFhNw

2) Please unpack the zip file into the PureBasic folder (Purebasic\Tailbite)

3) Choose in PB "Menu Tools" -> "Configure Tools" -> "New"

4) In Commandline chose the Tailbite manager (c:\Program Files\PureBasic\TailBite\TBManager.exe)

5) in Name: TailBite\TBManager and ok and you are ready to go


Notes:
1) Tailbite requires admin rights
2) It is important that all variables etc. are available in procedures.
3) To use lib function you must declare these as ProcedureDll
4) Have a look on my file "MP3D_OpenGL_Library" how to make a userlib
5) I use the program PureHelp Maker Version 1.04.109 to make a help file from the created lib. If you are interested, i can also publish it here as a download and instruction note. i dont have this as souce code, it was from Gnozal and i never heard from him again :oops: . If have anybody the sourcecode, i need them :wink: ..

First lib with tailbite and a solution for a problem

1) Create a code

ProcedureDLL Increment(Value, Inc = 2)
ProcedureReturn(Value + inc)
EndProcedure

"inc = 2" doesnt work with tailbite, so you must make it in this case:

Code: Select all

Procedure Increment_All(Value,INC) ; My kind of solution
  ProcedureReturn (Value + INC)
EndProcedure
      
ProcedureDLL Increment(Value)  ; Procedure2
  INC = 2
  ProcedureReturn Increment_All(Value, INC)
EndProcedure
 
ProcedureDLL Increment2(Value,INC) ; Procedure2
  ProcedureReturn Increment_All(Value, INC)
EndProcedure
2) Save this file as myfirst_lib.pb

3) Start the Tailbite manager (PB menu -> tailbite manager)

4) Activate here "Multilib option" to create a threadsafe and a unicode lib

5) Choose the correct Purebasic folder

6) Choose the library subsystem folder. Here i choose for my lib "MP3D_OpenGL_Library" the "subsytems\OpenGL\purebasic\userlibraries".

7) Select your file myfirst_lib.pb with correct path (C:\Program Files\PureBasic\Examples\myfirst_lib.pb)

8) Save your setting with Save

9) Choose Tailbite!


If you make a new program you can use the new function for example (if you choose the correct subsystem library, if you want you can create a own subsystem)

debug Increment(10) -> 12 (10+2)
debug Increment(10,10) -> 20 (10+10)

Greetings
Michael
Working on - MP3D Library - PB 5.73 version ready for download
User avatar
Bisonte
Addict
Addict
Posts: 1226
Joined: Tue Oct 09, 2007 2:15 am

Re: Tailbite 1.4.17 with PB 5.73 (Windows)

Post by Bisonte »

Image

Edit :

Even though userlibraries have few followers, one more small note about Tailbite that many may have already forgotten.

If you want to return a string from a procedure you have to define a global "ReturnString" and assign the string to it to make it work.

Example :

Code: Select all

Global ReturnString$

ProcedureDLL.s GiveMeString(Value.i)
  
  ReturnString$ = Str(Value)
  
  ProcedureReturn ReturnString$
  
EndProcedure

And to make something like this ....

Image

only add a comment after the ProcedureDLL statement.

Code: Select all

ProcedureDLL.s GiveMeString(Value.i) ; This text is displayed in the IDE

And to read all this again there is also a help file in the archive ! There are again all characteristics described.
PureBasic 6.04 LTS (Windows x86/x64) | Windows10 Pro x64 | Asus TUF X570 Gaming Plus | R9 5900X | 64GB RAM | GeForce RTX 3080 TI iChill X4 | HAF XF Evo | build by vannicom​​
English is not my native language... (I often use DeepL to translate my texts.)
mestnyi
Addict
Addict
Posts: 995
Joined: Mon Nov 25, 2013 6:41 am

Re: Tailbite 1.4.17 with PB 5.73 (Windows)

Post by mestnyi »

Why only for window?)))
User avatar
Bisonte
Addict
Addict
Posts: 1226
Joined: Tue Oct 09, 2007 2:15 am

Re: Tailbite 1.4.17 with PB 5.73 (Windows)

Post by Bisonte »

mpz only adapt it for newer PB. The source is included. Feel free to make a Linux/MacOS version. My knowledge to do this is not exist. ;)
In this forum are threads for linux and macos too : See Announcements
PureBasic 6.04 LTS (Windows x86/x64) | Windows10 Pro x64 | Asus TUF X570 Gaming Plus | R9 5900X | 64GB RAM | GeForce RTX 3080 TI iChill X4 | HAF XF Evo | build by vannicom​​
English is not my native language... (I often use DeepL to translate my texts.)
Post Reply