-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 756a73e
Showing
446 changed files
with
159,128 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Known contributors (listed roughly in order by date) | ||
|
||
WA1GON | ||
K1MK | ||
KE3Z | ||
K1MU | ||
KC2YWE | ||
AA6YQ |
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 |
---|---|---|
@@ -0,0 +1,174 @@ | ||
cmake_minimum_required (VERSION 2.8 FATAL_ERROR) | ||
|
||
project(TrustedQSL) | ||
|
||
find_package(OpenSSL REQUIRED) | ||
|
||
|
||
if ( CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" ) | ||
if ( CMAKE_VERSION VERSION_LESS 2.8.12 ) | ||
SET ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC" ) | ||
else() | ||
ADD_COMPILE_OPTIONS("-fPIC") | ||
endif ( CMAKE_VERSION VERSION_LESS 2.8.12 ) | ||
endif( CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" ) | ||
|
||
SET (LINUX FALSE) | ||
IF (${CMAKE_SYSTEM_NAME} MATCHES "Linux") | ||
SET(LINUX TRUE) | ||
ENDIF () | ||
|
||
# These attempts to play with LIB_SUFFIX aren't portable. | ||
# Comment this out, and let GNUInstallDirs do this. | ||
# Uncomment if you're sure it's needed. | ||
#SET (LIB_SUFFIX "") | ||
# | ||
# Pre-set LIB_SUFFIX for 64-bit Linux platforms | ||
#IF (LINUX AND CMAKE_SHARED_LIBRARY_PREFIX STREQUAL "lib64") | ||
# SET (LIB_SUFFIX "64") | ||
#ENDIF() | ||
# | ||
# Make sure that there's a value for LIB_SUFFIX | ||
#IF (LINUX AND NOT CMAKE_SHARED_LIBRARY_PREFIX AND NOT LIB_SUFFIX) | ||
# # check 64 bit | ||
# IF (CMAKE_SIZEOF_VOID_P EQUAL 4) | ||
# SET (LIB_SUFFIX "") | ||
# ELSE (CMAKE_SIZEOF_VOID_P EQUAL 4) | ||
# SET (LIB_SUFFIX "64") | ||
# ENDIF (CMAKE_SIZEOF_VOID_P EQUAL 4) | ||
#ENDIF (LINUX AND NOT CMAKE_SHARED_LIBRARY_PREFIX AND NOT LIB_SUFFIX) | ||
|
||
if(LINUX) | ||
include(GNUInstallDirs) | ||
if(NOT DEFINED CMAKE_INSTALL_LIBDIR) | ||
if(CMAKE_SIZEOF_VOID_P EQUAL 4) | ||
set(CMAKE_INSTALL_LIBDIR lib) | ||
else() | ||
set(CMAKE_INSTALL_LIBDIR lib64) | ||
endif() | ||
endif() | ||
if(NOT DEFINED CMAKE_INSTALL_DATADIR) | ||
set(CMAKE_INSTALL_DATADIR share) | ||
endif() | ||
if(NOT DEFINED CMAKE_INSTALL_INCLUDEDIR) | ||
set(CMAKE_INSTLL_INCLUDEDIR include) | ||
endif() | ||
if(NOT DEFINED CMAKE_INSTALL_BINDIR) | ||
set(CMAKE_INSTALL_BINDIR bin) | ||
endif() | ||
elseif (NOT WIN32 AND NOT APPLE) | ||
set(CMAKE_INSTALL_LIBDIR lib) | ||
set(CMAKE_INSTALL_DATADIR share) | ||
set(CMAKE_INSTALL_INCLUDEDIR include) | ||
set(CMAKE_INSTALL_BINDIR bin) | ||
endif(LINUX) | ||
|
||
if(WIN32) | ||
set(CMAKE_FIND_LIBRARY_SUFFIXES .lib .a ${CMAKE_FIND_LIBRARY_SUFFIXES}) | ||
# just windows for now... unix knows how to find libraries better | ||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) | ||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) | ||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) | ||
endif() | ||
|
||
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmakemodules/") | ||
find_package(OptionalAddSubdirectory REQUIRED) | ||
|
||
option(USE_STATIC_MSVCRT "Use a static Visual C++ Runtime when building with MSVC") | ||
|
||
if(MSVC AND USE_STATIC_MSVCRT) | ||
foreach(flag_var | ||
CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE | ||
CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO) | ||
if(${flag_var} MATCHES "/MD") | ||
string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}") | ||
endif(${flag_var} MATCHES "/MD") | ||
endforeach(flag_var) | ||
else() | ||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall") | ||
endif() | ||
|
||
# Prefer LMDB, fall back to BDB if that's not available | ||
find_package(LMDB) | ||
if(NOT LMDB_FOUND) | ||
set (LMDB_LIBRARIES "") | ||
find_package(BDB REQUIRED) | ||
set (LMDB_INCLUDE_DIR "") | ||
else() | ||
add_definitions(-DUSE_LMDB) | ||
set (BDB_INCLUDE_DIR "") | ||
endif() | ||
|
||
if(NOT APPLE AND NOT WIN32) | ||
add_definitions("-DCONFDIR=\"${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}/TrustedQSL/\"") | ||
endif() | ||
|
||
# Get version number | ||
|
||
file(STRINGS "apps/tqslversion.ver" TQSLVERSION) | ||
string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\1" TQSL_VERSION_MAJOR ${TQSLVERSION}) | ||
string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\2" TQSL_VERSION_MINOR ${TQSLVERSION}) | ||
string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\3" TQSL_VERSION_UPDATE ${TQSLVERSION}) | ||
|
||
# Handle case where version number does not have an update i.e. 2.0 | ||
if (TQSL_VERSION_MAJOR STREQUAL ${TQSLVERSION}) | ||
string(REGEX REPLACE "([0-9]+)\\.([0-9]+)" "\\1" TQSL_VERSION_MAJOR ${TQSLVERSION}) | ||
string(REGEX REPLACE "([0-9]+)\\.([0-9]+)" "\\2" TQSL_VERSION_MINOR ${TQSLVERSION}) | ||
set(TQSL_VERSION_UPDATE "0") | ||
endif() | ||
|
||
#get build # with git | ||
|
||
find_program(GIT_PROG git "C:\\Program Files (x86)\\Git\\bin" "C:\\Program Files\\Git\\bin") | ||
|
||
if(GIT_PROG) #we can use git | ||
execute_process(COMMAND ${GIT_PROG} describe RESULT_VARIABLE GITERROR ERROR_QUIET OUTPUT_VARIABLE HEAD_COMMIT OUTPUT_STRIP_TRAILING_WHITESPACE) | ||
if(NOT GITERROR) #git ran alright | ||
set(BUILD ${HEAD_COMMIT}) | ||
else() # Git error - hope this is a source distro | ||
if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/apps/tqslbuild.h) | ||
file(STRINGS ${CMAKE_CURRENT_SOURCE_DIR}/apps/tqslbuild.h BUILDSTR REGEX "\\[.*\\]") | ||
string(REGEX REPLACE ".*\\[(.*)\\].*" "\\1" BUILD ${BUILDSTR}) | ||
endif() | ||
endif() | ||
else() # No git, again grab from source | ||
if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/apps/tqslbuild.h) | ||
file(STRINGS ${CMAKE_CURRENT_SOURCE_DIR}/apps/tqslbuild.h BUILDSTR REGEX "\\[.*\\]") | ||
string(REGEX REPLACE ".*\\[(.*)\\].*" "\\1" BUILD ${BUILDSTR}) | ||
endif() | ||
endif() | ||
|
||
# If BUILD is set (we have a version) and BUILDSTR is not (we got that build from | ||
# git), then write a tqslbuild.h. Else leave it alone. | ||
if(BUILD AND NOT BUILDSTR) | ||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/apps/tqslbuild.h.in" "${CMAKE_CURRENT_SOURCE_DIR}/apps/tqslbuild.h") | ||
else() #hope this is a source distribution, which will always include a correct tqslbuild | ||
if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/apps/tqslbuild.h") | ||
#but otherwise someone downloaded a snapshot without a buildfile | ||
set(BUILD "unknown") | ||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/apps/tqslbuild.h.in" "${CMAKE_CURRENT_SOURCE_DIR}/apps/tqslbuild.h") | ||
endif() | ||
endif() | ||
|
||
# In case the versions couldn't be deduced, set them | ||
if(NOT ${TQSL_VERSION_MAJOR}) | ||
set(TQSL_VERSION_MAJOR 2) | ||
endif() | ||
|
||
if(NOT TQSL_VERSION_MINOR) | ||
set(TQSL_VERSION_MINOR 1) | ||
endif() | ||
|
||
if (NOT TQSL_VERSION_UPDATE) | ||
set(TQSL_VERSION_UPDATE 0) | ||
endif() | ||
|
||
IF(TQSL_VERSION_UPDATE AND NOT TQSL_VERSION_UPDATE EQUAL 0) | ||
set(TQSLVERSION "${TQSL_VERSION_MAJOR}.${TQSL_VERSION_MINOR}.${TQSL_VERSION_UPDATE}") | ||
else() | ||
set(TQSLVERSION "${TQSL_VERSION_MAJOR}.${TQSL_VERSION_MINOR}") | ||
endif() | ||
# | ||
add_subdirectory(src) #tqsllib | ||
add_subdirectory(apps) | ||
macro_optional_add_subdirectory(tests) |
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 |
---|---|---|
@@ -0,0 +1,181 @@ | ||
TQSL/tqsllib | ||
================== | ||
|
||
TQSL is the TrustedQSL application suite and tqsllib is the | ||
TrustedQSL library. These are the two major components of the | ||
TrustedQSL project: | ||
|
||
http://sourceforge.net/projects/trustedqsl/ | ||
|
||
=================================================================== | ||
Contents | ||
|
||
1) Prerequisites | ||
|
||
2) Building the Library under Linux/Unix | ||
|
||
3) Building the Library under Mac OS X | ||
|
||
4) Building the Library under Windows. | ||
|
||
=================================================================== | ||
|
||
1) Prerequisites | ||
|
||
The TQSL applications depend upon the tqsllib library. First you | ||
should build and install that library and its prerequisites. | ||
|
||
The TrustedQSL library depends on several other libraries: | ||
|
||
OpenSSL (http://www.openssl.org/) - OpenSSL 1.1.1g was used for TQSL 2.5.5. | ||
expat 1.x XML parser library (http://expat.sourceforge.net/) - expat 2.2.9 | ||
zlib (http://zlib.net/) zlib 1.2.11 | ||
One of the following: | ||
LMDB (Lightning Memory-mapped DataBase) - https://lmdb.readthedocs.io/ - lmdb 0.9.23 | ||
or | ||
Berkeley DB (http://www.oracle.com/technetwork/products/berkeleydb/downloads/index.html) - BDB 6.2.23 | ||
wxWidgets (http://wxwidgets.org/downloads) - wxWidgets 2.8.12 or wxWidgets 3.1.2 | ||
curl - (http://curl.haxx.se/download.html) - curl 7.70.0 | ||
|
||
You will need the "developer" versions of these. The version numbers above aren't mandatory, they're just | ||
what was recenty used. | ||
|
||
Most Unix and unix-like workstations will have these available. For | ||
those systems that do not, the packages are easily built. Instructions | ||
for building under the Windows environment are given below under | ||
"Building under Windows." | ||
|
||
In the instructions that follow, the versions of other packages | ||
that were used to build the tqsllib package as of the date this | ||
document was last updated are given in parentheses. | ||
|
||
=================================================================== | ||
|
||
2) Building under Linux/Unix | ||
|
||
Many Linux distributions have a version of TrustedQSL already built | ||
and ready to use. Try installing package "TrustedQSL" using whatever | ||
commands your distribution uses for package instals: | ||
sudo yum install TrustedQSL | ||
sudo dnf install TrustedQSL | ||
sudo dnf install trustedqsl | ||
sudo apt-get install TrustedQSL | ||
sudo pkg-add TrustedQSL | ||
etc. | ||
|
||
If you need to build from source, follow the directions below. This | ||
is not intended for casual users, as you'll need to be able to | ||
install a C++ compiler and be able to search for and install the | ||
required development libraries. | ||
|
||
The quick answer: | ||
|
||
From the parent directory | ||
cmake . | ||
make | ||
make install | ||
(If you're not running as root (good!) the last should be | ||
"sudo make install"). | ||
|
||
That will install the library and applications under /usr/local. It | ||
also will install the needed header files under /usr/local/include. | ||
Configuration and help files will be installed in /usr/local/share. | ||
|
||
You can change the install location via: | ||
cmake -DCMAKE_INSTALL_PREFIX=/foo/bar . | ||
|
||
By default, only a shared version of the library is built. | ||
CMake option TQSLLIB_STATIC can be set to cause a static library to be | ||
built, either by using 'cmake -i' or by adding '-DTQSLLIB_STATIC=YES' | ||
to the cmake command above. | ||
|
||
If you installed the tqsllib library or its dependent libraries | ||
in locations that configure can't find, you'll need to specify | ||
those locations to cmake. For example, you can define the location for | ||
the Berkeley Database headers using BDB_PREFIX. (That points to the top-level | ||
directory, with /include for headers and /lib for libraries assumed below | ||
it.) | ||
|
||
If you choose to build with a different target directory (cmake with a | ||
pointer to the source), ensure that your build target/current directory is | ||
empty prior to invoking cmake. Vestiges of older builds can cause issues. | ||
|
||
=================================================================== | ||
|
||
3) Building under Mac OS X | ||
|
||
You'll need to have the Mac developer's tools, Xcode 1.5, installed. | ||
|
||
This is done in much the same manner as building under Linux/Unix, above. | ||
|
||
You will need to download and compile Berkeley DB 5.3 or later. The version | ||
of Berkeley DB shipped with OS X (as of 10.8) is out of date. | ||
|
||
You also may not want to install the library into system directories: | ||
|
||
cmake -DBDB_PREFIX=$HOME/bdb -DCMAKE_INSTALL_PREFIX=$HOME/tqsllib . | ||
make | ||
sudo make install | ||
|
||
To build a universal binary with compatibility from MacOS 10.4 upwards through | ||
Mojave, use the following shell script: | ||
|
||
#!/bin/sh | ||
# | ||
# Adjust this to where you've installed wxWidgets | ||
# | ||
PATH=$HOME/wx3/bin:$PATH | ||
# | ||
# Adjust this to where you've installed Berkeley DB 5.x | ||
# | ||
bdb=$HOME/bdb | ||
arch_flags="-arch ppc -arch i386" | ||
# | ||
# You need to download and install the OSX 10.4 universal SDK | ||
# to build a universal binary. gcc 4.0 is also needed. | ||
# | ||
sdk="/Developer/SDKs/MacOSX10.4u.sdk" | ||
ver_min="10.4" | ||
CMAKE_PREFIX_PATH="~/bdb/ ~/wx3/ ~/expat" | ||
|
||
cmake \ | ||
-DCMAKE_BUILD_TYPE=Debug \ | ||
-DCMAKE_OSX_ARCHITECTURES="ppc;i386" \ | ||
-DCMAKE_LINKER=/usr/bin/gcc-4.0 \ | ||
-DCMAKE_CXX_COMPILER=/usr/bin/c++-4.0 \ | ||
-DCMAKE_C_COMPILER=/usr/bin/gcc-4.0 \ | ||
-DBDB_PREFIX=$bdb \ | ||
-DCMAKE_OSX_SYSROOT=$sdk \ | ||
-DCMAKE_CXX_FLAGS=" -I $HOME/bdb/include -I /usr/include/c++/4.0.0 \ | ||
-I $sdk/System/Library/Frameworks/Carbon.framework/Headers \ | ||
-isysroot $sdk -mmacosx-version-min=$ver_min \ | ||
-fno-stack-protector $arch_flags" \ | ||
-DCMAKE_C_FLAGS=" -I $HOME/bdb/include -I /usr/include/c++/4.0.0 \ | ||
-I $sdk/System/Library/Frameworks/Carbon.framework/Headers \ | ||
-isysroot $sdk -mmacosx-version-min=$ver_min \ | ||
-fno-stack-protector $arch_flags" \ | ||
-DCMAKE_EXE_LINKER_FLAGS=" -Wl,-syslibroot,$sdk \ | ||
-mmacosx-version-min=$ver_min $arch_flags " \ | ||
-DCMAKE_SHARED_LINKER_FLAGS=" -Wl,-syslibroot,$sdk \ | ||
-mmacosx-version-min=$ver_min $arch_flags " \ | ||
$* . | ||
make | ||
|
||
The build will result in the directory apps/tqsl.app, which contains the | ||
complete Mac OS X application. You can simply move that folder to your | ||
system's Applications folder or the location of your choice, then launch | ||
the application from Finder. | ||
If you want to distribute the built application: | ||
|
||
./macos_createdmg.sh | ||
|
||
will make tqsl-2.x.x.dmg, a Mac distributable disk image | ||
containing the TrustedQSL applications folder and document files. | ||
It will also create tqsl-2.x.x.pkg, a standard Mac install package. | ||
|
||
=================================================================== | ||
|
||
4) Building under Windows | ||
|
||
See file WindowsBuildSetup.txt in the top-level directory for details | ||
on how to set up MSVC to compile TQSL. |
Oops, something went wrong.