Code

Changeset 5e1201 in uwesieber.usbdlm


Ignore:
Timestamp:
05/14/2012 05:13:37 AM (8 years ago)
Author:
geos_one
Branches:
master
Children:
aed00d
Parents:
af3e6e
git-author:
Mario Fetka <mario.fetka@…> (05/14/2012 05:13:37 AM)
git-committer:
Mario Fetka <mario.fetka@…> (05/14/2012 05:13:37 AM)
Message:

Bump and Rename and move to new buildsystem with old package handling

Files:
7 added
3 deleted
1 edited
2 moved

Legend:

Unmodified
Added
Removed
  • CLIENT_DATA/delsub3264.ins

    r3f496e r5e1201  
    55 
    66 
    7 Set $MsiId32$ = '{765E5A6F-A253-4D23-B2A8-0DE7CA5D73EF}' 
    87Set $UninstallProgram32$ = $InstallDir32$ + "\uninstall.exe" 
     8Set $UninstallProgram64$ = $InstallDir64$ + "\uninstall.exe" 
     9Set $IniFile32$ = $InstallDir32$ + "\opsi-" + $ProductId$ + ".ini" 
     10Set $IniFile64$ = $InstallDir64$ + "\opsi-" + $ProductId$ + ".ini" 
    911 
    10 Set $MsiId64$ = '{BAA8B8BD-DBDC-4061-8A98-CFBFE1531BFF}' 
    11 Set $UninstallProgram32$ = $InstallDir64$ + "\uninstall.exe" 
     12 
    1213 
    1314if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specific")) or ($INST_architecture$ = "both") or ($INST_architecture$ = "32 only") 
    1415        Message "Uninstalling " + $ProductId$ + " 32 Bit..." 
     16 
     17        if FileExists($IniFile32$) 
     18                Set $MsiIdOld32$ = GetValueFromInifile($IniFile32$,"X86","MsiId32","{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}") 
     19                if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiIdOld32$ + "] DisplayName") = "") 
     20                        comment "Old MSI id " + $MsiIdOld32$ + " found in registry, starting msiexec to uninstall old version" 
     21                        Winbatch_uninstall_msi_old_32 
     22                        sub_check_exitcode 
     23                endif 
     24        endif 
    1525 
    1626        if FileExists($UninstallProgram32$) 
     
    3545        Message "Uninstalling " + $ProductId$ + " 64 Bit..." 
    3646 
     47        if FileExists($IniFile64$) 
     48                Set $MsiIdOld64$ = GetValueFromInifile($IniFile64$,"X86_64","MsiId64","{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}") 
     49                if not (GetRegistryStringValue64("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiIdOld64$ + "] DisplayName") = "") 
     50                        comment "Old MSI id " + $MsiIdOld64$ + " found in registry, starting msiexec to uninstall old version" 
     51                        Winbatch_uninstall_msi_old_64 
     52                        sub_check_exitcode 
     53                endif 
     54        endif 
    3755        if FileExists($UninstallProgram64$) 
    3856                comment "Uninstall program found, starting uninstall" 
     
    6381; 
    6482; === Inno Setup ======================================================================================== 
    65 ; "$UninstallProgram32$" /silent /norestart 
     83; "$UninstallProgram32$" /silent /norestart /SUPPRESSMSGBOXES 
    6684 
     85 
     86[Winbatch_uninstall_msi_old_32] 
     87msiexec /x $MsiIdOld32$ /qb! REBOOT=ReallySuppress 
    6788 
    6889[Winbatch_uninstall_msi_32] 
     
    81102; 
    82103; === Inno Setup ======================================================================================== 
    83 ; "$UninstallProgram64$" /silent /norestart 
     104; "$UninstallProgram64$" /silent /norestart /SUPPRESSMSGBOXES 
    84105 
     106 
     107[Winbatch_uninstall_msi_old_64] 
     108msiexec /x $MsiIdOld64$ /qb! REBOOT=ReallySuppress 
    85109 
    86110[Winbatch_uninstall_msi_64] 
  • CLIENT_DATA/setup3264.ins

    rc48de4 r5e1201  
    77requiredWinstVersion >= "4.10.8.6" 
    88 
    9 DefVar $MsiId32$ 
     9; DefVar $MsiId32$ 
     10DefVar $MsiIdOld32$ 
    1011DefVar $UninstallProgram32$ 
    11 DefVar $MsiId64$ 
     12DefVar $IniFile32$ 
     13; DefVar $MsiId64$ 
     14DefVar $MsiIdOld64$ 
    1215DefVar $UninstallProgram64$ 
     16DefVar $IniFile64$ 
     17DefVar $IniCfgFile$ 
    1318DefVar $LogDir$ 
    1419DefVar $ProductId$   
     
    2934Set $LogDir$ = "%SystemDrive%\tmp" 
    3035 
     36; The token BUILDER_VARIABLES will be replaced by opsi-builder.sh 
     37; and adds the following variables: 
     38;   from builder-product.cfg :  all variables definded by attribute WINST[index] 
     39;   from builder-product.cfg :  VENDOR PN VERSION RELEASE PRIORITY ADVICE TYPE    
     40;   from opsi-builder.cfg    :  CREATOR_TAG CREATOR_NAME CREATOR_EMAIL            
     41;   auto generated winst-variables 
     42;         $IconFile$: path to product picture 
     43; 
     44@@BUILDER_VARIABLES@@ 
     45 
    3146; ---------------------------------------------------------------- 
    3247; - Please edit the following values                             - 
     
    3550; therefore please: only lower letters, no umlauts,  
    3651; no white space use '-' as a seperator 
    37 Set $ProductId$       = "usbdlm" 
    38 Set $MinimumSpace$    = "20 MB" 
     52Set $ProductId$       = "uwesieber.usbdlm" 
     53Set $MinimumSpace$    = "10 MB" 
    3954; the path were we find the product after the installation 
    4055Set $InstallDir32$      = "%ProgramFiles32Dir%\USBDLM" 
    4156Set $InstallDir64$      = "%ProgramFiles64Dir%\USBDLM" 
     57Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini" 
    4258Set $LicenseRequired$ = "false" 
    4359Set $LicensePool$     = "p_" + $ProductId$ 
     
    5268        ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$ 
    5369         
    54         if FileExists("%ScriptPath%\delsub.ins") 
     70        if FileExists("%ScriptPath%\delsub3264.ins") 
    5571                comment "Start uninstall sub section" 
    56                 Sub "%ScriptPath%\delsub.ins" 
     72                Sub "%ScriptPath%\delsub3264.ins" 
    5773        endif 
    5874         
     
    93109 
    94110[Winbatch_install_32] 
    95 ; Choose one of the following examples as basis for your installation 
    96 ; You can use $LicenseKey$ var to pass a license key to the installer 
    97 ; 
    98 ; === MSI package ======================================================================================= 
    99 ; You may use the parameter PIDKEY=$Licensekey$ 
    100 msiexec /i "%ScriptPath%\X86FILE" /l* "$LogDir$\$ProductId$.install_log.txt" /qb! ALLUSERS=2 REBOOT=ReallySuppress 
     111msiexec /i "$Install32Msi$" /l* "$LogDir$\$ProductId$.install_log.txt" /qb! ALLUSERS=2 REBOOT=ReallySuppress 
    101112 
    102113[Files_install_32] 
     114copy "$IniCfgFile$" "$InstallDir32$" 
     115 
    103116; Example of recursively copying some files into the installation directory: 
    104117; 
     
    106119 
    107120[Winbatch_install_64] 
    108 ; Choose one of the following examples as basis for your installation 
    109 ; You can use $LicenseKey$ var to pass a license key to the installer 
    110 ; 
    111 ; === MSI package ======================================================================================= 
    112 ; You may use the parameter PIDKEY=$Licensekey$ 
    113 msiexec /i "%ScriptPath%\AMD64FILE" /l* "$LogDir$\$ProductId$.install_log.txt" /qb! ALLUSERS=2 REBOOT=ReallySuppress 
     121msiexec /i "$Install64Msi$" /l* "$LogDir$\$ProductId$.install_log.txt" /qb! ALLUSERS=2 REBOOT=ReallySuppress 
    114122 
    115123[Files_install_64] 
     124copy "$IniCfgFile$" "$InstallDir64$" 
     125 
    116126; Example of recursively copying some files into the installation directory: 
    117127; 
     
    161171 
    162172[Sub_get_licensekey] 
    163 if opsiLicenseManagementEnabled 
    164         comment "License management is enabled and will be used" 
    165  
    166         comment "Trying to get a license key" 
    167         Set $LicenseKey$ = demandLicenseKey ($LicensePool$) 
    168         ; If there is an assignment of exactly one licensepool to the product the following call is possible: 
    169         ; Set $LicenseKey$ = demandLicenseKey ("", $ProductId$) 
    170         ; 
    171         ; If there is an assignment of a license pool to a windows software id, it is possible to use: 
    172         ; DefVar $WindowsSoftwareId$ 
    173         ; $WindowsSoftwareId$ = "..." 
    174         ; Set $LicenseKey$ = demandLicenseKey ("", "", $WindowsSoftwareId$) 
    175          
    176         DefVar $ServiceErrorClass$ 
    177         set $ServiceErrorClass$ = getLastServiceErrorClass 
    178         comment "Error class: " + $ServiceErrorClass$ 
    179          
    180         if $ServiceErrorClass$ = "None" 
    181                 comment "Everything fine, we got the license key '" + $LicenseKey$ + "'" 
    182         else 
    183                 if $ServiceErrorClass$ = "LicenseConfigurationError" 
    184                         LogError "Fatal: license configuration must be corrected" 
    185                         LogError getLastServiceErrorMessage 
     173comment "License management is enabled and will be used" 
     174 
     175comment "Trying to get a license key" 
     176Set $LicenseKey$ = demandLicenseKey ($LicensePool$) 
     177; If there is an assignment of exactly one licensepool to the product the following call is possible: 
     178; Set $LicenseKey$ = demandLicenseKey ("", $ProductId$) 
     179; 
     180; If there is an assignment of a license pool to a windows software id, it is possible to use: 
     181; DefVar $WindowsSoftwareId$ 
     182; $WindowsSoftwareId$ = "..." 
     183; Set $LicenseKey$ = demandLicenseKey ("", "", $WindowsSoftwareId$) 
     184 
     185DefVar $ServiceErrorClass$ 
     186set $ServiceErrorClass$ = getLastServiceErrorClass 
     187comment "Error class: " + $ServiceErrorClass$ 
     188 
     189if $ServiceErrorClass$ = "None" 
     190        comment "Everything fine, we got the license key '" + $LicenseKey$ + "'" 
     191else 
     192        if $ServiceErrorClass$ = "LicenseConfigurationError" 
     193                LogError "Fatal: license configuration must be corrected" 
     194                LogError getLastServiceErrorMessage 
     195                isFatalError 
     196        else  
     197                if $ServiceErrorClass$ = "LicenseMissingError" 
     198                        LogError "Fatal: required license is not supplied" 
    186199                        isFatalError 
    187                 else  
    188                         if $ServiceErrorClass$ = "LicenseMissingError" 
    189                                 LogError "Fatal: required license is not supplied" 
    190                                 isFatalError 
    191                         endif 
    192200                endif 
    193201        endif 
    194 else 
    195         LogError "Fatal: license required, but license management not enabled" 
    196         isFatalError 
    197202endif 
    198  
    199203 
    200204[Sub_check_exitcode] 
  • OPSI/control

    ra9504d r5e1201  
    66[Product] 
    77type: localboot 
    8 id: usbdlm 
     8id: uwesieber.usbdlm 
    99name: USB Drive Letter Manager 
    1010description: USB Drive Letter Manager - Laufwerksbuchstaben-Manager fuer Windows 
     
    1414licenseRequired: False 
    1515productClasses:  
    16 setupScript: setup.ins 
    17 uninstallScript: uninstall.ins 
     16setupScript: setup3264.ins 
     17uninstallScript: uninstall3264.ins 
    1818updateScript:  
    1919alwaysScript:  
Note: See TracChangeset for help on using the changeset viewer.