Adding automatically the Editor_BuidCount [Resolved]

Just starting out? Need help? Post your questions and find answers here.
User avatar
Kwai chang caine
Always Here
Always Here
Posts: 5494
Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France

Adding automatically the Editor_BuidCount [Resolved]

Post by Kwai chang caine »

Hello,

I want to adding the Editor_BuidCount when i compile my EXE or DLL
For example if my Editor_BuidCount = 100 :
NamePrg + " " + VersionPrg.Editor_BuidCount.ExtensionPrg so finally "KccProgram v1.0.100.exe"

Have you a way for do that ??

Have a good day
Last edited by Kwai chang caine on Thu Oct 04, 2012 11:59 am, edited 1 time in total.
ImageThe happiness is a road...
Not a destination
User avatar
Kwai chang caine
Always Here
Always Here
Posts: 5494
Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France

Re: Adding automatically the Editor_BuidCount

Post by Kwai chang caine »

Finally, i found a way alone like a big :D
It's surelly the worst...:oops: but that works for EXE and DLL
When i compile an EXE or a DLL the Build is automatically adding between the end of fileName and the Extension
If someone have better...I would not be offended :mrgreen:

Create executable and create a PersonalTools

CommandLine = PathOfTheEXE\InsertBuildCompile.exe
Arguments = %EXECUTABLE|%FILE
Name = InsertBuildCompile
Event = After create executable
Check "Running hidden"
Check "Hide tool from menu"

Code: Select all

; Created by KCC
For i = 1 To CountProgramParameters()
 Parametres.s + Space(1) + ProgramParameter()
Next

Executable$ = Trim(StringField(Parametres, 1, "|"))
CodeSource$ = Trim(StringField(Parametres, 2, "|"))
ParametrePbBuildCount.s = Chr(059) + Chr(032) + Chr(069) + Chr(110) + Chr(097) + Chr(098) + Chr(108) + Chr(101) + Chr(066) + Chr(117) + Chr(105) + Chr(108) + Chr(100) + Chr(067) + Chr(111) + Chr(117) + Chr(110) + Chr(116) + Chr(032) + Chr(061) + Chr(032)

; Lecture du BuildCount
Canal = ReadFile(#PB_Any, CodeSource$)
     
If Canal
      
 Repeat
  
  Donnee$ = ReadString(Canal)
  
  If FindString(Donnee$, ParametrePbBuildCount, 1)
   BuildCount$ = Trim(ReplaceString(Donnee$, ParametrePbBuildCount, ""))
   Break
  EndIf 
  
 Until Eof(Canal) <> #False
       
 CloseFile(Canal)
      
EndIf

Extension$ = "." + GetExtensionPart(Executable$)

If GetFilePart(Executable$) <> "InsertBuildCompile.exe"
 
 If Not RenameFile(Executable$, ReplaceString(Executable$, Extension$, "") + " Build" + BuildCount$ + Extension$)
  MessageRequester("", "Impossible d'ajouter l'indice de compilation.")
 EndIf
 
EndIf 
ImageThe happiness is a road...
Not a destination
Wood51
New User
New User
Posts: 7
Joined: Sat May 12, 2012 11:21 am

Adding automatically the Editor_BuidCount [Resolved]

Post by Wood51 »

Thanks a lot KCC !!!
@+ Wood51
User avatar
Kwai chang caine
Always Here
Always Here
Posts: 5494
Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France

Re: Adding automatically the Editor_BuidCount [Resolved]

Post by Kwai chang caine »

:wink:
ImageThe happiness is a road...
Not a destination
Wood51
New User
New User
Posts: 7
Joined: Sat May 12, 2012 11:21 am

Adding automatically the Editor_BuidCount [Resolved]

Post by Wood51 »

Hi KCC !
While you talk about Plugin , I made one . It's about procedure's declarations . If you want test it : http://www.purebasic.fr/french/viewtopic.php?t=13220

@+ wood51
User avatar
Kwai chang caine
Always Here
Always Here
Posts: 5494
Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France

Re: Adding automatically the Editor_BuidCount [Resolved]

Post by Kwai chang caine »

Yes very useful your PlugIn "Create declaration of procedure automaticaly" 8)
Like the regular expression is not my "cup of tea", i keep it :wink:
Thanks for sharing
Have a good day 8)
ImageThe happiness is a road...
Not a destination
Wood51
New User
New User
Posts: 7
Joined: Sat May 12, 2012 11:21 am

Re: Adding automatically the Editor_BuidCount [Resolved]

Post by Wood51 »

Kwaï chang caïne wrote: Like the regular expression is not my "cup of tea", i keep it :wink:
Me too, but I tested a nice Program who call "The Regex Coach" and this is very very very usefull for learn RegEx

For all about Thanks KCC
@+ Wood51
User avatar
Kwai chang caine
Always Here
Always Here
Posts: 5494
Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France

Re: Adding automatically the Editor_BuidCount [Resolved]

Post by Kwai chang caine »

:wink:
ImageThe happiness is a road...
Not a destination
Post Reply