Mad Scientist
Mad Scientist

Reputation: 331

I cannot add Android target platform for packages via IDE

Just a quick stupid question about Delphi Berlin 10.1.2

I'd like to add Android platform as one of the target platforms for my runtime package... and it seems impossible to do via IDE. Popup menu is disabled when there are Win32 & Win64 added to the list.

Upvotes: 5

Views: 2641

Answers (2)

Deltics
Deltics

Reputation: 23036

Starter Edition

Delphi Starter Edition specifically does not support anything other than Win32 development. This is one of the limitations that differentiates Starter from other Delphi SKU's:

enter image description here

The fact that you can contrive to make Starter Edition "support" anything other than Win32 at all does indeed indicate a bug.

But the bug is in the Starter Edition's attempts to limit it's own capabilities.

If the bug is ever fixed then it would not remove the need for workarounds but rather ensure that any such work-arounds no longer work at all!

Pro Edition

Pro Edition similarly does not support all platforms "out of the box" so if you do not have support for certain platforms installed then the IDE is again taking (clumsy) steps to limit you to your [apparently] licensed features.

And again, if this is ever "fixed" then it too will be to prevent your work-arounds from working, absolutely requiring you to install the platforms you wish to support in order to create/work on projects involving platforms for which you require a specific license.

Enterprise/Architect Edition

It is not entirely clear from your question whether you have tested this behaviour with SKU's above Professional, but since the behaviour is predicated on not having "installed" specific platforms then I presume that it does not, since all platforms are supported by default in these higher editions.

Unless the installer specifically provides the option to not install them of course (I don't recall off-hand), in which case you could argue that any "error" lies with the person choosing not to install a feature of a product that they then insist on trying to use.

The General Problem

If you create a project in a product that does not support a platform then you would not expect that project to support that platform. If you then open that project in a product that does support the platform, should the product add support for that platform to that project ? What if the platform makes no sense for the project ? What if you are going to hand the project back to someone else to work on who still does not have that platform installed ?

It might be nice if the IDE would check the project and if it identifies target platforms that are missing (as opposed to disabled) then offer to add support for them for you.

But it should not add them automatically since if it did this and you were to work on a project in an IDE with Android support and then hand that project to someone with an IDE that did NOT have Android support (for example) then this would prevent them from working on the project (if the platform limitations were robustly implemented).

But the behaviour in question (removing platforms that are not installed) appears from your description to simply be a clumsy attempt to enforce license conditions. Not a bug.

Ideal Solution

Ideally the target platforms would not be separately licensed "features" and more appropriate points of differentiation provided between the SKU's, then all of these (platform related) problems would disappear.

Upvotes: 1

Mad Scientist
Mad Scientist

Reputation: 331

Results of investigation: Looks like a bug (or a feature).

When You create a project in Starter edition or before installing Android SDK .dproj files does not contain line

<Platform value="Android">False</Platform>

Result:

User can stuck with old platform list

Delphi IDE just don't automatically update .dproj file when You install Android SDK...

But Wait, There's More!

Delphi Starter Edition automatically remove all platform entries like

<Platform value="Android">True</Platform>
<Platform value="Win64">True</Platform>

without asking when You are saving project... (except Win32 ofc)

So watch out if You use Starter Edition and You want to contribute to some GitHub project that works with Win64 too... You have to correct .dproj files manually before commiting.

Solution:

Manually edit .dproj file and add missing platform entry.


In addition to Starter SKU, IDE exhibits same behavior on other SKU's when you create project while IDE does not have all (specific) platforms yet installed.


The IDE behaviour is a bit inconsistent. It should

  • automatically update .dproj file in all of cases

or

  • just don't touch it at all

P.S. I love to waste my time for fighting with IDE design flaws...

P.P.S. Target platform Win32 seems to be unremovable :P

Upvotes: 4

Related Questions