用戶:Artoria2e5/Sandbox

wikt:1

閣下剛剛在維基百科上的編輯中插入了不可見字符數據範圍),建議閣下檢查並去除。謝謝。


閣下剛剛在維基百科上的編輯中直接用文字展開書寫了參考資料,而未使用{{cite}}系列模板。這樣做的壞處是系統不會生成機器可讀的COinS英語COinS元數據。要簡化插入引用模板的流程,可以在參數設置中的小工具勾選RefToolbar,或者也可以直接使用視覺化編輯器的自動引用生成功能。謝謝。

{{User:Artoria2e5/PRCoords.js}}

Temp for en:Wikipedia_talk:AutoWikiBrowser/Mono_and_Wine. TODOs: merge all UNIX stuffs together. Template:AWB tech menu

Information about running AWB on Mono/Wine.

Mono

Status:  N Not yet known to be working.

Mono setup

Mono install (Linux)

  • 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

Mono install (OS X)

  • 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 OS X. MonoMac or Monobjc may be a solution, still.

Building AWB

  • 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).
  • Template:Awbsvn and earlier: Make a change to the end of Resources.resx to fix the build error, then AWB will build (AWB Template:AWBSVN, opensuse 11.4 64-bit, MonoDevelop 2.4.2)
  • Template:Awbsvn 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. You should also remove the Copy.exe stuffs from all the .csproj files.
  • Hint: Always try the Unit tests. Simply replacing all the \r\n with \n fixes some faults in the tests.
  • TODO: Add #if __MonoCS__ stuffs for line endings, etc. This seperates the code. Or use ControlChars.NewLine.

Running under mono

  • On Linux install libgluezilla (provides WebBrowser support)
  • TODO: running Windows-compiled AWB gives exception on opening and goes no further

Wine

Status  Y Known to be generally working.

Setup and installation

Ubuntu/Mint

  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.
  3. 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.
  4. Use Winetricks to install dotnet35. You can use the Winetricks GUI to do this, although it can also be done in the command-line. 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.
  • 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. winetricks ie8

Fedora

  1. Install Wine by running command sudo yum install wine
  2. Install Winetricks by running command wget http://winetricks.org/winetricks && chmod +x winetricks
  3. 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.
  4. Install .NET Framework version 2 by running command ./winetricks dotnet35. Running ./winetricks dotnet40 will install .NET framework 4.0, but it is not compatible with AWB.
  5. To start AWB, run command wine "", putting the location of AutoWikiBrowser in the quotes.

opensuse

1. install wine and any required dependencies via YaST/zypper

2. Run command export WINEARCH=win32 (as .NET 2 or 3.5 requires 32-bit environment).

3. Run command winetricks msxml3 dotnet35 corefonts gdiplus riched20 ie6

  • msxml3 Required for dotnet35 to install successfully.
  • dotnet35 Required. Provides the Microsoft .NET framework version 3.5, you won't get anywhere without this. .NET version 2.0 or higher is mandatory for AWB, .NET 3.5 will give better performance for certain operations such as list deduplication.
  • riched20 Recommended. May be required for dotnet35 to install successfully.
  • gdiplus Obsolete? Previously required to work around Wine bug 21798, may no longer be required.
  • riched20 Recommended. Works around issues described by Wine bug 12458 (in AWB: click on diff to focus text box there, double click on diff to undo).
  • ie6 Required. If not installed each diff will be appended to the previous as you process multiple articles.

If you have problems with dotnet35, you can try winetricks dotnet20 gdiplus riched20 ie6. AWB will work with .NET 2.0 but certain operations such as list deduplication will be slower.

4. When using Template:Awbsvn and later: download Microsoft.mshtml.dll and ensure the dll is placed alongside AutoWikiBrowser.exe before you run AWB. If not single click on diff to focus edit box will have no effect.

Wine AppDb entry for AWB

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

What works

  • Open AWB
  • Open Settings, save settings
  • General fixes, typo fixing, TypoScan plugin
  • Edit box, diff
  • Save pages

Known problem areas

  • Database scanner
  • Find match/error/syntax highlighting riched20 winetrick fixes this.
  • 'Open in browser': if compiling your own AWB, change Tools.OpenURLInBrowser() to pass '/usr/bin/firefox' (or the path to the executable of your browser) as the first argument to the System.Diagnostics.Process.Start() call.

Tips & tricks

  • You may get more frequent connection errors, especially on login/the first save, but just try again.
  • Turn off the highlighting options to avoid errors over them not working.
  • 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

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 - Mac OS X page.

  • Install Homebrew.
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/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
  • Make sure you have X11.
Run startx and see what happened. If there is a command not find error, install one.
XQuartz is recommend as an X11 client: http://xquartz.macosforge.org/
  • Install wine and winetricks.
Append --devel after wine if you want to get the development version of wine, which often contains more support for Windows APIs. Be ready to waste some time compiling the packages. Use --HEAD instead --devel to get the git HEAD wine, which may be really buggy. Read brew info wine for informations and suggestions.
brew install wine winetricks
  • Sometime the dependancies 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
  • 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)
  • Install .NET Framework 3.5 in wine, using winetricks
winetricks dotnet35
  • The first time this is run it will print a lot of ignorable fixme: error messages and then ask you to download netframework3.exe from www.oldversion.com. Follow the instructions, and then run again:
winetricks dotnet35
It will install various service packs. It may fail on wine msiexec /i XPSEP XP and Server 2003 32 bit.msi. Don't worry.
  • You can also install .NET framework 2.0 SP2 or any other version of .NET Framework 2.0 instead, but they're slower:
winetricks dotnet20sp2
  • 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.