Wikipedia:AutoWikiBrowser/Mono and Wine
Information about running AWB on Mono/Wine.
Mono
[edit]Parts of this Wikipedia page (those related to this section) need to be updated. The reason given is: API scan very ancient. MoMA should be replaced with .NET Portability Analyzer.. Please help update this Wikipedia page to reflect recent events or newly available information. Relevant discussion may be found on the talk page. (2020-07-18) Last update: 2013-05-06 |
Status: Not yet usable for general use.
- See http://tools.wmflabs.org/awb/mono/output.html
- AWB can be built under mono, but raises exceptions at runtime during load, and does not open cleanly.
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 theSvnInfo.template.cs
file, write the version code if you want to).- An incomplete shell version of SubWCRev: http://stackoverflow.com/questions/1954062/emulate-subwcrev-when-using-git-svn
- 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 aslibgluezilla
gives a stack trace.- Therefore, cannot view diff or preview when editing pages.
Running unit tests (for developers)
[edit]- Mono: 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 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 Known to be generally working.
Setup and installation
[edit]Getting Wine and Winetricks
[edit]Ubuntu/Mint
[edit]- Install Wine. Use the package installation tool of your choice, such as apt-get. If you prefer, direct downloads of Wine are here.
- 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]- Install Wine by running command
sudo yum install wine
- 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]- If you don't have X11 installed (check by trying
startx
), install a working X11 environment from XQuartz. - Use your package manager to install wine. If you don't have a package manager, consider using Homebrew:
- Head to brew.sh, and follow its instructions for installing Homebrew.
- Run
brew install wine-stable
to download and install wine. Append--devel
for new bugfixes and potentially new bugs on the development branch. Readbrew info wine-stable
for informations and suggestions.
- 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]- 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 thewine: 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
). - 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 ofwinetricks
otherwise it may fail to download the necessary files.
- 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
- 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]- 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.
- AWB should be working, though there is a glitch in the diff view that is fixed by installing Internet Explorer.
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 andwinetricks dotnet40
, was not working with wine 2.0.1 or earlier. Database scanner also works under Mono 4.2.Find match/error/syntax highlightingwinetricks 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 (Workaround implemented in AWB in rev 11270 and later, display of tooltip does not affect application focus.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. - 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.
- Focus change:
- 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]It has been suggested that this section be merged into Wikipedia:AutoWikiBrowser/Mono and Wine#Wine. (Discuss) |
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.
- Sometime the dependencies of wine may need to be reinstalled, systems older than OS X 10.9 may need them installed with the
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
- Sometimes you may want to change how the fonts are rendered so they look better. See manpage: fonts-conf for rendering stuffs and
wine winecfg
for changing the DPI setting of wine. — Preceding unsigned comment added by 222.65.178.5 (talk) 09:04, 11 September 2014 (UTC)
- Sometimes you may want to change how the fonts are rendered so they look better. See manpage: fonts-conf for rendering stuffs and
- 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.
- It may fail on
- 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.)
- Download and install the trial version from https://www.codeweavers.com/products.
- Install Microsoft .NET Framework 4.5.1 and choose Windows Vista or later when creating a new bottle.
- Run Command, browse to the AutoWikiBrowser.exe. Click Run.