-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from morganwillcock/buildnative
Build without cygwin
- Loading branch information
Showing
11 changed files
with
191 additions
and
296 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,126 +1,7 @@ | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# C extensions | ||
*.so | ||
|
||
# I want to ignore the source of sphinx | ||
source/ | ||
|
||
# Distribution / packaging | ||
.Python | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
wheels/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
MANIFEST | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*.cover | ||
.hypothesis/ | ||
.pytest_cache/ | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# the chmcmd binary and md5 | ||
__pycache__ | ||
build | ||
source | ||
chmcmd | ||
chmcmd.md5 | ||
|
||
# the resulting chm docs | ||
*.chm | ||
|
||
# Django stuff: | ||
*.log | ||
local_settings.py | ||
db.sqlite3 | ||
|
||
# Flask stuff: | ||
instance/ | ||
.webassets-cache | ||
|
||
# Scrapy stuff: | ||
.scrapy | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
target/ | ||
|
||
# Jupyter Notebook | ||
.ipynb_checkpoints | ||
|
||
# pyenv | ||
.python-version | ||
|
||
# celery beat schedule file | ||
celerybeat-schedule | ||
|
||
# SageMath parsed files | ||
*.sage.py | ||
|
||
# Environments | ||
.env | ||
.venv | ||
env/ | ||
venv/ | ||
ENV/ | ||
env.bak/ | ||
venv.bak/ | ||
|
||
# usual things on the venv | ||
bin/ | ||
lib/ | ||
lib64/ | ||
share/ | ||
|
||
# this is a pip-delete-this-directory | ||
src/ | ||
|
||
# pip on venv | ||
pip-selfcheck.json | ||
|
||
# Spyder project settings | ||
.spyderproject | ||
.spyproject | ||
|
||
# Rope project settings | ||
.ropeproject | ||
|
||
# mkdocs documentation | ||
/site | ||
|
||
# mypy | ||
.mypy_cache/ | ||
*.chw |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,52 @@ | ||
# Minimal makefile for Sphinx documentation | ||
# | ||
SOURCEDIR ?= source | ||
BUILDDIR ?= build | ||
SPHINXPROJ ?= AGSHelp | ||
SPHINXOPTS ?= -c . | ||
|
||
# You can set these variables from the command line. | ||
SPHINXOPTS ?= -c . | ||
SPHINXBUILD = sphinx-build | ||
SPHINXPROJ = AGSHelp | ||
SOURCEDIR = source | ||
BUILDDIR = build | ||
GITURL ?= https://github.com/adventuregamestudio/ags-manual.wiki.git | ||
GITOPTS ?= --depth=1 --branch=master | ||
|
||
.PHONY: help clone html htmlhelp chm clean | ||
|
||
# Put it first so that "make" without argument is like "make help". | ||
help: | ||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
@awk -F '[: ]' \ | ||
'/^[^ ][a-z ]+:/ { for (i = 1; i < NF; i ++ ) { if ($$i != "help") print $$i } }' Makefile | ||
|
||
clone: | ||
@rm -rf "$(SOURCEDIR)" | ||
@git clone $(GITOPTS) $(GITURL) $(SOURCEDIR) | ||
touch "$(SOURCEDIR)/index.rst" | ||
|
||
html htmlhelp: | ||
@python -m sphinx -b $@ "$(SOURCEDIR)" "$(BUILDDIR)/$@" $(SPHINXOPTS) | ||
|
||
chm: | ||
@sed -E -i.bak -n "/^Binary (TOC|Index)=No$$/!p" "$(BUILDDIR)/htmlhelp/AGSHelpdoc.hhp" && \ | ||
rm "$(BUILDDIR)/htmlhelp/AGSHelpdoc.hhp.bak" | ||
|
||
.PHONY: help Makefile | ||
@chmcmd=`which chmcmd` ;\ | ||
if [ $$? != 0 ]; then \ | ||
if [ "`uname`" = "Linux" ]; then \ | ||
rm -f chmcmd && wget –quiet https://github.com/ericoporto/freepascal/releases/download/3.0.4/chmcmd ;\ | ||
echo "af4eea94c843adb20f8ae10884badbc5 chmcmd" > chmcmd.md5 ;\ | ||
md5sum -c chmcmd.md5 || exit 1 ;\ | ||
chmod +x chmcmd ;\ | ||
chmcmd=`pwd`"/chmcmd" ;\ | ||
else \ | ||
echo "chmcmd is not present" ;\ | ||
exit 1;\ | ||
fi ;\ | ||
fi ;\ | ||
echo "Using '$$chmcmd' \ | ||
$$( \ | ||
cd "$(BUILDDIR)/htmlhelp" && \ | ||
rm -f "AGSHelpdoc.chm" && \ | ||
"$$chmcmd" "AGSHelpdoc.hhp" && \ | ||
chmod a+r-w-x "AGSHelpdoc.chm" && \ | ||
mv -fv "AGSHelpdoc.chm" ../../ags-help.chm \ | ||
)" | ||
|
||
# Catch-all target: route all unknown targets to Sphinx using the new | ||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). | ||
.DEFAULT: Makefile | ||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
clean: | ||
@while read -r line; do \ | ||
rm -rf "$$line"; \ | ||
done < .gitignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,36 +4,57 @@ Travis (web): [ | [**Revision History**](https://github.com/adventuregamestudio/ags-manual/wiki/_history) | ||
|
||
The help files can be edited on the wiki or cloned locally and pushed. Create issues if something is wrong. | ||
The help files can be edited on the wiki or cloned locally and pushed. Please open an issue if something is wrong. | ||
|
||
git clone https://github.com/adventuregamestudio/ags-manual.wiki.git | ||
|
||
## Read the help files | ||
## Reading the help files | ||
|
||
The manual is hosted online on [adventuregamestudio.github.io/ags-manual/](https://adventuregamestudio.github.io/ags-manual) . | ||
The manual is hosted online on [adventuregamestudio.github.io/ags-manual/](https://adventuregamestudio.github.io/ags-manual). | ||
|
||
You can also download it from [latest release](https://github.com/adventuregamestudio/ags-manual/releases/latest) . | ||
You can also download the [latest release](https://github.com/adventuregamestudio/ags-manual/releases/latest). | ||
|
||
 | ||
|
||
## How to generate the help files from the wiki! | ||
## Building the help files | ||
|
||
The help file is generated using [Python 3 Sphinx](http://www.sphinx-doc.org/en/master/)! | ||
The help files are generated using [Python 3 Sphinx](http://www.sphinx-doc.org/en/master/)! | ||
|
||
This documentation assumes you have Sphinx already installed and configured and you have access to a Unix-style *bash* compatible shell. | ||
**Note that the use of a virtualenv is recommended if your Python installation is system-wide** | ||
|
||
To build the help files, clone this repository first! | ||
Install the requisite pip packages | ||
|
||
git clone [email protected]:adventuregamestudio/ags-manual.git | ||
cd agshelp | ||
pip install -r requirements.txt | ||
|
||
Then you need to get the wiki files | ||
Install an HTML help compiler | ||
|
||
./get-help-source.sh | ||
For Windows, install [HTML Help Workshop](http://go.microsoft.com/fwlink/?LinkId=14188). For macOS, Unix, Linux, etc. install chmcmd from your regular package repository or install [Free Pascal](https://www.freepascal.org/download.var). | ||
|
||
Now just use make to create any help version you want! **Example for html files**: | ||
### Make targets | ||
|
||
make html | ||
name | function | ||
--- | --- | ||
clone | git clone the wiki source | ||
html | run sphinx-build with the html builder | ||
htmlhelp | run sphinx-build with the htmlhelp builder | ||
chm | run the HTML compiler | ||
clean | delete everything listed in .gitignore | ||
|
||
build just the html site | ||
|
||
make clone html | ||
|
||
build just the CHM (Windows help) file | ||
|
||
make clone htmlhelp chm | ||
|
||
build everything | ||
|
||
make clone html htmlhelp chm | ||
|
||
rebuild everything | ||
|
||
make clean clone html htmlhelp chm | ||
|
||
## Indexing | ||
|
||
|
@@ -44,21 +65,17 @@ Markdown | Indexed as | |
\#\# Heading | Single entry: 'Heading' | ||
\#\#\# Sub-heading | Paired entry: 'Heading' <-> 'Sub-heading' | ||
|
||
Using \#\#\# without a preceeding \#\# on the page will generate a warning and be ignored by Sphinx, so it won't appear in the index. To create an H2 style heading without an index entry, use the alternate H2 markup: | ||
To create an H2 style heading without an index entry, use the alternate H2 markup: | ||
|
||
Heading | ||
------- | ||
|
||
H1 headings are not checked, effectively reserving their use for primary document titles. | ||
H1 headings are not checked, effectively reserving their use for the primary title on the contents page. | ||
|
||
## Checking wiki links | ||
|
||
If making a lot of changes, the included AWK script can validate links within a directory: | ||
|
||
./checklinks path/to/wiki/source/*.md | ||
|
||
A checklinks task is run on every Travis-CI build, and the build will fail for any missing link. [Read the logs here to find the missing link](https://travis-ci.org/adventuregamestudio/ags-manual). | ||
|
||
Additionally, *sphinx linkchecker* can check if external links are broken. | ||
|
||
make linkcheck | ||
A checklinks task is run on every Travis-CI build, and the build will fail for any missing link. Read the logs [here](https://travis-ci.org/adventuregamestudio/ags-manual) to find the missing link. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.