Jump to content

Wikipedia:AutoWikiBrowser/Mono and Wine

From Wikipedia, the free encyclopedia

Information about running AWB on Mono/Wine.

Mono

[edit]

Status: ☒N Not yet usable for general use.

Mono setup

[edit]

Mono install (Linux)

[edit]
  • Get the packages/see the official guide at the Mono downloads page
  • Be sure to install mono, monodevelop, mono-devel, mono-nunit and any other packages for dependencies
  • perl is required for the build event to set the SVN revision number.

Mono install (macOS)

[edit]
  • Read the guide, and install MonoDevelop. Be sure to have MDK.
  • Stop right here -- There's no libgluezilla. You can try compiling the lib for macOS. MonoMac or Monobjc may be a solution, still.

Building AWB

[edit]
  • To run AWB under wine you must build under Mono version 3 (3.8 works). Mono version 4 enforces use of .NET 4 libraries that wine isn't happy with.
  • Open the AutoWikiBrowser no plugins project solution
  • Manually create the SvnInfo.cs file in WikiFunctions directory (copy the SvnInfo.template.cs file, write the version code if you want to).
  • If build fails due to WikiFunctions pre-build event, edit WikiFunctions.csproj to delete the text within the PreBuildEvent tags (at the end of the file)
  • rev 8712 and earlier: Make a change to the end of Resources.resx to fix the build error, then AWB will build (AWB rev 7686, opensuse 11.4 64-bit, MonoDevelop 2.4.2)
  • rev 8966 and later: download Microsoft.mshtml.dll and add a reference to the file in the AutoWikiBrowser project. Ensure the dll is placed alongside AutoWikiBrowser.exe when you run it.
  • Hint: Always try the Unit tests. Under Mono 3.8 around 5 sets of unit tests fail due to mono issues. Under Mono 4.2 all unit tests pass correctly.
  • If at runtime under Wine you get errors relating to System.Drawing version 4.0.0.0, disable the "use msbuild" option for WikiFunctions and AutoWikiBrowser projects in MonoDevelop and rebuild. If the build then fails due to missing .resources files, remove the obj directory in AWB/AWB/ (per MonoDevelop bug note) and rebuild.

Running under mono

[edit]
  • Disabling a couple of references to webbrowser in Main.cs will allow AWB to open cleanly (Mono 3.8 or Mono 4.2). Things such as list comparer, list filter, database scanner (Mono 3.8 gives error on large files, Mono 4.2 works cleanly) can be used.
  • The web browser component is not working. Installing libgluezilla does not work as libgluezilla gives a stack trace.
    • Therefore, cannot view diff or preview when editing pages.

Running unit tests (for developers)

[edit]
  • Mono: checkY Running unit tests under Mono using MonoDevelop all pass correctly with Mono 4.2.2 and rev 11894. With Mono 3.x some unit tests incorrectly fail.
  • NUnit via Wine checkY Running unit tests using NUnit through wine works, all tests run and pass successfully, as of AWB rev 10524.
    • Download pre-compiled Windows binaries (zip) from NUnit website
    • Run using wine nunit-x86.exe, open the UnitTests.nunit file.

Wine

[edit]

Status checkY Known to be generally working.

Setup and installation

[edit]

Getting Wine and Winetricks

[edit]
Ubuntu/Mint
[edit]
  1. Install Wine. Use the package installation tool of your choice, such as apt-get. If you prefer, direct downloads of Wine are here.
  2. Install Winetricks using the same installation tool. You'll need this to install additional components and DLLs used by AWB. Some distributions of Wine include Winetricks; others do not. For more information, see the Winetricks on the Wine wiki.
Fedora
[edit]
  1. Install Wine by running command sudo yum install wine
  2. Install Winetricks by running command wget http://winetricks.org/winetricks && chmod +x winetricks
openSUSE
[edit]

Just install wine and winetricks and any required dependencies via YaST/zypper.

Arch Linux
[edit]

Ensure the multilib repository is enabled by uncommenting or adding the following lines in /etc/pacman.conf:

[multilib]
Include = /etc/pacman.d/mirrorlist

Then, install wine and winetricks: pacman -S wine winetricks

macOS
[edit]
  1. If you don't have X11 installed (check by trying startx), install a working X11 environment from XQuartz.
  2. Use your package manager to install wine. If you don't have a package manager, consider using Homebrew:
    1. Head to brew.sh, and follow its instructions for installing Homebrew.
    2. Run brew install wine-stable to download and install wine. Append --devel for new bugfixes and potentially new bugs on the development branch. Read brew info wine-stable for informations and suggestions.
  3. Install Winetricks by running command curl https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks > winetricks && chmod +x winetricks.

Setting up the Wine environment

