Merge branch '1.x' into dev
This commit is contained in:
halx99 2023-08-25 16:52:26 +08:00
parent 46f668b01b
commit 33afe5470a
16 changed files with 455 additions and 312 deletions

View File

@ -5,7 +5,7 @@ name: gendocs
on:
push:
branches:
- 1.x
- dev
paths:
- core/**/*
- docs/**/*
@ -29,7 +29,7 @@ jobs:
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/html/
publish_dir: ./docs/out/
enable_jekyll: false
allow_empty_commit: false
force_orphan: true

3
docs/.gitignore vendored
View File

@ -1,3 +1,4 @@
html/
out/
.tee-*.txt
Doxyfile

View File

@ -38,7 +38,7 @@ PROJECT_NAME = Axmol Engine
# could be handy for archiving the generated documentation or if some version
# control system is used.
PROJECT_NUMBER = v1.0
PROJECT_NUMBER = @VERSION@
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
@ -58,7 +58,7 @@ PROJECT_LOGO =
# entered, it will be relative to the location where doxygen was started. If
# left blank the current directory will be used.
OUTPUT_DIRECTORY = ./
OUTPUT_DIRECTORY = ./out
# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub-
# directories (in 2 levels) under the output directory of each output format and
@ -228,7 +228,7 @@ TAB_SIZE = 4
# "Side Effects:". You can put \n's in the value part of an alias to insert
# newlines.
ALIASES =
ALIASES =
# This tag can be used to specify a number of word-keyword mappings (TCL only).
# A mapping has the form "name=value". For example adding "class=itcl::class"
@ -661,8 +661,7 @@ FILE_VERSION_FILTER =
# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
# tag is left empty.
LAYOUT_FILE =
LAYOUT_FILE =
# The CITE_BIB_FILES tag can be used to specify one or more bib files containing
# the reference definitions. This must be a list of .bib files. The .bib
# extension is automatically appended if omitted. This requires the bibtex tool
@ -1065,7 +1064,7 @@ GENERATE_HTML = YES
# The default directory is: html.
# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_OUTPUT = html
HTML_OUTPUT = @HTML_OUTPUT@
# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each
# generated HTML page (for example: .htm, .php, .asp).
@ -1092,7 +1091,7 @@ HTML_FILE_EXTENSION = .html
# of the possible markers and block names see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_HEADER =
HTML_HEADER = ./header.html
# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each
# generated HTML page. If the tag is left blank doxygen will generate a standard
@ -1102,7 +1101,7 @@ HTML_HEADER =
# that doxygen normally uses.
# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_FOOTER =
HTML_FOOTER = ./footer.html
# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style
# sheet that is used by each HTML page. It can be used to fine-tune the look of
@ -1146,7 +1145,7 @@ HTML_EXTRA_FILES =
# allow to user to switch between light and dark mode via a button.
# The default value is: AUTO_LIGHT.
HTML_COLORSTYLE = DARK
HTML_COLORSTYLE = LIGHT
# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
@ -1514,7 +1513,7 @@ MATHJAX_EXTENSIONS =
# example see the documentation.
# This tag requires that the tag USE_MATHJAX is set to YES.
MATHJAX_CODEFILE =
MATHJAX_CODEFILE = ./mathjax.js
# When the SEARCHENGINE tag is enabled doxygen will generate a search box for
# the HTML output. The underlying search engine uses javascript and DHTML and

View File

@ -6,9 +6,9 @@
@image html axmol_portrait.png
@section sec1 About axmol
axmol is based on cocos2d-x-4.0, cocos2d-x is a open source project is designed to be a cross-platform 2D game engine for building 2D games, demos and other graphical/interactive mobile applications.
It runs on top of OpenGL 2.0 and OpenGL ES 2.0 and is written in C++.\n
This project is based on the famous <A HREF="http://www.cocos2d-iphone.org">"cocos2d-iphone"</A> project.\n
axmol is a open source project is designed to be a cross-platform 2D game engine for building 2D games, demos and other graphical/interactive mobile applications.
It runs on top of OpenGL 3.3(ES 2.0)/Metal and is written in C++.\n
This project is a fork of <A HREF="https://github.com/cocos2d/cocos2d-x">"cocos2d-x-4.0"</A>.\n
- website: https://axmolengine.github.io/
@ -46,7 +46,7 @@ THE SOFTWARE. \n
- https://github.com/axmolengine/axmol
@section sec4 How to contribute
- Fork our repository on github, commit your changes, and send a "pull request" to us. We will merge your contribution to master
- Fork our repository on github, commit your changes, and send a "pull request" to us. We will merge your contribution to dev
- Suggestion, bug fixes, and improvements are highly appreciated.
@endcond

