link_to_system.sh 4.82 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 32
jscomps/HelperAppDialog.js
jscomps/DownloadManagerUI.js
33
jscomps/EmbedPrefService.js
34
jscomps/ContentPermissionPrompt.js
35
jscomps/EmbedLiteGlobalHelper.js
36
jscomps/EmbedLiteConsoleListener.js
37
jscomps/EmbedLiteSyncService.js
38
jscomps/EmbedLiteFaviconService.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 47 48 49
jscomps/TelProtocolHandler.js
jscomps/SmsProtocolHandler.js
jscomps/MailtoProtocolHandler.js
jscomps/GeoProtocolHandler.js
50
jscomps/RtspProtocolHandler.js
51
jscomps/Sidebar.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/TelURIParser.jsm $TARGET_DIR/chrome/embedlite/content/TelURIParser.jsm;
67
ln -s $(pwd)/jsscripts/SelectHelper.js $TARGET_DIR/chrome/embedlite/content/SelectHelper.js;
68
ln -s $(pwd)/jsscripts/SelectAsyncHelper.js $TARGET_DIR/chrome/embedlite/content/SelectAsyncHelper.js;
69 70 71
ln -s $(pwd)/jsscripts/SelectionHandler.js $TARGET_DIR/chrome/embedlite/content/SelectionHandler.js;
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;
72
ln -s $(pwd)/jsscripts/google.xml $TARGET_DIR/chrome/embedlite/content/google.xml;
73 74
ln -s $(pwd)/jsscripts/bing.xml $TARGET_DIR/chrome/embedlite/content/bing.xml;
ln -s $(pwd)/jsscripts/yahoo.xml $TARGET_DIR/chrome/embedlite/content/yahoo.xml;
75 76 77
ln -s $(pwd)/jsscripts/baidu.xml $TARGET_DIR/chrome/embedlite/content/baidu.xml;
ln -s $(pwd)/jsscripts/duckduckgo.xml $TARGET_DIR/chrome/embedlite/content/duckduckgo.xml;
ln -s $(pwd)/jsscripts/yandex.xml $TARGET_DIR/chrome/embedlite/content/yandex.xml;
78

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

81 82 83 84 85 86
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;
87
mkdir -p $TARGET_DIR/chrome/chrome/skin/images;
88 89 90
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/
91 92 93 94 95 96 97 98 99 100
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/
101 102 103 104 105 106 107 108 109

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/