HTML_Browser.html 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343
  1. <!DOCTYPE html>
  2. <html dir="ltr">
  3. <head>
  4. <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
  5. <title>App/UI/HTML Browser - XOWA</title>
  6. <link rel="shortcut icon" href="https://gnosygnu.github.io/xowa/xowa_logo.png" />
  7. <link rel="stylesheet" href="https://gnosygnu.github.io/xowa/xowa_common.css" type="text/css">
  8. </head>
  9. <body class="mediawiki ltr sitedir-ltr ns-0 ns-subject skin-vector action-submit vector-animateLayout" spellcheck="false">
  10. <div id="mw-page-base" class="noprint"></div>
  11. <div id="mw-head-base" class="noprint"></div>
  12. <div id="content" class="mw-body">
  13. <h1 id="firstHeading" class="firstHeading"><span>App/UI/HTML Browser</span></h1>
  14. <div id="bodyContent" class="mw-body-content">
  15. <div id="siteSub">From XOWA: the free, open-source, offline wiki application</div>
  16. <div id="contentSub"></div>
  17. <div id="mw-content-text" lang="en" dir="ltr" class="mw-content-ltr">
  18. <p>
  19. The HTML Browser is a core part of the XOWA application.
  20. </p>
  21. <div id="toc" class="toc">
  22. <div id="toctitle" class="toctitle">
  23. <h2>
  24. Contents
  25. </h2>
  26. </div>
  27. <ul>
  28. <li class="toclevel-1 tocsection-1">
  29. <a href="#Overview"><span class="tocnumber">1</span> <span class="toctext">Overview</span></a>
  30. </li>
  31. <li class="toclevel-1 tocsection-2">
  32. <a href="#HTTP_Server"><span class="tocnumber">2</span> <span class="toctext">HTTP Server</span></a>
  33. </li>
  34. <li class="toclevel-1 tocsection-3">
  35. <a href="#Android"><span class="tocnumber">3</span> <span class="toctext">Android</span></a>
  36. </li>
  37. <li class="toclevel-1 tocsection-4">
  38. <a href="#SWT"><span class="tocnumber">4</span> <span class="toctext">SWT</span></a>
  39. <ul>
  40. <li class="toclevel-2 tocsection-5">
  41. <a href="#Mozilla_(XULRunner)"><span class="tocnumber">4.1</span> <span class="toctext">Mozilla (XULRunner)</span></a>
  42. <ul>
  43. <li class="toclevel-3 tocsection-6">
  44. <a href="#Background"><span class="tocnumber">4.1.1</span> <span class="toctext">Background</span></a>
  45. </li>
  46. <li class="toclevel-3 tocsection-7">
  47. <a href="#ESR_limitation"><span class="tocnumber">4.1.2</span> <span class="toctext">ESR limitation</span></a>
  48. </li>
  49. </ul>
  50. </li>
  51. <li class="toclevel-2 tocsection-8">
  52. <a href="#WebKit"><span class="tocnumber">4.2</span> <span class="toctext">WebKit</span></a>
  53. </li>
  54. <li class="toclevel-2 tocsection-9">
  55. <a href="#None"><span class="tocnumber">4.3</span> <span class="toctext">None</span></a>
  56. </li>
  57. </ul>
  58. </li>
  59. <li class="toclevel-1 tocsection-10">
  60. <a href="#Current_state_of_the_SWT_HTML_Browser_by_operating_systems"><span class="tocnumber">5</span> <span class="toctext">Current state of the SWT HTML Browser by operating systems</span></a>
  61. <ul>
  62. <li class="toclevel-2 tocsection-11">
  63. <a href="#Windows"><span class="tocnumber">5.1</span> <span class="toctext">Windows</span></a>
  64. </li>
  65. <li class="toclevel-2 tocsection-12">
  66. <a href="#Mac_OS_X"><span class="tocnumber">5.2</span> <span class="toctext">Mac OS X</span></a>
  67. </li>
  68. <li class="toclevel-2 tocsection-13">
  69. <a href="#Linux"><span class="tocnumber">5.3</span> <span class="toctext">Linux</span></a>
  70. </li>
  71. </ul>
  72. </li>
  73. </ul>
  74. </div>
  75. <h2>
  76. <span class="mw-headline" id="Overview">Overview</span>
  77. </h2>
  78. <p>
  79. The XOWA GUI application embeds a web browser to show the wiki pages.
  80. </p>
  81. <h2>
  82. <span class="mw-headline" id="HTTP_Server">HTTP Server</span>
  83. </h2>
  84. <p>
  85. XOWA HTTP Server does not use the embedded XOWA web browser.
  86. </p>
  87. <h2>
  88. <span class="mw-headline" id="Android">Android</span>
  89. </h2>
  90. <p>
  91. XOWA droid uses the built in WebView that comes with Android.
  92. </p>
  93. <h2>
  94. <span class="mw-headline" id="SWT">SWT</span>
  95. </h2>
  96. <p>
  97. XOWA uses SWT for its Web Browser across all 3 major operating systems: Windows, Linux, Mac OS X.
  98. </p>
  99. <p>
  100. SWT provides 3 different modes for its Web Browser: mozilla, webkit and none. These can be configured through /xowa/user/anonymous/app/os_name.gfs with the following snippet:
  101. </p>
  102. <pre>
  103. app.gui {
  104. browser_type = 'mozilla';
  105. }
  106. </pre>
  107. <p>
  108. More information on the 3 modes are below
  109. </p>
  110. <h3>
  111. <span class="mw-headline" id="Mozilla_(XULRunner)">Mozilla (XULRunner)</span>
  112. </h3>
  113. <h4>
  114. <span class="mw-headline" id="Background">Background</span>
  115. </h4>
  116. <p>
  117. <a href="https://developer.mozilla.org/en-US/docs/Mozilla/Projects/XULRunner" rel="nofollow" class="external text">XULRunner</a> is a runtime package provided by Mozilla that can be used to build Firefox-like applications. It can be deployed in a standalone package that does not interfere with any installed versions of Firefox.
  118. </p>
  119. <p>
  120. The download location for xulrunner is <a href="http://ftp.mozilla.org/pub/mozilla.org/xulrunner/releases/" rel="nofollow" class="external free">http://ftp.mozilla.org/pub/mozilla.org/xulrunner/releases/</a>
  121. </p>
  122. <p>
  123. XOWA includes xulrunner at /xowa/operating_system_name/xulrunner . For example, on Linux 64-bit, this folder is at /xowa/linux_64/xulrunner/
  124. </p>
  125. <p>
  126. XOWA can use different versions of xulrunner with something like the following snippet:
  127. </p>
  128. <pre>
  129. app.gui {
  130. browser_type = 'mozilla';
  131. xul_runner_path = '~{&lt;&gt;bin_plat_dir&lt;&gt;}xulrunner_v24';
  132. }
  133. </pre>
  134. <h4>
  135. <span class="mw-headline" id="ESR_limitation">ESR limitation</span>
  136. </h4>
  137. <p>
  138. Mozilla Firefox has Extended Support Releases (ESRs). These start at version 10 and occur at 7-step intervals: 10, 17, 24, 31, 38.
  139. </p>
  140. <p>
  141. Each version of SWT limits compatibility to a specific XULRunner ESR. For SWT version 4.5, the highest XULRunner is 31. Also, non-ESR versions are not allowed. For example, SWT will fail if using XULRunner v30.
  142. </p>
  143. <h3>
  144. <span class="mw-headline" id="WebKit">WebKit</span>
  145. </h3>
  146. <p>
  147. SWT can also be configured to use the system's default WebKit browser. In most cases, this relates directly to Safari and is easiest done on a Mac OS X system. It can be done for Linux / Windows, but further steps need to be taken. See <a href="https://www.eclipse.org/swt/faq.php#howusewebkit" rel="nofollow" class="external free">https://www.eclipse.org/swt/faq.php#howusewebkit</a>
  148. </p>
  149. <p>
  150. XOWA may support WebKit on Linux / Windows at a future date, but for now, it is not a backlog item. If you are interested, please contact me and I will reevaluate.
  151. </p>
  152. <p>
  153. If you're on Linux, and want to experiment, you can try the following:
  154. </p>
  155. <ul>
  156. <li>
  157. Open the following file in your text editor: /xowa/user/anonymous/app/os.linux_64.gfs
  158. </li>
  159. <li>
  160. Change <code>browser_type</code> to <code>webkit</code>. When you're done, it should look something like this:
  161. </li>
  162. </ul>
  163. <pre>
  164. app.gui {
  165. browser_type = 'webkit';
  166. }
  167. </pre>
  168. <ul>
  169. <li>
  170. Run XOWA
  171. </li>
  172. </ul>
  173. <p>
  174. Note this may not work on systems with proper webkit support.
  175. </p>
  176. <h3>
  177. <span class="mw-headline" id="None">None</span>
  178. </h3>
  179. <p>
  180. SWT can also be configured to use the system's browser through the keyword "none". For all intents and purposes, this basically applies to using Internet Explorer on Windows machines.
  181. </p>
  182. <p>
  183. XOWA does not support Internet Explorer. It may do so in the future, but it would be dependent on the ease of the Javascript / CSS integration.
  184. </p>
  185. <h2>
  186. <span class="mw-headline" id="Current_state_of_the_SWT_HTML_Browser_by_operating_systems">Current state of the SWT HTML Browser by operating systems</span>
  187. </h2>
  188. <h3>
  189. <span class="mw-headline" id="Windows">Windows</span>
  190. </h3>
  191. <p>
  192. As of v2.6.5, XOWA uses XUL Runner 24 for both Windows 32 bit and Windows 64.
  193. </p>
  194. <p>
  195. XULRunner 31 does work with Windows XP and Windows 7, but there have been reports of failure on Windows 8. As a result, 24 is the official package.
  196. </p>
  197. <p>
  198. There is one known issue wherein an error message appears in the console: <code>1435372844657 addons.manager ERROR startup failed: [Exception... "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIPrefBranch.setCharPref]" nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)" location: "JS frame :: resource://gre/modules/AddonManager.jsm :: AMI_startup :: line 645" data: no] Stack trace: AMI_startup()@resource://gre/modules/AddonManager.jsm:645 &lt; AMP_startup()@resource://gre/modules/AddonManager.jsm:2318 &lt; AMC_observe()@resource://gre/components/addonManager.js:55 &lt; &lt;file:unknown&gt;</code>
  199. </p>
  200. <p>
  201. However this appears to be benign. There is also currently an open bug on it. <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=466391" rel="nofollow" class="external free">https://bugs.eclipse.org/bugs/show_bug.cgi?id=466391</a>
  202. </p>
  203. <p>
  204. Neither WebKit nor None are supported on Windows.
  205. </p>
  206. <h3>
  207. <span class="mw-headline" id="Mac_OS_X">Mac OS X</span>
  208. </h3>
  209. <p>
  210. As of v2.6.3, XOWA uses WebKit for Mac OS X.
  211. </p>
  212. <p>
  213. The app package also includes XULRunner 31, but this is not enabled by default. The main issue is that mouse events are not relayed from XULrunner to SWT: <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=246830" rel="nofollow" class="external free">https://bugs.eclipse.org/bugs/show_bug.cgi?id=246830</a> . As a result, mouse hover does not work, and XOWA popups will not show.
  214. </p>
  215. <p>
  216. WebKit appears to be mostly functional, but it doesn't handle cursor changes. Hovering over a link won't change the cursor to a hand cursor. This appears to be an SWT issue, though the only known ticket is closed: <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=237562" rel="nofollow" class="external free">https://bugs.eclipse.org/bugs/show_bug.cgi?id=237562</a>
  217. </p>
  218. <p>
  219. The None mode is not supported on Mac OS X
  220. </p>
  221. <h3>
  222. <span class="mw-headline" id="Linux">Linux</span>
  223. </h3>
  224. <p>
  225. As of v2.6.5, XOWA uses XULRunner 24 with Linux.
  226. </p>
  227. <p>
  228. Unfortunately, XULRunner 31 is not yet implemented by SWT. See: <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=437700" rel="nofollow" class="external free">https://bugs.eclipse.org/bugs/show_bug.cgi?id=437700</a>
  229. </p>
  230. <p>
  231. Furthermore, XULRunner 24 requires GTK3 to be disabled since XULRunner is not yet ported to GTK3. See: <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=423870" rel="nofollow" class="external free">https://bugs.eclipse.org/bugs/show_bug.cgi?id=423870</a>
  232. </p>
  233. <p>
  234. XOWA accomplishes this by running the following in the xowa_linux_64.sh file "export SWT_GTK3=0 &amp;&amp; java -jar xowa_linux_64.jar"
  235. </p>
  236. <p>
  237. Neither WebKit nor None are supported on Linux.
  238. </p>
  239. </div>
  240. </div>
  241. </div>
  242. <div id="mw-head" class="noprint">
  243. <div id="left-navigation">
  244. <div id="p-namespaces" class="vectorTabs">
  245. <h3>Namespaces</h3>
  246. <ul>
  247. <li id="ca-nstab-main" class="selected"><span><a id="ca-nstab-main-href" href="index.html">Page</a></span></li>
  248. </ul>
  249. </div>
  250. </div>
  251. </div>
  252. <div id='mw-panel' class='noprint'>
  253. <div id='p-logo'>
  254. <a style="background-image: url(https://gnosygnu.github.io/xowa/xowa_logo.png);" href="http://xowa.org/" title="Visit the main page"></a>
  255. </div>
  256. <div class="portal" id='xowa-portal-home'>
  257. <h3>XOWA</h3>
  258. <div class="body">
  259. <ul>
  260. <li><a href="http://xowa.org/index.html" title='Visit the main page'>Main page</a></li>
  261. <li><a href="http://xowa.org/screenshots.html" title='See screenshots of XOWA'>Screenshots</a></li>
  262. <li><a href="https://www.youtube.com/watch?v=q0qbXYXEH6M" title="See a video of XOWA Desktop in action">Video</a></li>
  263. <li><a href="http://xowa.org/home/wiki/Help/Download_XOWA.html" title='Download the XOWA application'>Download XOWA</a></li>
  264. <li><a href="http://xowa.org/home/wiki/Dashboard/Image_databases.html" title='Download offline wikis and image databases'>Download wikis</a></li>
  265. </ul>
  266. </div>
  267. </div>
  268. <div class="portal" id='xowa-portal-started'>
  269. <h3>Getting started</h3>
  270. <div class="body">
  271. <ul>
  272. <li><a href="http://xowa.org/home/wiki/App/Setup/System_requirements.html" title='Get XOWA&apos;s system requirements'>Requirements</a></li>
  273. <li><a href="http://xowa.org/home/wiki/App/Setup/Installation.html" title='Get instructions for installing XOWA'>Installation</a></li>
  274. <li><a href="http://xowa.org/home/wiki/App/Import/Simple_Wikipedia.html" title='Learn how to set up Simple Wikipedia'>Simple Wikipedia</a></li>
  275. <li><a href="http://xowa.org/home/wiki/App/Import/English_Wikipedia.html" title='Learn how to set up English Wikipedia'>English Wikipedia</a></li>
  276. <li><a href="http://xowa.org/home/wiki/App/Import/Other_wikis.html" title='Learn how to set up other Wikipedias'>Other Wikipedias</a></li>
  277. </ul>
  278. </div>
  279. </div>
  280. <div class="portal" id='xowa-portal-android'>
  281. <h3>Android</h3>
  282. <div class="body">
  283. <ul>
  284. <li><a href="http://xowa.org/home/wiki/Android/Setup.html" title='Setup XOWA on your Android device'>Setup</a></li>
  285. <li><a href="https://www.youtube.com/watch?v=jsMTBxGweUw" title="See a video of XOWA Android in action">Video</a></li>
  286. </ul>
  287. </div>
  288. </div>
  289. <div class="portal" id='xowa-portal-help'>
  290. <h3>Help</h3>
  291. <div class="body">
  292. <ul>
  293. <li><a href="http://xowa.org/home/wiki/Help/About.html" title='Get more information about XOWA'>About</a></li>
  294. <li><a href="http://xowa.org/home/wiki/Help/Contents.html" title='View a list of help topics'>Contents</a></li>
  295. <li><a href="http://xowa.org/home/wiki/Help/Media.html" title='Read what others have written about XOWA'>Media</a></li>
  296. <li><a href="http://xowa.org/home/wiki/Help/Feedback.html" title='Questions? Comments? Leave feedback for XOWA'>Feedback</a></li>
  297. </ul>
  298. </div>
  299. </div>
  300. <div class="portal" id='xowa-portal-blog'>
  301. <h3>Blog</h3>
  302. <div class="body">
  303. <ul>
  304. <li><a href="http://xowa.org/home/wiki/Blog.html" title='Follow XOWA''s development process'>Current</a></li>
  305. </ul>
  306. </div>
  307. </div>
  308. <div class="portal" id='xowa-portal-links'>
  309. <h3>Links</h3>
  310. <div class="body">
  311. <ul>
  312. <li><a href="http://dumps.wikimedia.org/backup-index.html" title="Get wiki datababase dumps directly from Wikimedia">Wikimedia dumps</a></li>
  313. <li><a href="https://archive.org/search.php?query=xowa" title="Search archive.org for XOWA files">XOWA @ archive.org</a></li>
  314. <li><a href="http://en.wikipedia.org" title="Visit Wikipedia (and compare to XOWA!)">English Wikipedia</a></li>
  315. </ul>
  316. </div>
  317. </div>
  318. <div class="portal" id='xowa-portal-donate'>
  319. <h3>Donate</h3>
  320. <div class="body">
  321. <ul>
  322. <li><a href="https://archive.org/donate/index.php" title="Support archive.org!">archive.org</a></li><!-- listed first due to recent fire damages: http://blog.archive.org/2013/11/06/scanning-center-fire-please-help-rebuild/ -->
  323. <li><a href="https://donate.wikimedia.org/wiki/Special:FundraiserRedirector" title="Support Wikipedia!">Wikipedia</a></li>
  324. <li><a href="http://xowa.org/home/wiki/Help/Donate.html" title="Support XOWA!">XOWA</a></li>
  325. </ul>
  326. </div>
  327. </div>
  328. </div>
  329. </body>
  330. </html>