/****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
**   * Redistributions of source code must retain the above copyright
**     notice, this list of conditions and the following disclaimer.
**   * Redistributions in binary form must reproduce the above copyright
**     notice, this list of conditions and the following disclaimer in
**     the documentation and/or other materials provided with the
**     distribution.
**   * Neither the name of The Qt Company Ltd nor the names of its
**     contributors may be used to endorse or promote products derived
**     from this software without specific prior written permission.
**
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
**
** $QT_END_LICENSE$
**
****************************************************************************/

//! [0]
cd /tmp
gunzip qt-everywhere-opensource-src-4.8.7.tar.gz        # uncompress the archive
tar xvf qt-everywhere-opensource-src-4.8.7.tar          # unpack it
//! [0]


//! [1]
cd /tmp/qt-everywhere-opensource-src-4.8.7
./configure
//! [1]


//! [2]
make
//! [2]


//! [3]
make install
//! [3]


//! [4]
PATH               - to locate qmake, moc and other Qt tools
//! [4]


//! [5]
PATH=/usr/local/Trolltech/Qt-4.8.7/bin:$PATH
export PATH
//! [5]


//! [6]
setenv PATH /usr/local/Trolltech/Qt-4.8.7/bin:$PATH
//! [6]


//! [7]
PATH               - to locate qmake, moc and other Qt tools
//! [7]


//! [8]
C:
cd /D C:\Qt\4.8.7
configure
//! [8]


//! [9]
configure -platform win32-msvc
//! [9]


//! [10]
nmake
//! [10]


//! [11]
cd /tmp
gunzip qt-everywhere-opensource-src-4.8.7.tar.gz        # uncompress the archive
tar xvf qt-everywhere-opensource-src-4.8.7.tar          # unpack it
//! [11]


//! [12]
cd /tmp/qt-everywhere-opensource-src-4.8.7
./configure
//! [12]


//! [13]
make
//! [13]


//! [14]
sudo make -j1 install
//! [14]


//! [15]
PATH               - to locate qmake, moc and other Qt tools
//! [15]


//! [16]
PATH=/usr/local/Trolltech/Qt-4.8.7/bin:$PATH
export PATH
//! [16]


//! [17]
setenv PATH /usr/local/Trolltech/Qt-4.8.7/bin:$PATH
//! [17]


//! [18]
PATH               - to locate qmake, moc and other Qt tools
//! [18]


//! [19]
C:
cd \Qt\4.8.7
configure -platform win32-msvc2005 -xplatform wincewm50pocket-msvc2005
//! [19]


//! [20]
set INCLUDE=C:\Program Files\Microsoft Visual Studio 8\VC\ce\include;C:\Program Files\Windows CE Tools\wce500\Windows Mobile 5.0 Pocket PC SDK\Include\Armv4i
set LIB=C:\Program Files\Microsoft Visual Studio 8\VC\ce\lib\armv4i;C:\Program Files\Windows CE Tools\wce500\Windows Mobile 5.0 Pocket PC SDK\Lib\ARMV4I
set PATH=C:\Program Files\Microsoft Visual Studio 8\VC\ce\bin\x86_arm;%PATH%
//! [20]


//! [21]
setcepaths wincewm50pocket-msvc2005
//! [21]


//! [22]
nmake
//! [22]


//! [23]
cd \Qt\4.8.7
configure -platform win32-g++ -xplatform symbian-abld
//! [23]


//! [24]
make debug-winscw
//! [24]

//! [25]
cd examples
qmake
make
cd ..\demos
qmake
make 
//! [25]

//! [27]
make run
//! [27]

//! [28]
make release-armv5
//! [28]

//! [29]
cd src\s60installs
make sis QT_SIS_OPTIONS=-i QT_SIS_CERTIFICATE=<certificate file> QT_SIS_KEY=<certificate key file>
cd ..\3rdparty\webkit\WebCore
make sis QT_SIS_OPTIONS=-i QT_SIS_CERTIFICATE=<certificate file> QT_SIS_KEY=<certificate key file>
//! [29]

//! [30]
cd demos\embedded\fluidlauncher
make sis QT_SIS_OPTIONS=-i
//! [30]

