#1 2016-06-27 09:17:46

svanneste
Member
From: Paris, France
Registered: 2015-05-27
Posts: 155

[SOLVED] Compiling for Windows

Hello,
Please do you have some errors while compiling for Windows ?
I have created a sample app, installed Visual Studio and compiled.

The first attempt produced that log :

Adding windows project...
Creating Cordova Windows Project:
        App Name  : My 1st Windows
        Namespace : ....
        Path      : C:\Users\svann\AppBuilder\Travaux\Test compilation Windows\MyApp_Compiled\platforms\windows
The following navigation rule had an invalid URI scheme and is ignored: "*".
The following image is skipped due to unsupported size: res/icon.png
The following navigation rule had an invalid URI scheme and is ignored: "*".
The following image is skipped due to unsupported size: res/icon.png
Fetching plugin "cordova-plugin-whitelist" via npm
Installing "cordova-plugin-whitelist" for windows
The following navigation rule had an invalid URI scheme and is ignored: "*".
The following image is skipped due to unsupported size: res/icon.png
The following navigation rule had an invalid URI scheme and is ignored: "*".
The following image is skipped due to unsupported size: res/icon.png
Building project: C:\Users\svann\AppBuilder\Travaux\Test compilation Windows\MyApp_Compiled\platforms\windows\CordovaApp.Windows10.jsproj
        Configuration : debug
        Platform      : anycpu
package.windows10.appxmanifest(20,61): error APPX3207: le manifeste de l'applic
ation référence l'image logo carré 310 x 310 'images\Square310x310Logo.scale-10
0.png' qui dépasse la taille maximale de fichier image. Il ne doit pas dépasser
 204 800 octets. [C:\Users\svann\AppBuilder\Travaux\Test compilation Windows\My
App_Compiled\platforms\windows\CordovaApp.Windows10.jsproj]
package.windows10.appxmanifest(8,10): error APPX1619:  Le manifeste de l'applic
ation référence l'image Logo Windows Store 'images\StoreLogo.scale-100.png' don
t les dimensions ne sont pas valides. Ses dimensions doivent être de 50x50 pixe
ls. [C:\Users\svann\AppBuilder\Travaux\Test compilation Windows\MyApp_Compiled\
platforms\windows\CordovaApp.Windows10.jsproj]
package.windows10.appxmanifest(8,10): error APPX3207: le manifeste de l'applica
tion référence l'image Logo Windows Store 'images\StoreLogo.scale-100.png' qui
dépasse la taille maximale de fichier image. Il ne doit pas dépasser 204 800 oc
tets. [C:\Users\svann\AppBuilder\Travaux\Test compilation Windows\MyApp_Compile
d\platforms\windows\CordovaApp.Windows10.jsproj]
Error: C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe: Command failed with exit code 1
Appuyez sur une touche pour continuer...

Summarized:

  • The following navigation rule had an invalid URI scheme and is ignored

  • Wrong dimensions or weight too heavy for two images

So, I corrected what I could :

  • reduced the weight of 'images\Square310x310Logo.scale-100.png'

  • reduced the size of  'images\StoreLogo.scale-100.png' to 50x50 pixels

I retried to compile again using the 'cordova_windows_run' batch file and got that log

Error: Platform windows already added.
Plugin "cordova-plugin-whitelist" already installed on windows.
The following navigation rule had an invalid URI scheme and is ignored: "*".
The following image is skipped due to unsupported size: res/icon.png
Building project: C:\Users\svann\AppBuilder\Travaux\Test compilation Windows\MyApp_Compiled\platforms\windows\CordovaApp.Windows10.jsproj
        Configuration : debug
        Platform      : anycpu
