{ "id": "64148", "key": "TIMOB-3516", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "11361", "description": "Mobile 1.8.0 M08", "name": "Sprint 2011-29", "archived": true, "released": true, "releaseDate": "2011-07-25" }, { "id": "11331", "description": "", "name": "Release 1.8.0", "archived": true, "released": true, "releaseDate": "2011-10-31" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-01-09T15:15:27.000+0000", "created": "2011-04-15T03:46:11.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "densitySpecificSplashScreen", "qe-testadded" ], "versions": [], "issuelinks": [], "assignee": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2012-01-09T15:15:27.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "{html}

It's currently impossible to use density-specific splash screens\r\non Android when building on Windows. The bug is easy to fix; in the\r\nfollowing code from support/android/builder.py:

\r\n
\r\n     # look for density-specific default.png's first\r\n        if os.path.exists(android_images_dir):\r\n            pattern = r'/android/images/(high|medium|low|res-[^/]+)/default.png'\r\n            for root, dirs, files in os.walk(android_images_dir):\r\n                for f in files:\r\n                    path = os.path.join(root, f)\r\n                    if re.search(pattern, path):\r\n                        res_folder = resource_drawable_folder(path)\r\n                        debug('found %s splash screen at %s' % (res_folder, path))\r\n                        dest_path = os.path.join(self.res_dir, res_folder)\r\n                        dest_file = os.path.join(dest_path, 'background.png')\r\n                        if not os.path.exists(dest_path):\r\n                            os.makedirs(dest_path)\r\n                        shutil.copy(path, dest_file)\r\n
\r\n

change \"if re.search(pattern, path):\" to \"if re.search(pattern,\r\npath.replace(\"\\\", \"/\")):\"

\r\n

It might be good to audit the rest of the code too for this\r\nproblem.

{html}", "attachment": [], "flagged": false, "summary": "Android: density-specific splash screen not working on Windows", "creator": { "name": "matthewlieder", "key": "matthewlieder", "displayName": "Matthew Lieder", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "matthewlieder", "key": "matthewlieder", "displayName": "Matthew Lieder", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "130733", "author": { "name": "matthewlieder", "key": "matthewlieder", "displayName": "Matthew Lieder", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

(looks like Lighthouse stripped out the second backslash from\nthe first parameter to path.replace in my comment)

{html}", "updateAuthor": { "name": "matthewlieder", "key": "matthewlieder", "displayName": "Matthew Lieder", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:46:11.000+0000", "updated": "2011-04-15T03:46:11.000+0000" }, { "id": "158753", "author": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "body": "the fix should probably not use pattern replacement specifically. The pattern should probably be built in a platform dependent way to begin with using os.path.join, then fixing the \\ to be \\\\ to handle the escaping properly.", "updateAuthor": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-07-06T09:12:51.000+0000", "updated": "2011-07-06T09:12:51.000+0000" }, { "id": "159941", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "It's easy to see the problem. Just build a Titanium app on Windows, then look down in your project's build/android/res folder and you'll only see a few \"drawable-xxx\" folders. There should be a bunch of them.\r\n\r\nWith the fix in place, re-build (you may need to \"touch\" the tiapp.xml first just one time after installing the newer SDK) and you'll see many more drawable folders under build/android/res.", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-07-19T11:41:49.000+0000", "updated": "2011-07-19T11:41:49.000+0000" }, { "id": "160499", "author": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Reviewed and tested.", "updateAuthor": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-07-25T12:49:30.000+0000", "updated": "2011-07-25T12:49:30.000+0000" }, { "id": "176049", "author": { "name": "mpettiford", "key": "mpettiford", "displayName": "Michael Pettiford", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested on Ti Studio 1.0.7.201112080131\r\n

Ti Mob SDK 1.8.0.1.v20111209102124 v8/rhino\r\n

Windows 7\r\n\r\nExpected behavior of the correct drawable folders is shown", "updateAuthor": { "name": "mpettiford", "key": "mpettiford", "displayName": "Michael Pettiford", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-12-14T09:36:40.000+0000", "updated": "2011-12-14T09:36:40.000+0000" }, { "id": "178576", "author": { "name": "mpettiford", "key": "mpettiford", "displayName": "Michael Pettiford", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Reopening/closing to add/remove labels", "updateAuthor": { "name": "mpettiford", "key": "mpettiford", "displayName": "Michael Pettiford", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-01-09T15:12:57.000+0000", "updated": "2012-01-09T15:12:57.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }