link_to_system.sh 5.1 KB
Newer Older
1 2
#!/bin/sh

Tatiana Meshkova's avatar
Tatiana Meshkova committed
3 4
TARGET_DIR=$1
if [ "$TARGET_DIR" = "" ]; then
5 6
  echo "TARGET_DIR ex: /usr/lib/mozembedlite"
  TARGET_DIR=/usr/lib/mozembedlite
Tatiana Meshkova's avatar
Tatiana Meshkova committed
7 8
fi

9 10 11 12 13 14 15
OBJPREFIX=$2
if [ "$OBJPREFIX" = "" ]; then
  BARCH=`uname -m`
  OBJPREFIX=objdir-$BARCH
fi

LAST_OBJ_DIR="$OBJPREFIX"
16

17
mkdir -p $TARGET_DIR
18
mkdir -p $TARGET_DIR/components
19 20

FILES_LIST="
21 22 23 24
$OBJPREFIX/chromehelper/.libs/libchromehelper.so
$OBJPREFIX/history/.libs/libhistory.so
$OBJPREFIX/prompt/.libs/libprompt.so
$OBJPREFIX/touchhelper/.libs/libtouchhelper.so
25
$OBJPREFIX/widgetfactory/.libs/libwidgetfactory.so
26
EmbedLiteBinComponents.manifest
27
jscomps/EmbedLiteJSComponents.manifest
28 29 30
jscomps/AboutRedirector.js
jscomps/AlertsService.js
jscomps/LoginManagerPrompter.js
31
jscomps/HelperAppDialog.js
32
jscomps/EmbedPrefService.js
33
jscomps/ContentPermissionPrompt.js
34
jscomps/EmbedLiteGlobalHelper.js
35
jscomps/EmbedLiteConsoleListener.js
36
jscomps/EmbedLiteSyncService.js
37
jscomps/EmbedLiteFaviconService.js
38
jscomps/EmbedLiteOrientationChangeHandler.js
39
jscomps/EmbedLiteSearchEngine.js
40
jscomps/EmbedLiteErrorPageHandler.js
41
jscomps/UserAgentOverrideHelper.js
42
jscomps/XPIDialogService.js
43 44
jscomps/EmbedLiteWebAppInstall.js
jscomps/PromptService.js
45
jscomps/PrivateDataManager.js
46
jscomps/EmbedliteDownloadManager.js
47 48 49 50
jscomps/TelProtocolHandler.js
jscomps/SmsProtocolHandler.js
jscomps/MailtoProtocolHandler.js
jscomps/GeoProtocolHandler.js
51
jscomps/RtspProtocolHandler.js
52
"
53

54 55
for str in $FILES_LIST; do
    fname="${str##*/}"
56
    rm -f $TARGET_DIR/components/$fname;
57
    ln -s $(pwd)/$str $TARGET_DIR/components/$fname;
58
done
59 60

rm -f $TARGET_DIR/chrome/EmbedLiteJSScripts.manifest;
61
ln -s $(pwd)/jsscripts/EmbedLiteJSScripts.manifest $TARGET_DIR/chrome/EmbedLiteJSScripts.manifest;
62 63

rm -rf $TARGET_DIR/chrome/embedlite;
64
mkdir -p $TARGET_DIR/chrome/embedlite/content/sync;
65
ln -s $(pwd)/jsscripts/embedhelper.js $TARGET_DIR/chrome/embedlite/content/embedhelper.js;
66
ln -s $(pwd)/jsscripts/OrientationChangeHandler.jsm $TARGET_DIR/chrome/embedlite/content/OrientationChangeHandler.jsm;
67
ln -s $(pwd)/jsscripts/TelURIParser.jsm $TARGET_DIR/chrome/embedlite/content/TelURIParser.jsm;
68
ln -s $(pwd)/jsscripts/SelectHelper.js $TARGET_DIR/chrome/embedlite/content/SelectHelper.js;
69
ln -s $(pwd)/jsscripts/SelectAsyncHelper.js $TARGET_DIR/chrome/embedlite/content/SelectAsyncHelper.js;
70
ln -s $(pwd)/jsscripts/SelectionHandler.js $TARGET_DIR/chrome/embedlite/content/SelectionHandler.js;
71
ln -s $(pwd)/jsscripts/SelectionPrototype.js $TARGET_DIR/chrome/embedlite/content/SelectionPrototype.js;
72 73
ln -s $(pwd)/jsscripts/Util.js $TARGET_DIR/chrome/embedlite/content/Util.js;
ln -s $(pwd)/jsscripts/ContextMenuHandler.js $TARGET_DIR/chrome/embedlite/content/ContextMenuHandler.js;
74 75 76 77 78 79
ln -s $(pwd)/search-engines/google.xml $TARGET_DIR/chrome/embedlite/content/google.xml;
ln -s $(pwd)/search-engines/bing.xml $TARGET_DIR/chrome/embedlite/content/bing.xml;
ln -s $(pwd)/search-engines/yahoo.xml $TARGET_DIR/chrome/embedlite/content/yahoo.xml;
ln -s $(pwd)/search-engines/baidu.xml $TARGET_DIR/chrome/embedlite/content/baidu.xml;
ln -s $(pwd)/search-engines/duckduckgo.xml $TARGET_DIR/chrome/embedlite/content/duckduckgo.xml;
ln -s $(pwd)/search-engines/yandex.xml $TARGET_DIR/chrome/embedlite/content/yandex.xml;
80