package.windows10.appxmanifest(20,61): error APPX3207: le manifeste de l'applic
ation référence l'image logo carré 310 x 310 'images\Square310x310Logo.scale-10
0.png' qui dépasse la taille maximale de fichier image. Il ne doit pas dépasser
 204 800 octets. [C:\Users\svann\AppBuilder\Travaux\Test compilation Windows\My
App_Compiled\platforms\windows\CordovaApp.Windows10.jsproj]
package.windows10.appxmanifest(8,10): error APPX1619:  Le manifeste de l'applic
ation référence l'image Logo Windows Store 'images\StoreLogo.scale-100.png' don
t les dimensions ne sont pas valides. Ses dimensions doivent être de 50x50 pixe
ls. [C:\Users\svann\AppBuilder\Travaux\Test compilation Windows\MyApp_Compiled\
platforms\windows\CordovaApp.Windows10.jsproj]
package.windows10.appxmanifest(8,10): error APPX3207: le manifeste de l'applica
tion référence l'image Logo Windows Store 'images\StoreLogo.scale-100.png' qui
dépasse la taille maximale de fichier image. Il ne doit pas dépasser 204 800 oc
tets. [C:\Users\svann\AppBuilder\Travaux\Test compilation Windows\MyApp_Compile
d\platforms\windows\CordovaApp.Windows10.jsproj]
Error: C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe: Command failed with exit code 1
Appuyez sur une touche pour continuer...

Errors about the same images weight and sizes.

Please do you know how I could fix that ? Many thanks

Last edited by svanneste (2016-06-29 21:28:13)

Offline

#2 2016-06-27 09:40:56

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,661
Website

Re: [SOLVED] Compiling for Windows

Hello Samuel,

Maybe I need to change my avatar too... smile Well. To be honest I did not try too much with the Windows platform, but it's something I must do. Certainly I found the problem you mentioned, but right now I can't figure a way to solve it.

The problem is mainly with the "image sizes", since all other can be apparently ignored (at this time). But the "image sizes" problem is not related with the images dimensions, but with the images files sizes...

So what you can try (for now) is not to change an image from 100x100 to 50x50. We must provide the 100x100 image, but their file size can't be greater than the required size (?) which is about 200 Kb.

Try that Samuel and then probably we can continue talking about...

Offline

#3 2016-06-27 10:29:22

svanneste
Member
From: Paris, France
Registered: 2015-05-27
Posts: 155

Re: [SOLVED] Compiling for Windows

Hello David,
Thanks again for your reply : I finally got it by doing this :

  • reduced the weight of the images located inside \res\icons\windows

  • I had to reduce the size of the image 'StoreLogo.scale-100.png' to 50x50 (as the logs printed) and put that image as readonly or it is resized while compiling

About the avatar, well... hu... you absolutely don't need it, Master wink

Last edited by svanneste (2016-06-27 10:35:26)

Offline

#4 2016-06-27 11:00:46

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,661
Website

Re: [SOLVED] Compiling for Windows

Hello Samuel,

I think the change to 50x50 is not required if we reduce the image weight first. So, if I am not wrong, the 100x100 image is good, except their weight must be reduced. I don't think the readonly attribute can matter here, but who knows! If finally the 50x50 is required App Builder can prepare such image.

On the other hand, that's the problem. App Builder, from the provided image, prepare dozens of different image/sizes per the different platforms. There is no problem to made an image 100x100 or 200x200, but how I can set the weight of an image? And without change too much the image quality...

That's the problem I found and I must solve. But honestly I don't know if this is a problem of the platform or what: any other platform complains about the images weight. Maybe about the images dimensions (and for that reason App Builder prepares various images sizes) but not the images weight.

Definitely I must look into this...

Offline

#5 2016-06-29 13:17:46

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,661
Website

Re: [SOLVED] Compiling for Windows

Hello Samuel,

I am working on this issue and the current release of App Builder has this changes and enhancements:

* Fix a problem with certain app's icon for the Cordova's Windows platform, which causes the Cordova's build can't end correctly. After this fix we can build our apps for the Cordova's Windows platform (for Microsoft Windows 10 for example) without that problems.