View File

@ -1,40 +0,0 @@
/****************************************************************************
Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.
https://axmolengine.github.io/axmol
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
/*!
@cond GEN_WRITE_BOOK
@mainpage axmol
@image html img-axmol.png
@section sec1 About axmol
axmol is a complete game development toolkit that enables game developers to quickly build games all the way from prototyping to full fledged game.
axmol combines the best ingredients from the axmol community. It includes an all purpose game editor, a coding IDE, and even a marketplace for the community to find and share 3rd-party extensions and tools. All for the purpose of making game development process a breeze.
axmol is maintained and copyrighted by Chukong Technologies.
@endcond
*/

View File

@ -1,171 +0,0 @@
# Cocos2d-x Release Engineering
## Tagging
New releases must be tagged in github. The tag name must follow these rules:
cocos2d-x-Major.Minor[.Status]
or
cocos2d-x-Major.Minor.Revision[.Status]
Example of valid names:
* cocos2d-x-3.0rc0
* cocos2d-x-3.0
* cocos2d-x-2.1.1
* cocos2d-x-2.1.1rc0
See "Naming Conventions" below
## Branching
Each Major version will have 2 branches, `master` and `develop`.
For cocos2d-x v3, the branches names will be `v3-master` and `v3-develop`, for v4 the branches names will be `v4-master` and `v4-develop`, and so on.
* `master` is the stable branch.
* `develop` is the unstable branch. All new features, bug fixes, etc, are applied first to `develop`.
Once a new version is released (either Major, Minor or Revision), then `develop` branch must be merged into `master` branch. To be more specific, `master` only contains _stable_ releases. _Alpha_, _Beta_, and _RC_ versions MUST NOT be merged into `master`.
## Announcing
Only stable releases must be announced on:
* [Blog](http://www.cocos2d-x.org/news)
All kind of releases (alpha,beta,rc, final) must be announced on:
* [Twitter](https://twitter.com/cocos2dx)
* [Forum](http://discuss.cocos2d-x.org/)
## Download package
A download package must be available for each released version.
The package shall include the source code of cocos2d-x, and the needed scripts to download and install the 3rd party binaries.
## Release Notes and Changelog
**BEFORE** releasing a new version (either stable or unstable), the following documents must be updated:
* [CHANGELOG](https://github.com/cocos2d/cocos2d-x/blob/v3/CHANGELOG)
* [Release Notes](https://github.com/cocos2d/cocos2d-x/blob/v3/docs/RELEASE_NOTES.md)
## Documentation
**BEFORE** releasing a new Minor or Major stable release, the following tasks MUST be done:
- All documentation MUST be updated to the new version. This includes:
- API Reference
- Programmers Guide
## Backward compatibility
- Minor versions MUST be backward compatible with previous minor versions. eg: v3.2 must be backward compatible with v3.1 and v3.0.
- Major versions SHOULD be backward compatible with previous major versions. Breaking backward compatibility in Major versions is acceptable only if it is extremely well justified
## Deprecated APIs
- Only Major versions (eg: 4.0, 5.0) can introduce deprecated APIs. Deprecated APIs cannot be introduced in Point releases (eg: 3.5, 4.2).
- Only Major versions can remove deprecated APIs. They cannot be removed in Point versions.
- A deprecated API must live at least for the whole cycle of a Major version. Eg: if an API was deprecated in 4.0, it can be removed in 5.0, but not before. It can be removed in 6.0 or future Major releases, but it cannot be removed in Point releases, like 5.1.
## Performance tests
- Performance tests MUST be run before releasing a Release Candidate
- If performance is worse than previous stable version, then the Release Candidate MUST NOT be released (See Naming Conventions below)
- Results of the performance tests must be documented in this [spreadsheet](https://docs.google.com/spreadsheet/ccc?key=0AvvkdgVbWvpZdHFudzdDT3NuYTRNTHlZZzRGZWYzMmc#gid=8)
## Samples and tests
**BEFORE** releasing a new Minor or Major stable release, the following tasks MUST be done:
- All the samples and tests must be updated to use the new version. This includes:
- The samples in [cocos2d-x-samples](https://github.com/cocos2d/cocos2d-x-samples) repository
- The demo games [EarthWarrior3D](https://github.com/chukong/EarthWarrior3D) and [FantasyWarrior3D](https://github.com/chukong/FantasyWarrior3D)
- All the tests bundled in cocos2d-x
- All the templates bundled in cocos2d-x
## Naming conventions
### Alpha
The product is unstable. It could have memory leaks, or crashes, or the API is unstable. The product contains little QA.
Although the product is not ready for production, the product should be testable.
Alpha versions might have Core functionality that has just been refactored, meaning that Core functionality might be unstable, but should work Ok.
As an example, for cocos2d-x, an _Alpha_ version means:
* Basic functionality works Ok (not great, but OK), like Sprites, Scenes, actions, etc.
_* But it might have memory leaks, or crashes, or the recently added features might be unfinished. The documentation might not be updated.
* As an example, the Renderer refactoring must be done in "alpha" versions (but not Beta versions).
Alpha versions are NOT feature freeze. New features might be added in future alpha and beta versions.
### Beta
The product is more stable than _Alpha_. The product might crash, but not frequently. No major changes were made in core components.
Smaller features could be refactored in _Beta_ versions, but the core functionality is stable.
The product has more QA.
The only difference between _Alpha_ and _Beta_, is that _Beta_ is more stable than _Alpha_. And that in _Beta_ versions no new major features will be added.
As an example, for cocos2d-x it means:
* All the Core features (Sprites, Menu, Labels, Director, Transitions) are stable. Bug fixes could have been added into the Core functionality, but no major refactoring were done in the Core.
* But perhaps new features like the new Particle Engine could be unfinished, or the Cocos Studio reader might crash.
* Some cocos2d-x users might want to use a beta version for real games.
Beta versions are NOT feature freeze. __Small__ new features might be added in future _Beta_ versions. New __BIG__ features that might affect the Core functionality must only be added in _Alpha_ versions, and not in _Beta_ versions.
### Release Candidate
Release candidate means that, unless major bugs are found, the product is ready for release.
The difference between _Release Candidate__ and _Final_ is that RC has less testing than the final version.
Many cocos2d-x users might want to try and use the RC releases for production.
RC versions ARE feature freeze. No new features, no matter how small they are, MUST be added in RC versions, because as the name implies, it is a _Release Candidate_.
### Final
It is the new stable version.
## Number conventions
major.minor [revision | status]
### Major
The major number is increased when there are significant jumps in functionality such as changing the framework which could cause incompatibility with interfacing systems
### Minor
The minor number is incremented when only minor features or significant fixes have been added.
### Revision
The revision number is incremented when minor bugs are fixed.
### Status
The status could be: alphaN, betaN or rcN.
'N' is a number, and the first MUST always be 0.
### Examples
v2.0-alpha0:
- New major version of cocos2d-x.
- Unstable
v2.1.3:
- Stable version of cocos2d-x. It is the same as v2.1 plus some bug fixes.
v2.2-beta0:
- Similar to v2.1.3, but some new features were added, but are not stable yet.
v2.2:
- Similar to v2.1.3, but some small features were added. The new features are stable.

View File

@ -1,38 +0,0 @@
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*
- [Cocos2d-x 4.0 Release Notes](#cocos2d-x-40-release-notes)
- [Highlights](#highlights)
- [Documentation](#documentation)
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
# Cocos2d-x 4.0 Release Notes #
This version is mainly to support metal on iOS/macOS. In order to support metal, this version does a big refactor of the rendering system. And this version also remove deprecated functions, so there are some API modification.
In order to help develpers easily update to v4, we wrote some documentations. These documentations can be found [here](https://docs.cocos.com/cocos2d-x/v4/manual/en/upgradeGuide/).
## Highlights
- support metal on iOS/macOS
- use CMake for all platforms
- update GLFW to 3.3
- update minizip to 1.2
- remove deprecated functions
- remove h5 engine and JSB
- remove tiff
- remove `SimpleAudioEngine`
- remove `experimetnal` namespace
- fix bug that system font can not work correctly on macOS15
- fix lua crash issue on 64bit devices
- fix bugs for iOS13
- UIWebView uses WKWebView instead
- VideoPlayer uses AVPlayerController instead
## Documentation
We wrote some documentations to help developers upgrade to v4:
- [how to run tests and how to create a new project and run](https://docs.cocos2d-x.org/cocos2d-x/v4/en/installation/)
- [v4 updrade guide](https://docs.cocos2d-x.org/cocos2d-x/v4/en/upgradeGuide/)

View File

@ -1,34 +0,0 @@
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*
- [Cocos2d-x v4 Release Notes](#cocos2d-x-v4-release-notes)
- [版本特性](#%E7%89%88%E6%9C%AC%E7%89%B9%E6%80%A7)
- [文档](#%E6%96%87%E6%A1%A3)
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
# Cocos2d-x v4 Release Notes #
## 版本特性
- iOS/macOS 支持 metal
- 使用 CMake删除各平台的工程文件
- 升级 GLFW 到 3.3
- 升级 minizip 到 1.2
- 删除废弃函数
- 删除 h5 引擎和 Javascript 绑定
- 删除 tiff
- 删除 `SimpleAudioEngine`
- 删除 `experimental` 名字空间
- 修复 macOS 15 系统字体绘制问题
- 适配 iOS13
- UIWebView 使用 WKWebView 实现
- VideoPlayer 使用 AVPlayerController 实现
- 修复 lua 工程在 64 位设备的崩溃问题
## 文档
编写了一些文档方便开发者升级到 v4:
- [如何运行测试例子,如何新建工程并运行](https://docs.cocos2d-x.org/cocos2d-x/v4/zn/installation)
- [v4 升级指南](https://docs.cocos2d-x.org/cocos2d-x/v4/zh/installation/)

16
docs/footer.html Normal file
View File

@ -0,0 +1,16 @@
<!-- 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&#160;<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>

128
docs/hacks.js Normal file
View File

@ -0,0 +1,128 @@
function generate_autotoc() {
var toc = $("#autotoc").append('<ul></ul>');
if(toc.length > 0) { // an autotoc has been requested
toc = toc.find('ul');
var indices = new Array();
indices[0] = 0;
indices[1] = 0;
indices[2] = 0;
$("h1, h2, h3").each(function(i) {
var current = $(this);
var levelTag = current[0].tagName.charAt(1);
var cur_id = current.attr("id");
indices[levelTag-1]+=1;
var prefix=indices[0];
if (levelTag >1) prefix+="."+indices[1];
if (levelTag >2) prefix+="."+indices[2];
current.html(prefix + " " + current.html());
for(var l = levelTag; l < 3; ++l){
indices[l] = 0;
}
if(cur_id == undefined) {
current.attr('id', 'title' + i);
current.addClass('anchor');
toc.append("<li class='level" + levelTag + "'><a id='link" + i + "' href='#title" +
i + "' title='" + current.prop("tagName") + "'>" + current.text() + "</a></li>");
} else {
toc.append("<li class='level" + levelTag + "'><a id='" + cur_id + "' href='#title" +
i + "' title='" + current.prop("tagName") + "'>" + current.text() + "</a></li>");
}
});
}
}
// throw a stick at the modules array and hijack gotoNode
// for our own evil purposes
$(document).ready(function() {
if (typeof modules !== 'undefined') {
// modules has been loaded, that means we are inside the
// documentation of a package
NAVTREE[0][2][1][1] = modules[0][1];
NAVTREE[0][2][1][2] = modules[0][2];
// override gotoNode from navtree.js
gotoNode = function (o,subIndex,root,hash,relpath) {
var nti = navTreeSubIndices[subIndex][root+hash];
if (!nti)
{
nti = navTreeSubIndices[subIndex][root];
}
if(nti && (nti[0] === 1 && nti[0])) {
nti.splice(1, 1);
}
o.breadcrumbs = $.extend(true, [], nti ? nti : navTreeSubIndices[subIndex][root]);
if (!o.breadcrumbs && root!=NAVTREE[0][1]) { // fallback: show index
navTo(o,NAVTREE[0][1],"",relpath);
$('.item').removeClass('selected');
$('.item').removeAttr('id');
}
if (o.breadcrumbs) {
o.breadcrumbs.unshift(0); // add 0 for root node
showNode(o, o.node, 0, hash);
}
}
}
// set-up footnote generation
$("#doc-content").append('<ol id="autoFootnotes0" class="footnotesList"></ol>');
$("body").footnotes();
generate_autotoc();
});
/*
* A jQuery plugin by Brian Holt that will search the selected blocks for
* specially-defined footnote elements. If found, these elements will be
* moved to a footnotes section and links to and from the footnotes will
* be created.
*
* See http://www.planetholt.com/articles/jQuery-Footnotes
* for full documentation.
*
* By default, footnotes will be found in SPANs with the footnote class,
* and in BLOCKQUOTEs with a TITLE attribute.
*
* Thanks to CSSNewbies.com for the general idea, which I have enhanced
* and implemented with as a jQuery plugin.
*
* Copyright 2008-2009 Brian Holt.
* Licensed under the LGPL license. See
* http://www.gnu.org/licenses/lgpl-3.0-standalone.html
*
* Version 1.2.2
*/
(function(c){c.fn.footnotes=function(d){var e=c.extend({},c.fn.footnotes.defaults,d);return this.each(function(f){b("INFO: Building footnotes for "+(f+1)+"...",e.debugMode);c(e.footnotes,this).addClass(e.autoFootnoteClass);var h=(""===e.contentBlock)?c(this):c(e.contentBlock,this),g=e.orderedList?"<ol/>":"<ul/>";c("."+e.autoFootnoteClass).each(function(l){var t=-1,n=f+"-"+l,q=c(this),j,r,s,u,p,m,o,k;if(e.singleFootnoteDestination){j=c("#"+e.destination);if(0===j.length){b("INFO: No #autoFootnotes found; adding our own",e.debugMode);j=c(g).attr("id",e.destination).addClass("footnotesList").appendTo(h)}}else{j=c("#"+e.destination+f);if(0===j.length){b("INFO: No #autoFootnotes"+f+" found; adding our own for "+(f+1),e.debugMode);j=c(g).attr("id",e.destination+f).addClass("footnotesList").appendTo(h)}}q.removeClass(e.autoFootnoteClass);r=e.fnExtractFootnote(this);t=-1;n=f+"-"+l;j.find("li > .footnoteContent").each(function(i){var v=c(this);if(v.html()===r){t=i;s=c(v.parents("li").get(0));return false}});if(-1===t){u=c("<a/>").attr("href","#cite-text-"+n).attr("name","cite-ref-"+n).attr("id","cite-ref-"+n).attr("dir","ltr").attr("title",r).text("["+(j.find("li").length+1)+"]").addClass("footnoteLink");if(q.is(e.prependTags)){c("<sup/>").prependTo(this).append(u)}else{c("<sup/>").appendTo(this).append(u)}p=c("<li/>").attr("id","cite-text-"+n);m=c("<span/>").addClass("footnoteBackReferenceGroup").appendTo(p);c("<span/>").addClass("footnoteContent").html(r).appendTo(p);u=c("<a/>").text("^").attr("href","#cite-ref-"+n).addClass("footnoteBackref").prependTo(m);j.append(p)}else{n=f+"-"+t;m=c(c("li > .footnoteBackReferenceGroup",j).get(t));o=m.find(".footnoteBackref");k=o.length;if(0===o.length){b("ERROR: $backRefs.length == 0, which should have prevented this code path",e.debugMode)}else{if(1===o.length){c("<sup/>").text("^ ").addClass("footnoteBackref").prependTo(m);o.html("<sup>a</sup>");++k}u=c("<a/>").attr("href","#"+s.attr("id")).attr("name","cite-ref-"+n+"-"+o.length).attr("id","cite-ref-"+n+"-"+o.length).attr("title",r).text("["+(t+1)+"]").addClass("footnoteLink");if(q.is(e.prependTags)){c("<sup/>").prependTo(this).append(u)}else{c("<sup/>").appendTo(this).append(u)}u=c("<a/>").attr("href","#cite-ref-"+n+"-"+o.length).addClass("footnoteBackref");if(k>=26){b("WARN: multiple letter functionality is probably broken when more than 26 footnotes exist",e.debugMode)}u.prepend(String.fromCharCode((k)+96));c("<sup/>").appendTo(m).append(u)}}});b("INFO: Done building footnotes for "+(f+1),e.debugMode)})};c.fn.footnotes.version=function(){return"1.2.2"};c.fn.footnotes.defaults={footnotes:"blockquote[title],span.footnote,blockquote[cite]",prependTags:"blockquote",singleFootnoteDestination:false,destination:"autoFootnotes",contentBlock:".content",autoFootnoteClass:"autoFootnote",fnExtractFootnote:a,orderedList:true,debugMode:true};function b(e,d){if(d){if(window.console&&window.console.log){window.console.log(e)}}}function a(i){var j=c(i),e,f,h,g,d;if(j.is("span.footnote")){e=c(i).html();f=/^(?:(?:&nbsp;)|\s)*\(([\S\s]+)\)(?:(?:&nbsp;)|\s)*$/;h=e.match(f);if(h&&2===h.length){e=h[1]}j.empty()}else{if(j.is("blockquote[title]")){g=j.attr("cite");e=j.attr("title");if(""!==g){d=c("<a/>").attr("href",g);if(0===c(e).length){e=d.text(e)}else{e=d.text(g).wrap("<span/>").parent().append(": "+e);j.attr("title","")}}}else{if(j.is("blockquote[cite]")){g=j.attr("cite");e=c("<a/>").attr("href",g).text(g)}}}return e}})(jQuery);
(function(){
if(window.location.href.includes("axmolengine.github.io/axmol")){
var url='https://axmolengine.github.io/axmol/latest/manual/menu_version.js';
var script = document.createElement("script"); // Make a script DOM node
script.src = url; // Set it's src to the provided URL
document.head.appendChild(script);
}
else
{
var url = window.__relpath + 'menu_version.js';
var script = document.createElement("script"); // Make a script DOM node
script.src = url; // Set it's src to the provided URL
document.head.appendChild(script);
}
})();
$(document).ready(function() {
var coll = document.getElementsByClassName("collapsible");
var i;
for (i = 0; i < coll.length; i++) {
coll[i].addEventListener("click", function() {
this.classList.toggle("active");
var content = this.nextElementSibling;
if (content.style.maxHeight){
content.style.maxHeight = null;
} else {
content.style.maxHeight = content.scrollHeight + "px";
}
});
}
});

86
docs/header.html Normal file
View File

@ -0,0 +1,86 @@
<!-- HTML header for doxygen 1.9.6-->
<!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>
<script type="text/javascript">
window.__relpath = "$relpath^";
</script>
<script src="$relpath^hacks.js" type="text/javascript"></script>
$treeview
$search
$mathjax
$darkmode
<link href="$relpath^$stylesheet" rel="stylesheet" type="text/css" />
<!-- This should probably be an extrastylesheet instead of hardcoded. -->
<link href="$relpath^stylesheet.css" rel="stylesheet" type="text/css" />
$extrastylesheet
</head>
<body>
<!--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! -->
<div id="back-nav">
<ul>
<li><a href="https://github.com/axmolengine/axmol">GitHub</a></li>
<li><a href="$relpath^index.html">Top</a></li>
</ul>
$searchbox
</div>
<!--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">&#160;$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 -->

16
docs/index.html.in Normal file
View File

@ -0,0 +1,16 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Redirecting</title>
<noscript>
<meta http-equiv="refresh" content="1; url=https://axmolengine.github.io/axmol/@VERSION@/manual" />
</noscript>
<script>
window.location.href = 'https://axmolengine.github.io/axmol/@VERSION@/manual';
</script>
</head>
<body>
Redirecting to <a href="https://axmolengine.github.io/axmol/@VERSION@">https://axmolengine.github.io/axmol/@VERSION@/manual</a>
</body>
</html>

35
docs/mathjax.js Normal file
View File

@ -0,0 +1,35 @@
//<![CDATA[
MathJax.Hub.Config(
{
TeX: {
Macros: {
qprel: [ "{\\gtreqless}", 0],
qpx: [ "{\\mathbf{x}}", 0],
qpl: [ "{\\mathbf{l}}", 0],
qpu: [ "{\\mathbf{u}}", 0],
qpc: [ "{\\mathbf{c}}", 0],
qpb: [ "{\\mathbf{b}}", 0],
qpy: [ "{\\mathbf{y}}", 0],
qpw: [ "{\\mathbf{w}}", 0],
qplambda: [ "{\\mathbf{\\lambda}}", 0],
ssWpoint: [ "{\\bf #1}", 1],
ssWeight: [ "{w_{#1}}", 1],
dabs: [ "{\\parallel\\! #1 \\!\\parallel}", 1],
E: [ "{\\mathrm{E}}", 0],
A: [ "{\\mathrm{A}}", 0],
R: [ "{\\mathrm{R}}", 0],
N: [ "{\\mathrm{N}}", 0],
Q: [ "{\\mathrm{Q}}", 0],
Z: [ "{\\mathrm{Z}}", 0],
ccSum: [ "{\\sum_{#1}^{#2}{#3}}", 3],
ccProd: [ "{\\prod_{#1}^{#2}{#3}}", 3],
pyr: [ "{\\operatorname{Pyr}}", 0],
aff: [ "{\\operatorname{aff}}", 0],
Ac: [ "{\\cal A}", 0],
Sc: [ "{\\cal S}", 0],
},
equationNumbers: { autoNumber: "AMS" }
}
}
);
//]]>

88
docs/menu_version.js.in Normal file
View File

@ -0,0 +1,88 @@
(function() {
'use strict';
var url_re = /(axmolengine\.github\.io\/axmol\/)(latest|(\d\.\d+|\d\.\d+\.\d+)(-beta\d)?)\//;
var url_local = /docs\/out\/(latest|(\d\.\d+|\d\.\d+\.\d+)(-beta\d)?)\//;
var current_version_local = '@VERSION@'
var all_versions = [
@VERLIST@
];
function build_select(current_version) {
if( current_version == 'latest') {
let top_elt = document.getElementById("top");
let first_element = top_elt.childNodes[0];
let new_div = document.createElement("p");
new_div.innerHTML = '⚠️ This documentation corresponds to the <a style="font-familly: monospace;" href="https://github.com/axmolengine/axmol/tree/dev">latest</a> development branch of axmol. It might diverge from the official releases.';
new_div.style.cssText = "background-color: #ff9800; margin: 1ex auto 1ex 1em; padding: 1ex; border-radius: 1ex; display: inline-block;"
let OK = top_elt.insertBefore(new_div, first_element);
}
var buf = ['<select>'];
$.each(all_versions, function(id) {
var version = all_versions[id];
buf.push('<option value="' + version + '"');
if (version == current_version) {
buf.push(' selected="selected">' + version);
} else {
buf.push('>' + version);
}
buf.push('</option>');
});
if ( !all_versions.includes(current_version)) {
buf.push('<option value="' + current_version + '"');
buf.push(' selected="selected">' + current_version);
buf.push('</option>');
}
buf.push('</select>');
return buf.join('');
}
function patch_url(url, new_version) {
if(url.includes("axmolengine.github.io/axmol")){
return url.replace(url_re, 'axmolengine.github.io/axmol/' + new_version + '/');
}
else {
return url.replace(url_local, 'docs/out/' + new_version + '/');
}
}
function on_switch() {
var selected = $(this).children('option:selected').attr('value');
var url = window.location.href,
new_url = patch_url(url, selected);
if (new_url != url) {
window.location.href = new_url;
}
}
$(document).ready(function() {
var motherNode=$("#back-nav ul")[0];
var node = document.createElement("LI");
var spanNode = document.createElement("SPAN");
var titleNode =document.createTextNode("axmol Version: ");
var textNode = document.createTextNode("x.y");
spanNode.setAttribute("class", "version_menu");
spanNode.appendChild(textNode);
node.appendChild(titleNode);
node.appendChild(spanNode);
motherNode.insertBefore(node, motherNode.firstChild);
$("#back-nav").css("padding-top", "0").css("padding-bottom", "0");
var match = url_re.exec(window.location.href);
if (match) {
var version = match[2];
var select = build_select(version);
spanNode.innerHTML=select;
$('.version_menu select').bind('change', on_switch);
}
else {
match = url_local.exec(window.location.href);
if (match) {
var version = current_version_local;
var select = build_select(version);
spanNode.innerHTML=select;
$('.version_menu select').bind('change', on_switch);
}
}
});
})();

23
docs/stylesheet.css Normal file
View File

@ -0,0 +1,23 @@
#back-nav {
border-bottom: 1px solid;
padding: 0.5em;
/*background-color: #FAF9FB;*/
}
#back-nav h2 {
display: inline;
}
#back-nav ul
{
display: inline;
padding: 0;
margin: 0;
}
#back-nav li
{
display: inline;
list-style-type: none;
padding-right: 20px;
}

View File

@ -47,11 +47,6 @@ setup_doxygen
Write-Host "Using doxygen $(doxygen --version)"
$CONFIG_NAME = 'doxygen'
if ($args.Count -gt 0) {
$CONFIG_NAME = $args[0]
}
$AX_ROOT = (Resolve-Path $DIR/../..)
$axver_file = (Resolve-Path $AX_ROOT/core/axmolver.h.in).Path
$content = ($(Get-Content -Path $axver_file) | Select-String 'AX_VERSION_STR')
@ -72,14 +67,53 @@ $docsRoot = (Resolve-Path "$DIR/../../docs").Path
$store_cwd = (Get-Location).Path
Set-Location $docsRoot
$content = [Regex]::Replace($(Get-Content doxygen.config -raw), '\bv1.0\b', "v$axver")
Move-Item 'doxygen.config' 'doxygen.config.bak' -Force
Set-Content -Path doxygen.config -Value "$content"
doxygen "$CONFIG_NAME.config"
function mkdirs([string]$path) {
if (!(Test-Path $path)) {
New-Item $path -ItemType Directory 1>$null
}
}
#restore the old doxygen.config
Move-Item 'doxygen.config.bak' 'doxygen.config' -Force
function configure_file($infile, $outfile, $vars) {
$content = $(Get-Content $infile -raw)
foreach($var in $vars.GetEnumerator()) {
$content = [Regex]::Replace($content, $var.Key, $var.Value)
}
Set-Content -Path $outfile -Value "$content"
}
# building latest
$verMap = @{
'latest' = "v$axver"
'1.0' = "v1.0.0"
}
$strVerList = "'$($verMap.Keys -join "','")'"
# set default doc ver
configure_file './index.html.in' "./out/index.html" @{'@VERSION@' = 'latest'}
foreach($item in $verMap.GetEnumerator()) {
$ver = $item.Key
$html_out_base = "./out/$ver"
mkdirs $html_out_base
$release_tag = $item.Value
if ($ver -eq 'latest') {
git checkout dev
} elseif($ver -eq '1.0') {
git checkout '1.x' # 1.x branch now for v1.0
} else {
git checkout $release_tag
}
configure_file './Doxyfile.in' './Doxyfile' @{'@VERSION@'=$release_tag; '@HTML_OUTPUT@' = "$ver/manual"}
doxygen "./Doxyfile"
$html_out = Join-Path $html_out_base 'manual'
Copy-Item './hacks.js' $html_out
Copy-Item './stylesheet.css' $html_out
configure_file './menu_version.js.in' "$html_out/menu_version.js" @{'@VERLIST@' = $strVerList; '@VERSION@' = $ver}
}
Set-Location $store_cwd