-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windows 10 version on PhoneGap Build #10
Comments
In response to https://forums.adobe.com/message/9123283 @vladimir-kotikov gave an excellent recommendation to use prebuilt SQLite3.winmd files in a similar fashion as phonegap / phonegap-plugin-barcodescanner (plugin.xml#L65-L67). I tried building the SQLite3 libraries then using the following lines in the Cordova-sqlite-evcore-extbuild-free version (for Windows 10 UWP only): <framework src="src/deps/windows/release/x86/SQLite3.winmd" target-dir="x86" arch="x86" custom="true" versions="10.*" />
<framework src="src/deps/windows/release/x64/SQLite3.winmd" target-dir="x64" arch="x64" custom="true" versions="10.*" />
<framework src="src/deps/windows/release/arm/SQLite3.winmd" target-dir="ARM" arch="ARM" custom="true" versions="10.*" /> then I would get a build warning like this:
I found the following links:
If I try including the DLLs like this: <source-file src="src/deps/windows/release/x86/SQLite3.UWP.dll" target-dir="x86" />
<source-file src="src/deps/windows/release/arm/SQLite3.UWP.dll" target-dir="ARM" />
<source-file src="src/deps/windows/release/x64/SQLite3.UWP.dll" target-dir="x64" /> the warning would not go away. I tried using Looking at the answer at http://stackoverflow.com/a/23435054/1283667 I tried applying the following changes by hand: --- platforms\windows\CordovaApp.Windows10.jsproj.orig Tue Nov 22 20:51:15 2016
+++ platforms\windows\CordovaApp.Windows10.jsproj Tue Nov 22 20:51:27 2016
@@ -90,6 +90,7 @@
<Reference Condition="'$(Platform)'=='x86'" Include="SQLite3">
<HintPath>plugins\cordova-sqlite-evcore-extbuild-free\x86\SQLite3.winmd</HintPath>
<IsWinMDFile>true</IsWinMDFile>
+ <Implementation>SQLite3.UWP.dll</Implementation>
</Reference>
</ItemGroup>
<ItemGroup> The build warning went away but it still would not work. I would get the following exception in the debug console output:
Reaching out to @vladimir-kotikov for any further suggestions? |
@brodybits, sorry but I must admit I'm out of ideas, how this can be done without hooks. Also none of |
Thanks @vladimir-kotikov. When do you think it would be possible to add winmd+dll support to cordova-windows? Can someone from Microsoft or cordova-windows work on this or do I have to do this myself? Should I raise a Cordova issue for this? |
I just raised https://issues.apache.org/jira/browse/CB-12189 with a request to add WinMD+DLL support. Can someone from cordova-windows or Microsoft help or will I have to do this myself? |
Acknowledged, thanks, Chris. I can't promise anything about timeline, but hope we can find some spare time in the near future. |
Thanks @vladimir-kotikov for whatever you can do. I already told my customer that this would be very difficult. Please let me know if there is anything I can do to help. No rush on my part. /cc @mbraude |
@brodybits, we've added support of |
Ok, the PR has been published |
along with:
@vladimir-kotikov thank you very much. I also saw your comments in CB-12189. I will try this within the next few days and keep you posted. |
I tried doing
I suspect you guys would have tested the solution so I wonder if I did something wrong here. I am thinking to try this with a very simple C++ DLL project as well. Do you think I missed something? A couple more things: The plugin would probably depend on cordova-windows 4.5.0 or later. Would this imply that we should target Visual Studio 2017? To get this to work on PhoneGap Build we would have to get the new version of cordova-windows integrated by PGB and then be sure we get the Visual Studio version to match. I suspect we would want to target Visual Studio 2017 but would like to see this coordinated with the PGB folks. |
Yeah, I've tested this in VS 2017 and Nikita has just checked if project builds with VS 2015 - everything works fine. Could you please confirm if :
Also, please notice that the version of the plugin I pushed to my fork doesn't have binaries for windows 8.1, so it will work only when built for Windows 10 As for dependency on VS 2017 - technically the plugin will not require any specific version of VS since the binaries are already built. If anyone would want to rebuild binaries itself, then he/she would need to install a specific version of VS (or have VS Build tools installed separately) |
I forgot to mention that last time I only tried Release build. If I would try Debug builds it works with the following exception: Following the link to page 2 or changing location to page 2 gives me a crash with the following JavaScript runtime error: 'WinJS' is undefined (if I click the button to do The Release builds do not work for me. I took a quick look at https://github.com/vladimir-kotikov/Cordova-sqlite-legacy-PGB-W10-x86-test-app/commit/da713d911f96db43fed341bf3739b8f61dadd52f and matrosov-nikita/cordova-windows@99a7016 but could not directly see the cause of this problem. |
My bad - it appeared that I uploaded debug libararies instead of release versions. I updated my fork (vladimir-kotikov/Cordova-sqlite-storage@4f6e588) w/ release versions - now everything should work in bot release and debug configuration. As for @brodybits, could you give it a shot once more |
Hi @vladimir-kotikov it now works OK in both Debug and Release builds on desktop (x86 & x64) and mobile (ARM). I am now looking forward to seeing this fix released in cordova-windows (4.5) and then included by the PhoneGap Build system. |
Hi, I'm having this problem in IonicFramework2 run windows 10 platform. Anyone know if this is already fixed in Cordova? What extra configuration was implemented in Solution in Visual Studio to be possible to build for UWP from Visual Studio 2015? My project (generated by Ionic build) in Visual Studio is not recognizing Solution Explorer: |
@fernandocode that looks like a different issue and may be a problem with your setup. Please try again with a fresh, clean project and raise a new issue if it is still a problem for you. |
So the fix in apache/cordova-windows#219 (Apache CB-12189) is now included in cordova-windows 5.0.0, looking forward to seeing this included by Cordova CLI, PhoneGap CLI, and PhoneGap Build. Maybe in Visual Studio TACO, someday. Thanks @matrosov-nikita @vladimir-kotikov @mbraude for your efforts. UPDATE: asked in https://forums.adobe.com/thread/2271279 when cordova-windows 5.0.0 with WinMD+DLL support can be included by PhoneGap Build. |
Similar to storesafe/cordova-sqlite-evcore-extbuild-free#1: if I build a test project (https://github.com/brodybits/Cordova-sqlite-legacy-PGB-W10-x86-test-app) with this plugin for Windows 10 UWP on PhoneGap Build I get the following in the log and then the test app crashes on startup:
I will submit this issue to https://github.com/phonegap/build for investigation.
The text was updated successfully, but these errors were encountered: