#PB_Editor_CompileCount/BuildCount in filenames

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
oreopa
Enthusiast
Enthusiast
Posts: 283
Joined: Sat Jun 24, 2006 3:29 am
Location: Edinburgh, Scotland.

#PB_Editor_CompileCount/BuildCount in filenames

Post by oreopa »

Would it be possible to have access to the compiler constants #PB_Editor_CompileCount and #PB_Editor_BuildCount in filenames...?

Like when saving you could name your files sth like "file_%compilecount%_%buildcount%.pb" and it would save as "file_64_1.pb" or whatever, and auto increase on each compile/build + save.

I know you can do a similar thing with PUREBuild tool, but its not very nice in some ways. Would rock to have this as a native feature and would help me immensely with source control/bug fixing.

If I have missed this functionality, please correct me :)
Proud supporter of PB! * Musician * C64/6502 Freak
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: #PB_Editor_CompileCount/BuildCount in filenames

Post by Fred »

What you need is to use the new session history tool, it will records all your changes and you will have the possibility to rollback at anytime easily.
User avatar
oreopa
Enthusiast
Enthusiast
Posts: 283
Joined: Sat Jun 24, 2006 3:29 am
Location: Edinburgh, Scotland.

Re: #PB_Editor_CompileCount/BuildCount in filenames

Post by oreopa »

Thanx Fred. I will look into it, i had a feeling this new feature may do the trick...

My main aim is to have release versions of my own apps (incidentally using the errorhandler feature, and the disasm lib to produce nice debug log output and crashlogs). And obviously I use the errorhandler source file/linenumber features to pin point where the error is. Time to read the fine manual on this.

Thx again Fred and team. PB is coming on leaps and bounds... some of the new features (linecontinuation <3) are just, well... *HUG*
Proud supporter of PB! * Musician * C64/6502 Freak
freak
PureBasic Team
PureBasic Team
Posts: 5940
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Re: #PB_Editor_CompileCount/BuildCount in filenames

Post by freak »

For your purposes i would suggest to use a tool for version control. I suggest mercurial (http://mercurial.selenic.com/). It is not that hard to lean and requires no server.

The SessionHistory provides a good way to find previous edits in your source files and reverting recent edits. But to keep snapshots of your entire program, especially to manage release versions nothing can beat real version control.
quidquid Latine dictum sit altum videtur
Post Reply