Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2007
    Location
    Delphi II
    Posts
    1,534

    Build Time Version Updater

    Some time ago I recall seeing a post in which someone was asking for build version tallying. Well, here's what I came up with...hope it helps.
    Code:
    BuildTime = {};
    
    --======================>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    function BuildTime.VersionUpdate(sAFVersionFilePath)   --[[>>
    << Updates the build version of your program each        >>
    << time it runs. Be sure to disable it before compiling. >>
    <<<<<<<<<<<<<<<<<<<<<==================================--]]
    if not File.DoesExist(sAFVersionFilePath) then
    tAFProgramVersion = {};
    tAFProgramVersion[1] = 0;
    tAFProgramVersion[2] = 0;
    tAFProgramVersion[3] = 0;
    tAFProgramVersion[4] = 0;
    TextFile.WriteFromTable(sAFVersionFilePath, tAFProgramVersion, false);
    end
    
    tAFProgramVersion = TextFile.ReadToTable(sAFVersionFilePath);
    
    tAFProgramVersion[4] = tAFProgramVersion[4] + 1;
    
    if tAFProgramVersion[4] > 9 then
    tAFProgramVersion[4] = 0;
    tAFProgramVersion[3] = tAFProgramVersion[3] + 1;	
    
    	if tAFProgramVersion[3] > 9 then
    	tAFProgramVersion[3] = 0;
    	tAFProgramVersion[2] = tAFProgramVersion[2] + 1;
    				
    		if tAFProgramVersion[2] > 9 then
    		tAFProgramVersion[2] = 0;
    		tAFProgramVersion[1] = tAFProgramVersion[1] + 1;
    		end	
    		
    	end	
    
    end
    
    TextFile.WriteFromTable(sAFVersionFilePath, tAFProgramVersion, false);
    
    sAFCurrentBuildVersion = tAFProgramVersion[1].."."..tAFProgramVersion[2].."."..tAFProgramVersion[3].."."..tAFProgramVersion[4];
    
    return sAFCurrentBuildVersion;
    
    -->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    end--|||||||||||||END FUNCTION|||||||||||||||||
    -->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

  2. #2
    Join Date
    Sep 2002
    Location
    Sol 3
    Posts
    3,160
    Thanks,

    I was asking for this feature to be built into AMS. It would be nice to know how many times I have built the project (I guess that would include previewing the project for testing). I have created a similar script to keep track of how many times a program ran. I even went so far as to put a check into the function that would verify that it was being run on my test machine (MAC address) and that the tracking file exists so it should actually increment the build number.

    Tigig
    TJ-Tigger
    "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
    "Draco dormiens nunquam titillandus."
    Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

  3. #3
    Join Date
    Jun 2007
    Location
    Delphi II
    Posts
    1,534
    Good idea, I just rely on the old fashion IS THERE / IS NOT THERE code placement for determining if it's build-time or run-time lol.

Similar Threads

  1. Unattended Build disabled in Demo version?
    By Biggles in forum Setup Factory 7.0
    Replies: 1
    Last Post: 08-18-2006, 02:56 PM
  2. build button crashes AM6 6.02 each time
    By cgirolet in forum AutoPlay Media Studio 6.0
    Replies: 4
    Last Post: 05-10-2006, 03:24 PM
  3. Sorry quick question Boolean
    By slafta in forum AutoPlay Media Studio 5.0
    Replies: 3
    Last Post: 06-05-2005, 12:37 AM
  4. HOWTO: Detect Acrobat Version
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-22-2002, 04:01 PM
  5. HOWTO: Build a Setup from the Command Line
    By Support in forum Setup Factory 5.0
    Replies: 0
    Last Post: 10-08-2002, 01:43 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts