diff --git a/README.md b/README.md index 5487b8f0dae58a480af02dd934c588893e444e9e..b925fb799decfc8adc84db65453bbb7729d2e318 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Full UNC path to 64-bit wpkg64.js Agreed-upon code your institution (see below) 1. WPKGSOFTWARE Full UNC path to the central software repository. -1. WPKGSHAREBASE +1. WPKGSHAREBASE Full UNC path to base of the central share. 1. WPKGSOFTWAREUSER Username that should be used for connecting to WPKGSOFTWARE @@ -29,18 +29,19 @@ Note: in general, the expectation is that environment variables with names start Share location ============== -* set WPKGSOFTWARE=\\ifs.ch.private.cam.ac.uk\deploy\software -* set WPKGSHAREBASE=\\ifs.ch.private.cam.ac.uk\deploy +* `set WPKGSOFTWARE=\\ifs.ch.private.cam.ac.uk\deploy\software` +* `set WPKGSHAREBASE=\\ifs.ch.private.cam.ac.uk\deploy` Institute codes -============== -1. chemistry -Department of Chemistry -2. maths -Faculty of Mathematics +=============== +See https://gitlab.developers.cam.ac.uk/ch/co/ucam_wpkg/-/wikis/Institute-codes Repository layout ================ -\packages - directory with multiple xml files, each of corresponds to an individual WPKG package definition -\scripts - example scripts, e.g. wrappers around wpkg.js which map drives and set environment variables +* packages: directory with multiple xml files, each of corresponds to an individual WPKG package definition +* packages\wpkg\tools: scripts which are called from wpkg definition (see https://gitlab.developers.cam.ac.uk/ch/co/ucam_wpkg/-/wikis/Helper-scripts-used-in-packages) +* miscscripts: example scripts, e.g. wrappers around wpkg.js which map drives and set environment variables (see https://gitlab.developers.cam.ac.uk/ch/co/ucam_wpkg/-/wikis/Misc-other-scripts) + +* common-config: config files that are used in a wpkg for all institutions +* %WPKGINSTITUTION%-config: config files specific to a particlar institution. diff --git a/packages/gimp.xml b/packages/gimp.xml new file mode 100755 index 0000000000000000000000000000000000000000..e9fc84b04e46b3a8c707cca03a4de2662853fc6b --- /dev/null +++ b/packages/gimp.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- vim: set softtabstop=3: --> +<packages> + <package id="gimp" name="GNU Image Manipulation Program" revision="%version%.1" reboot="false" priority="20"> + <variable name="version" value="2.10.18" /> + <check type="uninstall" condition="exists" path="GIMP %version%" /> + + <install cmd='"%WPKGSOFTWARE%\gimp\gimp-%version%-setup.exe" /ALLUSERS /VERYSILENT /NORESTART /DIR="%PROGRAMFILES%\GIMP-2.0"' /> + + <upgrade include="install" /> + + <remove cmd='"%PROGRAMFILES%\GIMP-2.0\uninst\unins000.exe" /VERYSILENT /NORESTART' > + <exit code="1" /> + <exit code="-1" /> + </remove> + <remove cmd='cmd /c rmdir /s /q "%PROGRAMFILES%\GIMP-2.0"'> + <exit code="1" /> + <exit code="2" /> + </remove> + <remove cmd='reg delete HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall\GIMP-2_is1 /f '> + <exit code='1'/><!-- Gone --> + </remove> + </package> +</packages> diff --git a/packages/git.xml b/packages/git.xml new file mode 100755 index 0000000000000000000000000000000000000000..682f99708a4c06c1f7d16142ca8fb773cbe23e28 --- /dev/null +++ b/packages/git.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<packages> +<package id="git" name="git" revision="%version%.2" priority="0" reboot="false"> +<variable name="version" value="2.24.0" /> + +<check type="uninstall" path="Git version %version%" condition="exists" /> + +<install cmd='%WPKGSOFTWARE%\git\git-%version%-64-bit.exe /sp- /verysilent /suppressmsgboxes /norestart' /> + +<upgrade include='remove' /> +<upgrade include='install' /> + +<remove cmd='"%programfiles%\git\unins000.exe" /verysilent /suppressmsgboxes /sp-'> + <exit code="-1"/> +</remove> + +</package> +</packages> diff --git a/packages/olex2.xml b/packages/olex2.xml new file mode 100755 index 0000000000000000000000000000000000000000..e97682af3025c64644f7fa8df939b92c3e7945b1 --- /dev/null +++ b/packages/olex2.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- vim: set softtabstop=3: --> +<packages> + <package id="olex2" name="olex2" revision="%version%.1" priority="0" reboot="false"> + <variable name="version" value="1.3" /> + + <!-- 1) download zip from their website and unpack + 2) copy to %programfiles% on test computer + 3) run olex2 as admin (needed so that it can compile lots of pyc files + and write them to %programfiles%) + 4) copy %programfiles%\olex2 back to the deploy share complete with pyc files --> + + <check type='registry' condition='equals' path='HKLM\software\ucam_wpkg.ch.cam.ac.uk\olex2\version' value="%version%" /> + + <install cmd='%WPKGSOFTWARE%\wpkg\tools\copydir.cmd "%WPKGSOFTWARE%\olex2\%version%" "%programfiles%\olex2"' /> + <install cmd='cscript %WPKGSOFTWARE%\wpkg\tools\create-shortcut.js /folder:"Olex2" /linkname:"Olex2 %version%" /target:"%programfiles%\olex2\olex2.exe"' /> + <install cmd='reg add HKLM\software\ucam_wpkg.ch.cam.ac.uk\olex2 /t reg_sz /v version /d %version% /f' /> + + <upgrade include='remove' /> + <upgrade include='install' /> + + <remove cmd='cmd /c if exist "%programfiles%\olex2" rmdir /s /q "%programfiles%\olex2"' /> + <remove cmd='cscript %WPKGSOFTWARE%\wpkg\tools\delete-shortcut.js /folder:"Olex2"'/> + <remove cmd='reg delete HKLM\software\ucam_wpkg.ch.cam.ac.uk\olex2 /f' /> + + </package> +</packages> diff --git a/packages/vlcclient.xml b/packages/vlcclient.xml new file mode 100755 index 0000000000000000000000000000000000000000..79d4779f3744af07db3ea6c035b1a8aa1503ca56 --- /dev/null +++ b/packages/vlcclient.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<packages> +<package id="vlcclient" name="VLC media player" revision="%version%.1" priority="40" reboot="false"> +<variable name="version" value="3.0.8" /> + +<check type="uninstall" condition="versiongreaterorequal" path="VLC media player" value="%version%" /> + + <install cmd='"%WPKGSOFTWARE%\vlc\vlc-%VERSION%-win64.exe" /S /NCRC' /> + + <upgrade include="remove"/> + <upgrade include="install"/> + + <remove cmd='cmd /c %WPKGSOFTWARE%\wpkg\tools\waitforprocess.cmd Au_.exe' /> + <remove cmd='cmd /c if exist "%PROGRAMFILES%\VideoLAN\VLC\uninstall.exe" "%PROGRAMFILES%\VideoLAN\VLC\uninstall.exe" /S' /> + <remove cmd='cmd /c %WPKGSOFTWARE%\wpkg\tools\waitforprocess.cmd Au_.exe' /> + +</package> +</packages> diff --git a/packages/vscode.xml b/packages/vscode.xml new file mode 100755 index 0000000000000000000000000000000000000000..fc1c9637571e0125553f4dd46224c08e7ab5b12e --- /dev/null +++ b/packages/vscode.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- vim: set softtabstop=3: --> +<packages> + <package id="vscode" name="Visual Studio Code" revision="%version%.1" priority="0" reboot="false"> + <variable name="version" value="1.42.1" /> + + <check type="uninstall" path="Microsoft Visual Studio Code" condition="versiongreaterorequal" value="%version%" /> + + <!-- the silent installer defaults to launching the software unless we specify the extra MERGETASKS flag: + https://stackoverflow.com/questions/42582230/how-to-install-visual-studio-code-silently-without-auto-open-when-installation + https://github.com/Microsoft/vscode/issues/19319 --> + + <install cmd='%WPKGSOFTWARE%\microsoft.com\vscode\vscodesetup-x64-%version%.exe /VERYSILENT /MERGETASKS=!runcode ' /> + + <upgrade include='remove' /> + <upgrade include='install' /> + + <remove cmd='"%programfiles%\Microsoft VS Code\unins000.exe" /VERYSILENT' /> + + </package> +</packages>