Update various references to scripts/ and mention old git issues in Compile.rst

develop
lethosor 2016-06-29 19:38:15 -04:00
parent 85a920d1df
commit cfaba3ec71
5 changed files with 26 additions and 17 deletions

@ -36,7 +36,7 @@ script:
- python travis/authors-rst.py
- python travis/script-in-readme.py
- python travis/script-syntax.py --ext=lua --cmd="luac5.2 -p"
- python travis/script-syntax.py --ext=rb --cmd="ruby -c" --path library/scripts/
- python travis/script-syntax.py --ext=rb --cmd="ruby -c"
- mkdir build-travis
- cd build-travis
- cmake .. -DCMAKE_C_COMPILER=gcc-$GCC_VERSION -DCMAKE_CXX_COMPILER=g++-$GCC_VERSION -DBUILD_DOCS:BOOL=ON

@ -210,6 +210,8 @@ IF(BUILD_PLUGINS)
add_subdirectory (plugins)
endif()
add_subdirectory(scripts)
find_package(Sphinx QUIET)
if (BUILD_DOCS)
if (NOT SPHINX_FOUND)
@ -221,12 +223,12 @@ if (BUILD_DOCS)
"${CMAKE_CURRENT_SOURCE_DIR}/docs/images/*.png"
"${CMAKE_CURRENT_SOURCE_DIR}/docs/styles/*"
"${CMAKE_CURRENT_SOURCE_DIR}/conf.py"
"${CMAKE_CURRENT_SOURCE_DIR}/library/scripts/about.txt"
"${CMAKE_CURRENT_SOURCE_DIR}/library/scripts/*/about.txt"
"${CMAKE_CURRENT_SOURCE_DIR}/scripts/about.txt"
"${CMAKE_CURRENT_SOURCE_DIR}/scripts/*/about.txt"
)
file(GLOB_RECURSE SPHINX_SCRIPT_DEPS
"${CMAKE_CURRENT_SOURCE_DIR}/library/scripts/*.lua"
"${CMAKE_CURRENT_SOURCE_DIR}/library/scripts/*.rb"
"${CMAKE_CURRENT_SOURCE_DIR}/scripts/*.lua"
"${CMAKE_CURRENT_SOURCE_DIR}/scripts/*.rb"
)
set(SPHINX_DEPS ${SPHINX_DEPS} ${SPHINX_SCRIPT_DEPS}
"${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.rst"

@ -52,7 +52,7 @@ def document_scripts():
"""
# First, we collect the commands and paths to include in our docs
scripts = []
for root, _, files in os.walk('library/scripts'):
for root, _, files in os.walk('scripts'):
scripts.extend(doc_dir(root, files))
# Next we split by type and create include directives sorted by command
kinds = {'base': [], 'devel': [], 'fix': [], 'gui': [], 'modtools': []}
@ -84,7 +84,7 @@ def write_script_docs():
'modtools': 'Scripts for Modders'}
for k in head:
title = ('.. _{k}:\n\n{l}\n{t}\n{l}\n\n'
'.. include:: /library/scripts/{a}about.txt\n\n'
'.. include:: /scripts/{a}about.txt\n\n'
'.. contents::\n\n').format(
k=k, t=head[k],
l=len(head[k])*'#',

@ -35,7 +35,21 @@ To get the latest development code (develop branch), clone as above and then::
You must run ``git submodule update`` every time you change Git branch,
for example when switching between master and develop branches and back.
If a submodule only exists on the newer branch, you also need to run
``git submodule update --init``. Failure to do this may result in strange
build errors or "not a known DF version" errors.
**Important note regarding very old git versions**
If you are using git 1.8.0 or older, and cloned DFHack before commit 85a920d
(around DFHack v0.43.03-alpha1), you may run into fatal git errors when updating
submodules after switching branches. This is due to those versions of git being
unable to handle our change from "scripts/3rdparty/name" submodules to a single
"scripts" submodule. This may be fixable by renaming .git/modules/scripts to
something else and re-running ``git submodule update --init`` on the branch with
the single scripts submodule (and running it again when switching back to the
one with multiple submodules, if necessary), but it is usually much simpler to
upgrade your git version.
Contributing to DFHack
======================
@ -47,6 +61,8 @@ and whenever you need help.
.. _IRC: https://webchat.freenode.net/?channels=dfhack
(Note: for submodule issues, please see the above instructions first!)
For lots more details on contributing to DFHack, including pull requests, code format,
and more, please see `contributing-code`.

@ -407,13 +407,6 @@ install(DIRECTORY lua/
DESTINATION ${DFHACK_LUA_DESTINATION}
FILES_MATCHING PATTERN "*.lua")
#install(DIRECTORY ${dfhack_SOURCE_DIR}/scripts
# DESTINATION ${DFHACK_DATA_DESTINATION}
# FILES_MATCHING PATTERN "*.lua"
# PATTERN "*.rb"
# PATTERN "3rdparty" EXCLUDE
# )
install(DIRECTORY ${dfhack_SOURCE_DIR}/patches
DESTINATION ${DFHACK_DATA_DESTINATION}
FILES_MATCHING PATTERN "*.dif")
@ -434,5 +427,3 @@ if(BUILD_DEVEL)
add_subdirectory (doc)
ENDIF()
endif()
add_subdirectory(scripts)