IsxGamesPatcher¶
- Table of contents
- IsxGamesPatcher
- What is isxGamesPatcher?
- User Information
- Developer Information
- Optional Features
- Detecting Updates from Scripts and Extensions
- Releasing (Initial Install) Projects Using the Patcher
- XML Manifest & Project File Storage/Distribution
What is isxGamesPatcher?¶
isxGamesPatcher is a self-updating patcher for Innerspace-related files, which runs as a .NET application under Innerspace. It is the primary update mechanism for isxVG, soon isxEQ2, and supports any Innerspace-related file or application.
User Information¶
This application will install to your "InnerSpace/.NET Programs" directory and will be used to automatically update ISXVG and ISXEQ2, as well by other script, extension, and .NET application authors to update their own material. It is designed to be usable by any InnerSpace developer.
For most users, the only thing you need to know is that this application will help you by updating your extensions and scripts without constantly having to visit isxGames.com.
Possible Permissions Issues¶
Patching on Vista and Windows 7¶
- Click on Vista Start button.
- Go to All Programs -> Accessories, and then locate the Command Prompt menu item.
- Right click on Command Prompt.
- On the pop-up right click context menu, select Run as Administrator.
- cd "\Program Files" or cd "\Program Files (x86)" for 64bit Windows
- Run the takeown command: (The last character should be the default "Yes" character for your language)
:# English Windows: takeown /f Innerspace /R /D Y
:# German Windows: takeown /f Innerspace /R /D j
- Run the icacls Permissions editor for Administrators (S-1-5-32-544) and Users (S-1-5-32-545) built-in groups: (We use the SIDs for these to avoid language issues)
:# icacls Innerspace /grant *S-1-5-32-544:F /T /C /Q
:# icacls Innerspace /grant *S-1-5-32-545:F /T /C /Q
Developer Information¶
To use isxGamesPatcher.exe for updating your scripts or executables, you will need to follow these steps:
Aquiring isxGamesPatcher.exe¶
Creating a Manifest File¶
- Create a Manifest file for each project you wish to auto-patch:
Test Project
CyberTech
testproject_OnFileUpdated1
testproject_OnUpdateError1
testproject_OnUpdateComplete
Extensions/ISXVG.dll
http://www.isxGames.com/isxvg/Extensions/ISXVG.dll
20070222.6
...(add more entries for any additional files your project uses)...
Manifest File Contents:
- WARNING - I recommend you change those default events to something more unique to your application or script, in order to avoid the possibility of receiving events intended for another script or application.
- Subdirectories will be created as needed ("Scripts/vgGodMode/UI/vgGodMod.xml", for instance), if specified in the filename
- Note that the url filename need not match the , it will be saved correctly on the local filesystem.
::* Order is not relevant
Place the Manifest file on your webserver as project.xml, scriptname.xml, extension.xml, etc... I suggest naming it the same as the project you're updating, but with an .xml extension, for example, "isxvg.xml".
Invoking the Patcher¶
dotnet PROJECTNAME isxGamesPatcher PROJECTNAME CURRENT_LOCAL_VERSION URLTOXMLFILE
Example using the xml file above:
dotnet ISXVG isxGamesPatcher ISXVG 20070222.5
http://www.isxGames.com/isxvg/Extensions/ISXVGExt.xml
- Note - We use the Project Name as the app domain name (1st parameter to dotnet command) so that multiple patchers can run simultaneously.
Patcher Operation¶
- If patching an extension, it will attempt to patch itself first, then reload.
- Download and parse the Manifest file from URLTOXMLFILE
- For each file found in the Manifest file, it will check the following:
:# Check for filename.ext.nopatch - ignore file, updates to it will not occur
:# If the version specified in the Manifest file is greater than CURRENT_LOCAL_VERSION -> Download File
:# If the file doesn't exist -> Download File
- Backup the original file as filename.ext.backup1 and filename.ext.backup2
- Call FileUpdated events for all files which were modified.
Optional Features¶
Blocking Patches - Client Side¶
- Patch Blocking (Developers Note - This is important for you to avoid accidentally overwriting your own files!)
- Users may block the updating of a file by creating a 0-byte file called filename.nopatch.
- Patch Blocking (Developers Note - This is important for you to avoid accidentally overwriting your own files!)
Detecting Updates from Scripts and Extensions¶
Description¶
Example¶
atom(script) myscript_OnFileUpdated(string param1)
{
echo "Event Received: myscript_OnFileUpdated " + ${param1}
}
atom(script) myscript_onUpdateError(string param1)
{
echo "Event Received: myscript_onUpdateError: " + ${param1}
}
atom(script) myscript_OnUpdateComplete()
{
echo "Event Received: myscript_OnUpdateComplete "
}
function main()
{
LavishScript:RegisterEvent
[myscript_OnFileUpdated
LavishScript:RegisterEvent
myscript_OnUpdateError
LavishScript:RegisterEvent
myscript_OnUpdateComplete
Event
myscript_OnFileUpdated]:AttachAtom[myscript_OnFileUpdated
Event
myscript_OnUpdateError]:AttachAtom[myscript_OnUpdateError
Event
myscript_OnUpdateComplete]:AttachAtom[myscript_OnUpdateComplete
]
dotnet TestScript isxGamesPatcher TestScript 0 XMLFILE
Wait 300
}
Releasing (Initial Install) Projects Using the Patcher¶
- Instructions to run the "dotnet appname isxGamesPatcher appname ..." patch command, pointed at your installation Manifest file.
- A stub Script (ProjectInstall.iss?) which calls the dotnet patch command for you.
XML Manifest & Project File Storage/Distribution¶
Project releases & the associated XML Manifest files may be stored in Subversion at http://www.isxgames.com/isxScripts/isxGamesPatcher/
- Create a directory named for your project
- Add your xml file(s) to the directory
:# (optional) Add your files to the directory, if you don't have your own hosting.
dotnet appname isxGamesPatcher appname version
http://www.isxgames.com/isxScripts/isxGamesPatcher/DirectoryName/Manifest_XML_File.xml
/isxGamesPatcher/vgGodMode
/isxGamesPatcher/vgGodMode/vgGodModeManifest.xml
/isxGamesPatcher/vgGodMode/vgGodMode.iss
/isxGamesPatcher/vgGodMode/vgGodMode.xml
/isxGamesPatcher/vgGodMode/vgGodMode.txt
- Note that this directory should NOT get development checkins of your scripts (those which are stored in subversion in /isxScripts/Vanguard Scripts... etc). The version of the files stored here should correspond to the version specified in the XML file.
- Note that in the same sense, you could release a custom manifest file which points users at the latest development code for your project, so that your beta users can test it out. Simply add
/isxGamesPatcher/vgGodMode/vgGodModeManifest-Unstable.xml