change output dir
This commit is contained in:
parent
d0023e9064
commit
3f1c6667a2
|
@ -68,7 +68,7 @@ PROJECT_LOGO =
|
||||||
# entered, it will be relative to the location where doxygen was started. If
|
# entered, it will be relative to the location where doxygen was started. If
|
||||||
# left blank the current directory will be used.
|
# left blank the current directory will be used.
|
||||||
|
|
||||||
OUTPUT_DIRECTORY = api
|
OUTPUT_DIRECTORY =
|
||||||
|
|
||||||
# If the CREATE_SUBDIRS tag is set to YES then doxygen will create up to 4096
|
# If the CREATE_SUBDIRS tag is set to YES then doxygen will create up to 4096
|
||||||
# sub-directories (in 2 levels) under the output directory of each output format
|
# sub-directories (in 2 levels) under the output directory of each output format
|
||||||
|
|
File diff suppressed because one or more lines are too long
Binary file not shown.
|
@ -0,0 +1,17 @@
|
||||||
|
<!-- HTML footer for doxygen 1.9.8-->
|
||||||
|
<!-- start footer part -->
|
||||||
|
<!--BEGIN GENERATE_TREEVIEW-->
|
||||||
|
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||||
|
<ul>
|
||||||
|
$navpath
|
||||||
|
<li class="footer">$generatedby <a href="https://www.doxygen.org/index.html"><img class="footer" src="$relpath^doxygen.svg" width="104" height="31" alt="doxygen"/></a> $doxygenversion </li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<!--END GENERATE_TREEVIEW-->
|
||||||
|
<!--BEGIN !GENERATE_TREEVIEW-->
|
||||||
|
<hr class="footer"/><address class="footer"><small>
|
||||||
|
$generatedby <a href="https://www.doxygen.org/index.html"><img class="footer" src="$relpath^doxygen.svg" width="104" height="31" alt="doxygen"/></a> $doxygenversion
|
||||||
|
</small></address>
|
||||||
|
<!--END !GENERATE_TREEVIEW-->
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,126 @@
|
||||||
|
<!-- HTML header for doxygen 1.9.8-->
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml" lang="$langISO">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||||
|
<meta name="generator" content="Doxygen $doxygenversion"/>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||||
|
<!--BEGIN PROJECT_NAME--><title>$projectname: $title</title><!--END PROJECT_NAME-->
|
||||||
|
<!--BEGIN !PROJECT_NAME--><title>$title</title><!--END !PROJECT_NAME-->
|
||||||
|
<link href="$relpath^tabs.css" rel="stylesheet" type="text/css"/>
|
||||||
|
<!--BEGIN DISABLE_INDEX-->
|
||||||
|
<!--BEGIN FULL_SIDEBAR-->
|
||||||
|
<script type="text/javascript">var page_layout=1;</script>
|
||||||
|
<!--END FULL_SIDEBAR-->
|
||||||
|
<!--END DISABLE_INDEX-->
|
||||||
|
<script type="text/javascript" src="$relpath^jquery.js"></script>
|
||||||
|
<script type="text/javascript" src="$relpath^dynsections.js"></script>
|
||||||
|
<!-- QSkinny WASM code -->
|
||||||
|
<script type="text/javascript">
|
||||||
|
async function docSampleInit()
|
||||||
|
{
|
||||||
|
const spinner = document.querySelector('#qtspinner');
|
||||||
|
const screen = document.querySelector('#qt-wasm-screen');
|
||||||
|
const status = document.querySelector('#qtstatus');
|
||||||
|
|
||||||
|
const showUi = (ui) => {
|
||||||
|
[spinner, screen].forEach(element => element.style.display = 'none');
|
||||||
|
if (screen === ui)
|
||||||
|
{
|
||||||
|
screen.style.position = 'default';
|
||||||
|
screen.style.width = '500px';
|
||||||
|
screen.style.height = '300px';
|
||||||
|
}
|
||||||
|
ui.style.display = 'block';
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
if(spinner)
|
||||||
|
{
|
||||||
|
showUi(spinner);
|
||||||
|
status.innerHTML = 'Loading...';
|
||||||
|
|
||||||
|
const instance = await qtLoad({
|
||||||
|
qt: {
|
||||||
|
onLoaded: () => showUi(screen),
|
||||||
|
onExit: exitData =>
|
||||||
|
{
|
||||||
|
status.innerHTML = 'Application exit';
|
||||||
|
status.innerHTML +=
|
||||||
|
exitData.code !== undefined ? ` with code ` : '';
|
||||||
|
status.innerHTML +=
|
||||||
|
exitData.text !== undefined ? ` ()` : '';
|
||||||
|
showUi(spinner);
|
||||||
|
},
|
||||||
|
entryFunction: window.createQtAppInstance,
|
||||||
|
containerElements: [screen],
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
console.error(e);
|
||||||
|
console.error(e.stack);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<script type="text/javascript" src="apiDocumentationSamples.js"></script>
|
||||||
|
<script type="text/javascript" src="qtloader.js"></script>
|
||||||
|
<!-- end QSkinny WASM code -->
|
||||||
|
$treeview
|
||||||
|
$search
|
||||||
|
$mathjax
|
||||||
|
$darkmode
|
||||||
|
<link href="$relpath^$stylesheet" rel="stylesheet" type="text/css" />
|
||||||
|
$extrastylesheet
|
||||||
|
</head>
|
||||||
|
<body onLoad="docSampleInit()">
|
||||||
|
<!--BEGIN DISABLE_INDEX-->
|
||||||
|
<!--BEGIN FULL_SIDEBAR-->
|
||||||
|
<div id="side-nav" class="ui-resizable side-nav-resizable"><!-- do not remove this div, it is closed by doxygen! -->
|
||||||
|
<!--END FULL_SIDEBAR-->
|
||||||
|
<!--END DISABLE_INDEX-->
|
||||||
|
|
||||||
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||||
|
|
||||||
|
<!--BEGIN TITLEAREA-->
|
||||||
|
<div id="titlearea">
|
||||||
|
<table cellspacing="0" cellpadding="0">
|
||||||
|
<tbody>
|
||||||
|
<tr id="projectrow">
|
||||||
|
<!--BEGIN PROJECT_LOGO-->
|
||||||
|
<td id="projectlogo"><img alt="Logo" src="$relpath^$projectlogo"/></td>
|
||||||
|
<!--END PROJECT_LOGO-->
|
||||||
|
<!--BEGIN PROJECT_NAME-->
|
||||||
|
<td id="projectalign">
|
||||||
|
<div id="projectname">$projectname<!--BEGIN PROJECT_NUMBER--><span id="projectnumber"> $projectnumber</span><!--END PROJECT_NUMBER-->
|
||||||
|
</div>
|
||||||
|
<!--BEGIN PROJECT_BRIEF--><div id="projectbrief">$projectbrief</div><!--END PROJECT_BRIEF-->
|
||||||
|
</td>
|
||||||
|
<!--END PROJECT_NAME-->
|
||||||
|
<!--BEGIN !PROJECT_NAME-->
|
||||||
|
<!--BEGIN PROJECT_BRIEF-->
|
||||||
|
<td>
|
||||||
|
<div id="projectbrief">$projectbrief</div>
|
||||||
|
</td>
|
||||||
|
<!--END PROJECT_BRIEF-->
|
||||||
|
<!--END !PROJECT_NAME-->
|
||||||
|
<!--BEGIN DISABLE_INDEX-->
|
||||||
|
<!--BEGIN SEARCHENGINE-->
|
||||||
|
<!--BEGIN !FULL_SIDEBAR-->
|
||||||
|
<td>$searchbox</td>
|
||||||
|
<!--END !FULL_SIDEBAR-->
|
||||||
|
<!--END SEARCHENGINE-->
|
||||||
|
<!--END DISABLE_INDEX-->
|
||||||
|
</tr>
|
||||||
|
<!--BEGIN SEARCHENGINE-->
|
||||||
|
<!--BEGIN FULL_SIDEBAR-->
|
||||||
|
<tr><td colspan="2">$searchbox</td></tr>
|
||||||
|
<!--END FULL_SIDEBAR-->
|
||||||
|
<!--END SEARCHENGINE-->
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<!--END TITLEAREA-->
|
||||||
|
<!-- end header part -->
|
|
@ -0,0 +1,276 @@
|
||||||
|
// Copyright (C) 2023 The Qt Company Ltd.
|
||||||
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Loads the instance of a WASM module.
|
||||||
|
*
|
||||||
|
* @param config May contain any key normally accepted by emscripten and the 'qt' extra key, with
|
||||||
|
* the following sub-keys:
|
||||||
|
* - environment: { [name:string] : string }
|
||||||
|
* environment variables set on the instance
|
||||||
|
* - onExit: (exitStatus: { text: string, code?: number, crashed: bool }) => void
|
||||||
|
* called when the application has exited for any reason. There are two cases:
|
||||||
|
* aborted: crashed is true, text contains an error message.
|
||||||
|
* exited: crashed is false, code contians the exit code.
|
||||||
|
*
|
||||||
|
* Note that by default Emscripten does not exit when main() returns. This behavior
|
||||||
|
* is controlled by the EXIT_RUNTIME linker flag; set "-s EXIT_RUNTIME=1" to make
|
||||||
|
* Emscripten tear down the runtime and exit when main() returns.
|
||||||
|
*
|
||||||
|
* - containerElements: HTMLDivElement[]
|
||||||
|
* Array of host elements for Qt screens. Each of these elements is mapped to a QScreen on
|
||||||
|
* launch.
|
||||||
|
* - fontDpi: number
|
||||||
|
* Specifies font DPI for the instance
|
||||||
|
* - onLoaded: () => void
|
||||||
|
* Called when the module has loaded.
|
||||||
|
* - entryFunction: (emscriptenConfig: object) => Promise<EmscriptenModule>
|
||||||
|
* Qt always uses emscripten's MODULARIZE option. This is the MODULARIZE entry function.
|
||||||
|
* - module: Promise<WebAssembly.Module>
|
||||||
|
* The module to create the instance from (optional). Specifying the module allows optimizing
|
||||||
|
* use cases where several instances are created from a single WebAssembly source.
|
||||||
|
* - qtdir: string
|
||||||
|
* Path to Qt installation. This path will be used for loading Qt shared libraries and plugins.
|
||||||
|
* The path is set to 'qt' by default, and is relative to the path of the web page's html file.
|
||||||
|
* This property is not in use when static linking is used, since this build mode includes all
|
||||||
|
* libraries and plugins in the wasm file.
|
||||||
|
* - preload: [string]: Array of file paths to json-encoded files which specifying which files to preload.
|
||||||
|
* The preloaded files will be downloaded at application startup and copied to the in-memory file
|
||||||
|
* system provided by Emscripten.
|
||||||
|
*
|
||||||
|
* Each json file must contain an array of source, destination objects:
|
||||||
|
* [
|
||||||
|
* {
|
||||||
|
* "source": "path/to/source",
|
||||||
|
* "destination": "/path/to/destination"
|
||||||
|
* },
|
||||||
|
* ...
|
||||||
|
* ]
|
||||||
|
* The source path is relative to the html file path. The destination path must be
|
||||||
|
* an absolute path.
|
||||||
|
*
|
||||||
|
* $QTDIR may be used as a placeholder for the "qtdir" configuration property (see @qtdir), for instance:
|
||||||
|
* "source": "$QTDIR/plugins/imageformats/libqjpeg.so"
|
||||||
|
*
|
||||||
|
* @return Promise<{
|
||||||
|
* instance: EmscriptenModule,
|
||||||
|
* exitStatus?: { text: string, code?: number, crashed: bool }
|
||||||
|
* }>
|
||||||
|
* The promise is resolved when the module has been instantiated and its main function has been
|
||||||
|
* called. The returned exitStatus is defined if the application crashed or exited immediately
|
||||||
|
* after its entry function has been called. Otherwise, config.onExit will get called at a
|
||||||
|
* later time when (and if) the application exits.
|
||||||
|
*
|
||||||
|
* @see https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/emscripten for
|
||||||
|
* EmscriptenModule
|
||||||
|
*/
|
||||||
|
async function qtLoad(config)
|
||||||
|
{
|
||||||
|
const throwIfEnvUsedButNotExported = (instance, config) =>
|
||||||
|
{
|
||||||
|
const environment = config.environment;
|
||||||
|
if (!environment || Object.keys(environment).length === 0)
|
||||||
|
return;
|
||||||
|
const isEnvExported = typeof instance.ENV === 'object';
|
||||||
|
if (!isEnvExported)
|
||||||
|
throw new Error('ENV must be exported if environment variables are passed');
|
||||||
|
};
|
||||||
|
|
||||||
|
const throwIfFsUsedButNotExported = (instance, config) =>
|
||||||
|
{
|
||||||
|
const environment = config.environment;
|
||||||
|
if (!environment || Object.keys(environment).length === 0)
|
||||||
|
return;
|
||||||
|
const isFsExported = typeof instance.FS === 'object';
|
||||||
|
if (!isFsExported)
|
||||||
|
throw new Error('FS must be exported if preload is used');
|
||||||
|
};
|
||||||
|
|
||||||
|
if (typeof config !== 'object')
|
||||||
|
throw new Error('config is required, expected an object');
|
||||||
|
if (typeof config.qt !== 'object')
|
||||||
|
throw new Error('config.qt is required, expected an object');
|
||||||
|
if (typeof config.qt.entryFunction !== 'function')
|
||||||
|
config.qt.entryFunction = window.createQtAppInstance;
|
||||||
|
|
||||||
|
config.qt.qtdir ??= 'qt';
|
||||||
|
config.qt.preload ??= [];
|
||||||
|
|
||||||
|
config.qtContainerElements = config.qt.containerElements;
|
||||||
|
delete config.qt.containerElements;
|
||||||
|
config.qtFontDpi = config.qt.fontDpi;
|
||||||
|
delete config.qt.fontDpi;
|
||||||
|
|
||||||
|
// Used for rejecting a failed load's promise where emscripten itself does not allow it,
|
||||||
|
// like in instantiateWasm below. This allows us to throw in case of a load error instead of
|
||||||
|
// hanging on a promise to entry function, which emscripten unfortunately does.
|
||||||
|
let circuitBreakerReject;
|
||||||
|
const circuitBreaker = new Promise((_, reject) => { circuitBreakerReject = reject; });
|
||||||
|
|
||||||
|
// If module async getter is present, use it so that module reuse is possible.
|
||||||
|
if (config.qt.module) {
|
||||||
|
config.instantiateWasm = async (imports, successCallback) =>
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
const module = await config.qt.module;
|
||||||
|
successCallback(
|
||||||
|
await WebAssembly.instantiate(module, imports), module);
|
||||||
|
} catch (e) {
|
||||||
|
circuitBreakerReject(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const qtPreRun = (instance) => {
|
||||||
|
// Copy qt.environment to instance.ENV
|
||||||
|
throwIfEnvUsedButNotExported(instance, config);
|
||||||
|
for (const [name, value] of Object.entries(config.qt.environment ?? {}))
|
||||||
|
instance.ENV[name] = value;
|
||||||
|
|
||||||
|
// Copy self.preloadData to MEMFS
|
||||||
|
const makeDirs = (FS, filePath) => {
|
||||||
|
const parts = filePath.split("/");
|
||||||
|
let path = "/";
|
||||||
|
for (let i = 0; i < parts.length - 1; ++i) {
|
||||||
|
const part = parts[i];
|
||||||
|
if (part == "")
|
||||||
|
continue;
|
||||||
|
path += part + "/";
|
||||||
|
try {
|
||||||
|
FS.mkdir(path);
|
||||||
|
} catch (error) {
|
||||||
|
const EEXIST = 20;
|
||||||
|
if (error.errno != EEXIST)
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
throwIfFsUsedButNotExported(instance, config);
|
||||||
|
for ({destination, data} of self.preloadData) {
|
||||||
|
makeDirs(instance.FS, destination);
|
||||||
|
instance.FS.writeFile(destination, new Uint8Array(data));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!config.preRun)
|
||||||
|
config.preRun = [];
|
||||||
|
config.preRun.push(qtPreRun);
|
||||||
|
|
||||||
|
config.onRuntimeInitialized = () => config.qt.onLoaded?.();
|
||||||
|
|
||||||
|
const originalLocateFile = config.locateFile;
|
||||||
|
config.locateFile = filename =>
|
||||||
|
{
|
||||||
|
const originalLocatedFilename = originalLocateFile ? originalLocateFile(filename) : filename;
|
||||||
|
if (originalLocatedFilename.startsWith('libQt6'))
|
||||||
|
return `${config.qt.qtdir}/lib/${originalLocatedFilename}`;
|
||||||
|
return originalLocatedFilename;
|
||||||
|
}
|
||||||
|
|
||||||
|
const originalOnExit = config.onExit;
|
||||||
|
config.onExit = code => {
|
||||||
|
originalOnExit?.();
|
||||||
|
config.qt.onExit?.({
|
||||||
|
code,
|
||||||
|
crashed: false
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
const originalOnAbort = config.onAbort;
|
||||||
|
config.onAbort = text =>
|
||||||
|
{
|
||||||
|
originalOnAbort?.();
|
||||||
|
|
||||||
|
aborted = true;
|
||||||
|
config.qt.onExit?.({
|
||||||
|
text,
|
||||||
|
crashed: true
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const fetchPreloadFiles = async () => {
|
||||||
|
const fetchJson = async path => (await fetch(path)).json();
|
||||||
|
const fetchArrayBuffer = async path => (await fetch(path)).arrayBuffer();
|
||||||
|
const loadFiles = async (paths) => {
|
||||||
|
const source = paths['source'].replace('$QTDIR', config.qt.qtdir);
|
||||||
|
return {
|
||||||
|
destination: paths['destination'],
|
||||||
|
data: await fetchArrayBuffer(source)
|
||||||
|
};
|
||||||
|
}
|
||||||
|
const fileList = (await Promise.all(config.qt.preload.map(fetchJson))).flat();
|
||||||
|
self.preloadData = (await Promise.all(fileList.map(loadFiles))).flat();
|
||||||
|
}
|
||||||
|
|
||||||
|
await fetchPreloadFiles();
|
||||||
|
|
||||||
|
// Call app/emscripten module entry function. It may either come from the emscripten
|
||||||
|
// runtime script or be customized as needed.
|
||||||
|
let instance;
|
||||||
|
try {
|
||||||
|
instance = await Promise.race(
|
||||||
|
[circuitBreaker, config.qt.entryFunction(config)]);
|
||||||
|
} catch (e) {
|
||||||
|
config.qt.onExit?.({
|
||||||
|
text: e.message,
|
||||||
|
crashed: true
|
||||||
|
});
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
|
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Compatibility API. This API is deprecated,
|
||||||
|
// and will be removed in a future version of Qt.
|
||||||
|
function QtLoader(qtConfig) {
|
||||||
|
|
||||||
|
const warning = 'Warning: The QtLoader API is deprecated and will be removed in ' +
|
||||||
|
'a future version of Qt. Please port to the new qtLoad() API.';
|
||||||
|
console.warn(warning);
|
||||||
|
|
||||||
|
let emscriptenConfig = qtConfig.moduleConfig || {}
|
||||||
|
qtConfig.moduleConfig = undefined;
|
||||||
|
const showLoader = qtConfig.showLoader;
|
||||||
|
qtConfig.showLoader = undefined;
|
||||||
|
const showError = qtConfig.showError;
|
||||||
|
qtConfig.showError = undefined;
|
||||||
|
const showExit = qtConfig.showExit;
|
||||||
|
qtConfig.showExit = undefined;
|
||||||
|
const showCanvas = qtConfig.showCanvas;
|
||||||
|
qtConfig.showCanvas = undefined;
|
||||||
|
if (qtConfig.canvasElements) {
|
||||||
|
qtConfig.containerElements = qtConfig.canvasElements
|
||||||
|
qtConfig.canvasElements = undefined;
|
||||||
|
} else {
|
||||||
|
qtConfig.containerElements = qtConfig.containerElements;
|
||||||
|
qtConfig.containerElements = undefined;
|
||||||
|
}
|
||||||
|
emscriptenConfig.qt = qtConfig;
|
||||||
|
|
||||||
|
let qtloader = {
|
||||||
|
exitCode: undefined,
|
||||||
|
exitText: "",
|
||||||
|
loadEmscriptenModule: _name => {
|
||||||
|
try {
|
||||||
|
qtLoad(emscriptenConfig);
|
||||||
|
} catch (e) {
|
||||||
|
showError?.(e.message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
qtConfig.onLoaded = () => {
|
||||||
|
showCanvas?.();
|
||||||
|
}
|
||||||
|
|
||||||
|
qtConfig.onExit = exit => {
|
||||||
|
qtloader.exitCode = exit.code
|
||||||
|
qtloader.exitText = exit.text;
|
||||||
|
showExit?.();
|
||||||
|
}
|
||||||
|
|
||||||
|
showLoader?.("Loading");
|
||||||
|
|
||||||
|
return qtloader;
|
||||||
|
};
|
Loading…
Reference in New Issue