It is currently Mon Mar 08, 2021 12:34 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 23 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: PureBUILD - Editor plugin [Build & Backup support]
PostPosted: Wed Oct 12, 2005 12:32 pm 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat Apr 26, 2003 8:27 am
Posts: 4229
Location: Strasbourg / France
PureBUILD editor plugin : build and backup support for the new Purebasic Editor (3.94+)

Description
Quote:
PureBUILD is a plugin for the new purebasic editor.
It enables build and backup support.

1. Build support :

At runtime, you have 4 new constants :

For the build number :
- #PureBuild_Number (or #jaPBe_ExecuteBuild for jaPBe source compatibility)
By default, the build number is only incremented after 'Create executable'.
The build number is also incremented after 'Compile/Run' if the option is enabled.
Note that this option only works after automatic registration of the plugin.

For the build date :
- #PureBuild_Date
Returns a number (purebasic internal format). FormatDate() can be used to transform the date value in user readable format.

For the build source file :
- #PureBuild_Source
Returns the source file complete path + filename.

For the execution mode :
- #PureBuild_IsExecute (or #jaPBe_IsExecute for jaPBe source compatibility)
Possible values : #TRUE = compiled with 'Create executable' / #False = compiled with 'Compile/Run'

To remember the build, the plugin adds one remark line to your source code before the PB editor footer
(last line of your source code).
For example : ; PureBUILD Build = 1 [generated by PureBUILD Plugin]
You can modify the build number at your wish.

2. Backup

If backup is enabled, a backup file is created for each new build.


Installation
Quote:
1. COPY PLUGIN TO ANY DIRECTORY

Example : C:\PureBasic394\Program\PureBuild.exe

2. TOOL REGISTRATION

2.1. AUTOMATIC

Start PureBuild.exe and use the '(Un)register' button.
Configure the options as you like.

2.2. MANUAL

There 2 entries to add : one for 'Create executable' and one for 'Compile/Run'

NEW ENTRY (first)

Commandline : <Path to plugin> (example : C:\PureBasic394\Program\PureBuild.exe)

Arguments : "%FILE" "%COMPILEFILE" /RUN

Name : PureBUILD /RUN

Event to trigger the tool : Before Compile/Run

Options : Check 'Wait until tool quits'
Check 'Hide Tool from the main menu'

NEW ENTRY (second)

Commandline : <Path to plugin> (example : C:\PureBasic394\Program\PureBuild.exe)

Arguments : "%FILE" "%COMPILEFILE" /EXE

Name : PureBUILD /EXE

Event to trigger the tool : Before Create Executable

Options : Check 'Wait until tool quits'
Check 'Reload Source after tool has quit' and select 'into current source'
Check 'Hide Tool from the main menu'


Test code
Code:
If #jaPBe_IsExecute
  MessageRequester("Create EXE", "Build = " + Str(#jaPBe_ExecuteBuild))
Else
  MessageRequester("Compile/Run", "Build = " + Str(#jaPBe_ExecuteBuild))
EndIf


Download
http://gnozal.ucoz.com/PureBUILD.zip

_________________
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).


Last edited by gnozal on Sat Dec 16, 2006 9:12 am, edited 4 times in total.

Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Oct 12, 2005 12:49 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sat Sep 20, 2003 3:57 pm
Posts: 216
Location: Germany
Nice plugin. But it must be "%FILE" "%COMPILEFILE" /RUN and "%FILE" "%COMPILEFILE" /EXE.

_________________
irc://irc.freenode.org/#purebasic


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Oct 12, 2005 1:39 pm 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat Apr 26, 2003 8:27 am
Posts: 4229
Location: Strasbourg / France
Deeem2031 wrote:
Nice plugin. But it must be "%FILE" "%COMPILEFILE" /RUN and "%FILE" "%COMPILEFILE" /EXE.

Yes, you are right. Apparently the editor doesn't place the filenames between quotes.

_________________
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Oct 12, 2005 3:26 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sat Sep 20, 2003 3:57 pm
Posts: 216
Location: Germany
Hm, when i create a executable your plugin is very slow. You should try to increase the speed. With this version it doesnt make fun to compile ;)

_________________
irc://irc.freenode.org/#purebasic


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Oct 12, 2005 3:32 pm 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat Apr 26, 2003 8:27 am
Posts: 4229
Location: Strasbourg / France
Deeem2031 wrote:
Hm, when i create a executable your plugin is very slow. You should try to increase the speed. With this version it doesnt make fun to compile ;)

I will try to make it faster

_________________
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Oct 12, 2005 3:41 pm 
Offline
User
User

Joined: Wed Oct 05, 2005 2:44 pm
Posts: 19
I can't test it right now...
Are we talking about 1 second slower or 10 seconds?


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Oct 12, 2005 4:20 pm 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat Apr 26, 2003 8:27 am
Posts: 4229
Location: Strasbourg / France
Update

Should be faster now

_________________
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Oct 12, 2005 5:13 pm 
Offline
Always Here
Always Here
User avatar

Joined: Thu Jun 24, 2004 2:44 pm
Posts: 5756
Location: Berlin - Germany
thx, but I use the "*.CFG"-files. Does the possibility exist also of supporting these?

_________________
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Oct 12, 2005 8:58 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Wed Apr 21, 2004 7:12 pm
Posts: 731
How about an option for counting the Compile/Run builds as well?

_________________
~I see one problem with your reasoning: the fact is thats not a chicken~


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Oct 13, 2005 7:53 am 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat Apr 26, 2003 8:27 am
Posts: 4229
Location: Strasbourg / France
ts-soft wrote:
thx, but I use the "*.CFG"-files. Does the possibility exist also of supporting these?
I think that if I store the build number in these files, it will be overwritten the next time the source code is saved ?
Killswitch wrote:
How about an option for counting the Compile/Run builds as well?
Sure, but there is no option to reload the source in the editor after 'Compile/Run' like there is after 'Create Executable', so the information would not be saved. Maybe editing ReloadSource in Tools.prefs ?

_________________
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Oct 13, 2005 3:59 pm 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat Apr 26, 2003 8:27 am
Posts: 4229
Location: Strasbourg / France
Update

Changes
- New constant #PureBuild_Date
- New constant #PureBuild_Source

_________________
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Oct 13, 2005 9:35 pm 
Offline
Always Here
Always Here
User avatar

Joined: Thu Jun 24, 2004 2:44 pm
Posts: 5756
Location: Berlin - Germany
gnozal wrote:
ts-soft wrote:
thx, but I use the "*.CFG"-files. Does the possibility exist also of supporting these?
I think that if I store the build number in these files, it will be overwritten the next time the source code is saved ?
You can store the build number on the top of source?

The MessageRequester by unsaved source is not good for me :wink:

_________________
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Oct 14, 2005 7:52 am 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat Apr 26, 2003 8:27 am
Posts: 4229
Location: Strasbourg / France
ts-soft wrote:
You can store the build number on the top of source?
Ok, I will save it in the source even if there is no PB footer (for the next version).

_________________
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Oct 14, 2005 8:33 am 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat Apr 26, 2003 8:27 am
Posts: 4229
Location: Strasbourg / France
Update

Changes
- a little faster
- for people using the "*.CFG"-files (no PB footer in the source file), the build number is stored at the end of the file.

_________________
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Oct 21, 2005 7:52 am 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat Apr 26, 2003 8:27 am
Posts: 4229
Location: Strasbourg / France
Update

Changes
- Automatic plugin registration
- Option : also increment build after Compile/Run
- Option : create backup for each new build

_________________
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 23 posts ]  Go to page 1, 2  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye