Developing Libreoffice for Windows... Without Windows

Developing Libreoffice for Windows... Without Windows

MinGW-64 & Wine: Developing LibreOffice for Windows... without Windows Fridrich Štrba, Software Engineer, SUSE on the behalf of the best Kendy ever. Why bother with cross-compilation? • Widely usable ‒ For tinderboxes, development or testing of Windows- specific parts of the codebase, etc. • Easy ‒ Easier to setup than native Windows build • Familiar environment for development ‒ When you are a Linux user, you just do everything the way you are used to when developing the Linux version • No excuses for anyone ‒ No more “I cannot test it on Windows” 2 First things first: Setup • Install MinGW packages from your distro ‒ Check http://cgit.freedesktop.org/libreoffice/core/tree/README.cross for details ‒ eg. on openSUSE, it is as easy as running the 'zypper' command twice ‒ Once to add the repository ‒ 2nd time to install the packages themselves ‒ Read the README.cross, you'll get a complete list there, and should there be anything missing, you will be warned during ./configure 3 Building it • In your LibreOffice clone, modify autogen.lastrun to look like this: CC=ccache i686-w64-mingw32-gcc CXX=ccache i686-w64-mingw32-g++ CC_FOR_BUILD=ccache gcc CXX_FOR_BUILD=ccache g++ --with-distro=LibreOfficeMinGW • Then the normal ./autogen.sh ‒ Watch out for problems, install the missing packages if necessary • And normal make ‒ The result is a tarball you can untar on Windows & run 4 Running it • You can unpack the resulting tarball on Windows ‒ & run it • But that is not convenient ‒ You have to transfer files here and there, set up a Windows virtual machine, or use another computer ‒ Worse when you want to develop – you have to remember if you have transferred the files you wanted etc. • Best is just to use Wine ‒ This way, you can continue developing on Linux, including debugging 5 Running the resulting build with Wine • Untar the result of the build: cd /tmp tar xf <your-build-dir>/instsetoo_native/wntgcci.pro/ LibreOffice_Dev/archive/install/en-US/ LibO-Dev_4.1.0.0.alpha0_Win_x86_install- arc_en-US.tar.gz cd LibO-Dev_4.1.0.0.alpha0_Win_x86_install- arc_en-US/LOdev\ 4.1/program/ • And run it ‒ wine soffice.exe 6 Debugging with Wine • You can debug ~everything with Wine ‒ Even Windows theming – in that case copy luna.msstyles from your Windows installation to your Linux box, and ‒ run winecfg ‒ Choose “Desktop Integration”, and install luna.msstyles there ‒ There is also many free alternative .msstyles files on the net, if you don't have Windows • Don't forget to use linkoo ‒ Symlinks just do the right thing, like make dev-install on Linux • Better experience with printf / SAL_DEBUG ‒ Winedbg usable, but it is just a very basic debugger 7 More details in http://cgit.freedesktop.org/libreoffice/core/tree/README.cross Just try it & no excuses! :-) Thank you. 8.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    8 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us