Jump to content

Incus J

Members
  • Content Count

    157
  • Joined

  • Last visited

Posts posted by Incus J


  1. OK, PUREPASCAL added as a Compiler Directive in the project options.  I think this is called winging-it.  Next up:

     

    [dccosx64 Error] OverbyteIcsUtils.pas(6956): E2033 Types of actual and formal var parameters must be identical

    function TIcsFindList.AddSorted(const Item2: Pointer; Compare: TListSortCompare): Integer;
    begin
        if NOT Sorted then
            Result := Count
        else begin
           if Find (Item2, Compare, Result) then exit;
        end ;
        Insert (Result, Item2) ;
    end;

    Result is an Integer, but Find defines its 3rd 'index' parameter as a LongInt.  

     

    Oh! - lightbulb moment.  ICS expects a 32-bit compiler, where Integer and LongInt are likely the same size.  But macOS requires a 64-bit compiler, where one of those (either Integer or LongInt, but not both) will be 64-bits.  Out of my depth - what do you mean you can tell? :)


  2. OK I've corrected (I think) $IFNDEF to $IFDEF and the compiler gets further.  The sticking point is now in OverbyteIcsUtils:

     

    [dccosx64 Error] OverbyteIcsUtils.pas(2391): E1025 Unsupported language feature: 'ASM'

    function IcsSwap16(Value: Word): Word;
    {$IFDEF PUREPASCAL}
    begin
        Result := (Value shr 8) or (Value shl 8);
    {$ELSE}
    asm
    {$IFDEF CPUX64}
        MOV   AX, CX
    {$ENDIF}
        XCHG  AL, AH
    {$ENDIF}
    end;

    It doesn't like the line 'asm' which makes sense because (unlike 32-bit) the 64-bit compiler doesn't support inline assembly.  My guess is it needs to use the PUREPASCAL version when compiling for macOS 64-bit.  However I haven't found where PUREPASCAL is defined yet.  Maybe I can add it as a directive in the project options?


  3. Thanks Vincent - I've corrected it to $MESSAGE, and now when building, the compiler actually displays that error i.e.

    "This unit should not be included in a Windows project..."

     

    But this is not a Windows project - it's a macOS 64-bit project.  

    So I was wondering whether it should actually read { $IFDEF MSWINDOWS } - would make more logical sense?


  4. OK I couldn't find anything in the IDE, but a quick browse of the Windows registry revealed a key named:

     

    Disabled IDE Packages

     

    ...containing three package entries.  I exported a copy of this key for safety, then deleted the three entries.  Restarted Delphi, and the macOS platform reappeared.

    If anyone finds that bits of the IDE are no longer loading, this might be useful.


  5. I'm trying to compile an FMX project with ICS 8.64 (installed in Delphi 10.4 via the GetIt Package manager) and getting the following error:

     

    [dccosx64 Error] Ics.Posix.Messages.pas(57): E1030 Invalid compiler directive: 'MESSAGES' at the following line:

     

    {$IFNDEF MSWINDOWS }
      {$MESSAGES Fatal 'This unit should not be included in a Windows project. Make sure you use Winapi.Messages instead'}
    {$ENDIF}

    The program is for macOS and uses ICS HTTP and SSL components.  It used to compile and run OK.  However it was last compiled some time ago, for macOS 32-bit.  I'm now recompiling it for macOS 64-bit, since 32-bit programs no longer run on macOS.  I'm wondering if the line above should read {$IFDEF MSWINDOWS} instead of {$IFNDEF MSWINDOWS} - but thought I'd ask before I tinker with it.


  6. After my issues with the Platform Manager on Friday, the IDE began displaying missing .bpl package errors when starting up, and the macOS platform was no longer available to add to a project.

     

    So I've uninstalled and reinstalled Delphi 10.4 (using the web installer, same as before).  The IDE starts up without errors now, and the Help documentation is back, though oddly the documentation refers to '10.4 Denali' - should that be 'Sydney' ?

     

    Unfortunately the macOS platform is still missing, though it appears to be installed - I suspect the IDE is just no longer attempting to load the necessary macOS packages.  Is there a listbox of IDE .bpl packages, maybe with checkboxes to enable them?  I've found a list of Design packages for a Project, but not packages for the IDE itself.

     

    593267870_PlatformManager10-4.thumb.png.5530b28d8883c6b867bb6cf87c2a23db.png


  7. On 7/31/2020 at 7:00 PM, Rollo62 said:

    "invalid credentials", either the server is down or I lost my credentials.

     

    I suspect there were server issues on Friday.  I kept getting "Invalid Serial Number" errors while trying to use the Tools > Platform Manager in Delphi 10.4 to install Help documentation.  After that the IDE started reporting missing .bpl packages when starting up, and the MacOS platform had vanished.

     

    I haven't got as far as Patches 2 & 3 yet - I'm currently reinstalling Delphi 10.4.


  8. Thanks Vandrovnik,

     

    In Tools > Manage Platforms, the Help documentation was marked as installed.

    So I unticked it, then clicked Apply to remove.

     

    Next I opened Manage Platforms again, re-ticked Help and Apply to (hopefully) reinstall Help.

    It seemed to be downloading and installing Help, but at the end announced:

    "Operation error, Invalid serial number"

     

    I restarted Delphi, checked the software is still licensed in the Help About box - that seems OK.

    So I tried again, and got the same error.

     

    Any ideas?  I have a current update subscription, which is listed in the License Manager, and 10.4 seemed to be running OK over the weeks I've been attempting to migrate from 10.3.

     

    (Edit:  The error sometimes changes to "Operation error, Internal check error")


  9. I'm trying to install a package EmbeddedWebBrowser_Tokyo.bpl in Delphi 10.4 which contains the following procedure:

    procedure TIEParser.Stop;
    begin
      if Assigned(Doc) then
        Doc := nil;
      if Assigned(All) then
        All := nil;
      FreeAndNil(Element);
      FUrl := EmptyStr;
      FBusy := False;
      Finalize;
    end;

    When Building I get a compiler error at FreeAndNil(Element).  Incompatible types: TObject and TElementInfo.

    This makes sense in that Element is a TElementInfo, which is a record, not a TObject.

     

    That suggests FreeAndNil may be the wrong thing to use here - but what could I use instead?  (not being sure exactly what the author's intention is).

     

    I realise _Tokyo indicates the package is for an older release, but it is the most up to date version of the package I can find at present.

    I had it installed and working OK in Delphi 10.3 - so hopefully I just need to tweak a couple of things?


  10. Thank you.

     

    I haven't found the repair option yet - sometimes software offers repair in the Add/Remove Programs window.  But I could only see Uninstall offered there.

    I tried setting file associations manually via the Windows right-click Open With... option, but couldn't get the setting to stick.  Windows kept displaying the Open With... dialog in a never ending loop.  Not sure why.

     

    Luckily I found an answer in another post on this forum.  Just in case it helps someone else:  In Delphi IDE Options there is a section listing File Associations.  Unticking them all, then ticking them again seems to have fixed the issue.  Phew!

    • Like 2

  11. I recently installed Delphi 10.4 and migrated my settings across from Delphi 10.3 via a .idesettings file.

     

    After that I uninstalled Delphi 10.3 as I figured I wouldn't need the previous version any more.  This might have been a mistake:

    All the Windows 10 file associations for Delphi (.dproj .dpr etc.) disappeared.

     

    How can I reinstate them - does Delphi have a repair option?


  12. In XE4 I can save and load IDE layouts using a field on the main toolbar.

     

    In Delphi Rio the main toolbar doesn't have these IDE layout controls, and I haven't located an equivalent on the view menu.

     

    - Whenever I start Rio, it defaults to a layout with very narrow Structure/Inspector panes about 100 pixels wide.  I drag to widen the panes to a useful size, but my adjustments are forgotten when I next start Rio.

    - In Delphi Options, Save desktop layout is ticked, but this setting seems to be ignored by the IDE.

    - I can see options for selecting Default, Startup and Debug layouts, but I don't currently understand what to do with them.  Can I add my own layouts to the list somehow?  What is the difference between Startup and Default?  What does a layout set to 'None' mean?

     

    Basically, how can I customise the IDE layout in Rio?  I'm using a 13" laptop, so need to customise carefully to be efficient/productive with the limited screen space available.


  13. How can I move some existing TMenuItems from one TPopupMenu to another, on the same form?

     

    In the form designer, I can drag a TMenuItem in the Structure pane - but as soon as I hover over the target TPopupMenu, the cursor changes to a 'no entry' symbol, so I'm unable to drop the item where I'd like it to be.

     

    Edit Cut/Paste don't seem to be available for a selected TMenuItem either?

     

    I'm probably missing the really obvious.  Any ideas?


  14. Thanks for all the replies.  I think I used the web installer to install 10.3.1 - so I'll give that a try (backing up the VM first).

     

    Yes, I've found that some projects, especially those originating in older releases (e.g. Delphi 7 or 2010) and then dragged through later releases, start to behave in odd ways.  For example the application version and build number settings don't stick - or when compiling, a different version number is assigned to the build than what is displayed in the project Options dialog.  It trips up source control too.  Perhaps there's an easy way to say 'start a new clean .dpr/.dproj file for this project'?

     

    It would be great if the Delphi Help menu included a Check For Updates item, as a quick foolproof way to update within the same series (e.g. 10.3.1 to 10.3.2 etc.)

     

     

    • Like 1

  15. OK - don't laugh... I’d like to update my Delphi Rio 10.3.1 installation to 10.3.2 - but I’m not sure how.

     

    I’ve had a look on the Help menu, but can’t see a Check For Updates menu item.

     

    I’m aware there is a full ISO image available - I run Delphi in a Virtual Machine, so I could mount that.  However I’m not looking to install from scratch here - I’d just like to update with the latest improvements and fixes, keeping my current environment intact.

     

    Is there a quick straight forward, hassle free way to update an existing installation to 10.3.2?


  16. Experiment 2 : In the Project Deployment Manager, simply rename the Remote Name of the original existing 44x44 icon so it ends '.targetsize-44_altform-unplated'.  Rather than trying to provide an additional 44x44 icon.

     

    OK that's more promising - the newly generated AppxManifest.xml icon entry matches the renamed file in the Assets folder:

    <uap:VisualElements ... Square44x44Logo="Assets\Logo44x44.targetsize-44_altform-unplated.png" .../>

     

    ...but unfortunately the deployed app still runs showing a tiny plated icon in the Task Bar.


  17. As an experiment I just tried adding a separate copy of the UWP 44x44 icon to the Project Deployment Manager.

     

    I named this copy with the extension '.targetsize-44_altform-unplated' as suggested in Microsoft's documentation.  Then I set its Remote Path to 'Assets\' so it would appear in the Assets folder, and built the app.

    No joy - perhaps because the auto-generated AppxManifest.xml file does not contain a path to that icon filename.  When the app is run, its Task Bar icon is still very small and surrounded by a grey 'plate'.  But maybe I'm heading in the right direction.  Anyone have any ideas?  Perhaps Delphi includes an option to customise the generated AppxManifest.xml file somewhere?
     


  18. When I create and run a Windows Store App, my application icon looks very small on the taskbar, compared to other application icons.  It appears to be surrounded by a grey background too, instead of transparent.

     

    After reading around a bit, I suspect I'm getting a 'plated' icon.  How can I get an 'unplated' app icon instead?

     

    I'm using Delphi Rio 10.3 to generate the appx file, and have provided the required UWP 44x44 and 150x150 icons, in addition to the main app icon (which contains 16x16, 24x24, 48x48 and 256x256 images) in Delphi's Options.

×