the really initial commit

This commit is contained in:
Kevin Dorner 2020-10-28 00:18:46 +01:00 committed by root
parent 38cd7529f6
commit b94042ef21
3 changed files with 117 additions and 0 deletions

29
control Normal file
View File

@ -0,0 +1,29 @@
[Product]
type: localboot
id: mdg-visual-studio-code
name: MDG Visual Studio Code
description: VSCode ist eine von Microsoft entwickelte, weit verbreitete Entwicklungsumgebung mit Unterstützung für eine Vielzahl an Erweiterungen. Der Großteil des Programms ist quelloffen.
advice: Erweiterungen werden im Verzeichnes %USERPROFILE%\.vscode\extensions und somit im Windows-Profil des Nutzers installiert.
version: 1.50.1
packageVersion: 1.0
setupScript: install.ins
uninstallScript: remove.ins
[ProductDependency]
action: setup
requiredProduct: microsoft-dot-net-framework
requiredStatus: installed
requirementType: before
[ProductProperty]
name: desktopshortcut
type: bool
description: Verknüpfung auf dem Windows Desktop erstellen
default: False
[ProductProperty]
name: contextmenuentry
type: bool
description: Windows-Explorer Kontextmenüeintrag erstellen
helptext: Dieser Kontextmenüeintrag wird für Dateien und Ordner im Windows-Explorer erzeugt.
default: False

57
install.ins Normal file
View File

@ -0,0 +1,57 @@
[Initial]
Message=Installiere MDG Visual Studio Code...
DefVar $Version$
DefVar $ExitCode$
DefVar $CreateContextMenuEntry$
DefVar $ContextMenuArguments$
DefVar $CreateDesktopShortcut$
DefVar $DesktopShortcutArgument$
[Aktionen]
ShowBitmap "%ScriptPath%\logo.png" "MDG Visual Studio Code"
Sub_GetProperties
Sub_ConfigureProperties
Sub_PrepareInstall
WinBatch_Setup
Sub_HandleExitCode
[Sub_GetProperties]
Set $Version$ = GetValue("productversion", GetProductMap)
Set $CreateContextMenuEntry$ = GetProductProperty("contextmenuentry", "false")
Set $CreateDesktopShortcut$ = GetProductProperty("desktopshortcut", "false")
[Sub_ConfigureProperties]
if ($CreateContextMenuEntry$ = "true")
Set $ContextMenuArguments$ = ", addcontextmenufiles, addcontextmenufolders"
else
Set $ContextMenuArguments$ = ", !addcontextmenufiles, !addcontextmenufolders"
endif
if ($CreateDesktopShortcut$ = "true")
Set $DesktopShortcutArgument$ = ", desktopicon"
else
Set $DesktopShortcutArgument$ = ", !desktopicon"
endif
[Sub_PrepareInstall]
if (processIsRunning("Code.exe"))
comment "Killing Process..."
Killtask "Code.exe"
sleepSeconds 3
endif
[WinBatch_Setup]
%ScriptPath%\data\VSCodeSetup-x64-$Version$.exe /VERYSILENT /SUPPRESSMSGBOXES /MERGETASKS="!runcode$ContextMenuArguments$$DesktopShortcutArgument$" /LOG="%opsiLogDir%\vscode-install.log"
; VERYSILENT unterdrückt das Installationsfenster
; SUPPRESSMSGBOXES unterdrückt Benachrichtigungsfenster
; MERGETASKS verhindert das automatische Starten des Programms nach der Installation
[Sub_HandleExitCode]
; check return code
Set $ExitCode$ = GetLastExitCode
comment "GetLastExitCode: " + $ExitCode$
if not($ExitCode$ = "0")
LogError "Fatal: setup returned exit code " + $ExitCode$
IsFatalError
endif

31
remove.ins Normal file
View File

@ -0,0 +1,31 @@
[Initial]
Message=Deinstalliere MDG Visual Studio Code...
DefVar $ExitCode$
[Aktionen]
ShowBitmap "%ScriptPath%\logo.png" "MDG Visual Studio Code"
Sub_PrepareRemove
WinBatch_Setup
Sub_HandleExitCode
[Sub_PrepareRemove]
if (processIsRunning("Code.exe"))
comment "Killing Process..."
Killtask "Code.exe"
sleepSeconds 3
endif
[WinBatch_Setup]
"%ProgramFiles64Dir%\Microsoft VS Code\unins000.exe" /VERYSILENT /SUPPRESSMSGBOXES /LOG="%opsiLogDir%\vscode-uninstall.log"
; VERYSILENT unterdrückt das Installationsfenster
; SUPPRESSMSGBOXES unterdrückt Benachrichtigungsfenster
[Sub_HandleExitCode]
; check return code
Set $ExitCode$ = GetLastExitCode
comment "GetLastExitCode: " + $ExitCode$
if not($ExitCode$ = "0")
LogError "Fatal: setup returned exit code " + $ExitCode$
IsFatalError
endif