Compile To DLL Tool

Working on new editor enhancements?
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Berikco.

Just a quick one, to compile a dll.
Compiles dll to source path, using source's name.

Code: Select all

;
; ------------------------------------------------------------
;
;           Dll Compile Help By Berikco
;
;           (c) 2002 - Benny Sels
;
; ------------------------------------------------------------
;
; For Purebasic Toolmenu version 3.40 and up
;
; --- Toolbox settings ---------------------------------------
;
; Arguments:
; First  argument "%FILE"   (Don't forget the "" around %FILE)
;
; ------------------------------------------------------------
;
; 2002/11/05
; First version
;

CompilerPath$="C:\Program Files\PureBasic\Compilers"  ; Your CompilerPath here !!

SourceFileName$ = ProgramParameter()

FileName$ = GetFilePart(SourceFileName$)
Path$ = GetPathPart(SourceFileName$)
 
FileName$=Left(FileName$,Len(FileName$)-3)+".dll"
DestFileDLL$ = Path$ + FileName$ 

Parameter$ = Chr(34) + SourceFileName$ + Chr(34) + " /DLL" 
Compiler$= CompilerPath$ + "\PBCompiler.exe"

RunProgram(compiler$ , Parameter$, CompilerPath$, 1) 

CopyFile(CompilerPath$ + "\purebasic.dll", DestFileDLL$)

Regards,

Berikco

http://www.benny.zeb.be
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Rings.

again a nice tool from you Berikco , thx for sharing.

Its a long way to the top if you wanna .....CodeGuru
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Berikco.

Just was playing with your dll example....and always must rename and copy dll to correct dir.....and i'm lazy guy so...

Regards,

Berikco

http://www.benny.zeb.be
Post Reply