Getting Started
First you will need to download the source code and compile the latest version of RocketLauncher or you can download the latest release candidate.
On the client you will need to supply the rocket launcher exe and update.xml
file. Here is a sample update.xml
file for the client:
<?xml version="1.0" encoding="utf-8"?>
<!--
Url: Path to your server xml
Latest: Current version the client is up to date with
Logging:
DEBUG = 1 // Detailed log messages for debugging issues.
INFO = 2 // General information on update tasks.
WARN = 3 // Warn when something isn't correct but can still function.
ERROR = 4 // Something has not functioned the way it is mean't to.
FATAL = 5 // Something has gone horribly wrong.
-->
<Updates url="http://yourupdateserver.com" director="server.xml" latest="0" logging="1,2,3,4,5">
</Updates>
You will need to replace the url
attribute with your update server address, this will point to the server director file, which can also be configured or you can leave it as the default server.xml
.
The server side structure looks like so:
This is for listing the updates and also some metadata for the launcher:
<?xml version="1.0" encoding="utf-8"?>
<Server name="My Application" launchText="Start" target="myapp.exe" layout="layout.xml">
<Font name="Moltors" archive="moltors.zip" package="moltors.zip">
<Apply to="lblName" size="20" unit="Point" bold="false" italic="false" strikeout="false" underline="false" gdicharset="0" gdiverticalfont="false"/>
</Font>
<Updates>
<Update version="0.1" dir="">0.1.xml</Update>
<Update version="0.2" dir="">0.2.xml</Update>
</Updates>
</Server>
The layout allows you to control the look and feel of the launcher, you can add C# components with most of the style controls available (more info to come).
<?xml version="1.0" encoding="utf-8" ?>
<Layout>
<Launcher.Interface.ControlLabel name="lblName">
<Accessibility>
<AccessibleName></AccessibleName>
<AccessibleDescription></AccessibleDescription>
<AccessibleRole>Default</AccessibleRole>
</Accessibility>
<Appearance>
<Text>PXG Macros</Text>
<BackColor>Control</BackColor>
<CompositeQuality>HighQuality</CompositeQuality>
<Cursor>Default</Cursor>
<DisabledTextColor>SteelBlue</DisabledTextColor>
<FlatStyle>Standard</FlatStyle>
<ForeColor>SteelBlue</ForeColor>
<Image></Image>
<ImageIndex></ImageIndex>
<ImageKey></ImageKey>
<ImageList></ImageList>
<ImageAlign>MiddleCenter</ImageAlign>
<RightToLeft>No</RightToLeft>
<SmoothingMode>HighQuality</SmoothingMode>
<TextAlign>TopLeft</TextAlign>
<TextRenderHint>AntiAliasGridFit</TextRenderHint>
<UseMnmonic>True</UseMnmonic>
<UseWaitCursor>False</UseWaitCursor>
</Appearance>
<Behavior>
<AllowDrop>False</AllowDrop>
<AutoEllipsis>True</AutoEllipsis>
<Enabled>False</Enabled>
<TabIndex>11</TabIndex>
<UseCompatibleTextRendering>False</UseCompatibleTextRendering>
<Visible>True</Visible>
</Behavior>
<Design>
<GenerateMember>True</GenerateMember>
<Locked>False</Locked>
<Modifiers>Private</Modifiers>
</Design>
<Focus>
<CausesValidation>True</CausesValidation>
</Focus>
<Layout>
<Anchor>Top, Left</Anchor>
<AutoSize>True</AutoSize>
<Dock>None</Dock>
<Location X="5" Y="7"/>
<Margin All="-1" Left="3" Top="0" Right="3" Bottom="0"/>
<Padding All="0" Left="0" Top="0" Right="0" Bottom="0"/>
<MaximumSize Width="0" Height="0"/>
<MinimumSize Width="0" Height="0"/>
<Size Width="150" Height="33"/>
</Layout>
</Launcher.Interface.ControlLabel>
<Launcher.Interface.GlossyButton name="btnLaunch">
<Accessibility>
<AccessibleName></AccessibleName>
<AccessibleDescription></AccessibleDescription>
<AccessibleRole>Default</AccessibleRole>
</Accessibility>
<Appearance>
<Text>Updating</Text>
<Font size="8.25" unit="Point" bold="false" italic="false" strikeout="false" underline="false" gdicharset="0" gdiverticalfont="false">Tahoma</Font>
<ActiveBackColor>DarkSeaGreen</ActiveBackColor>
<ActiveBorderColor>White</ActiveBorderColor>
<BackColor>DarkSeaGreen</BackColor>
<BackgroundImage></BackgroundImage>
<BackgroundImageLayout>Tile</BackgroundImageLayout>
<BorderColor>White</BorderColor>
<Cursor>Hand</Cursor>
<DisabledTextColor>SteelBlue</DisabledTextColor>
<FlatStyle>Standard</FlatStyle>
<ForeColor>White</ForeColor>
<HoverBackColor>MediumAquamarine</HoverBackColor>
<HoverBorderColor>White</HoverBorderColor>
<RightToLeft>No</RightToLeft>
<StandbyBackColor>DarkSeaGreen</StandbyBackColor>
<StandbyBorderColor>White</StandbyBorderColor>
<UseWaitCursor>False</UseWaitCursor>
</Appearance>
<Behavior>
<AllowDrop>False</AllowDrop>
<AutoValidate>True</AutoValidate>
<Enabled>False</Enabled>
<ImeMode>NoControl</ImeMode>
<TabIndex>6</TabIndex>
<TabStop>True</TabStop>
<Visible>True</Visible>
</Behavior>
<Design>
<GenerateMember>True</GenerateMember>
<Locked>False</Locked>
<Modifiers>Private</Modifiers>
</Design>
<Focus>
<CausesValidation>True</CausesValidation>
</Focus>
<Layout>
<Anchor>Top, Left</Anchor>
<AutoScroll>False</AutoScroll>
<AutoScrollMargin Width="0" Height="0"/>
<AutoScrollMinSize Width="0" Height="0"/>
<AutoSize>True</AutoSize>
<AutoSizeMode>GrowOnly</AutoSizeMode>
<Dock>None</Dock>
<Location X="417" Y="34"/>
<Margin All="3" Left="3" Top="3" Right="3" Bottom="3"/>
<Padding All="0" Left="0" Top="0" Right="0" Bottom="0"/>
<MaximumSize Width="0" Height="0"/>
<MinimumSize Width="0" Height="0"/>
<Size Width="76" Height="39"/>
</Layout>
</Launcher.Interface.GlossyButton>
</Layout>
The update file itself contains the log and file information for the update:
for example 0.1.xml
<?xml version="1.0" encoding="utf-8"?>
<Update name="Initial Install">
<Changelog>
<Log>Add initial application files</Log>
</Changelog>
<Archive name="bin.zip" extractTo="bin" cleanDirs="true" mime="application/zip"/>
</Update>
then we have an update for 0.2.xml
<?xml version="1.0" encoding="utf-8"?>
<Update name="Adding images and sample">
<Changelog>
<Log>A sample update log</Log>
<Log>We added images</Log>
</Changelog>
<Archive name="images.zip" extractTo="images" cleanDirs="true" mime="application/zip"/>
</Update>
You can add individual files, for example:
<File name="myapp.exe" destination="" mime="application/exe"/>