javafxport(gluon) android class dont build - javafxports

i have create a "Gluon Mobile multiple Views with FXML" project. picture of structure and error is attached.
i have these problems:
1- i build android but classes in android section dont build.
2- scene builder dont open fxml becouse of:
com.gluonhq.charm.glisten.mvc.View
<?xml version="1.0" encoding="UTF-8"?>
<?import com.gluonhq.charm.glisten.control.Icon?>
<?import com.gluonhq.charm.glisten.mvc.View?>
<?import java.lang.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.layout.BorderPane?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.layout.*?>
<View fx:id="primary" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="600.0" prefWidth="350.0" stylesheets="#primary.css" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.gluonapplication1.views.PrimaryPresenter">
<center>
<VBox alignment="CENTER" prefHeight="200.0" prefWidth="100.0" spacing="15.0" BorderPane.alignment="CENTER">
<children>
<TextArea fx:id="txtArea" text="txt area text"/>
<Label fx:id="label" text="Hello JavaFX World!" />
<Button mnemonicParsing="false" onAction="#buttonClick" text="Change the World!">
<graphic>
<Icon content="LANGUAGE" />
</graphic>
</Button>
</children>
</VBox>
</center>
</View>
Thankful.

Regarding the first issue, Android classes failing on NetBeans, the problem is due to having two Gradle plugins colliding: Gradle Support and NBAndroid.
Gluon/JavaFXPorts make use of the Gradle plugin for NetBeans, so this is a must. NBAndroid plugin could be used for logging for instance, but giving that both don't play well together, the solution is just disabling NBAndroid.
Notice that NBAndroid plugin will be under NetBeans->Tools->Plugins, Installed: Android and Android Gradle Support. Deactivate or uninstall both.
Restart NetBeans and Android errors will be solved.
About the FXML issue: FXML with Gluon controls (View), failing to load on Scene Builder.
There are two issues here:
Install the Charm.jar
As posted here, using the Jar manager allows searching for charm and installing the custom components, once it is found on a repository. Currently, com.gluonhq:charm:4.0.1 will be resolved.
In case the control list is empty, try searching for charm-glisten, and install com.gluonhq:charm-glisten:4.0.1. This dependency should be resolved by the charm.pom, but it seems it might fail.
The second issue, once charm controls are installed, is related to opening the fxml file from the IDE: Charm controls are not found by Scene Builder and the load fails.
This is a known issue, and it will be fixed in the next release, so for now there are two options:
Launch Scene Builder, and go to Open..., or Open recent and open the FXML.
Edit the SceneBuilder.cfg file (found under C:\Users\<user>\AppData\Local\SceneBuilder\app\SceneBuilder.cfg) and add the path of the installed custom jars to the class path variable app.classpath=.

Related

WinUI Registration Free WinRT Component

