1 | #!/bin/sh
|
---|
2 |
|
---|
3 | cd "$(dirname "$0")"
|
---|
4 |
|
---|
5 | if pwd | grep " ";
|
---|
6 | then alert "Please install from a directory with no spaces in the path name, the current one (`pwd`) has spaces. Just move all the files to somewhere that doesn't have spaces, like /boot/home/mydirectory. If there are spaces, the install script malfunctions. Sorry.";
|
---|
7 | exit 1;
|
---|
8 | fi
|
---|
9 |
|
---|
10 | RETURN=`alert "This will install the IM Kit in /boot/apps/im_kit. Previous versions of the kit will be deleted." "Continue" "Cancel"`
|
---|
11 |
|
---|
12 | if [[ $RETURN = Cancel ]]
|
---|
13 | then
|
---|
14 | exit -1;
|
---|
15 | fi
|
---|
16 |
|
---|
17 | # quit kit if running
|
---|
18 |
|
---|
19 |
|
---|
20 | quit "application/x-vnd.beclan.im_kit"
|
---|
21 | quit "application/x-vnd.m_eiman.im_logger"
|
---|
22 | quit "application/x-vnd.m_eiman.sample_im_client"
|
---|
23 | quit "application/x-vnd.xeD.im_emoclient"
|
---|
24 | quit "application/x-vnd.BeClan.im_binlogger"
|
---|
25 | quit "application/x-vnd.BeClan.im_binlog_viewer"
|
---|
26 | quit "application/x-vnd.beclan.IM_InfoPopper"
|
---|
27 | quit "application/x-vnd.beclan.im_kit-DeskbarIcon"
|
---|
28 | quit "application/x-vnd.BeClan.IMKit.IconSetter"
|
---|
29 | quit "application/x-vnd.beclan-IMKitPrefs"
|
---|
30 |
|
---|
31 |
|
---|
32 |
|
---|
33 | # remove old im kit parts
|
---|
34 | query -a 'BEOS:APP_SIG == "application/x-vnd.beclan.im_kit" || BEOS:APP_SIG == "application/x-vnd.m_eiman.im_logger" || BEOS:APP_SIG == "application/x-vnd.m_eiman.sample_im_client" || BEOS:APP_SIG == "application/x-vnd.xeD.im_emoclient" || BEOS:APP_SIG == "application/x-vnd.BeClan.im_binlogger" || BEOS:APP_SIG == "application/x-vnd.BeClan.im_binlog_viewer" || BEOS:APP_SIG == "application/x-vnd.beclan.IM_InfoPopper" || BEOS:APP_SIG == "application/x-vnd.beclan.im_kit-DeskbarIcon" || BEOS:APP_SIG == "application/x-vnd.BeClan.IMKit.IconSetter" || BEOS:APP_SIG == "application/x-vnd.beclan-IMKitPrefs"' | grep -v "`/bin/pwd`" | xargs rm -f
|
---|
35 |
|
---|
36 | rm ~/config/lib/libim.so
|
---|
37 |
|
---|
38 | # this is due to a bug that causes the Deskbar icon loading to fail, it's an app_sig thing.
|
---|
39 | rm ~/config/settings/beos_mime/application/x-vnd.beclan.im_kit
|
---|
40 |
|
---|
41 | # create indexes
|
---|
42 | /bin/mkindex -t string IM:connections
|
---|
43 | /bin/mkindex -t string IM:status
|
---|
44 |
|
---|
45 | # add attributes to application/x-person
|
---|
46 | ./bin/mimetype_attribute --mime application/x-person --internal-name "IM:status" --public-name "IM Status" --type string --width 80 --viewable --public --not-editable
|
---|
47 | ./bin/mimetype_attribute --mime application/x-person --internal-name "IM:connections" --public-name "IM Connections" --type string --width 80 --viewable --public
|
---|
48 |
|
---|
49 | # create add-ons and settings dir
|
---|
50 | mkdir -p ~/config/settings/im_kit/icons
|
---|
51 | mkdir -p ~/config/settings/im_kit/clients
|
---|
52 | mkdir -p ~/config/settings/im_kit/add-ons/protocols
|
---|
53 | mkdir -p ~/config/add-ons/im_kit/protocols
|
---|
54 |
|
---|
55 | # install apps
|
---|
56 | mkdir -p /boot/home/config/servers
|
---|
57 | copyattr -d -m bin/im_server /boot/home/config/servers/im_server
|
---|
58 | mkdir -p /boot/apps/im_kit
|
---|
59 | copyattr -d -m bin/clients/im_send_message /boot/apps/im_kit/im_send_message
|
---|
60 | copyattr -d -m bin/clients/im_client /boot/apps/im_kit/im_client
|
---|
61 | copyattr -d -m bin/clients/im_emoclient /boot/apps/im_kit/im_emoclient
|
---|
62 | copyattr -d -m bin/clients/im_logger /boot/apps/im_kit/im_logger
|
---|
63 | copyattr -d -m bin/clients/im_binlogger /boot/apps/im_kit/im_binlogger
|
---|
64 | copyattr -d -m bin/clients/im_binlog_viewer /boot/apps/im_kit/im_binlog_viewer
|
---|
65 | copyattr -d -m bin/clients/im_infopopper /boot/apps/im_kit/im_infopopper
|
---|
66 | mkdir -p /boot/apps/im_kit/utils
|
---|
67 | copyattr -d -m bin/IconSetter /boot/apps/im_kit/utils/IconSetter
|
---|
68 | copyattr -d -m bin/IMDeskbarIcon /boot/apps/im_kit/utils/IMDeskbarIcon
|
---|
69 | copyattr -d -m bin/mimetype_attribute /boot/apps/im_kit/utils/mimetype_attribute
|
---|
70 |
|
---|
71 |
|
---|
72 |
|
---|
73 |
|
---|
74 | # install sounds
|
---|
75 | mkdir -p /boot/apps/im_kit/sounds
|
---|
76 | copyattr -d -m sounds/Connect.wav /boot/apps/im_kit/sounds/Connect.wav
|
---|
77 | copyattr -d -m sounds/Disconnect.wav /boot/apps/im_kit/sounds/Disconnect.wav
|
---|
78 | copyattr -d -m sounds/Message.wav /boot/apps/im_kit/sounds/Message.wav
|
---|
79 | copyattr -d -m sounds/StatusAvailable.wav /boot/apps/im_kit/sounds/StatusAvailable.wav
|
---|
80 | copyattr -d -m sounds/StatusAway.wav /boot/apps/im_kit/sounds/StatusAway.wav
|
---|
81 | copyattr -d -m sounds/StatusOffline.wav /boot/apps/im_kit/sounds/StatusOffline.wav
|
---|
82 |
|
---|
83 | # install libs, add-ons, settings
|
---|
84 | copyattr -d -m bin/lib/libim.so ~/config/lib/libim.so
|
---|
85 | if [ ! -e ~/config/lib/libbsvg.so ]; then
|
---|
86 | copyattr -d -m bin/lib/libbsvg.so ~/config/lib/libbsvg.so
|
---|
87 | fi
|
---|
88 | copyattr -d -m bin/lib/libexpat.so ~/config/lib/libexpat.so
|
---|
89 | copyattr -d -m bin/protocols/aim ~/config/add-ons/im_kit/protocols/aim
|
---|
90 | copyattr -d -m bin/protocols/gtalk ~/config/add-ons/im_kit/protocols/gtalk
|
---|
91 | copyattr -d -m bin/protocols/jabber ~/config/add-ons/im_kit/protocols/jabber
|
---|
92 | copyattr -d -m bin/protocols/msn ~/config/add-ons/im_kit/protocols/msn
|
---|
93 |
|
---|
94 |
|
---|
95 | copyattr -d -m bin/settings/InstantMessaging /boot/apps/im_kit/InstantMessaging
|
---|
96 | ln -s /boot/apps/im_kit/InstantMessaging ~/config/be/Preferences/InstantMessaging
|
---|
97 |
|
---|
98 | # install icon-holding person files
|
---|
99 | unzip -n bin/Icons.zip -d /boot/home/config/settings/im_kit/icons
|
---|
100 | unzip -n bin/smileys.zip -d /boot/home/config/settings/im_kit/
|
---|
101 | rm bin/Icons.zip
|
---|
102 | rm bin/smileys.zip
|
---|
103 |
|
---|
104 | # install Tracker add-ons
|
---|
105 | copyattr -d -m bin/tracker-addons/IM_Merge_contacts ~/config/add-ons/Tracker/IM_Merge_contacts
|
---|
106 | ln -s /boot/apps/im_kit/im_client /boot/home/config/add-ons/Tracker/im_client
|
---|
107 |
|
---|
108 | # install query to desktop
|
---|
109 | copyattr -d -m bin/Online_contacts ~/Desktop/Online_contacts
|
---|
110 |
|
---|
111 | # start im kit
|
---|
112 | /boot/home/config/servers/im_server &
|
---|
113 | sleep 2
|
---|
114 | /boot/apps/im_kit/im_client &
|
---|
115 | /boot/apps/im_kit/im_emoclient &
|
---|
116 | /boot/apps/im_kit/im_logger &
|
---|
117 | /boot/apps/im_kit/im_binlogger &
|
---|
118 | /boot/apps/im_kit/im_binlogger_viewer &
|
---|
119 | /boot/apps/im_kit/im_infopopper &
|
---|
120 |
|
---|
121 | # remove traces
|
---|
122 | rm Install.sh
|
---|
123 | rm -rf bin
|
---|
124 | rm -rf sounds
|
---|
125 |
|
---|
126 | # done
|
---|
127 | alert "All done. Click OK to view docs!"
|
---|
128 |
|
---|
129 | # open docs
|
---|
130 | cd docs
|
---|
131 | /system/Tracker index.html
|
---|