[TIMOB-19113] Platform-specific resources copied into builds for platforms not available in SDK/on OS
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | None |
Status | Open |
Resolution | Unresolved |
Affected Version/s | Release 4.1.0 |
Fix Version/s | n/a |
Components | CLI |
Labels | cb-tooling |
Reporter | Fokke Zandbergen |
Assignee | Christopher Williams |
Created | 2015-06-30T13:22:49.000+0000 |
Updated | 2020-01-30T10:52:40.000+0000 |
Description
This probably includes TIMOB-19112.
Compile the following Alloy app for the Windows SDK:
https://github.com/appcelerator-developer-relations/appc-sample-ti410
As the first screenshot shows the
Resources
folder only has a windows
folder.
Still, as the second screenshots shows the build/windows/Assets
folder has a iphone
folder which can only have been copied straight from app/assets/iphone
. Furthermore, while the compiled Alloy app from Resources/windows
is there in the root, the icons and splash screens which where there as well are missing.
Attachments
File | Date | Size |
---|---|---|
Screen Shot 2015-06-30 at 15.17.38.png | 2015-06-30T13:22:46.000+0000 | 42379 |
Screen Shot 2015-06-30 at 15.17.53.png | 2015-06-30T13:22:46.000+0000 | 108300 |
test.zip | 2015-07-01T18:51:34.000+0000 | 28388 |
I think this may actually be an alloy issue, not a Windows CLI issue...
Nope, it's not. I'm also seeing it with a classic project. The
Resources/iphone
folder is included in the Assets.OK, I think I know why. The splash screen/branding stuff is covered in TIMOB-19112. During the build we copy the Resources folder, and we are supposed to ignore any root dirs matching any platform name. Then we copy Resources/windows over top. The issue is that the listing of platform names is populated by reading the manifest in the SDK, which actually lists the SDKs packaged. On Windows, we don't package ios/iphone/ipad, so it's not in the listing of platform directory names to ignore. I assume an app that worked on blackberry or tizen would also suffer the same fate, since we no longer package and distribute them. This is a general pattern issues with the CLI, not specific to Windows. We likely need to populate and re-use some special array of platform names, regardless of whether that platform is actually valid for this OS (or has been deprecated/removed). Otherwise we'll forever be copying tizen and blackberry resources into say iOS apps until the user removes those directories from their app. For reference, here's where the list of platform names are "generated": https://github.com/appcelerator/titanium_mobile/blob/master/node_modules/titanium-sdk/lib/titanium.js#L31 Which reads the manifest.json file in the root of an SDK for it's platforms array. You'll notice the ios CLI build command will suffer from the same issue if an app has windows specific resources and you build for iOS on a Mac (where "windows" is not in the manifest.json platforms array). The issue is here: https://github.com/appcelerator/titanium_mobile/blob/master/iphone/cli/commands/_build.js#L3501 And Android: https://github.com/appcelerator/titanium_mobile/blob/master/android/cli/commands/_build.js#L2470
Nice catch! And since we deprecate platforms (Tizen, BB..) it means we need to hard-code them in a config.