I followed the following tutorial on how to register a UWP registration free WinRT component https://blogs.windows.com/windowsdeveloper/2019/04/30/enhancing-non-packaged-desktop-apps-using-windows-runtime-components/ but I continue to receive errors about the component not being registered.
I begin by creating a Propertysheet.props sheet, like in the tutorial:
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros" />
<PropertyGroup />
<ItemDefinitionGroup />
<ItemGroup />
<ItemGroup>
<Reference Include="C:\Users\User\Solution\x64\Debug\Component\Component.winmd">
<IsWinmdFile>true</IsWinmdFile>
</Reference>
<ReferenceCopyLocationPaths Include="C:\Users\User\Solution\x64\Debug\Component\Component.dll">
<IsWinmdFile>false</IsWinmdFile>
</ReferenceCopyLocationPaths>
<!--<Reference Include="C:\Users\User\Solution\x64\Debug\Component2\Component2.winmd">
<IsWinmdFile>true</IsWinmdFile>
</Reference>
<ReferenceCopyLocationPaths Include="C:\Users\User\Solution\x64\Debug\Component2\Component2.dll">
<IsWinmdFile>false</IsWinmdFile>
</ReferenceCopyLocationPaths>-->
</ItemGroup>
</Project>
When the solution is compiled, the Winmd and the dll for Component are added to the DUALITY.exe folder, but only the Winmd for Component2 has been auto added so I remmed it out for now. I then add the Propertysheet.props to the Application project using the properties manager utility. This disabled the ability to add reference, but it still works as though it has been added. My app.manifest looks like this:
<?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity version="1.0.0.0" name="Application.app"/>
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/PM</dpiAware>
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2, PerMonitor</dpiAwareness>
</windowsSettings>
</application>
<file name="Component.dll">
<activatableClass
name="Component.SubNamespace.Class"
threadingModel="both"
xmlns="urn:schemas-microsoft-com:winrt.v1" />
</file>
<!--<file name="Component2.dll">
<activatableClass
name="Component.PeregrineX12"
threadingModel="both"
xmlns="urn:schemas-microsoft-com:winrt.v1" />
</file>-->
</assembly>
There were concerns about Namespace and I itterated through a few possibilities. I get an error in my Appmanifest.xml at line 39:
"DEP0700: Registration of the app failed. [0x80080204] error 0xC00CE012: App manifest validation error: The app manifest must be valid as per schema: Line 39, Column 8, Reason: Content for element '{http://schemas.microsoft.com/appx/manifest/foundation/windows10}InProcessServer' is incomplete according to the DTD/Schema. Expecting: {http://schemas.microsoft.com/appx/manifest/foundation/windows10}ActivatableClass."
and the Appmanifest.xml looks like this:
<?xml version="1.0" encoding="utf-8"?>
<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities" IgnorableNamespaces="uap rescap build" xmlns:build="http://schemas.microsoft.com/developer/appx/2015/build">
<Identity Name="837f0535-5d07-4290-983b-a49988c57b12" Publisher="CN=User" Version="1.0.0.0" ProcessorArchitecture="x64" />
<Properties>
<DisplayName>Application</DisplayName>
<PublisherDisplayName>User</PublisherDisplayName>
<Logo>Assets\StoreLogo.png</Logo>
</Properties>
<Dependencies>
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.22000.0" MaxVersionTested="10.0.22000.0" />
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19041.0" />
<PackageDependency Name="Microsoft.WindowsAppRuntime.1.1" MinVersion="1001.524.1918.0" Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" />
<PackageDependency Name="Microsoft.VCLibs.140.00.Debug" MinVersion="14.0.30704.0" Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" />
<PackageDependency Name="Microsoft.VCLibs.140.00.Debug.UWPDesktop" MinVersion="14.0.30704.0" Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" />
</Dependencies>
<Resources>
<Resource Language="EN-US" />
</Resources>
<Applications>
<Application Id="App" Executable="Application.exe" EntryPoint="Windows.FullTrustApplication">
<uap:VisualElements DisplayName="Application" Description="DUALITY" BackgroundColor="transparent" Square150x150Logo="Assets\Square150x150Logo.png" Square44x44Logo="Assets\Square44x44Logo.png">
<uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png" />
<uap:SplashScreen Image="Assets\SplashScreen.png" />
</uap:VisualElements>
</Application>
</Applications>
<Capabilities>
<rescap:Capability Name="runFullTrust" />
</Capabilities>
<Extensions>
<Extension Category="windows.activatableClass.inProcessServer">
<InProcessServer>
<Path>Component.dll</Path>
</InProcessServer>
</Extension>
</Extensions>
<build:Metadata>
<build:Item Name="cl.exe" Version="19.31.31107.0" />
<build:Item Name="OptimizingToolset" Value="None" />
<build:Item Name="TargetRuntime" Value="Native" />
<build:Item Name="Microsoft.UI.Xaml.Markup.Compiler.dll" Version="1.0.0.0" />
<build:Item Name="Microsoft.UniversalCRT.Debug" Version="10.0.22000.0" />
<build:Item Name="makepri.exe" Version="10.0.22621.1 (WinBuild.160101.0800)" />
</build:Metadata>
</Package>
At this point, this was the first time an attempt was made by the framework to register the dll. This is all of the information I have collected from documentation, at this time. As can be seen ActivatableClass was not added and I'm pretty sure it should have been.
I'm going to re-summarize here, based on what I have come to, going through more of the documentation.
When you create a WinUI App, you can create a Packaged app with a packaging project or without. Here was my first mistake. The second project template is still a Packaged App and not an Unpackaged App. So keep that in mind while choosing your approach. The above tutorial says that the tutorial is specific to Unpackaged Apps, but it is applicable to both Packaged and Unpackaged Apps.
The tutorial describes how to consume WinRT Components calling it Registration Free. But WinRT is a Registration Free framework. Calling it Registration Free was misleading. Registration Free simply meant that it uses a manifest and doesn't mean you can gain access to the component without registering it with the App. Unless late binding (calling plugins), you will have to follow the Registration Free in application registration.
When making a Packaged App I needed to include the NuGet package Microsoft.VCRTForwarders.140. The tutorial uses app.manifest to declare activatableClasses. This is a shortcut, and really, you need to use the Package.appxmanifest to acquire full framework functionality; like declaring Proxy-Stub Servers for Interfaces. I use the Propertysheet.props to include the winmds and move the dll's into the exe folder, instead of just making a reference to the winmd and manually copying the dll's.
Here I learned I wasn't actually making an Unpackaged App. To make an Unpackaged App, first I had to make a Packaged App with no packaging project. Then, WindowPackageType had to be set to None and AppxPackage to false in the project file. Package.appxmanifest had to be removed from the project. I no longer needed the NuGet. Instead I needed to install the required framework bits, and load the Bootstrapper. This enabled connectivity and started the winrt framework in the Unpackaged environment. When not late binding, I included the winmds and moved my dll's into the executable folder using the Propertysheet.props. In this way I was able to use winrt get_activation_factory to make Runtime Classes in WinUI Components. There was no single document that covered this.
I found the easiest way to late bind WinRT components was--in an unpackaged or packaged app--was to load the dll using WINRT_IMPL_LoadLibraryW from base.h and call the GetActivationFactory directly using WINRT_IMPL_GetProcAddress. The only problem with this was that the Xaml framework didn't just extend into the WinUI Component. Xaml content was unable to load in the loaded component dll. I believe there is a way to add Xaml functionality, but it looks like it mixes with legacy WRL code and Xaml islands.
My solution to this last problem was to start another WinUI process. I Loaded a sub App from an App as a driver for the code behind. Other than to have a call up application, I don't see why I'd personally use controls defined in WinUI component dll's, and will simply use the main processes to drive behind UI logic in modular WinRT dll's. Especially with my Desktop Application already being so modular. Need new UI functionality, make a new one off of a template. For my purposes this makes the most sense. WinUI, WinRT, and Windows::Foundation all work without Xaml. I even passed a SwapChainPanel to a WinUI Component dll to make late binding DirectX12 graphics pipelines, so we're doing good.