* Add some new AngularJS img-src sanitization white list items like "ms-appx-web" in order to be ready with the Cordova's Windows platform. Before this addition app's images are not properly shown in the Cordova's Windows platform.

* Added the new Splash compression level options in the Behaviour tab of the program's options dialog. This new option allow us to set the compression level for the PNG generated by App Builder from the app's splashs. By default the compression level is 5, which also solve the problem with some image weight for the Cordova's Windows platform.

* Added the new Icons compression level options in the Behaviour tab of the program's options dialog. This new option allow us to set the compression level for the PNG generated by App Builder from the app's icon. By default the compression level is 5, which also solve the problem with some image weight for the Cordova's Windows platform.

Update your App Builder copy Samuel and try it to build your app for the Windows platform. Below you can see the Calculator sample running in my Windows 10 operating system:

PVvuN4k.png

5Vf53Rw.png

zhHRn1e.png

naRdODY.png

Hope this can be useful for you! smile

Offline

#6 2016-06-29 15:15:19

svanneste
Member
From: Paris, France
Registered: 2015-05-27
Posts: 155

Re: [SOLVED] Compiling for Windows

Hello David,
I do thank you for that new version but I still do have bad news about.

After having updated to version #2016.135, I did compile the Calculator's app as you did. What I have noticed is this :

  • the compilation failed because the image "Square310x310Logo.scale-100" had a weight over 204 Kb (we have already seen that previously)

  • some new Cordova's icons were created

  • if I set a splash screen, it is lost and replaced by Cordova's own splash screen

Below is the content of the \Calc_Compiled\platforms\windows\images after compilation and creation of the new icons.

Please did you had such troubles on your part or, perhaps is it a faulty configuration on my PC ? Many thanks David
icons.png

Last edited by svanneste (2016-06-29 15:18:05)

Offline

#7 2016-06-29 16:07:56

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,661
Website

Re: [SOLVED] Compiling for Windows

Hello Samuel,

Perhaps what happend is you don't change (I need to revisit this in the future, because if you upgrade App Builder the compression level is "0", which means "No compression", which means larger image files, which cause the problem...) the compression levels? Take a look at the below image and set the trackbars more or less that you can see:

mUwZRCW.png

Offline

#8 2016-06-29 16:40:03

svanneste
Member
From: Paris, France
Registered: 2015-05-27
Posts: 155

Re: [SOLVED] Compiling for Windows

Hello David,
After several trials, nothing to do (on my PC). If you would like to try my project
But please, only if you have some time (because it could be on my own PC, I am currently checking everything)

Last edited by svanneste (2016-06-30 19:16:48)

Offline

#9 2016-06-29 16:46:58

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,661
Website

Re: [SOLVED] Compiling for Windows

Hello Samuel,

I asume you try with my suggested changes in the Icons compression level. Ok. Please, Samuel, delete by hand the "_Compiled" directory of your application and then try to compile it again. If I can do it here... then you must do it!

Offline

#10 2016-06-29 18:00:33

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,661
Website

Re: [SOLVED] Compiling for Windows

Hello Samuel,

I cam compile your sample here:

BnQTYKb.png

