This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
userspace:zygrib [2023/01/10 16:07] chris_10 created |
userspace:zygrib [2023/01/10 16:42] chris_10 |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | Tested with opsi 4.2 | + | ====== zyGrib ====== |
- | Windows 10 x64 Ent SAC 19.09, 20H2 & 21H2 | + | Tested with opsi 4.2 \\ |
- | Download zyGrib from here: https:// | + | Windows 10 x64 Ent SAC 19.09, 20H2 & 21H2 \\ |
+ | Download zyGrib from here: https:// | ||
+ | type: localboot \\ | ||
+ | id: zyGrib \\ | ||
+ | description: | ||
+ | Beschreibung: | ||
+ | |||
+ | |||
+ | __**Hinweis: | ||
+ | zyGrib liegt nicht als klassischer Installer vor. Es handelt sich um ein gepacktes Programm welches an die gewünschte Stelle, sprich das Installationsverzeichnis, | ||
+ | Ich habe zum entpacken das Programm 7-Zip verwendet, welches entsprechend Vorraussetzung ist damit dieses Script funktioniert. | ||
+ | Anschließend wird einfach ein Link im Startmenü zur ausführbaren Datei erstellt über welchen das Programm gestartet anschließend werden kann. | ||
+ | Zum Ausführen des Programms zyGrib benötigt die entsprechende Benutzergruppe " | ||
+ | Daher sollte an dieser Stelle im Script " | ||
+ | < | ||
+ | [DosInAnIcon_rights] | ||
+ | icacls " | ||
+ | </ | ||
+ | der // | ||
+ | |||
+ | __**Notice: | ||
+ | zyGrib is not available as a classic installer. It is a packed program which only needs to be unpacked to the desired location, in this case the installation directory. | ||
+ | I used the 7-Zip program to unpack, which is a prerequisite for this script to work. | ||
+ | A link is then simply created in the start menu to the executable file, which starts the program. | ||
+ | To run the zyGrib program, the corresponding user group needs " | ||
+ | Therefore, at this point in the script " | ||
+ | < | ||
+ | [DosInAnIcon_rights] | ||
+ | icacls " | ||
+ | </ | ||
+ | the // | ||
+ | |||
+ | < | ||
+ | tree: | ||
+ | |-- setup.opsiscript | ||
+ | |-- uninstall.opsiscript | ||
+ | |-- zyGrib_win_withmaps2-8.0.1.zip | ||
+ | |-- zyGrib_32.png | ||
+ | </ | ||
+ | |||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ==== setup.opsiscript ==== | ||
+ | |||
+ | <code winst> | ||
+ | ; Copyright (c) uib gmbh (www.uib.de) | ||
+ | ; This sourcecode is owned by uib | ||
+ | ; and published under the Terms of the General Public License. | ||
+ | ; credits: http:// | ||
+ | [Initial] | ||
+ | setLogLevel=6 | ||
+ | ; Log Errors in Logfile but don't abort: | ||
+ | ExitOnError=false | ||
+ | ; Show syntax errors in the script: | ||
+ | ScriptErrorMessages=on | ||
+ | ; Dont trace step by step through the script: | ||
+ | TraceMode=off | ||
+ | ; let started programs run in front of the winst window | ||
+ | StayOnTop=false | ||
+ | |||
+ | |||
+ | [Actions] | ||
+ | requiredWinstVersion >= " | ||
+ | |||
+ | ; ---------------------------------------------------------------- | ||
+ | ; - define Variables | ||
+ | ; ---------------------------------------------------------------- | ||
+ | DefVar $ProductId$ | ||
+ | DefVar $Version$ | ||
+ | DefVar $LogDir$ | ||
+ | DefVar $MinimumSpace$ | ||
+ | DefVar $INST_architecture$ | ||
+ | DefVar $INST_SystemType$ | ||
+ | DefVar $INST_MsVersion$ | ||
+ | DefVar $7zPrg$ | ||
+ | DefVar $7zCall$ | ||
+ | DefVar $OSVersion$ | ||
+ | DefVar $InstallDir$ | ||
+ | DefVar $Product_Pic$ | ||
+ | DefVar $ExitCode$ | ||
+ | DefVar $TestResult$ | ||
+ | DefVar $zyGribZip$ | ||
+ | DefVar $LinkFolder_Prog$ | ||
+ | DefVar $Link_Prog_Name$ | ||
+ | DefVar $Link_WorkingDir$ | ||
+ | DefVar $Link_TargetProg$ | ||
+ | ; ---------------------------------------------------------------- | ||
+ | |||
+ | ; ---------------------------------------------------------------- | ||
+ | ; - Setting fixed Variables | ||
+ | ; ---------------------------------------------------------------- | ||
+ | Set $INST_SystemType$ = GetSystemType | ||
+ | Set $INST_MsVersion$ = GetMsVersionInfo | ||
+ | Set $OSVersion$ = " | ||
+ | ; ---------------------------------------------------------------- | ||
+ | |||
+ | ; ---------------------------------------------------------------- | ||
+ | ; - Please edit the following values | ||
+ | ; ---------------------------------------------------------------- | ||
+ | Set $ProductId$ = " | ||
+ | Set $Version$ = " | ||
+ | Set $MinimumSpace$ = "500 MB" | ||
+ | ; the path were we find the product after the installation | ||
+ | Set $InstallDir$ = " | ||
+ | Set $zyGribZip$ = " | ||
+ | Set $7zPrg$ = " | ||
+ | Set $7zCall$ = "x -y " | ||
+ | Set $Product_Pic$ = " | ||
+ | ; for Start Menue entry | ||
+ | Set $LinkFolder_Prog$ = " | ||
+ | Set $Link_Prog_Name$ = " | ||
+ | Set $Link_WorkingDir$ = $InstallDir$+" | ||
+ | Set $Link_TargetProg$ = $Link_WorkingDir$+" | ||
+ | ; ---------------------------------------------------------------- | ||
+ | |||
+ | ; ---------------------------------------------------------------- | ||
+ | ; - Check System Requierements | ||
+ | ; ---------------------------------------------------------------- | ||
+ | if not(HasMinimumSpace (" | ||
+ | LogError "Not enough space on %SystemDrive%, | ||
+ | isFatalError "Drive Space" | ||
+ | ; Stop process and set installation status to failed | ||
+ | endif | ||
+ | |||
+ | if CompareDotSeparatedNumbers($INST_MsVersion$,"<", | ||
+ | LogError "Wrong OS Version. At least Windows 7 is required for installation!" | ||
+ | isFatalError "OS Version" | ||
+ | ; Stop process and set installation status to failed | ||
+ | endif | ||
+ | |||
+ | if not(FileExists($7zPrg$)) | ||
+ | LogError "7-Zip not found in default Installation destination " + $7zPrg$ + ". Check 7-Zip installation." | ||
+ | isFatalError "7-Zip missing" | ||
+ | endif | ||
+ | ; ---------------------------------------------------------------- | ||
+ | |||
+ | ; ---------------------------------------------------------------- | ||
+ | ; - Installation | ||
+ | ; ---------------------------------------------------------------- | ||
+ | |||
+ | comment "Show product picture" | ||
+ | ShowBitmap " | ||
+ | |||
+ | if ($INST_SystemType$ = "x86 System" | ||
+ | Message " | ||
+ | WinBatch_Install | ||
+ | Set $ExitCode$ = getLastExitCode | ||
+ | if ($ExitCode$ = " | ||
+ | comment " | ||
+ | else | ||
+ | if ($ExitCode$ = " | ||
+ | LogError "7-Zip Command Line Error. Exit Code" + $ExitCode$ + " returned." | ||
+ | isFatalError "7-Zip CLI Error" | ||
+ | else | ||
+ | LogError " | ||
+ | isFatalError " | ||
+ | endif | ||
+ | endif | ||
+ | DosInAnIcon_rights | ||
+ | LinkFolder_install | ||
+ | endif | ||
+ | |||
+ | if ($INST_SystemType$ = "64 Bit System" | ||
+ | Message " | ||
+ | WinBatch_Install | ||
+ | Set $ExitCode$ = getLastExitCode | ||
+ | if ($ExitCode$ = " | ||
+ | comment " | ||
+ | else | ||
+ | if ($ExitCode$ = " | ||
+ | LogError "7-Zip Command Line Error. Exit Code" + $ExitCode$ + " returned." | ||
+ | isFatalError "7-Zip CLI Error" | ||
+ | else | ||
+ | LogError " | ||
+ | isFatalError " | ||
+ | endif | ||
+ | endif | ||
+ | DosInAnIcon_rights | ||
+ | LinkFolder_install | ||
+ | endif | ||
+ | ; ---------------------------------------------------------------- | ||
+ | |||
+ | ; ---------------------------------------------------------------- | ||
+ | ; - Sub' | ||
+ | ; ---------------------------------------------------------------- | ||
+ | |||
+ | [WinBatch_Install] | ||
+ | " | ||
+ | |||
+ | [DosInAnIcon_rights] | ||
+ | icacls " | ||
+ | |||
+ | [LinkFolder_install] | ||
+ | set_basefolder common_programs | ||
+ | |||
+ | ; Link for User Information | ||
+ | set_subfolder $LinkFolder_Prog$ | ||
+ | |||
+ | set_link | ||
+ | name: $Link_Prog_Name$ | ||
+ | target: $Link_TargetProg$ | ||
+ | parameters: | ||
+ | working_dir: | ||
+ | icon_file: | ||
+ | icon_index: | ||
+ | end_link | ||
+ | |||
+ | </ | ||
+ | |||
+ | ==== uninstall.opsiscript ==== | ||
+ | <code winst> | ||
+ | [Initial] | ||
+ | setLogLevel=6 | ||
+ | ; Log Errors in Logfile but don't abort: | ||
+ | ExitOnError=false | ||
+ | ; Show syntax errors in the script: | ||
+ | ScriptErrorMessages=on | ||
+ | ; Dont trace step by step through the script: | ||
+ | TraceMode=off | ||
+ | ; let started programs run in front of the winst window | ||
+ | StayOnTop=false | ||
+ | |||
+ | |||
+ | [Actions] | ||
+ | requiredWinstVersion >= " | ||
+ | |||
+ | ; ---------------------------------------------------------------- | ||
+ | ; - define Variables | ||
+ | ; ---------------------------------------------------------------- | ||
+ | DefVar $ProductId$ | ||
+ | DefVar $Version$ | ||
+ | DefVar $LogDir$ | ||
+ | DefVar $MinimumSpace$ | ||
+ | DefVar $INST_architecture$ | ||
+ | DefVar $INST_SystemType$ | ||
+ | DefVar $INST_MsVersion$ | ||
+ | DefVar $OSVersion$ | ||
+ | DefVar $InstallDir$ | ||
+ | DefVar $Product_Pic$ | ||
+ | DefVar $LinkFolder_Prog$ | ||
+ | ; ---------------------------------------------------------------- | ||
+ | |||
+ | ; ---------------------------------------------------------------- | ||
+ | ; - Setting fixed Variables | ||
+ | ; ---------------------------------------------------------------- | ||
+ | Set $INST_SystemType$ = GetSystemType | ||
+ | Set $INST_MsVersion$ = GetMsVersionInfo | ||
+ | Set $OSVersion$ = " | ||
+ | ; ---------------------------------------------------------------- | ||
+ | |||
+ | ; ---------------------------------------------------------------- | ||
+ | ; - Please edit the following values | ||
+ | ; ---------------------------------------------------------------- | ||
+ | Set $ProductId$ = " | ||
+ | Set $Version$ = " | ||
+ | Set $MinimumSpace$ = "500 MB" | ||
+ | ; the path were we find the product after the installation | ||
+ | Set $InstallDir$ = '" | ||
+ | Set $Product_Pic$ = " | ||
+ | ; for Start Menue entry | ||
+ | Set $LinkFolder_Prog$ = " | ||
+ | ; ---------------------------------------------------------------- | ||
+ | |||
+ | ; ---------------------------------------------------------------- | ||
+ | ; - Check System Requierements | ||
+ | ; ---------------------------------------------------------------- | ||
+ | if not(HasMinimumSpace (" | ||
+ | LogError "Not enough space on %SystemDrive%, | ||
+ | isFatalError | ||
+ | ; Stop process and set installation status to failed | ||
+ | endif | ||
+ | |||
+ | if CompareDotSeparatedNumbers($INST_MsVersion$,"<", | ||
+ | LogError "Wrong OS Version. At least Windows 7 is required for deinstallation!" | ||
+ | isFatalError | ||
+ | ; Stop process and set installation status to failed | ||
+ | endif | ||
+ | ; ---------------------------------------------------------------- | ||
+ | |||
+ | ; ---------------------------------------------------------------- | ||
+ | ; - Installation | ||
+ | ; ---------------------------------------------------------------- | ||
+ | |||
+ | comment "Show product picture" | ||
+ | ShowBitmap " | ||
+ | |||
+ | if ($INST_SystemType$ = "x86 System" | ||
+ | Message " | ||
+ | Files_delete | ||
+ | LinkFolder_remove | ||
+ | endif | ||
+ | |||
+ | if ($INST_SystemType$ = "64 Bit System" | ||
+ | Message " | ||
+ | Files_delete | ||
+ | LinkFolder_remove | ||
+ | endif | ||
+ | ; ---------------------------------------------------------------- | ||
+ | |||
+ | ; ---------------------------------------------------------------- | ||
+ | ; - Sub' | ||
+ | ; ---------------------------------------------------------------- | ||
+ | |||
+ | [Files_delete] | ||
+ | del -sf $InstallDir$ | ||
+ | |||
+ | [LinkFolder_remove] | ||
+ | set_basefolder common_startmenu | ||
+ | delete_subfolder $LinkFolder_Prog$ | ||
+ | |||
+ | </ | ||
+ | |||
+ | ==== control ==== | ||
+ | |||
+ | <code winst> | ||
+ | [Package] | ||
+ | version: 1 | ||
+ | depends: | ||
+ | |||
+ | [Product] | ||
type: localboot | type: localboot | ||
id: zyGrib | id: zyGrib | ||
- | description: GRIB File Viewer - Weather data visualization | + | name: zyGrib mit Kartendaten |
- | Beschreibung: | + | description: |
+ | advice: 7-Zip muss vor Installation installiert sein | ||
+ | version: 8.0.1 | ||
+ | priority: 0 | ||
+ | licenseRequired: | ||
+ | productClasses: | ||
+ | setupScript: | ||
+ | uninstallScript: | ||
+ | updateScript: | ||
+ | alwaysScript: | ||
+ | onceScript: | ||
+ | customScript: | ||
+ | userLoginScript: | ||
+ | |||
+ | [ProductDependency] | ||
+ | action: setup | ||
+ | requiredProduct: | ||
+ | requiredStatus: | ||
+ | requirementType: | ||
+ | |||
+ | [Changelog] | ||
+ | zyGrib (1.0-1) stable; urgency=low | ||
+ | |||
+ | Project created with opsi Package Builder 8.4.4 | ||
+ | </ |