Skip to content

Commit

Permalink
Merge pull request tidev#812 from ayeung/timob-6371
Browse files Browse the repository at this point in the history
TIMOB-6371:Android: CommonJS apps crashing on android (V8 + Rhino) on Windows 7 / XP
  • Loading branch information
billdawson committed Dec 2, 2011
2 parents 998ebc0 + cfb9cb6 commit d44b628
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 3 additions & 2 deletions support/android/builder.py
Expand Up @@ -665,8 +665,9 @@ def make_relative(path, relative_to, prefix=None):
relative_path = relative_path.replace("\\", "/")
self.run_adb('push', delta.get_path(), "%s/%s" % (self.sdcard_resources, relative_path))

if len(self.project_deltas) > 0:
requireIndex.generateJSON(self.assets_dir, os.path.join(self.assets_dir, "index.json"))
index_json_path = os.path.join(self.assets_dir, "index.json")
if len(self.project_deltas) > 0 or not os.path.exists(index_json_path):
requireIndex.generateJSON(self.assets_dir, index_json_path)

def generate_android_manifest(self,compiler):

Expand Down
4 changes: 3 additions & 1 deletion support/android/requireIndex.py
Expand Up @@ -14,7 +14,9 @@ def generateJSON(projectDir, outFile):
index = {}
for dirpath, dirnames, filenames in os.walk(projectDir):
for name in filenames:
index[os.path.join(os.path.relpath(dirpath, projectDir), name)] = 1
relative_path = dirpath[len(projectDir)+1:].replace("\\", "/")
file_path = "/".join([relative_path , name])
index[file_path] = 1
simplejson.dump(index, open(outFile, "w"))

if __name__ == "__main__":
Expand Down

0 comments on commit d44b628

Please sign in to comment.