ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE. Software > DcUpdater

Make_versioninfo.ahk - Generate versioninfo.xml


Made a very simple script that you can use as part of the build process of your app, if it uses DcUpdater.

Purpose: Generate the DcUpdater's versioninfo.xml ready for uploading. You probably already store the product version somewhere, so just pass the product version to the app:

Call it as follows (example if your product version is

--- Code: Text ---make_versioninfo.ahk
this will generate a _versioninfo.xml with today's date:

--- Code: Text ---<?xml version="1.0"?><root>        <Program_Version></Program_Version>        <Program_Release_Month>05</Program_Release_Month>        <Program_Release_Day>30</Program_Release_Day>        <Program_Release_Year>2011</Program_Release_Year></root>

Save the following text as versioninfo.xml:

--- Code: Text ---<?xml version="1.0"?><root>        <Program_Version>$ProgramVersion$</Program_Version>        <Program_Release_Month>$ProgramReleaseMonth$</Program_Release_Month>        <Program_Release_Day>$ProgramReleaseDay$</Program_Release_Day>        <Program_Release_Year>$ProgramReleaseYear$</Program_Release_Year></root>
Save the following code as make_versioninfo.ahk:

--- Code: Autohotkey ---#NoEnvSetWorkingDir %A_ScriptDir%if 0 < 1{    MsgBox This script requires at least 1 incoming parameter(s) but it only received %0%.    ExitApp}FileRead, vf, versioninfo.xmlFormatTime, ProgramReleaseMonth,, MMFormatTime, ProgramReleaseDay,, ddFormatTime, ProgramReleaseYear,, yyyy StringReplace, vf, vf, $ProgramVersion$, %1%StringReplace, vf, vf, $ProgramReleaseMonth$, %ProgramReleaseMonth%StringReplace, vf, vf, $ProgramReleaseDay$, %ProgramReleaseDay%StringReplace, vf, vf, $ProgramReleaseYear$, %ProgramReleaseYear%FileDelete, _versioninfo.xmlFileAppend,%vf%,_versioninfo.xml

very nice, thank you.  :up:

I would have thought that everyone who needs this is happy to install AHK, but I'm happy to add the compiled exe to the zipfile if anyone is interested.


[0] Message Index

Go to full version