81 82
ln -s $(pwd)/jsscripts/sync/bookmarks.js $TARGET_DIR/chrome/embedlite/content/sync/bookmarks.js;

83 84 85 86 87 88
rm -f $TARGET_DIR/chrome/EmbedLiteOverrides.manifest;
ln -s $(pwd)/overrides/EmbedLiteOverrides.manifest $TARGET_DIR/chrome/EmbedLiteOverrides.manifest;

rm -rf $TARGET_DIR/chrome/chrome;
mkdir -p $TARGET_DIR/chrome/chrome/content;
mkdir -p $TARGET_DIR/chrome/chrome/skin;
89
mkdir -p $TARGET_DIR/chrome/chrome/skin/images;
90 91 92
ln -s $(pwd)/overrides/aboutCertError.xhtml $TARGET_DIR/chrome/chrome/content/
ln -s $(pwd)/overrides/netError.xhtml $TARGET_DIR/chrome/chrome/content/
ln -s $(pwd)/overrides/netError.css $TARGET_DIR/chrome/chrome/skin/
93 94 95 96 97 98 99 100 101 102
ln -s $(pwd)/overrides/touchcontrols.css $TARGET_DIR/chrome/chrome/skin/
ln -s $(pwd)/overrides/images/mute-hdpi.png $TARGET_DIR/chrome/chrome/skin/images/
ln -s $(pwd)/overrides/images/pause-hdpi.png $TARGET_DIR/chrome/chrome/skin/images/
ln -s $(pwd)/overrides/images/play-hdpi.png $TARGET_DIR/chrome/chrome/skin/images/
ln -s $(pwd)/overrides/images/unmute-hdpi.png $TARGET_DIR/chrome/chrome/skin/images/
ln -s $(pwd)/overrides/images/error.png $TARGET_DIR/chrome/chrome/skin/images/
ln -s $(pwd)/overrides/images/exitfullscreen-hdpi.png $TARGET_DIR/chrome/chrome/skin/images/
ln -s $(pwd)/overrides/images/fullscreen-hdpi.png $TARGET_DIR/chrome/chrome/skin/images/
ln -s $(pwd)/overrides/images/throbber.png $TARGET_DIR/chrome/chrome/skin/images/
ln -s $(pwd)/overrides/images/scrubber-hdpi.png $TARGET_DIR/chrome/chrome/skin/images/
103 104 105 106 107 108 109 110 111

rm -rf $TARGET_DIR/chrome/en-US/locale/branding;
rm -rf $TARGET_DIR/chrome/en-US/locale/en-US/browser;
mkdir -p $TARGET_DIR/chrome/en-US/locale/branding;
mkdir -p $TARGET_DIR/chrome/en-US/locale/en-US/browser;
ln -s $(pwd)/overrides/brand.dtd $TARGET_DIR/chrome/en-US/locale/branding/
ln -s $(pwd)/overrides/brand.properties $TARGET_DIR/chrome/en-US/locale/branding/
ln -s $(pwd)/overrides/aboutCertError.dtd $TARGET_DIR/chrome/en-US/locale/en-US/browser/
ln -s $(pwd)/overrides/netError.dtd $TARGET_DIR/chrome/en-US/locale/en-US/browser/