Abacus

From WPKG | Open Source Software Deployment and Distribution
Jump to: navigation, search

Version 2015

You need the "abacus.jnlp" and "Abacus.ico" file. abacus.jnlp can be downloaded from your server -> http://myserver:40000. Abacus.ico is located in the install location under "abac\df_win64". You also need the "CreateShortcut.js" for creating the links in the Start Menu. Installation is discribed here: Create_Desktop_Icon#JavaScript_helper.

<?xml version="1.0" encoding="UTF-8"?>
<packages>
<package
	id='abacus'
	name='Abacus vi'
	revision='%PKG_VERSION%'
	priority='1'
	reboot='false'>

	<variable name="PKG_VERSION"          value="2015.10" />

	<variable name="PKG_EXE"              value="abacus.jnlp" />
	<variable name="PKG_LINKNAME"         value="ABACUS vi" />
	<variable name="PKG_SOURCE"           value="%SOFTWARE%\abacus" />

	<variable name="PKG_NAME"             value="Abacus" />
	<variable name="PKG_DESTINATION"      value="%ProgramFiles%\%PKG_NAME%" />
	<variable name="PKG_STARTMENU"        value="%ProgramData%\Microsoft\Windows\Start Menu" />

	<variable name="PKG_ICON"			  value="%PKG_SOURCE%\Abacus.ico" />
	<variable name="WPKG_ROOT"			  value="%SOFTWARE%\.." />

	<depends package-id='java' />

	<check type="logical" condition="or">
		<check type="file" condition="exists" path="%PKG_DESTINATION%\%PKG_EXE%" />
		<check type="file" condition="exists" path="%PKG_STARTMENU%\%PKG_LINKNAME%.lnk" />
	</check>

	<commands>
		<command type="install" cmd='%ComSpec% /c if not exist "%PKG_DESTINATION%" mkdir "%PKG_DESTINATION%"' />
		<command type="install" cmd='%ComSpec% /c if not exist "%PKG_STARTMENU%" mkdir "%PKG_STARTMENU%"' />
		<command type="install" cmd='%ComSpec% /c copy /V /Y /B "%PKG_SOURCE%\%PKG_EXE%" "%PKG_DESTINATION%" &gt; "%TMP%\%PKG_NAME%.log"' >
			<exit code="0" />
			<exit code="1" />
		</command>
		<command type="install" cmd='%ComSpec% /c if exist "%PKG_STARTMENU%" cscript.exe "%WPKG_ROOT%\tools\CreateShortCut.js" /target:"%PKG_DESTINATION%\%PKG_EXE%" /icon:"%PKG_ICON%" /name:"%PKG_LINKNAME%" /saveto:"%PKG_STARTMENU%"' >
			<exit code="0" />
			<exit code="1" />
		</command>

		<command type="upgrade" include="remove" />
		<command type="upgrade" include="install" />

		<command type="remove" cmd='%ComSpec% /c if exist "%PKG_DESTINATION%" rmdir /s /q "%PKG_DESTINATION%"'>
			<exit code="3010" />
		</command>
		<command type="remove" cmd='%ComSpec% /c if exist "%PKG_STARTMENU%\%PKG_LINKNAME%.lnk" del "%PKG_STARTMENU%\%PKG_LINKNAME%.lnk"'>
			<exit code="3010" />
		</command>
	</commands>
</package>
</packages>


Version 2008

Silent installer for the Abacus ERP System

Example for the Client Setup, using version 2008.00

<?xml version="1.0" encoding="UTF-8"?>
<packages>
<package id="abacus"
         name="Abacus"
         revision="200800"
         reboot="false"
         priority="0">
	
   <check type="registry" condition="equals" path="HKLM\SOFTWARE\ABACUS Research AG\AbaSetup\Version" value="2008.00" />
	
   <install cmd='cmd /c "%SOFTWARE%\abacus\install.cmd"' >
      <exit code="any" />
   </install>
		
</package>
</packages>

The batchfile install.cmd calls the actual clientsetup, as mapping network drives from within wpkg packages doesn't allways seem to work.

@echo off
net use x: \\SERVERNAME\SHARENAME /user:DOMAIN\USER PASSWORD
x:
x:\Abac\Setup\client\ClientSetup.exe

Notes: this asumes that you have Abacus installed from drive X:.

Don't forget to change the Server, Sharename and your logon credentials within the batch