Is it able to add version for Windows Runtime Component(C++/WinRT)? - windows-runtime

I am developing a Windows Runtime Component with C++/WinRT.
I want to know if it is possible to add version information for the component?
For example, if we want to add version information to legacy dll file, we just add a .rc file into the project and the dll file will contain the version information.
How should I do this for a Windows Runtime Component?

If it is possible to add version information for the component
You can Right-Click the component project -> Add -> Resource, then you can add Verion information in your project. After building it, you can see the version information in the dll's property in File Explorer.
In addition, each type in a windows runtime file can be associated with a version. You can check the version attribute.
Note that, this is not the same as the DLL version information you see in File Explorer. The winmd files are not DLLs, so you can not do the same to add this kind of info to winmd file.

Related

Getting error while creating JavaFX11 application in Apache Netbeans 10

i am new to java fx and i have downloaded Apache Netbeans 9 which runs on java 11.
since java fx is shipped separately, i have downloaded openjfx-11.0.1_SDK and followed steps in this link https://openjfx.io/openjfx-docs/#install-javafx
when i try to create java fx application in apache netbeans , i am getting below error
Failed to automatically set-up a JavaFX Platform.
Please go to Platform Manager, create a non-default Java SE platform, then go to the JavaFX tab,
enable JavaFX and fill in the paths to valid JavaFX SDK and JavaFX Runtime.
Note: JavaFX SDK can be downloaded from JavaFX website
attaching screen shot of netbeans 10.
This is for the future developers that will stumble on this problem. You can follow this video for Installing JavaFX13 and integrate it with Apache Netbeans 11.2. Try following the instructions here
There might be problems with CSS autocomplete but you can create a JavaFx project now.
Edited: As suggested from the other answer, you can download the JavaFX from the official page of JavaFX.
I had the same issue on Netbeans 11. I solved this issue by following below steps.
Download the javafx.zip file from the website and after downloading it put it on JDK folder.
First, click on Manage Platforms and then click on Add platform and after clicking on Add platform it will ask of the filename, so give the path till JDK folder.
After giving path click on next and it will ask for platform name and platform sources so in platform sources give the path till src.zip (jdk/lib/src.zip) and press finish button.
After finishing button, you will see the new platform is added with the same name you have given platform name then click on it and go-to sources and click on Add Jar/Folder button and give the path till javafx.zip file which is saved on JDK folder.
After giving path click on add Jar/folder and close it. After closing it click on JavaFX platform and in that you will see the platform name is there click on it and create the project.
The problem is fixing by jdk1.8. Download and install at the page - https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html for your platform. For me, it was "Linux x64 Compressed Archive"(https://download.oracle.com/otn/java/jdk/8u241-b07/1f5b5a70bf22433b84d0e960903adac8/jdk-8u241-linux-x64.tar.gz)
after that:
setting up 1
setting up 2
It may be too late, but I figured it out nonetheless. You, and all other people reading this while trying to figure out how to use JavaFX with any Apache Netbeans version should:
create a new Library, name it JavaFx and in it, put all the .jar files(not the src.zip file) inside the lib directory of the unzipped javafx installation.
create a new normal java project. Go to project properties, and to module path, add the library JavaFx.
create a new module-info.java file (netbeans automates it) in that project and in it, you should put a dependency to all of the JavaFx components, if netbeans didn't already do that (in my case, it did. I didn't even have to hand code a single dependency). And yes, declare the module as "open module".
In essence, I just told you to modularize your project

How to use third party dll in windows phone 8.1 application with windows runtime component?

I have created the windows phone 8.1 application in which I want to use third party dll file. That's why I have created windows runtime component for the windows phone project. I have given reference of the runtime component to the windows phone 8.1 application project.
In windows runtime component, I have set the additional Include directory path. Moreover, I have also set the Linker -> Input ->additional dependencies as lib file listing. I have drag drop all dll files in my c# windows phone application main project folder and set build action as content and copy output directory as copy always.
However, I got the following error.
An exception of type 'System.IO.FileNotFoundException' occurred in App1.WindowsPhone.exe but was not handled in user code
I have checkout the following question. But did not resolve it.
How to use a C++ dll in Windows Phone 8.1 XAML App within C++ Runtime Component
I found the answer. All the dependencies has been set properly. There was an issue in the dll file which architecture does not match with the current platform.
After created the build for proper architecture, it works.

How to change version of application in air package?

