ultimatepp/uppbox/Scripts
amrein cc4e63de47 Add "buildrequires." prefix on debian and fedora files
git-svn-id: svn://ultimatepp.org/upp/trunk@10646 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2017-01-05 09:56:49 +00:00
..
all .lpbuild2: switched from testing to live 2012-05-14 05:32:19 +00:00
builddeb Scripts: Updated builddeb 2010-02-06 23:54:33 +00:00
CLANGMK.bm .uppbox replace -std=c++0x with -std=c++11 for GCC and CLANG build methods. 2016-12-25 20:23:58 +00:00
deb64 Fixed deb64 Script 2009-04-27 17:48:00 +00:00
debian install scripts added openssl-dev 2016-10-16 09:04:52 +00:00
doinstall uppbox: Scripts: Better clang support on install 2015-11-29 14:15:15 +00:00
domake Add "buildrequires." prefix on debian and fedora files 2017-01-05 09:56:49 +00:00
fedora .uppbox: Scripts 2016-12-25 09:43:46 +00:00
GCCMK.bm .uppbox replace -std=c++0x with -std=c++11 for GCC and CLANG build methods. 2016-12-25 20:23:58 +00:00
git-mirror .docs 2015-10-19 15:03:33 +00:00
idebuild added debian64 nighty builds 2009-04-26 13:13:21 +00:00
Makefile Scripts BSD src install fix 2009-04-19 11:22:02 +00:00
readme Drastically improve POSIX/X11 installation documentation in readme file too 2017-01-05 09:55:05 +00:00
Scripts.upp .uppbox 2016-12-25 08:58:58 +00:00
src Add "buildrequires." prefix on debian and fedora files 2017-01-05 09:56:49 +00:00
upgrade.sh .ubbox: Scripts 2012-09-07 12:59:07 +00:00
upp-devel.spec Rename upp.spec to upp-devel spec and fix U++ description line for rpmlint, fix "src" script accordingly and simplify sed command and remove tabs from "domake" script 2017-01-03 10:18:36 +00:00
upp.xml .web 2016-02-05 08:46:42 +00:00
uppdeb uppbox: libnotify in .deb fix 2010-01-24 21:45:24 +00:00
uppnighty2deb Fixed deb64 Script 2009-04-27 17:48:00 +00:00
win .uppbox 2016-03-26 18:03:18 +00:00
www .uppbox: Scripts: website generation removed from nightly builds 2011-10-25 20:13:20 +00:00

==== U++ POSIX/X11 installation
 ====


Standard POSIX/X11 distribution of U++ comes as a source tarball. If you want to run U++ graphical environnement (theide) or run U++ command line tool (umk), you will first need to compile and install U++.


=== Build Requires
 ===

Before compiling U++ source code, you must install a few developpement packages. Many POSIX/X11 distributions provides developpement packages with the same names. Sometimes, developpement package names don't match. You will have to find the corresponding names for your distribution.


== Build requires per distribution
 ==


= Debian/apt-get based distributions
 =

Build requires: g++  make  libgtk2.0-dev  libnotify-dev  libbz2-dev  sox

How to install them:

if sudo is available and enabled on your distribution, copy/paste this in a terminal:

$ sudo apt-get install  g++  make  libgtk2.0-dev  libnotify-dev  libbz2-dev  sox

if sudo is not available:

$ su -c 'apt-get install  g++  make  libgtk2.0-dev  libnotify-dev  libbz2-dev  sox'

The 'buildrequires.debian' file in U++ tarball contains apt-get commands to do the same thing. You can use this file by running 'sh buildrequires.debian' as root (e.g. 'sudo sh buildrequires.debian' if sudo is available or 'su -c "sh buildrequires.debian"' if not).


= Fedora based distributions
 =

Build requires:  gtk2-devel  pango-devel  atk-devel  cairo-devel  libnotify-devel  bzip2-devel xorg-x11-server-devel  freetype-devel  expat-devel

How to install them:

if sudo is available and enabled on your distribution, copy/paste this in a terminal:

$ sudo yum install  gtk2-devel  pango-devel  atk-devel  cairo-devel  libnotify-devel  bzip2-devel xorg-x11-server-devel  freetype-devel  expat-devel

if sudo is not available:

$ su -c 'yum install  gtk2-devel  pango-devel  atk-devel  cairo-devel  libnotify-devel  bzip2-devel xorg-x11-server-devel  freetype-devel  expat-devel'

The 'buildrequires.fedora' file in U++ tarball contains yum commands to do the same thing. You can use this file by running 'sh buildrequires.fedora' as root (e.g. 'sudo sh buildrequires.fedora' if sudo is available or 'su -c "sh buildrequires.fedora"' if not).


= Other rpm based distributions
 =

Redhat 7 build requires:  gtk2-devel pango-devel atk-devel cairo-devel libnotify-devel freetype-devel expat-devel bzip2-devel
OpenSuse build requires: gtk2-devel pango-devel atk-devel cairo-devel libnotify-devel xorg-x11-devel freetype2-devel libexpat-devel libbz2-devel


=== Compile U++ source code
 ===


== Standard U++ compilation
 ==

First, uncompress U++ source tarball and change dir into the new created directory.

Example: for upp-x11-src-10641.tar.gz

$ version=10641
$ tar zxvf upp-x11-src-$version.tar.gz
$ cd upp-x11-src-$version

Use 'make' to compile U++ and generate theide (U++ integrated development environment) and umk (commandline tool for building U++ projects) then run 'make install' to prepare standard U++ environment:

$ make
$ make install

Now you can start playing with U++ by invoking ~/theide.
You might want to put theide and umk elsewhere later, e.g. inside ~/bin/ for example

Note:. 'make install' copy theide and umk in your home directory but it also:

 * create ~/upp directory to store U++ library sources and copy the U++ sources inside
 * create ~/upp/MyApps to store your application sources
 * create ~/upp.out as output for intermediate files
 * set up a few variables in the '~/.upp' directory. Those variables are required by umk and .theide


 === Troubleshooting
 ===

If your POSIX/X11 distribution use an old gcc version (< 4.9), U++ compilation will fail because of missing gcc c++11 standard implementation. To solve this, you need to install and use clang++ compiler instead of g++.
In order to use clang++ as compiler, run make with those extra parameters:

$ make -e CXX="clang++" -e CXXFLAGS="-O3 -ffunction-sections -fdata-sections -Wno-logical-op-parentheses -std=c++11"
$ make install



=== U++ spec file for rpm based distribution
 ===

There is an alternative way to build U++ on rpm based distributions. Indead, U++ POSIX/X11 tarball contains a spec file for you to build a standard rpm binary and source file. To do that, first install U++ build requires and rpm-build:

== Fedora based distributions
 ==

if sudo is available and enabled on your distribution, copy/paste this in a terminal:

$ sudo yum install  gtk2-devel  pango-devel  atk-devel  cairo-devel  libnotify-devel  bzip2-devel xorg-x11-server-devel  freetype-devel  expat-devel
$ sudo yum install  rpm-build
$ version=10641
$ rpmbuild -ta upp-x11-src-$version.tar.gz

if sudo is not available:

$ su -c 'yum install  gtk2-devel  pango-devel  atk-devel  cairo-devel  libnotify-devel  bzip2-devel xorg-x11-server-devel  freetype-devel  expat-devel'
$ su -c 'yum install  rpm-build'
$ version=10641
$ rpmbuild -ta upp-x11-src-$version.tar.gz

Note : the rpm binary doesn't install U++ source in your home directory nor does it create needed configuration for U++ command line tool (umk) after installation. theide will take care of all this on first start.