PureBUILD PB Editor Plugin I. DESCRIPTION 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. II. INSTALLATION 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 : (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 : (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' III. TEST FILE [code]If #jaPBe_IsExecute MessageRequester("Create EXE", "Build number = " + Str(#jaPBe_ExecuteBuild) + Chr(10) + "Build date = " + FormatDate("%dd/%mm/%yyyy", #PureBUILD_Date) + Chr(10) + "Source = " + #PureBUILD_Source) Else MessageRequester("Compile/Run", "Build number = " + Str(#jaPBe_ExecuteBuild) + Chr(10) + "Build date = " + FormatDate("%dd/%mm/%yyyy", #PureBUILD_Date) + Chr(10) + "Source = " + #PureBUILD_Source) EndIf[/code] ----------------------------------------------------------------------- Plugin by Gnozal [gnozal@freenet.de or http://people.freenet.de/gnozal]. Please report any bugs at the purebasic forum.