flamp/doxygen/make_docs.sh
Robert Stiles 9104fc050a Relay, Modems, Scripting, Documentation, and Notices
* Update Copyright (C) to GPL version 3
  * Add doxygen based documentation
  * Remove .EPS file requirement for PDF generation.
  * Add warning dialog when removing files from the transmit queue.
    (Request from Frank N3FLL)
  * New widgets in receive panel to support data relays.
  * Add code for data relays.
  * Extend supported 8 bit modems. QPSK31-500, BPSK31-64/64F.
    (Request from Charles N5PVL)
  * Move ztimer code into separate files.
  * Add ztimer watch dog to restart ztimer when operator changes system
    time.
  * Correct modem assignments to hamcast drop down menus 2,3,4.
  * Add simple configuration script.
  * Add callback interface to script engine.
  * Add file run_script.cxx. Script to GUI interface code.
  * Add files hamcast_group.cxx/.h. Transmit times updated only when HAMCAST
    tab has focus. Subclass of Fl_Group;
  * Fixed multiple non error issues with display and file processing.
  * Corrected value assignments in script processing for TX interval and
    block size.
  * New command: EVENT TIMED:<ON:OFF>
  * Reassigned use of command EVENT:<ON|OFF>
  * Modify RESET: to handle EVENT TIMED: and EVENT:
  * Correct data corruption in cAmp with mutex lock/unlocks.
  * Data relay functional. Limited to sending all available data on
    a file by file basis.
  * Thread the Relay transmit, and added interval timer functionality.
  * Data relay completely functional.
  * Add hash values in the receive queue list.
  * Possible fix for modem string name transfer crashing both
    FLAMP and FLDIGI.
  * Script settings overwritten by panel settings on next file load. Fixed.
  * Fixed synchronized display and processing concurrency.
  * Fixed auto file update on events, broken when new script engine added.
  * cAmp handle routines moved to new files global_am.cxx/.h.
  * Program exit crash; Remove duplicate pthread_muxtex_destroy() call.
  * Clear TX panel when last file removed.
  * Script COMP:<ON|OFF> conflict with FLTK GUI callback() function. Remove
    FLTK GUI callback() from script COMP GUI interface.
  * Minor GUI logic changes to support independent file attributes.
  * Add additional character filtering when sending binary/non-binary files
    in unproto mode. Allowable characters >= SPACE, <= '~',
    TAB, CR, LF.
  * Extend thread lock/unlocking to amp.cxx external access api's.
  * Move function convert_to_plain_text from file_io.cxx to amp.cxx
    to prevent thread dead lock.
  * Create/Use a copy of cAmp instance when transmitting.
  * Corrected n+1 for() loop. is for(i<c) s/b for(i<=c) for relay block
    selection.
  * Add code to disable transmitting events using the cancel button
    on the TX panel.
  * Move cAmp RX/TX code from flamp.cxx into new transmit_camp.cxx/.h files.
  * Move relavent code from flamp.cxx to amp.cxx. In an attempt to
    isolate GUI from data for easier mutex locking.
  * Add 8PSK timing tables for 8PSK250/500/1000/1333
  * Add FL_APPS directory support
  * Changed and fixed --config-dir (old command --flamp-dir).
  * Release Candidate (RC1)
  * Adjust GUI widget height for Linux
  * Minor change to doxygen docs
2014-12-01 15:51:33 -06:00

290 lines
4.8 KiB
Bash
Executable file

