Difference between revisions of "Compilation"

From Sim-Im
Jump to navigation Jump to search
m (Reverted edit of JosephPorter, changed back to last version by Shaplov)
 
(25 intermediate revisions by 8 users not shown)
Line 1: Line 1:
'''SVN snapshots compilation:'''
+
<div style="float: right;">__TOC__</div>
  
1. make -f admin/Makefile.common<br>
+
=== Linux Build ===
2. ./configure<br>
+
 
3. make<br>
+
[[Building with CMake]]
4. make install<br>
+
 
5. Start SIM :-)<br>
+
[[Building with Cmake FAQ]]
 +
 
 +
===SVN snapshots compilation===
 +
To build SIM you should have automake-1.5 and autoconf-2.53, however, autoconf 2.13 works too, you just need to hack admin/cvs.sh to turn off "exit 1" on version check. Note that you will be unable to compile icq plugin without SSL support.
 +
 
 +
====Requirements====
 +
*[http://www.zlib.net/ zlib ]
 +
*[http://xmlsoft.org/ libxml2 ]
 +
*[http://xmlsoft.org/XSLT/ libxslt ]
 +
*[http://www.openssl.org/ OpenSSL ]
 +
*[http://www.perl.org/ Perl ]
 +
*[http://www.info-zip.org/pub/infozip/Zip.html#Win32 zip]
 +
*[http://www.monmouth.com/~wstreett/lex-yacc/lex-yacc.html flex]
 +
*[http://www.trolltech.com QT]
 +
*[http://www.kde.org KDE] - optional
 +
*[http://aspell.net/ aspell] - Optional, for spellchecker plugin
 +
 
 +
====Compilation====
 +
* make -f admin/Makefile.common<br>
 +
* ./configure --prefix=<your_installation_path><br>
 +
* make<br>
 +
* sudo make install<br>
 +
* Start SIM :-)<br>
 +
 
 +
If your system doesnt support 'sudo' command try to use 'su' instead.<br>
 +
See "./configure --help" for more options, specially for --enable-final and --disable-debug.
 +
 
 +
To compile plugins you should run:
 +
* cd plugins/<plugin_name>
 +
* make
 +
* sudo make install
 +
 
 +
----
 +
 
 +
===MINGW compilation===
 +
 
 +
====Requirements====
 +
*[http://mingw.org/download.shtml Mingw and Msys]
 +
*[http://sourceforge.net/projects/qtwin Q..3/Windows ]
 +
*[http://www.zlib.net/ zlib ]
 +
*[http://xmlsoft.org/ libxml2 ]
 +
*[http://xmlsoft.org/XSLT/ libxslt ]
 +
*[http://www.openssl.org/ OpenSSL ]
 +
*[http://www.activestate.com/Products/ActivePerl/?mp=1 Perl ]
 +
*[http://www.info-zip.org/pub/infozip/Zip.html#Win32 zip]
 +
*[http://sourceforge.net/project/showfiles.php?group_id=23617&package_id=16424 flex]
 +
*[http://aspell.net/win32/ aspell] - Optional, for spellchecker plugin
 +
 
 +
 
 +
====Toolchain setup====
 +
*Install Mingw. You need to install gcc-core, g++, binutils, w32api, mingw32-make. Add mingw's bin directory to %PATH%
 +
*Install Msys. You need MSYS-1.0.10.exe
 +
*Compile Q..3/Windows. Extract sources somewhere. Then create dirs "include", "include/private" in this folder. Then run configure-mingw.bat. Add Q..3's bin directory to %PATH%
 +
*Compile and install zlib. specify --prefix=/mingw option to ./configure script, then make&&make install.
 +
*Compile and install libxml2. specify --prefix=/mingw option to ./configure script, then make&&make install.
 +
*Compile and install libxslt. specify --prefix=/mingw option to ./configure script, then make&&make install.
 +
*Compile and install OpenSSL. Extract sources, then run "ms\mingw32 no-asm". Then install as specified in INSTALL.W32 file into your Mingw installation dir.
 +
*Install Perl. Add Perl's bin directory to %PATH%
 +
*Install zip. Extract and put zip.exe in some dir in your %PATH%
 +
*Install Flex. Extract and put flex.exe in some dir in your %PATH%.
 +
*Install Aspell. You need this only if you want to compile spell plugin. Download development package for win32 aspell. Then extract include folder into mingw root folder, then put lib\libaspell-15-dll.lib into lib\libaspell.a, lib\libpspell-15-dll.lib into lib\libpspell.la in mingw root folder.
 +
 
 +
====Compilation and Installation====
 +
*make -f admin/Makefile.common unfortunally doesn't work under Msys. This must be performed under Cygwin or some other *nix environment.
 +
*./configure --disable-kde --enable-win --with-qt-dir=... --with-ssl-dir=...
 +
*make
 +
*make INSTALL=install DESTDIR=/yor/destdir. After this you must manually put sim files in this layout:
 +
/icons <br>
 +
/pict <br>
 +
/plugins <br>
 +
/po <br>
 +
/sounds <br>
 +
/styles <br>
 +
/libsim-0.dll <br>
 +
/sim.exe <br>
 +
*Or you can compile [http://nsis.sourceforge.net/Main_Page NSIS] installer script install_win32\mingw\sim.nsi
 +
 
 +
----
 +
===Win32-MSVC compilation===
 +
 
 +
====Requirements====
 +
* TortoiseSVN for getting the Sources
 +
* Visual C++ 2005 Express + Platform SDK Core 2003
 +
*[http://qtwin.sf.net Q/Free (Q../free 3.3.*.*) ]
 +
*[http://www.zlib.net/ zlib ] [1]
 +
*[http://xmlsoft.org/ libxml2 ] [1]
 +
*[http://xmlsoft.org/XSLT/ libxslt ] [1]
 +
*[http://www.openssl.org/ OpenSSL ] [1]
 +
*[http://www.gnu.org/software/libiconv/ iconv ] [1] ( [1:] which are already in Project now.)
 +
*[http://java.sun.com Java Runtime (jar.exe) ] for creating the jisp's, add jre\bin or jdk\bin to path
 +
or
 +
*[http://fastjar.sourceforge.net/ fastJar ] for creating the jisp's, %pathToFastJar% to path
 +
*[http://www.gnu.org/software/bison/ Bison ] && [http://flex.sourceforge.net/ Flex ] for lexing the .ll files
 +
*[http://aspell.net/ aspell] - Optional, for spellchecker plugin
 +
 
 +
====Compilation and Installation====
 +
*Compile Q..3/Windows. Extract sources somewhere. Then create dirs "include", "include/private" in this folder. Then run configure-msvc2005.bat -debug (or without Release). Add Q..3's bin directory to %PATH%
 +
* Build qt3\tools\msg2qm
 +
* Put msg2qm.exe in path for compiling the po-files or simple copy it to %windir%\system32\ .
 +
*Compile and install zlib. specify --prefix=c:/libs option to ./configure script, then make&&make install.
 +
*Compile and install libxml2. specify --prefix=c:/libs option to ./configure script, then make&&make install.
 +
*Compile and install libxslt. specify --prefix=c:/libs option to ./configure script, then make&&make install.
 +
*Compile and install OpenSSL. Extract sources, then run "ms\msvc no-asm". Then install as specified in INSTALL.W32.
 +
 
 +
* Environment vars (examples) to set:
 +
 
 +
** QTDIR="C:\qt3"
 +
** QTLIB="qt-mt3.lib"
 +
 
 +
* Environment vars (examples):
 +
** QTDIR="C:\qt3"
 +
** Path=%Path%;%QTDIR%\bin
 +
** QTLIB="qt-mt3.lib"
 +
** OPENSSL_DIR="c:\openssl"
 +
 
 +
* Visual C++ Configuration:
 +
** set Executable Directories
 +
*** Java-jdk\bin
 +
 
 +
** set Include Directories
 +
*** FLEX-2.5.4A-1-BIN\INCLUDE (or newer version)
 +
*** aspell-0.60.2\interfaces\cc
 +
 
 +
** set Library Directories:
 +
****%QTDIR%\Lib
 +
 
 +
 
 +
----
 +
===compilation with CMake===
 +
 
 +
====Requirements====
 +
* [http://tortoisesvn.tigris.org/ TortoiseSVN for getting the Sources]
 +
* [http://www.cmake.org/ CMake 2.4.2]
 +
* Qt3 for your platform
 +
* A supported compiler (linux: gcc; win32: MinGW, Visual Studio >= 7)
 +
* LibXML2
 +
* LibXSLT
 +
* zlib
 +
* Iconv (when you want to compile SIM-IM on win32)
 +
* OpenSSL (optional, required for some plugins)
 +
* ASpell (optional, required for spell plugin)
 +
 
 +
* Once you've installed all requried packages, make sure you've set the following environment variables correct-
 +
** QTDIR (the path to your Qt3 installation)
 +
** CMAKE_INCLUDE_PATH (all paths to the headers of the installed packages - for example D:\Programm\GnuWin32\Include;D:\Programm\OpneSSL\Include)
 +
** CMAKE_LIBRARY_PATH (all paths to the libraries of the installed packages - for example D:\Programm\GnuWin32\Lib;D:\Programm\OpenSSL\Lib\MSVC)
 +
 
 +
* After you've checked out the sources, create a new directory 'sim-im-build'.
 +
* Now you can call cmake (or cmakesetup on win32) by switching into 'sim-im-build':
 +
** cmake ..\sim-im
 +
 
 +
* When cmake is ready and all required packages were found you can start compiling sim with 'make' (or mingw-32make or nmake)

Latest revision as of 09:59, 8 March 2013

Linux Build

Building with CMake

Building with Cmake FAQ

SVN snapshots compilation

To build SIM you should have automake-1.5 and autoconf-2.53, however, autoconf 2.13 works too, you just need to hack admin/cvs.sh to turn off "exit 1" on version check. Note that you will be unable to compile icq plugin without SSL support.

Requirements

Compilation

  • make -f admin/Makefile.common
  • ./configure --prefix=<your_installation_path>
  • make
  • sudo make install
  • Start SIM :-)

If your system doesnt support 'sudo' command try to use 'su' instead.
See "./configure --help" for more options, specially for --enable-final and --disable-debug.

To compile plugins you should run:

  • cd plugins/<plugin_name>
  • make
  • sudo make install

MINGW compilation

Requirements


Toolchain setup

  • Install Mingw. You need to install gcc-core, g++, binutils, w32api, mingw32-make. Add mingw's bin directory to %PATH%
  • Install Msys. You need MSYS-1.0.10.exe
  • Compile Q..3/Windows. Extract sources somewhere. Then create dirs "include", "include/private" in this folder. Then run configure-mingw.bat. Add Q..3's bin directory to %PATH%
  • Compile and install zlib. specify --prefix=/mingw option to ./configure script, then make&&make install.
  • Compile and install libxml2. specify --prefix=/mingw option to ./configure script, then make&&make install.
  • Compile and install libxslt. specify --prefix=/mingw option to ./configure script, then make&&make install.
  • Compile and install OpenSSL. Extract sources, then run "ms\mingw32 no-asm". Then install as specified in INSTALL.W32 file into your Mingw installation dir.
  • Install Perl. Add Perl's bin directory to %PATH%
  • Install zip. Extract and put zip.exe in some dir in your %PATH%
  • Install Flex. Extract and put flex.exe in some dir in your %PATH%.
  • Install Aspell. You need this only if you want to compile spell plugin. Download development package for win32 aspell. Then extract include folder into mingw root folder, then put lib\libaspell-15-dll.lib into lib\libaspell.a, lib\libpspell-15-dll.lib into lib\libpspell.la in mingw root folder.

Compilation and Installation

  • make -f admin/Makefile.common unfortunally doesn't work under Msys. This must be performed under Cygwin or some other *nix environment.
  • ./configure --disable-kde --enable-win --with-qt-dir=... --with-ssl-dir=...
  • make
  • make INSTALL=install DESTDIR=/yor/destdir. After this you must manually put sim files in this layout:

/icons
/pict
/plugins
/po
/sounds
/styles
/libsim-0.dll
/sim.exe

  • Or you can compile NSIS installer script install_win32\mingw\sim.nsi

Win32-MSVC compilation

Requirements

or

  • fastJar for creating the jisp's, %pathToFastJar% to path
  • Bison && Flex for lexing the .ll files
  • aspell - Optional, for spellchecker plugin

Compilation and Installation

  • Compile Q..3/Windows. Extract sources somewhere. Then create dirs "include", "include/private" in this folder. Then run configure-msvc2005.bat -debug (or without Release). Add Q..3's bin directory to %PATH%
  • Build qt3\tools\msg2qm
  • Put msg2qm.exe in path for compiling the po-files or simple copy it to %windir%\system32\ .
  • Compile and install zlib. specify --prefix=c:/libs option to ./configure script, then make&&make install.
  • Compile and install libxml2. specify --prefix=c:/libs option to ./configure script, then make&&make install.
  • Compile and install libxslt. specify --prefix=c:/libs option to ./configure script, then make&&make install.
  • Compile and install OpenSSL. Extract sources, then run "ms\msvc no-asm". Then install as specified in INSTALL.W32.
  • Environment vars (examples) to set:
    • QTDIR="C:\qt3"
    • QTLIB="qt-mt3.lib"
  • Environment vars (examples):
    • QTDIR="C:\qt3"
    • Path=%Path%;%QTDIR%\bin
    • QTLIB="qt-mt3.lib"
    • OPENSSL_DIR="c:\openssl"
  • Visual C++ Configuration:
    • set Executable Directories
      • Java-jdk\bin
    • set Include Directories
      • FLEX-2.5.4A-1-BIN\INCLUDE (or newer version)
      • aspell-0.60.2\interfaces\cc
    • set Library Directories:
        • %QTDIR%\Lib



compilation with CMake

Requirements

  • TortoiseSVN for getting the Sources
  • CMake 2.4.2
  • Qt3 for your platform
  • A supported compiler (linux: gcc; win32: MinGW, Visual Studio >= 7)
  • LibXML2
  • LibXSLT
  • zlib
  • Iconv (when you want to compile SIM-IM on win32)
  • OpenSSL (optional, required for some plugins)
  • ASpell (optional, required for spell plugin)
  • Once you've installed all requried packages, make sure you've set the following environment variables correct-
    • QTDIR (the path to your Qt3 installation)
    • CMAKE_INCLUDE_PATH (all paths to the headers of the installed packages - for example D:\Programm\GnuWin32\Include;D:\Programm\OpneSSL\Include)
    • CMAKE_LIBRARY_PATH (all paths to the libraries of the installed packages - for example D:\Programm\GnuWin32\Lib;D:\Programm\OpenSSL\Lib\MSVC)
  • After you've checked out the sources, create a new directory 'sim-im-build'.
  • Now you can call cmake (or cmakesetup on win32) by switching into 'sim-im-build':
    • cmake ..\sim-im
  • When cmake is ready and all required packages were found you can start compiling sim with 'make' (or mingw-32make or nmake)