[Implemented] Dll creation in Directory/name.dll

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

[Implemented] Dll creation in Directory/name.dll

Post by BackupUser »

Restored from previous forum. Originally posted by plopzz.

Hi

I would like to see 1 option with name and directory for the created dll...
In french :
Voila le probleme. Je travaille sur une application qui peut utiliser des dll. Le probleme est que le nom est fixe dans l'exe de cette application, et qu'a chaques tests je dois recopier purebasic.dll dans le directory de l'application et la renommer. Faut avouer que c'est pas pratique du tout ! :)
A moins que j'ai loupe quelque chose et que ce soit deja possible ??

Merci (et bravo fred)
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 fred.

Ok, I will add it.

Fred - AlphaSND
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 plopzz.

Ok thanks.

Fred :
Est-ce qu'il y a un bricolage que je pourrais faire en attendant ?
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 Bodind.

yes:

;
; ------------------------------------------------------------
;
; 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:\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$)

Save this code after setting the right path to your compiler, and compile it as .exe Then adjust the tools pref to the above settings and that's all !

Dominique
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 plopzz.

Hehe thanks, i had the same idea, work great for the moment, but i think a real solution are better (in the IDE)

++
Post Reply