This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
start [2011/09/21 13:14] ueluekmen |
start [2024/01/03 15:38] (current) d.oertel [Packaging] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== | + | ====== |
- | test | + | Welcome to the opsi wiki / Willkommen beim opsi wiki |
- | hallo | + | * Anybody is invited to share opsi-script scripts with the opsi-community / Alle sind eingeladen opsi-script Skripte in der opsi-Community bereitzustellen. |
+ | * Postings or descriptions should be in English / Beiträge sollten möglichst einsprachig (Englisch) sein. | ||
+ | * To join this wiki please register - you can even use your forum user account / Für das Einstellen von Skripten o.a. ist eine Useranmeldung erforderlich - es kann der Benutzer Account aus dem Forum benutzt werden. | ||
+ | * Anybody can edit and comment the pages, so please respect each other / Jeder kann editieren und kommentieren, | ||
- | < | + | A short introduction on how to post a script / Kurze Einführung, |
- | class hallo | + | * Put your scripts at new pages below [[userspace: |
- | </ | + | * Put the opsi-script code between %%"< |
+ | * A product name and maybe a short product description / Ein Produktname und eventuell eine kurze Produktbeschreibung. | ||
+ | * Which opsi (opsi-script) version is needed for the script / Welche opsi (opsi-script) Version wird für das Skript benötigt. | ||
+ | * Other script settings / Anderen spezielle Einstellungen für das Skript. | ||
+ | * Is a license-file needed? (don't put it in the script) / Erklärung, ob eine Lizenz benötigt wird (Lizenzinformationen nicht ins Skript posten). | ||
+ | * To discuss scripts, please use the ' | ||
- | test | + | A Script example / Ein Skriptbeispiel :\\ |
+ | [[userspace: | ||
- | <code Bash> | ||
- | $test | ||
- | case | ||
- | if | ||
- | xargs | ||
- | |||
- | alias | ||
- | </ | ||
- | |||
- | <code Winst> | ||
- | $test$ | ||
- | |||
- | case | ||
- | if | ||
- | xargs | ||
- | |||
- | alias | ||
- | </ | ||
====== Packaging ====== | ====== Packaging ====== | ||
- | * [[Packaging links]] | + | * [[userspace: |
- | * [[script templates]] | + | |
- | + | * [[userspace:script templates|opsi-script scripts]] | |
- | <code winst> | + | * [[userspace: |
- | ; Copyright (c) uib gmbh (www.uib.de) | + | * [[userspace:webservice corner|webservice_corner]] |
- | ; This sourcecode is owned by uib | + | |
- | ; and published under the Terms of the General Public License. | + | |
- | ; credits: http:// | + | |
- | + | * [[userspace:shell scripts|shell scripts]] | |
- | [Actions] | + | * [[opsi-server authentication over Windows AD based on LDAP]] |
- | requiredWinstVersion >= " | + | |
- | + | ||
- | DefVar $MsiId$ | + | |
- | DefVar $UninstallProgram$ | + | |
- | DefVar $LogDir$ | + | |
- | DefVar $ProductId$ | + | |
- | DefVar $MinimumSpace$ | + | |
- | DefVar $InstallDir$ | + | |
- | DefVar $ExitCode$ | + | |
- | DefVar $LicenseRequired$ | + | |
- | DefVar $LicenseKey$ | + | |
- | DefVar $LicensePool$ | + | |
- | + | ||
- | Set $LogDir$ = " | + | |
- | + | ||
- | ; ---------------------------------------------------------------- | + | |
- | ; - Please edit the following values | + | |
- | ; ---------------------------------------------------------------- | + | |
- | ; | + | |
- | ; therefore please: only lower letters, no umlauts, | + | |
- | ; no white space use ' | + | |
- | Set $ProductId$ | + | |
- | Set $MinimumSpace$ | + | |
- | ; the path were we find the product after the installation | + | |
- | Set $InstallDir$ | + | |
- | Set $LicenseRequired$ = " | + | |
- | Set $LicensePool$ | + | |
- | ; ---------------------------------------------------------------- | + | |
- | + | ||
- | if not(HasMinimumSpace (" | + | |
- | LogError "Not enough space on %SystemDrive%, | + | |
- | isFatalError | + | |
- | ; Stop process and set installation | + | |
- | else | + | |
- | comment "Show product picture" | + | |
- | ShowBitmap " | + | |
- | + | ||
- | if FileExists(" | + | |
- | comment "Start uninstall sub section" | + | |
- | Sub " | + | |
- | endif | + | |
- | + | ||
- | Message " | + | |
- | + | ||
- | if $LicenseRequired$ = " | + | |
- | comment " | + | |
- | Sub_get_licensekey | + | |
- | endif | + | |
- | + | ||
- | comment "Start setup program" | + | |
- | Winbatch_install | + | |
- | Sub_check_exitcode | + | |
- | + | ||
- | comment "Copy files" | + | |
- | Files_install /32Bit | + | |
- | + | ||
- | comment "Patch Registry" | + | |
- | Registry_install /32Bit | + | |
- | + | ||
- | comment " | + | |
- | LinkFolder_install | + | |
- | + | ||
- | comment "Test for installation success" | + | |
- | ; Test if software marked as installed in registry | + | |
- | ; if (GetRegistryStringValue32(" | + | |
- | ; | + | |
- | ; | + | |
- | ; else | + | |
- | ; | + | |
- | ; endif | + | |
- | + | ||
- | endif | + | |
- | + | ||
- | [Winbatch_install] | + | |
- | ; Choose one of the following examples as basis for your installation | + | |
- | ; You can use $LicenseKey$ var to pass a license key to the installer | + | |
- | ; | + | |
- | ; === Nullsoft Scriptable Install System ================================================================ | + | |
- | ; " | + | |
- | ; | + | |
- | ; === MSI package ======================================================================================= | + | |
- | ; You may use the parameter PIDKEY=$Licensekey$ | + | |
- | ; msiexec /i " | + | |
- | ; | + | |
- | ; === InstallShield + MSI===================================================================================== | + | |
- | ; Attention: The path to the log file should not contain any whitespaces | + | |
- | ; " | + | |
- | ; " | + | |
- | ; | + | |
- | ; === InstallShield ===================================================================================== | + | |
- | ; Create setup.iss answer file by running: setup.exe /r / | + | |
- | ; " | + | |
- | ; | + | |
- | ; === Inno Setup ======================================================================================== | + | |
- | ; http:// | + | |
- | ; You may create setup answer file by: setup.exe / | + | |
- | ; You may use an answer file by the parameter / | + | |
- | ; " | + | |
- | + | ||
- | [Files_install] | + | |
- | ; Example of recursively copying some files into the installation directory: | + | |
- | ; | + | |
- | ; copy -s " | + | |
- | + | ||
- | [Registry_install] | + | |
- | ; Example of setting some values of an registry key: | + | |
- | ; | + | |
- | ; openkey | + | |
- | ; set " | + | |
- | ; set " | + | |
- | ; set " | + | |
- | + | ||
- | [LinkFolder_install] | + | |
- | ; Example of deleting a folder from AllUsers startmenu: | + | |
- | ; | + | |
- | ; set_basefolder common_programs | + | |
- | ; delete_subfolder $ProductId$ | + | |
- | ; | + | |
- | ; Example of creating an shortcut to the installed exe in AllUsers startmenu: | + | |
- | ; | + | |
- | ; set_basefolder common_programs | + | |
- | ; set_subfolder $ProductId$ | + | |
- | ; | + | |
- | ; set_link | + | |
- | ; name: $ProductId$ | + | |
- | ; | + | |
- | ; | + | |
- | ; | + | |
- | ; | + | |
- | ; | + | |
- | ; end_link | + | |
- | ; | + | |
- | ; Example of creating an shortcut to the installed exe on AllUsers desktop: | + | |
- | ; | + | |
- | ; set_basefolder common_desktopdirectory | + | |
- | ; set_subfolder "" | + | |
- | ; | + | |
- | ; set_link | + | |
- | ; name: $ProductId$ | + | |
- | ; | + | |
- | ; | + | |
- | ; | + | |
- | ; | + | |
- | ; | + | |
- | ; end_link | + | |
- | + | ||
- | [Sub_get_licensekey] | + | |
- | if opsiLicenseManagementEnabled | + | |
- | comment " | + | |
- | + | ||
- | comment " | + | |
- | Set $LicenseKey$ = demandLicenseKey ($LicensePool$) | + | |
- | ; If there is an assignment of exactly one licensepool to the product the following call is possible: | + | |
- | ; Set $LicenseKey$ = demandLicenseKey ("", | + | |
- | ; | + | |
- | ; If there is an assignment of a license pool to a windows software id, it is possible to use: | + | |
- | ; DefVar $WindowsSoftwareId$ | + | |
- | ; $WindowsSoftwareId$ = " | + | |
- | ; Set $LicenseKey$ = demandLicenseKey ("", | + | |
- | + | ||
- | DefVar $ServiceErrorClass$ | + | |
- | set $ServiceErrorClass$ = getLastServiceErrorClass | + | |
- | comment "Error class: " + $ServiceErrorClass$ | + | |
- | + | ||
- | if $ServiceErrorClass$ = " | + | |
- | comment " | + | |
- | else | + | |
- | if $ServiceErrorClass$ = " | + | |
- | LogError " | + | |
- | LogError getLastServiceErrorMessage | + | |
- | isFatalError | + | |
- | else | + | |
- | if $ServiceErrorClass$ = " | + | |
- | LogError " | + | |
- | isFatalError | + | |
- | endif | + | |
- | endif | + | |
- | endif | + | |
- | else | + | |
- | LogError " | + | |
- | isFatalError | + | |
- | endif | + | |
- | [Sub_check_exitcode] | ||
- | comment "Test for installation success via exit code" | ||
- | set $ExitCode$ = getLastExitCode | ||
- | ; informations to exit codes see | ||
- | ; http:// | ||
- | ; http:// | ||
- | if ($ExitCode$ = " | ||
- | comment "Looks good: setup program gives exitcode zero" | ||
- | else | ||
- | comment "Setup program gives a exitcode unequal zero: " + $ExitCode$ | ||
- | if ($ExitCode$ = " | ||
- | comment " | ||
- | comment " | ||
- | else | ||
- | if ($ExitCode$ = " | ||
- | comment "looks good: setup program gives exitcode 1641" | ||
- | comment " | ||
- | else | ||
- | if ($ExitCode$ = " | ||
- | comment "looks good: setup program gives exitcode 3010" | ||
- | comment " | ||
- | else | ||
- | logError " | ||
- | isFatalError | ||
- | endif | ||
- | endif | ||
- | endif | ||
- | endif | ||
- | </ | ||
+ | ====== Sources ====== | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||