//! [31]
cd \Qt\4.8.7
configure -platform win32-g++ -xplatform symbian-sbsv2
//! [31]

//! [32]
cd <Your SDK path>\S60CppExamples\Note\group
bldmake bldfiles
abld build winscw udeb
abld build gcce urel
//! [32]

//! [33]
SYMBIANBUILD_DEPENDENCYOFF=1
//! [33]

//! [34]
cd src\s60installs
make sis QT_SIS_OPTIONS=-i
cd ..\3rdparty\webkit\WebCore
make sis QT_SIS_OPTIONS=-i
//! [34]

//! [35]
cd src\s60installs
patch_capabilities.pl Qt_template.pkg release-armv5 "ALL -Tcb -AllFiles -DRM"
make sis QT_SIS_OPTIONS=-i QT_SIS_CERTIFICATE=<certificate file> QT_SIS_KEY=<certificate key file>
cd ..\3rdparty\webkit\WebCore
patch_capabilities.pl QtWebKit_template.pkg release-armv5 "ALL -Tcb -AllFiles -DRM"
make sis QT_SIS_OPTIONS=-i QT_SIS_CERTIFICATE=<certificate file> QT_SIS_KEY=<certificate key file>
//! [35]

//! [36]
EPOCROOT=/home/user/s60-sdk/
export EPOCROOT
//! [36]

//! [37]
PATH=/home/user/qt/4.8.7/bin:$EPOCROOT/epoc32/tools:$PATH
export PATH
//! [37]

//! [38]
cd /home/user/qt/4.8.7
./configure -platform linux-g++ -xplatform symbian-armcc
//! [38]

//! [39]
cd /home/user/qt/4.8.7
./configure -platform linux-g++ -xplatform symbian-gcce -no-webkit
//! [39]

//! [40]
make
//! [40]

//! [41]
cd src
make sis
//! [41]

//! [42]
cd src/s60installs
patch_capabilities.pl Qt_template.pkg - "ALL -Tcb -AllFiles -DRM"
make sis QT_SIS_CERTIFICATE=<certificate file> QT_SIS_KEY=<certificate key file>
cd ../3rdparty/webkit/WebCore
patch_capabilities.pl QtWebKit_template.pkg - "ALL -Tcb -AllFiles -DRM"
make sis QT_SIS_CERTIFICATE=<certificate file> QT_SIS_KEY=<certificate key file>
//! [42]

//! [43]
lsusb
//! [43]

//! [44]
sudo rmmod usbserial
sudo modprobe usbserial vendor=0x0XXX product=0x0XXX
//! [44]

//! [45]
$ qmake -version
QMake version 2.01a
Using Qt version 4.6.2 in /usr/lib/qt4
//! [45]

//! [46]
cd $HOME/runonphone
qmake
make
//! [46]

//! [47]
runonphone -s lib/Qt.sis
//! [47]

//! [runonphone with device file path]
runonphone -s lib/Qt.sis -p /dev/ttyUSB1
//! [runonphone with device file path]

//! [48]
cd demos/embedded/fluidlauncher
runonphone -s fluidlauncher.sis fluidlauncher.exe
//! [48]

//! [make runonphone with options]
make runonphone "QT_RUN_ON_PHONE_OPTIONS=-p /dev/ttyUSB1"
//! [make runonphone with options]

//! [make runonphone with preset environment variable]
export QT_RUN_ON_PHONE_OPTIONS="-p /dev/ttyUSB1"
make runonphone
//! [make runonphone with preset environment variable]

//! [49]
cd myapp
qmake
make
make sis
runonphone -s myapp.sis myapp.exe
//! [49]

//! [50]
src/s60installs/sqlite3.sis
$EPOCROOT/nokia_plugin/openc/s60opencsis/openc_ssl_s60_1_6_ss.sis
$EPOCROOT/nokia_plugin/openc/s60opencsis/pips_s60_1_6_ss.sis
$EPOCROOT/nokia_plugin/opencpp/s60opencppsis/stdcpp_s60_1_6_ss.sis
//! [50]