[edit]
  1. If your Wine environment is 64-bit (it is by default on 64-bit machines), you'll need to reconfigure it to 32-bit as .NET 2.0 requires a 32-bit environment. Use Terminal (i.e. the command-line) to adjust the WINEARCH variable by running the command WINEARCH=win32 winecfg. See this wiki section for more information. If you get the wine: WINEARCH set to win32 but '[PATH]' is a 64-bit installation. message, choose a different prefix in that previous command, or if this is your first time using WINE, delete the .wine folder specified by the path, then run the command again. This will recreate the Wine prefix with a 32-bit environment (i.e. WINEARCH=win32 WINEPREFIX=~/.local/share/wineprefixes/dotnet35 winetricks dotnet35).
  2. Use Winetricks to install dotnet35. You can use the Winetricks GUI to do this, although it can also be done in the command-line (winetricks dotnet35). This may require manual downloads, and make sure that all the required components are actually installed: you may need to rerun Winetricks to finish the installers.
    • November 2019 / TLS 1.2: from November 2019 it appears that Wikipedia requires HTTPS TLS 1.2 for connectivity, a known working setup for this is wine 4.19 and winetricks dotnet462 (wine 3.7 and dotnet462 did not work). If you're using an older Ubuntu/Debian package, you may need to get a newer version of winetricks otherwise it may fail to download the necessary files.
  3. Use Winetricks to install riched20. This enables usability features such as moving the edit window to the relevant line when clicking on a diff, and fixes an occasional but reproducible bug which adds blank lines without riched20.

Starting AWB

[edit]
  1. To start AWB, run command wine "path/to/AutoWikiBrowser.exe", putting the location of AutoWikiBrowser in the quotes.
  • AWB should be working, though there is a glitch in the diff view that is fixed by installing Internet Explorer. IE6 or IE8 have both been confirmed to be sufficient. As of September 2015, IE7 is the only version working well. Use winetricks ie7 to install it, and avoid installing IE8, as it would render AWB unusable.

Wine AppDb entry for AWB

[edit]

Please update this page or the Wine AppDb entry for AWB with further information on your experience.

What works

[edit]
  • Open AWB
  • Open Settings, save settings
  • General fixes, typo fixing, TypoScan plugin
  • Edit box, diff (with winetricks ie6), preview
  • Save pages
  • List comparer, list splitter
  • List providers (searches)
  • Custom modules
  • External processing
  • Logging

Known problem areas

[edit]
  • Database scanner, often fails after a few minutes or seconds before the scan has completed (with error "No access to memory location", Wine bug 40156). No current known workaround or solution for Wine. Database scanner works with wine 3.5 and winetricks dotnet40, was not working with wine 2.0.1 or earlier. Database scanner also works under Mono 4.2.
  • Find match/error/syntax highlighting winetricks riched20 fixes this.
  • Tooltips
    • Focus change: AWB 5.6.0.0 and earlier, up to SVN 11269: Tooltips can cause application focus to switch to the tooltip (could be Wine bug 9512). Workaround: in wine config, Graphics section (winecfg) uncheck "Allow the window manager to control the windows" and restart AWB, tooltips will then display without stealing focus, but this will mean AWB window isn't integrated with your system's window manager. Workaround implemented in AWB in rev 11270 and later, display of tooltip does not affect application focus.
    • Caching: there can sometimes be a caching/lag issue whereby tooltips fail to display the first time, or are shown once when they should not be. Focusing on another item that does have a tooltip generally causes the tooltip display to move on or catch up. No current known workaround or solution.
  • External Processing: in rev 11780 and earlier scripts may not work under Wine. Alternative solutions to running unix scripts with AWB. From rev 11780 scripts work using full Linux paths.

Tips & tricks

[edit]
  • You may get more frequent connection errors, especially on login/the first save, but just try again.
  • If you sometimes encounter the exception "attempted to read or write protected memory" and the wiki page you are processing has some Latin extended Unicode characters in it, change AWB's edit box font away from the Tahoma default to another TrueType font e.g. one of the Liberation sets. This should prevent the exception.

Wine on a Mac using homebrew

[edit]

AWB can be installed to run under Wine on a Mac using the Homebrew package management software. It may be possible using other package management systems like Fink, Gentoo/Alt, MacPorts, Pkgsrc or Rudix. See the main WineHQ - macOS page.

  • Install Homebrew.
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Or update homebrew and its formulas, if you already have Homebrew.
brew update
  • You may need to install XCode for brew to work fine and install the XCode command line tools. The brew installer will ask you to do so automatically.
xcode-select --install
  • Check for problems.
brew doctor and just in case, you may want to do it again: brew doctor
  • Make sure you have X11.
Run startx. If there's a "command not found" error—or similar—then you probably need an X11 client. Try XQuartz if you're not sure which one to use: http://xquartz.org
  • Install wine and winetricks: brew install wine winetricks
    • Sometime the dependencies of wine may need to be reinstalled, systems older than OS X 10.9 may need them installed with the --universal option. e.g.
brew rm libpng # warning may be issued about libraries like libpng
brew install libpng --universal

brew rm libusb-compat # no warning was issued about this library and it needed reinstalling
brew install libusb-compat --universal
  • Install .NET Framework 3.5 in wine, following the steps in #Setting up the Wine environment.
    • It may fail on wine msiexec /i XPSEP XP and Server 2003 32 bit.msi. Don't worry.
    • If the installation looks like it got stuck the window might just be hidden. Click on the icon in the menu bar to bring it back to foreground and confirm the dialog to continue.
  • Run AWB
wine AutoWikiBrowser.exe
  • AWB runs fine but does not clear the diff window so you will need to scroll to the bottom of the page.

CrossOver

[edit]

Wine's commercial version, CrossOver, has good and easy support for AWB. It works under Linux and Mac. (A free trial is available for 14 days.)