This file is indexed.

/usr/share/qt5/doc/qtdoc/windowsce-customization.html is in qt5-doc-html 5.3.2-3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- wince-customization.qdoc -->
  <title>Windows CE - Working with Custom SDKs | QtDoc 5.3</title>
  <link rel="stylesheet" type="text/css" href="style/offline.css" />
</head>
<body>
<div class="header" id="qtdocheader">
    <div class="main">
    <div class="main-rounded">
        <div class="navigationbar">
        <ul>
<li><a href="index.html">Qt 5.3</a></li>
<li>Windows CE - Working with Custom SDKs</li>
<li id="buildversion">
Qt 5.3.2 Reference Documentation</li>
    </ul>
    </div>
</div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#creating-a-custom-build-specification">Creating a Custom Build Specification</a></li>
<li class="level1"><a href="#fine-tuning-options">Fine-Tuning Options</a></li>
<li class="level1"><a href="#cross-compilation-environment-for-a-custom-sdk">Cross-compilation Environment for a Custom SDK</a></li>
<li class="level1"><a href="#compiling-qt-for-a-custom-sdk">Compiling Qt for a Custom SDK</a></li>
<li class="level1"><a href="#making-qt-applications-start-on-a-custom-device">Making Qt Applications Start on a Custom Device</a></li>
</ul>
</div>
<h1 class="title">Windows CE - Working with Custom SDKs</h1>
<span class="subtitle"></span>
<!-- $$$windowsce-customization.html-description -->
<div class="descr"> <a name="details"></a>
<p>When working with a custom SDK for Windows CE, Qt provides an easy way to add support for it to your development environment. The following is a tutorial that covers how to create a specification for Qt for Windows CE platforms.</p>
<a name="creating-a-custom-build-specification"></a>
<h2>Creating a Custom Build Specification</h2>
<p>Create a subdirectory in the <tt>mkspecs</tt> folder of the Qt directory. New specifications for Qt for Windows CE following this naming convention:</p>
<pre class="cpp">wince<span class="operator">&lt;</span>version<span class="operator">&gt;</span><span class="operator">&lt;</span>SDK<span class="operator">-</span>shortcut<span class="operator">&gt;</span><span class="operator">-</span><span class="operator">[</span>architecture<span class="operator">]</span><span class="operator">-</span>msvc2005</pre>
<p>Using this convention makes it possible for <a href="../qmake/qmake-manual.html#qmake">qmake</a> to identify that you are building Qt for Windows CE, and will customize the compilation process accordingly.</p>
<p>Create the files <tt>qmake.conf</tt> and <tt>qplatformdefs.h</tt> inside the new specification directory. Take a look at the implementation of the other Windows CE specifications included in the <tt>mkspecs</tt> directory to see what is required to build Qt for Windows CE successfully.</p>
<a name="fine-tuning-options"></a>
<h2>Fine-Tuning Options</h2>
<p>Compared to the desktop versions, Qt for Windows CE needs two additional options:</p>
<ul>
<li><b>CE_SDK</b> specifies the name of the SDK.</li>
<li><b>CE_ARCH</b> specifies information about the target architecture.</li>
</ul>
<p>Following is an example configuration for a custom SDK we call &quot;CustomSDK&quot;:</p>
<pre class="cpp">CE_SDK        <span class="operator">=</span> Windows Mobile <span class="number">5.0</span> Pocket PC SDK
CE_ARCH       <span class="operator">=</span> ARMV4I</pre>
<p><b>Note: </b>Running <a href="../qmake/qmake-manual.html#qmake">qmake</a> to generate Visual Studio project files for Windows CE currently does not produce valid output..</p><p>Additionally, most Windows CE SDKs use extra compiler options. These can be specified by expanding the <tt>DEFINES</tt> value.</p>
<p>For example, with CustomSDK, the <tt>DEFINES</tt> variable is expanded in the following way:</p>
<pre class="cpp">DEFINES <span class="operator">+</span><span class="operator">=</span> QT_NO_CLIPBOARD QT_NO_ACCESSIBILITY QT_NO_NATIVE_GESTURES QT_NOSTANDARDSHELL_UI_MODEL _CRT_SECURE_NO_DEPRECATE _WIN32_WCE<span class="operator">=</span><span class="number">0x700</span> $$CE_ARCH _AMRV7_ armv7 _ARM_</pre>
<a name="cross-compilation-environment-for-a-custom-sdk"></a>
<h2>Cross-compilation Environment for a Custom SDK</h2>
<p>Qt for Windows CE only requires that the mkspec that is specified with -xplatform is setup as mentioned <a href="#fine-tuning-options">above</a>.</p>
<p>The selection of the custom SDK environment will happen by concatenating <tt>CE_SDK</tt> and <tt>CE_ARCH</tt>. This builds a string that can be found in &quot;<i>%ProgramFiles%\Microsoft Visual Studio 9.0\VC\vcpackages\WCE.VCPlatform.xml</i>&quot; and contains the correct environment. If you are unsure about the SDK name and Arch for your SDK you can find it in this file.</p>
<a name="compiling-qt-for-a-custom-sdk"></a>
<h2>Compiling Qt for a Custom SDK</h2>
<p>Windows CE is highly customizable, hence it is possible that some SDKs have feature-stripped setups. Depending on the SDK's configuration, Qt may not compile in its standard configuration, as Qt for Windows CE is designed to be compatible with the Standard SDK setup. Every Makefile qmake generates that is not flagged to build for the host system will build WindowsCE projects for the SDK Qt was built with. There is no need to set a custom environment besides the Visual Studio 2005/2008 environment.</p>
<p>However, it is possible to exclude features of Qt and create a version that compiles for the desired SDK.</p>
<a name="making-qt-applications-start-on-a-custom-device"></a>
<h2>Making Qt Applications Start on a Custom Device</h2>
<p>Sometimes, a Windows CE device has been created with a configuration different from the corresponding SDK's configuration. In this case, symbols that were available at linking stage will be missing from the run-time libraries.</p>
<p>Unfortunately, the operating system will not provide an error message that mentions which symbols are absent. Instead, a message box with the following message will appear:</p>
<p><tt>app.exe is not a valid CE application!</tt></p>
<p>To identify the missing symbols, you need to create a temporary application that attempts to dynamically load the Qt for Windows CE libraries using <tt>LoadLibrary</tt>. The following code can be used for this:</p>
<pre class="cpp"><span class="keyword">wchar_t</span><span class="operator">*</span> libraries<span class="operator">[</span><span class="operator">]</span> <span class="operator">=</span> {
    L<span class="string">&quot;QtCore4.dll&quot;</span><span class="operator">,</span>
    L<span class="string">&quot;QtGui4.dll&quot;</span><span class="operator">,</span>
    <span class="number">0</span>
};