I need to change version of air package from 1.1.0 to 1.2.0, without having it's source codes.
I've tried to extract .air package with winRar, and changing the META-INF\AIR\application.xml file, then after archiving it back to .air package, install it, but it gives me an error - "package cannot be install, try to get new file".
Any ideas how to change information in .air file? OR how to make auto update to older version of application?
Every AIR application requires an application descriptor file. The application descriptor file is an XML document that defines the basic properties of the application.
Open your -app.xml in your adobe air application project and change value in version tag
<versionNumber>0.0.0</versionNumber>

Compiling sqlite-winrt for using SQL in WinRT/WP app with SQLite

I'm trying to use the sqlite-winrt library at https://sqlwinrt.codeplex.com (cf. http://blogs.windows.com/windows_phone/b/wpdev/archive/2013/05/30/sqlite-winrt-wrapper-for-windows-phone.aspx) because I need to access an SQLite database via SQL commands in a WinRT 8.1 and a WP8 app and this library seems the only available option.
Anyway, there is no binary release and if I try compiling the source I get several link errors for unresolved externals against the SQLite DLL. I posted an issue at codeplex but got no reply yet, so I was wondering if anyone had already managed to successfully compile this lib and how (or if you know of any viable alternative for RT8.1 and WP8). Here is what I did:
downloaded the latest source from the site.
downloaded and installed 2 VSIX from http://www.sqlite.org/download.html: sqlite-winrt81-3080002.vsix for RT 8.1 and sqlite-wp80-winrt-3080100.vsix for WP.
executed the powershell scripts in each subfolder of the source code solution, which are required to update the projects with newer releases of the SQLite for WinRT extension. The current versions of the scripts refer to SQLite for WinRT 8.1 (prerelease) which is the same I downloaded above.
opened the VS2013 solution and removed the RT project (I just need RT8.1 and WP, this was for WinRT 8.0).
5) built the solution, which failed with link errors.
If I see the RT8.1 project properties, I can confirm the reference to SQLite is under C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1\ExtensionSDKs\SQLite.WinRT81\3.8.0.2.
Did anyone manage to use this lib? Thanks!
I also once had that problem. I fix it by editing the project file manually. At that time, the powershell script updating the wrong path. That's why I always failed when compiling my project. After I edit the project file using external text editor (I use sublime text), the projects are linked correctly.
You can try DatabasesCx. It is another SQLite Wrapper using Windows Runtime Component technology. It is freeware distributed as precompiled binary. You can find the details at http://www.almanacsoft.com/databasescx

WP8 - Re-using a native DLL through Windows Runtime Component

I have a native dll that I'd like to use in a WP8 project that I'm working on. I've done some research and have created a C++ Windows Runtime Component (WRC) to wrap the native DLL. The WRC project uses a .lib file, and my WP8 application calls the WRC project.
My solution compiles all fine, but when my application makes a call to a method in the native DLL, I get a The specified module could not be found. (Exception from HRESULT: 0x8007007E) exception.
From reading around it seems like the dll is not being loaded. I've copied all relevant dlls to the output dir of where the .exe file is and also in various places but the error keeps showing up.
If anyone could point me in the right direction I'd be very grateful. Also if more info is required I'll post that up also.
The DLL must be included in your XAP package. Something you can see being taken care of in the Output window when you build your app, it starts with the "Begin Xap packaging" messages and then lists all the files that get added. The runtime error says it is not being included.
There is remarkably little guidance on how to ensure that a file gets included in a phone package when MSBuild cannot figure out the dependencies by itself. It certainly won't for your DLL, no way the build system can tell if it isn't a project in your solution. Seems you're operating a bit on the bleeding edge in this case :)
But this works well when I try it, going by the MSBuild output and not by actually testing it: Project + Add Existing Item. Navigate to your DLL and select it. Select it in the Solution Explorer window and look in the Properties window. Ensure that "Build Action" = Content, Copy to Output Directory = "Copy if newer". Rebuild, you'll now see the file getting added to the XAP. Which should solve this particular error. There might be others :)
Windows Desktop or Windows Store native DLLs are not binary compatible with Windows Phone, even if they are built for the same CPU architecture.
Therefore you will need to recompile your native DLL for the Windows Phone toolset.
About Windows Runtime Components:
On Windows Phone a Windows Runtime Component is itself a native DLL (.NET is not supported on the phone). The binaries of Windows Runtime Components cannot be shared between Windows Store apps and Windows Phone apps.