Problem running ClickOnce application in Windows 10 multi-app kiosk mode

I’m trying to set up a Windows 10 multi-app kiosk configuration running a ClickOnce application. I’m following the Microsoft guide https://learn.microsoft.com/en-us/windows/configuration/lock-down-windows-10-to-specific-apps
It works until the ClickOnce application is updated after this it’s not possible run the application.
The problem is the path C:\Users\Musikspelare\AppData\Local\Apps\2.0\EBQ78BLC.1MN\0J3M24G5.KRQ\danc..tion_57ca62a9d061b04b_0002.0000_6fffc994766df618\DancePlayer.exe to the ClickOnce application under the section as this path changes after the application is updated.
Is there any other way of doing this for a ClickOnce application?
The XML configuration file for the multi-app kiosk setup looks as below:
<?xml version="1.0" encoding="utf-8" ?>
<AssignedAccessConfiguration
xmlns="http://schemas.microsoft.com/AssignedAccess/2017/config"
xmlns:rs5="http://schemas.microsoft.com/AssignedAccess/201810/config"
>
<Profiles>
<Profile Id="{AFF9DA33-AE89-4039-B646-3A5706E92957}">
<AllAppsList>
<AllowedApps>
<App AppUserModelId="SpotifyAB.SpotifyMusic_zpdnekdrzrea0!Spotify"/>
<App DesktopAppPath="%ProgramFiles(x86)%\Google\Chrome\Application\chrome.exe"/>
<App DesktopAppPath="C:\Users\Musikspelare\AppData\Local\Apps\2.0\EBQ78BLC.1MN\0J3M24G5.KRQ\danc..tion_57ca62a9d061b04b_0002.0000_6fffc994766df618\DancePlayer.exe"/>
</AllowedApps>
</AllAppsList>
<StartLayout>
<![CDATA[<LayoutModificationTemplate xmlns:defaultlayout="http://schemas.microsoft.com/Start/2014/FullDefaultLayout" xmlns:start="http://schemas.microsoft.com/Start/2014/StartLayout" Version="1" xmlns="http://schemas.microsoft.com/Start/2014/LayoutModification">
<LayoutOptions StartTileGroupCellWidth="6" />
<DefaultLayoutOverride>
<StartLayoutCollection>
<defaultlayout:StartLayout GroupCellWidth="6">
<start:Group Name="">
<start:Tile Size="2x2" Column="0" Row="0" AppUserModelID="SpotifyAB.SpotifyMusic_zpdnekdrzrea0!Spotify" />
<start:DesktopApplicationTile Size="2x2" Column="2" Row="0" DesktopApplicationLinkPath="%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\Google Chrome.lnk" />
<start:DesktopApplicationTile Size="2x2" Column="3" Row="0" DesktopApplicationLinkPath="%APPDATA%\Microsoft\Windows\Start Menu\Programs\DancePlayer\DancePlayer.appref-ms" />
</start:Group>
</defaultlayout:StartLayout>
</StartLayoutCollection>
</DefaultLayoutOverride>
</LayoutModificationTemplate>
]]>
</StartLayout>
<Taskbar ShowTaskbar="true"/>
</Profile>
</Profiles>
<Configs>
<Config>
<Account>Musikspelare</Account>
<DefaultProfile Id="{AFF9DA33-AE89-4039-B646-3A5706E92957}"/>
</Config>
</Configs>
</AssignedAccessConfiguration>
I also ran into this issue. Fortunately, multi-app kiosk mode utilizes AppLocker to allow the apps listed under the "AllowedApps" tag. You can use an asterisk (*) as a wildcard in your filepaths to include arbitrary paths that are generated from ClickOnce applications. You would make the following adjustment to your code:
<App DesktopAppPath="%OSDrive%\Users\Musikspelare\AppData\Local\Apps\2.0\*\danc..tion_57ca62a9d061b04b_0002.0000_6fffc994766df618\DancePlayer.exe"/>
You should also include the AMUID of the app as it's listed from the Get-StartApps cmdlet to the "AllowedApps" list.
I haven't been able to test whether the AMUID looking portion of that path, "danc..tion_57ca62a9d061b04b_0002.0000_6fffc994766df618" is generated as part of the install or if it's a GUID. It may also change when the ClickOnce apps updates, if that's the case, just remove that portion from the path and it should take care of it.
And for anybody using Intune, I wasn't able to include an asterisk in the path for a multi-app setup under the Kiosk Template. You will have to create a profile that includes the AssignedAccess policy and add your own XML.
https://learn.microsoft.com/en-us/windows/client-management/mdm/assignedaccess-csp