<span class="keyword">for</span> (<span class="type">int</span> i <span class="operator">=</span> <span class="number">0</span>; libraries<span class="operator">[</span>i<span class="operator">]</span> <span class="operator">!</span><span class="operator">=</span> <span class="number">0</span>; <span class="operator">+</span><span class="operator">+</span>i) {
    HINSTANCE instance <span class="operator">=</span> LoadLibraryW(libraries<span class="operator">[</span>i<span class="operator">]</span>);
    OutputDebugStringW(libraries<span class="operator">[</span>i<span class="operator">]</span>);
    <span class="keyword">if</span> (instance <span class="operator">!</span><span class="operator">=</span> NULL) {
        OutputDebugStringW(L<span class="string">&quot; : Successfully instantiated\n&quot;</span>);
        FreeLibrary(instance);
    } <span class="keyword">else</span> {
        OutputDebugStringW(L<span class="string">&quot; : Could not be loaded\n&quot;</span>);
    }
}</pre>
<p>Once you have compiled and deployed the application as well as the Qt libraries, start a remote debugger. The debugger will then print the ordinal number of the unresolved symbol.</p>
<p>Search for parts of Qt that rely on these functions and disable them using the QFeatures functionality.</p>
<p>In our experience, when Qt applications do not start on Windows CE, it is usually the result of missing symbols for the following classes or features:</p>
<ul>
<li><a href="../qtgui/dnd.html">Drag and Drop</a></li>
<li><a href="../qtgui/qclipboard.html">QClipboard</a></li>
<li><a href="../qtgui/qcursor.html">QCursor</a></li>
</ul>
<p>Please refer to the Microsoft documentation <a href="http://msdn.microsoft.com/en-us/library/e7tsx612.aspx">here</a> for information on what ordinals are and how you can create them. Information on accessing the corresponding symbol name to a given ordinal value can also be found in the Microsoft documentation.</p>
</div>
<!-- @@@windowsce-customization.html -->
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2014 Digia Plc and/or its
   subsidiaries. Documentation contributions included herein are the copyrights of
   their respective owners.<br>    The documentation provided herein is licensed under the terms of the    <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation    License version 1.3</a> as published by the Free Software Foundation.<br>    Digia, Qt and their respective logos are trademarks of Digia Plc     in Finland and/or other countries worldwide. All other trademarks are property
   of their respective owners. </p>
</div>
</body>
</html>