Page 1 of 1

Posted: Tue Nov 05, 2002 8:23 pm
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

Posted: Wed Nov 06, 2002 10:11 am
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

Posted: Wed Nov 06, 2002 11:55 am
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