How to set a custom icon for a file extension which shows up in the solution explorer

I'm trying to set a custom icon for a specific file extension in the solution explorer in visual studio 2019. What do i need to add to the vsix project to make it happen?
I have tried to add a imagemanifest including the new icon as a .png file and in the pkgdef hook it up to the extension, but it will not show up. I tried a lot of different things to make it work. When i set an KnowMoniker as the icon for the extension it does show up.
The manifest is set to content and include in vsix is set to true.
The icon is set to resource.
icon.imagemanifest
<?xml version="1.0" encoding="utf-8"?>
<ImageManifest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.microsoft.com/VisualStudio/ImageManifestSchema/2014">
<Symbols>
<String Name="Resources" Value="/Test;Component/Resources" />
<Guid Name="Guid" Value="{35e0e52d-a955-451d-86e4-5813fef55368}" />
<ID Name="icon" Value="1" />
</Symbols>
<Images>
<Image Guid="$(Guid)" ID="$(icon)">
<Source Uri="$(Resources)/icon.png">
<Size Value="16" />
</Source>
</Image>
</Images>
<ImageLists />
</ImageManifest>
icon.pkgdef
[$RootKey$\ShellFileAssociations\.ext]
"DefaultIconMoniker"="35e0e52d-a955-451d-86e4-5813fef55368:1"

External PNG graphic not displaying (Geoserver 2.13)

I have recently upgraded from Geoserver 2.11.0 to 2.13.1 and have found my external graphics for point layers are not displaying (they revert to a default grey symbol).
Is there anything wrong in my code, or has anything changed between 2.11 and 2.13 which might be causing problems? Inaccessibility problems for Geoserver to online resources?
An example of my xml is below:
<?xml version="1.0" encoding="UTF-8"?>
<StyledLayerDescriptor xmlns="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="http://www.opengis.net/sld http://schemas.opengis.net/sld/1.1.0/StyledLayerDescriptor.xsd" xmlns:se="http://www.opengis.net/se">
<NamedLayer>
<se:Name>cctv_cameras</se:Name>
<UserStyle>
<se:Name>cctv_cameras</se:Name>
<se:FeatureTypeStyle>
<se:Rule>
<se:Name>Single symbol</se:Name>
<se:PointSymbolizer>
<se:Graphic>
<se:ExternalGraphic>
<se:OnlineResource xlink:type="simple" xlink:href="http://maps.runnymede.gov.uk/website/maps/png/community/cctv_cameras.png"/>
<se:Format>image/png</se:Format>
</se:ExternalGraphic>
</se:Graphic>
</se:PointSymbolizer>
</se:Rule>
</se:FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>
Works fine on my local machine with 2.13.0, but does fail with 2.13.1, I've filed a bug.

Handle i18n localization in alloy appcelerator

these do not work in alloy:
<Label id="label2" onClick="doClick" title="L('helloWorld')" />
<Label id="label2" onClick="doClick" >L('helloWorld')</Label>
my translation files are in:
/i18n/en/strings.xml
/i18n/fr/strings.xml
my strings.xml file has:
<?xml version="1.0" encoding="UTF-8"?>
<resources>
<string name="helloWorld">Hello World</string>
</resources>
ios simulator 8.1 is broken. localization in ios8.1 simulator doesn't work. test on real device.

Resources