Ignore:
Timestamp:
May 23, 2019, 1:46:22 AM (6 years ago)
Author:
ataylor
Message:

Try to avoid relocating an existing NewView icon when installing.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/installer/MainFormUnit.pas

    r425 r434  
    2323  Description = 'NewView Install';
    2424
    25   Version =        'V1.10.1'; // $SS_REQUIRE_NEW_VERSION$
    26   BldLevelVersion = '1.10.1'; // Embedded for IBM BLDLEVEL tool
     25  Version =        'V1.10.2'; // $SS_REQUIRE_NEW_VERSION$
     26  BldLevelVersion = '1.10.2'; // Embedded for IBM BLDLEVEL tool
    2727
    2828  // BLDLevel - compatible - mostly
     
    199199
    200200  ECSNewViewObjectID = '<ECS_NEWVIEW>';
     201  WPNewViewObjectID = '<WP_NEWVIEW>';
    201202  NewViewObjectID = '<NEWVIEW>';
    202203  IPFFiles = '*.INF,*.HLP'; // NOTE: PM is case sensitive here
     
    848849                     Description,
    849850                     szSetupString, // setup string
     851                     '<WP_TOOLS>',
     852                     CO_UPDATEIFEXISTS );
     853
     854  if Result <> NULLHANDLE then
     855  begin
     856    // OK
     857    WinCreateObject( 'WPShadow',        // class
     858                     Description,
     859                     'SHADOWID=' + ID,  // setup string
    850860                     '<WP_DESKTOP>',
    851                      CO_REPLACEIFEXISTS );
    852 
    853   if Result <> NULLHANDLE then
    854     // OK
    855     exit;
     861                     CO_UPDATEIFEXISTS );
     862    exit;
     863  end;
    856864
    857865  // error
     
    865873                  'Unable to create desktop icon:' + StrCRLF
    866874                  + IntToHex( PMError, 8 )
    867                   + ': The desktop is not correctly installed '
    868                   + '(<WP_DESKTOP> missing). ' );
     875                  + ': The target folder is not correctly installed '
     876                  + '(<WP_TOOLS> missing). ' );
    869877
    870878    WPERR_NOT_WORKPLACE_CLASS:
     
    880888                  + ': There may be some problem with the desktop.' );
    881889  end;
     890
    882891end;
    883892
     
    13751384      ObjectID := ECSNewViewObjectID
    13761385    else
    1377       // no, create our own
    1378       ObjectID := NewViewObjectID;
     1386    begin
     1387      ProgramObjectHandle :=
     1388        WinQueryObject( WPNewViewObjectID );
     1389      if ProgramObjectHandle <> NULLHANDLE then
     1390        ObjectID := WPNewViewObjectID
     1391      else
     1392        ObjectID := NewViewObjectID;
     1393    end;
    13791394
    13801395    if CreateDesktopIcon( FAppInstallPath,
Note: See TracChangeset for help on using the changeset viewer.