Certainly the splash screen do not appear (in their place a Cordova's generic icons is shown), at least for some screen sizes, but I will investigating that...

Offline

#11 2016-06-29 18:14:50

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,661
Website

Re: [SOLVED] Compiling for Windows

Hello Samuel,

I simply can't understand why the splash screen issue. I follow the Cordova documentation and provide with the two required (for Windows) splash screen files. Then Cordova creates (by their hat) some other images, which are finally used, at least in some screen sizes. I will take note about this and try to search for a posible solution.

P.S. I know Cordova generates some images because I try to generate the same images from App Builder without success.

Offline

#12 2016-06-29 19:03:25

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,661
Website

Re: [SOLVED] Compiling for Windows

Hello Samuel,

Some news about this issue. Finally App Builder creates up to 21 different icons and 3 splash screens for the Windows platforms. As you can see when upgrade your App Builder copy, only three icons appear to be missing! That is, even when App Builder provide it, something is wrong,... since Apache Cordova put in their place their default icon.

Of course I will to continue investigating this, however, certainly I am go so far from the Cordova's documentation. In fact some of the icons are not well documented or at least I can't found it documented.

Offline

#13 2016-06-29 20:55:39

svanneste
Member
From: Paris, France
Registered: 2015-05-27
Posts: 155

Re: [SOLVED] Compiling for Windows

Hello Boss wink
There is my return (I really hope not to bother you because I am not clear at all on that point and you know more than me) :

  • I have updated to v2016.136

  • I have noticed that 3 icons still were the ones from Cordova instead the ones App Builder created

  • So I have tried to edit the App options \ Configuration \ Extra XML  thinking it will copy the images instead of creating the Cordova's ones

  • After compilation, the images were created but with another name

Images concerned

Cordova Images generated in \res\icons\windows
SplashScreen.scale-100.png  620*300
SpashScreenPhone.scale-240.png  1152*1920
StoreLogo.scale-240.png  120*120

Images in \MyApp_Compiled\platforms\windows\images
SplashScreen.scale-100.png 620*300
SpashScreenPhone.scale-240.png  1152*1920
StoreLogo.scale-240.png  120*120

Code put into Extra XML

<platform name="windows">
 <icon src="res/icons/windows/SplashScreen.scale-100.png" target="SplashScreen.scale-100" />
 <icon src="res/icons/windows/SpashScreenPhone.scale-240.png" target="SpashScreenPhone.scale-240" />
 <icon src="res/icons/windows/StoreLogo.scale-240.png" target="StoreLogo.scale-240" />
</platform>

Images were copied but with a new name like, for example : "SplashScreen.scale-100.scale-100.png"

I will continue to try to find a solution this evening and will report if I can find one. Thanks for all the patient and helpful support you do provide David

Offline

#14 2016-06-29 21:05:02

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,661
Website

Re: [SOLVED] Compiling for Windows

Hello Samuel,

Thanks for your efforts. As you can see only three icons appear "as default". However App Builder try to prepare such icons, in the same way than prepare the others.

Offline

#15 2016-06-29 21:11:21

svanneste
Member
From: Paris, France
Registered: 2015-05-27
Posts: 155

Re: [SOLVED] Compiling for Windows

Hello David,
Yes, App Builder does its job perfectly. If I can not find a valid solution, the one I (and the others) can use is copying the images prepared by App Builder and make them read only so Cordova won't replace them (but I will continue trying).
Wishing you a good evening David smile

Offline

#16 2016-06-29 21:29:56

svanneste
Member
From: Paris, France
Registered: 2015-05-27
Posts: 155

Re: [SOLVED] Compiling for Windows

SOLVED thanks to App Builder.

We simply have to add this to Extra XML (inside App Builder in : App options\Configuration\Extra XML)

<platform name="windows">
 <icon src="res/screens/windows/SplashScreen.scale-100.png" target="SplashScreen" />
 <icon src="res/screens/windows/SplashScreenPhone.scale-240.png" target="SpashScreenPhone" />
 <icon src="res/icons/windows/StoreLogo.scale-240.png" target="StoreLogo" />
</platform>

Last edited by svanneste (2016-06-29 21:34:22)

Offline

#17 2016-06-29 22:10:46

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,661
Website

Re: [SOLVED] Compiling for Windows

Hello Samuel,

Many thanks for your efforts. Certainly I need to take a look in deep in the near future. smile

Offline

#18 2016-06-30 16:51:15

svanneste
Member
From: Paris, France
Registered: 2015-05-27
Posts: 155

Re: [SOLVED] Compiling for Windows

Hello David,
A quick note to spare your precious time : the problem surely is on my part as I can not get a "release" Windows version getting an error MSB3779 (still searching on my part - mostly the 64 bits version of the SDK but still unsure).

Just read that : "You can not build for Windows 10 with the architecture AnyCPU"
How may I make a release as Cordova modifies the configuration file. Modify it and make it read only ? Thanks

Currently trying to modify the batch file to include the targeted CPU : worked. So we have to modify "cordova_windows_release.bat" to add the platform (but we can not from the BATCH app option) :

REM Created by App Builder v2016.137
REM More information at https://www.davidesperalta.com/

@ECHO OFF
CLS

REM Add the Windows platform for our app
CALL cordova platform add windows

REM Add the Whitelist plugin for our app
CALL cordova plugin add cordova-plugin-whitelist

REM Add the Splashscreen plugin for our app
CALL cordova plugin add cordova-plugin-splashscreen

REM Build our app for the Windows platform
CALL cordova build --release windows --archs=x64

REM Pause the script execution, so we can view the script results
PAUSE

Edit: installed the Release package. And got an error about some Javascript code inside after the splash screen. Well, it seems that the solution for me is using Phonegap now.

Last edited by svanneste (2016-06-30 17:24:34)

Offline

#19 2016-06-30 21:14:45

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,661
Website

Re: [SOLVED] Compiling for Windows

Hello Samuel,

Thanks very much for your efforts. I really appreciate it. I will take note also about the possible new BAT file option. I am very sorry, but I expend today into the hospital with my mom, and probably tomorrow too... I promise I put me into this and other things as quickly as possible Samuel.

Offline

#20 2016-07-18 13:52:16

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,661
Website

Re: [SOLVED] Compiling for Windows

Hello Samuel,

Please, update your App Builder copy. Among other enhancements the current AB release includes a new "Architecture type" option in App Options / Cordova / Windows. The architecture type is only taken in consideration when creates the "release" BAT file. If you think they can be useful too in the "run" and "debug" BAT files, please, just post it here and I will add for the next release.

Thanks for your feedback!

Offline

#21 2016-07-21 17:30:56

svanneste
Member
From: Paris, France
Registered: 2015-05-27
Posts: 155

Re: [SOLVED] Compiling for Windows

Hello David,
Thanks for that improvement : it works great and is very useful. +11111 smile

Offline

#22 2016-07-21 18:33:05

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,661
Website

Re: [SOLVED] Compiling for Windows

Hello Samuel,

You're welcome! App Builder rocks! And you are near to be an App Builder ninja! smile

Offline

#23 2016-08-03 17:27:19

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,661
Website

Re: [SOLVED] Compiling for Windows

Hello to all,

Finally I made certain changes in App Builder in order to fix some problems related with the icons and splash screens generator. I encourage you to update your App Builder copy Samuel.

* As a try to solve the problem explained in the next point, App Builder try to copy some Cordova's Windows splash screen images into the icons directory, which have non sense at all. This is fixed now and such images are not copied anymore.

* The splash screens files for the Cordova's Windows platform has been correctly generated by App Builder, however, they are not well referenced in the Cordova's configuration file, causing such files are not taken in consideration when build the application. This is fixed now. Thanks Bekhzod to point me in the right direction!

* App Builder no more generates icons and splash screens for the Windows 8 platform, since this has been depretaced by Cordova (and also by App Builder time ago) and use in their place the icons and splash screens generated by the Windows platform.

* The App Builder's icons generated for the Cordova Windows Phone 8 are not well referenced in the Cordova's configuration file. They refer to a "wp8" folder when the icons are generated and placed at a "wp" folder. This is fixed now.

* A new icon size has added for the Cordova's Windows platform: StoreLogo.scale-240.png. This is apparently the only one icon missing when I try to build a sample application for the Cordova's Windows platform. This icon, however, continue to be untaken by Cordova or Windows, and I need some further investigation. Anyway this icon appear to not used by Windows, at least when our app is launched.

Hope this can be useful!

Offline

Board footer

Powered by FluxBB


Copyright ©2018 DecSoft. All rights reserved.