]> khamidou — GitHub mirrors - electron.git/commitdiff
The icudtl.dat is also needed by helper app.
authorCheng Zhao <zcbenz@gmail.com>
Mon, 30 Jun 2014 03:26:00 +0000 (11:26 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Mon, 30 Jun 2014 03:26:00 +0000 (11:26 +0800)
atom.gyp
tools/mac/link_file_to_helper.sh [new file with mode: 0755]

index d067b46560a110e3c8b20c1b3cb11e5fb21283aa..d2adfe3ba001139816c6550cae05d9cd952e586c 100644 (file)
--- a/atom.gyp
+++ b/atom.gyp
                 '<@(locale_dirs)',
               ],
             },
+              # Link the icudtl.dat file to the Helper app, which is needed
+              # by the V8 of Helper too.
+            {
+              'postbuild_name' : 'Link icudtl.dat to Helper App',
+              'action': [
+                'tools/mac/link_file_to_helper.sh',
+                'Resources/icudtl.dat',
+              ],
+            },
           ]
         }, {  # OS=="mac"
           'dependencies': [
diff --git a/tools/mac/link_file_to_helper.sh b/tools/mac/link_file_to_helper.sh
new file mode 100755 (executable)
index 0000000..670d68c
--- /dev/null
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+# Copyright (c) 2014 GitHub, Inc. All rights reserved.
+# Use of this source code is governed by the MIT license that can be
+# found in the LICENSE file.
+
+# usage: link_file_to_helper.sh relative-path-to-Contents
+# This script links a file from the helper app to the main app.
+
+FILE_PATH=$1
+HELPER_CONTENTS_FOLDER_PATH="$BUILT_PRODUCTS_DIR/$CONTENTS_FOLDER_PATH/Frameworks/$PRODUCT_NAME Helper.app/Contents"
+
+PARENT="`dirname "$HELPER_CONTENTS_FOLDER_PATH/$FILE_PATH"`"
+if [[ ! -d "$PARENT" ]]; then
+  mkdir -p "$PARENT"
+fi
+
+cd "$HELPER_CONTENTS_FOLDER_PATH"
+ln -s "../../../../$FILE_PATH" "$FILE_PATH"