#!/bin/bash
#
# A simple script for creating/archiving doxygen documentation for FLAmp
PRG_NAME="FLAmp"
LATEX="0"
DOXY="0"
BUILD_PROG_DOCS="0"
BUILD_PROTO_DOCS="0"
VER_NUM="0"
if [ -z $1 ]; then
BUILD_USER_DOCS="1"
else
BUILD_USER_DOCS="0"
fi
macintosh_file_clean()
{
BASE_PATH=$1
if [ -z $BASE_PATH ]; then
BASE_PATH="${PWD}"
fi
find $BASE_PATH -name ".DS_Store" -exec rm -rf {} \;
}
doc_version()
{
if [ ! -f $1 ]; then
echo "Doxyfile not found ($1)"
echo "PWD=$PWD"
exit
fi
VER_STR=`grep -e "PROJECT_NUMBER*=*" $1`
if [ -z $VER_STR ]; then
VER_NUM="UNKNOWN_VERSION"
return
fi
VER_NUM="${VER_STR#*=}"
VER_NUM="${VER_NUM#"${VER_NUM%%[![:space:]]*}"}"
VER_NUM="${VER_NUM%"${VER_NUM##*[![:space:]]}"}"
}
help()
{
echo ""
echo "Use:"
echo " make_docs.sh <prog and/or user and/or proto>"
echo " make_docs.sh help"
echo ""
echo "default: user"
echo "user: Generate user documentation"
echo "prog: Generate programmer documentation"
echo "proto: Generate protocol documentation"
echo "help: This message"
echo ""
}
rename_file()
{
if [ -f "$1" ]; then
mv "$1" "$2"
fi
}
make_dir()
{
echo "Make Dir: $1"
if [ -d "$1" ]; then
return
fi
mkdir "$1"
}
function check_dir()
{
if [ -d "$1" ]; then
echo "1"
return
fi
echo "0"
}
function check_file()
{
if [ -f "$1" ]; then
echo "1"
return
fi
echo "0"
}
check_doxy()
{
RESULTS=$(check_file "$PWD/Doxyfile")
if [ "$RESULTS" = "1" ]; then
doxygen
else
echo "Doxyfile not found in directory $PWD"
fi
}
check_doxy_exec()
{
PROG_NAME=`which doxygen`
EXEC_FILE=`basename $PROG_NAME`
if [ "$EXEC_FILE" != "doxygen" ]; then
echo "Install doxygen to build documentation"
DOXY="0"
else
echo "Found $PROG_NAME"
DOXY="1"
fi
}
check_latex_exec()
{
PROG_NAME=`which latex`
EXEC_FILE=`basename $PROG_NAME`
if [ "$EXEC_FILE" != "latex" ]; then
echo "Install TeX/LaTeX to build pdf documentation"
LATEX="0"
else
echo "Found $PROG_NAME"
LATEX="1"
fi
}
pdf_docs()
{
if [ "$LATEX" = "1" ]; then
OP_DIR="$1"
RESULTS=$(check_dir "$OP_DIR")
if [ "$RESULTS" = "1" ]; then
cd $OP_DIR
make
rename_file "refman.pdf" "$2"
fi
fi
}
compress_html()
{
if [ -z $1 ]; then
return
fi
if [ -z $2 ]; then
return
fi
TAR=`which tar`
if [ -z $TAR ]; then
echo "***************************************"
echo "* Compression program 'tar' not found *"
echo "***************************************"
return
fi
SAVE_NAME="compressed_html/$1_html.tar.bz2"
cd "../../doc"
COMP_DIR="$2/html/"
RESULTS=$(check_dir "$COMP_DIR")
if [ "$RESULTS" = "1" ]; then
$TAR -cvjf "$SAVE_NAME" "$COMP_DIR"
fi
}
for var in "$@"
do
case "$var" in
prog)
BUILD_PROG_DOCS="1"
;;
PROG)
BUILD_PROG_DOCS="1"
;;
USER)
BUILD_USER_DOCS="1"
;;
user)
BUILD_USER_DOCS="1"
;;
PROTO)
BUILD_PROTO_DOCS="1"
;;
proto)
BUILD_PROTO_DOCS="1"
;;
*)
help
exit
;;
esac
done
check_doxy_exec
if [ "$DOXY" != "1" ]; then
echo "**************************************"
echo "* Install Doxygen to build documents *"
echo "**************************************"
exit
fi
check_latex_exec
if [ "$LATEX" != "1" ]; then
echo "********************************************"
echo "* Install TeX/LaTeX to build PDF documents *"
echo "********************************************"
fi
SCRIPT_PATH="$PWD/make_docs.sh"
echo "Looking for Script: $SCRIPT_PATH"
if [ -f "$SCRIPT_PATH" ]; then
make_dir "../doc"
make_dir "../doc/pdf"
make_dir "../doc/compressed_html"
make_dir "../doc/programmer_docs"
make_dir "../doc/protocol_docs"
make_dir "../doc/user_docs"
# Additional files for html link references
# make_dir "../doc/user_docs/html"
# make_dir "../doc/user_docs/html/aux"
# cp ./user_src_doc/aux/*.* ../doc/user_docs/html/aux
else
echo "***********************************************************************"
echo "* Change Directory to the ./make_doc.sh location then execute script. *"
echo "***********************************************************************"
exit
fi
# Protocol Manual
if [ $BUILD_PROTO_DOCS -eq "1" ]; then
(
cd protocol_src_doc
doc_version "${PWD}/Doxyfile"
check_doxy
( compress_html "Amp2_v${VER_NUM}_Protocol" "protocol_docs" )
pdf_docs "../../doc/protocol_docs/latex" "../../pdf/Amp2_v${VER_NUM}_Protocol.pdf"
)
fi
# User Manual
if [ $BUILD_USER_DOCS -eq "1" ]; then
(
cd user_src_doc
doc_version "${PWD}/Doxyfile"
check_doxy
( compress_html "${PRG_NAME}_${VER_NUM}_Users_Manual" "user_docs")
pdf_docs "../../doc/user_docs/latex" "../../pdf/${PRG_NAME}_${VER_NUM}_Users_Manual.pdf"
)
fi
# Programmers Code Reference
if [ $BUILD_PROG_DOCS -eq "1" ]; then
(
cd prog_src_doc
doc_version "${PWD}/Doxyfile"
check_doxy
( compress_html "${PRG_NAME}_${VER_NUM}_Code_Reference" "programmer_docs")
pdf_docs "../../doc/programmer_docs/latex" "../../pdf/${PRG_NAME}_${VER_NUM}_Code_Reference.pdf"
)
fi