* All dependency packages in the RPMS folder where taken verbatim from: http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_11.4/noarch/ All packages in this repository are built using a mingw/msys/gcc,g++ toolchain. * Please don't mix and match packages from different sources (unless it's absolutely necessary) , as that tends to result in obscure and hard to track down bugs. * Using the above packages has three drawbacks: 1. You can't use C++ based packages from that repository, as the mingw/msys/g++ generated libraries are incompatible with the MSVS C++ compiler. 2. You can't share file descriptors between libraries from that repository and AbiWord (and its plugins). This is because they use a different runtime environment. 3. Whenever you update a library, you need to relink it with the MSVC linker. Without relinking, the MSVS C++ linker can't link against the minwg/msys/gcc generated libaries. The procedure is described below. * To update a package, download it from the repository above, and run ./build-prefix.sh on a Linux/Unix machine. This builds a 'Prefix' directory that can be compared with the 'Prefix' directory from the abiword-msvc2008 module. Carefully copy the changes / updates over, and commit them. On Windows you can use 7zip ( http://www.7-zip.org/ ) to extract the RPM files. * If you are adding or updating a dependency, then you should relink its .dll files. This will generate .lib files that the MSVS C++ linker can link against. 1. First of all, make sure the MSVC linker is in your path. On most Windows this can be done by right clicking on My Computer on your desktop. Then go to Properties -> Advanced. Then click on the Environment Variables button. Highlight the Path variable and click Edit. Now add the following directories to your path: C:\Program Files\Microsoft Visual Studio 9.0\VC\bin C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE This is assuming you installed MSVC under C:\Program Files\Microsoft Visual Studio 9.0. Adjust the location if needed for your system. Separate the directories from each other and the existing path setting using a ";" character. You only need to do this step once. 2. A utility called pexports.exe is located in the same directory as this README file. Copy this pexports.exe to your computer, and add its location to your path as well. You can use the same procedure as described in step 1. Complete this step by logging out and logging back in to make the new path settings take effect. You only need to do this step once. 3. You can now relink every DLL you want to use in AbiWord by executing the following steps: - Open a command shell (Start -> Run -> cmd.exe) - Change into the directory where the DLLs are located, for example: cd c:\AbiWordSource\msvc2008\Prefix\bin This assumes you checked out the AbiWord source code in c:\AbiWordSrc, and the MSVC project files in c:\AbiWordSrc\msvc2008. Adjust this to your locations. - Extract the symbols from the DLL using the pexports tool. For example, if we want to link against libcairo-2.dll, execute: pexports libcairo-2.dll > ..\lib\libcairo-2.def By convention we name the .def file identical to the name of the DLL file, except with a different extension. - Change into the library directory: cd ..\lib - Relink the DLL file, creating a .lib file for use in MSVC. Continuing the above example, we get: lib -machine:X86 -name:libcairo-2.dll -def:libcairo-2.def -out:libcairo.lib By convention, we name the .lib file identical to the existing gcc-created library, except with a different extension. Note that libraries created by gcc can be recognized by their .dll.a extension. For example, in the lib directory a library named libcairo.dll.a already exists, so we reused that name to create libcairo.lib. A libcairo.exp file is also created in the process. - Commit the .def, .lib and .exp files that are created in the lib directory. In the above examples those were libcairo-2.def, libcairo.lib and libcairo.exp. 4. Use the newly created .lib file to link against in your MSVC project file. If you for example want to link LibAbiWord.dll against the libcairo-2.dll from step 3, then: - Right click on the LibAbiWord project in MSVC, and select Properties - Go to Configuration Properties -> Linker -> Input - In the Additional Dependencies field, and the .lib file you created in step 3, in this case libcairo.lib. NOTE: make sure to perform this step for *both* the Debug and Release configurations. 5. When you run AbiWord from within MSVC, you need to have the new DLL files placed into the proper bin directory. We do that by copying the needed DLLs in place using a post-build event. If you for example added the libcairo-2.dll as a dependency to LibAbiWord, then: - Right click on the LibAbiWord project in MSVC, and select Properties - Go to Configuration Properties -> Build Events -> Post-Build Event - In the Command Line field, add a line to copy the DLL file over, like: xcopy /Y "$(SolutionDir)\Prefix\bin\libcairo-2.dll" "$(OutDir)\bin" NOTE: make sure to perform this step for *both* the Debug and Release configurations. * The only dependencies that did not came from the above repository are: Package Remarks ------- -------------------------------------------------- gtkmathview Since this is a C++ package, you can't mix it with the mingw/msys/g++ toolchain used for the suse repo. We used the stock gtkmathview 0.8.0 source release, added an MSVC project file, and some patches to make it build. Part of the patches were already upstream, but in a slightly different way, so we can't just send our patches upstream and expect them to apply. Tarball: http://helm.cs.unibo.it/mml-widget/sources/gtkmathview-0.8.0.tar.gz MSVC project: TODO write me Custom patches: TODO write me libwpd Since this is a C++ package, you can't mix it with the mingw/msys/g++ toolchain used for the suse repo. TODO: where did we get it, write me libwps Since this is a C++ package, you can't mix it with the mingw/msys/g++ toolchain used for the suse repo. TODO: where did we get it, write me