Compare commits
4 Commits
tix-8.4.3.
...
openssl-1.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d6b2cd4920 | ||
|
|
66bc075dac | ||
|
|
ffe559ef64 | ||
|
|
4b29e0458f |
3
.gitattributes
vendored
Normal file
3
.gitattributes
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
*.der binary
|
||||
/fuzz/corpora/** binary
|
||||
*.pfx binary
|
||||
14
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
14
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
<!--
|
||||
Thank you for your pull request. Please review these requirements:
|
||||
|
||||
Contributors guide: https://github.com/openssl/openssl/blob/master/CONTRIBUTING
|
||||
|
||||
Other than that, provide a description above this comment if there isn't one already
|
||||
|
||||
If this fixes a github issue, make sure to have a line saying 'Fixes #XXXX' (without quotes) in the commit message.
|
||||
-->
|
||||
|
||||
##### Checklist
|
||||
<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->
|
||||
- [ ] documentation is added or updated
|
||||
- [ ] tests are added or updated
|
||||
185
.gitignore
vendored
Normal file
185
.gitignore
vendored
Normal file
@@ -0,0 +1,185 @@
|
||||
# Ignore editor artefacts
|
||||
/.dir-locals.el
|
||||
|
||||
# Top level excludes
|
||||
/Makefile.orig
|
||||
/MINFO
|
||||
/TABLE
|
||||
/*.pc
|
||||
/rehash.time
|
||||
/inc.*
|
||||
/makefile.*
|
||||
/out.*
|
||||
/tmp.*
|
||||
/configdata.pm
|
||||
|
||||
# *all* Makefiles
|
||||
Makefile
|
||||
# ... except in demos
|
||||
!/demos/*/Makefile
|
||||
|
||||
# Links under apps
|
||||
/apps/CA.pl
|
||||
/apps/tsget
|
||||
/apps/tsget.pl
|
||||
/apps/md4.c
|
||||
|
||||
# Auto generated headers
|
||||
/crypto/buildinf.h
|
||||
/apps/progs.h
|
||||
/crypto/include/internal/*_conf.h
|
||||
/openssl/include/opensslconf.h
|
||||
/util/domd
|
||||
|
||||
# error code files
|
||||
/crypto/err/openssl.txt.old
|
||||
/engines/e_afalg.txt.old
|
||||
/engines/e_capi.txt.old
|
||||
/engines/e_dasync.txt.old
|
||||
/engines/e_ossltest.txt.old
|
||||
|
||||
# Executables
|
||||
/apps/openssl
|
||||
/test/sha256t
|
||||
/test/sha512t
|
||||
/test/gost2814789t
|
||||
/test/ssltest_old
|
||||
/test/*test
|
||||
/test/fips_aesavs
|
||||
/test/fips_desmovs
|
||||
/test/fips_dhvs
|
||||
/test/fips_drbgvs
|
||||
/test/fips_dssvs
|
||||
/test/fips_ecdhvs
|
||||
/test/fips_ecdsavs
|
||||
/test/fips_rngvs
|
||||
/test/fips_test_suite
|
||||
/test/ssltest_old
|
||||
/test/x509aux
|
||||
/test/v3ext
|
||||
/test/versions
|
||||
/test/ossl_shim/ossl_shim
|
||||
/test/rsa_complex
|
||||
|
||||
# Certain files that get created by tests on the fly
|
||||
/test/test-runs
|
||||
/test/buildtest_*
|
||||
|
||||
# Fuzz stuff.
|
||||
# Anything without an extension is an executable on Unix, so we keep files
|
||||
# with extensions. And we keep the corpora subddir versioned as well.
|
||||
# Anything more generic with extensions that should be ignored will be taken
|
||||
# care of by general ignores for those extensions (*.o, *.obj, *.exe, ...)
|
||||
/fuzz/*
|
||||
!/fuzz/README*
|
||||
!/fuzz/corpora
|
||||
!/fuzz/*.*
|
||||
|
||||
# Misc auto generated files
|
||||
/include/openssl/opensslconf.h
|
||||
/tools/c_rehash
|
||||
/tools/c_rehash.pl
|
||||
/util/shlib_wrap.sh
|
||||
/tags
|
||||
/TAGS
|
||||
/libcrypto.map
|
||||
/libssl.map
|
||||
|
||||
# Windows (legacy)
|
||||
/tmp32
|
||||
/tmp32.dbg
|
||||
/tmp32dll
|
||||
/tmp32dll.dbg
|
||||
/out32
|
||||
/out32.dbg
|
||||
/out32dll
|
||||
/out32dll.dbg
|
||||
/inc32
|
||||
/MINFO
|
||||
/ms/.rnd
|
||||
/ms/bcb.mak
|
||||
/ms/libeay32.def
|
||||
/ms/nt.mak
|
||||
/ms/ntdll.mak
|
||||
/ms/ssleay32.def
|
||||
/ms/version32.rc
|
||||
|
||||
# Files created on other branches that are not held in git, and are not
|
||||
# needed on this branch
|
||||
/include/openssl/asn1_mac.h
|
||||
/include/openssl/des_old.h
|
||||
/include/openssl/fips.h
|
||||
/include/openssl/fips_rand.h
|
||||
/include/openssl/krb5_asn.h
|
||||
/include/openssl/kssl.h
|
||||
/include/openssl/pq_compat.h
|
||||
/include/openssl/ssl23.h
|
||||
/include/openssl/tmdiff.h
|
||||
/include/openssl/ui_compat.h
|
||||
/test/fips_aesavs.c
|
||||
/test/fips_desmovs.c
|
||||
/test/fips_dsatest.c
|
||||
/test/fips_dssvs.c
|
||||
/test/fips_hmactest.c
|
||||
/test/fips_randtest.c
|
||||
/test/fips_rngvs.c
|
||||
/test/fips_rsagtest.c
|
||||
/test/fips_rsastest.c
|
||||
/test/fips_rsavtest.c
|
||||
/test/fips_shatest.c
|
||||
/test/fips_test_suite.c
|
||||
/test/shatest.c
|
||||
|
||||
##### Generic patterns
|
||||
# Auto generated assembly language source files
|
||||
*.s
|
||||
!/crypto/*/asm/*.s
|
||||
/crypto/arm*.S
|
||||
/crypto/*/*.S
|
||||
*.asm
|
||||
!/crypto/*/asm/*.asm
|
||||
|
||||
# Object files
|
||||
*.o
|
||||
*.obj
|
||||
|
||||
# editor artefacts
|
||||
*.swp
|
||||
.#*
|
||||
\#*#
|
||||
*~
|
||||
|
||||
# Certificate symbolic links
|
||||
*.0
|
||||
|
||||
# All kinds of libraries and executables
|
||||
*.a
|
||||
*.so
|
||||
*.so.*
|
||||
*.dylib
|
||||
*.dylib.*
|
||||
*.dll
|
||||
*.dll.*
|
||||
*.exe
|
||||
*.pyc
|
||||
*.exp
|
||||
*.lib
|
||||
*.pdb
|
||||
*.ilk
|
||||
*.def
|
||||
*.rc
|
||||
*.res
|
||||
|
||||
# Misc generated stuff
|
||||
Makefile.save
|
||||
/crypto/**/lib
|
||||
/engines/**/lib
|
||||
/ssl/**/lib
|
||||
*.bak
|
||||
cscope.*
|
||||
*.d
|
||||
pod2htmd.tmp
|
||||
|
||||
# Windows manifest files
|
||||
*.manifest
|
||||
doc-nits
|
||||
11
.gitmodules
vendored
Normal file
11
.gitmodules
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
[submodule "boringssl"]
|
||||
path = boringssl
|
||||
url = https://boringssl.googlesource.com/boringssl
|
||||
|
||||
[submodule "pyca.cryptography"]
|
||||
path = pyca-cryptography
|
||||
url = https://github.com/pyca/cryptography.git
|
||||
|
||||
[submodule "krb5"]
|
||||
path = krb5
|
||||
url = https://github.com/krb5/krb5
|
||||
15
.travis-apt-pin.preferences
Normal file
15
.travis-apt-pin.preferences
Normal file
@@ -0,0 +1,15 @@
|
||||
Package: clang-3.9
|
||||
Pin: release o=Ubuntu
|
||||
Pin-Priority: -1
|
||||
|
||||
Package: libclang-common-3.9-dev
|
||||
Pin: release o=Ubuntu
|
||||
Pin-Priority: -1
|
||||
|
||||
Package: libclang1-3.9
|
||||
Pin: release o=Ubuntu
|
||||
Pin-Priority: -1
|
||||
|
||||
Package: libllvm3.9v4
|
||||
Pin: release o=Ubuntu
|
||||
Pin-Priority: -1
|
||||
11
.travis-create-release.sh
Normal file
11
.travis-create-release.sh
Normal file
@@ -0,0 +1,11 @@
|
||||
#! /bin/sh
|
||||
|
||||
# $1 is expected to be $TRAVIS_OS_NAME
|
||||
|
||||
./Configure dist
|
||||
if [ "$1" == osx ]; then
|
||||
make NAME='_srcdist' TARFILE='_srcdist.tar' \
|
||||
TAR_COMMAND='$(TAR) $(TARFLAGS) -cf -' tar
|
||||
else
|
||||
make TARFILE='_srcdist.tar' NAME='_srcdist' dist
|
||||
fi
|
||||
254
.travis.yml
Normal file
254
.travis.yml
Normal file
@@ -0,0 +1,254 @@
|
||||
dist: trusty
|
||||
sudo: required
|
||||
|
||||
osx_image: xcode9.3
|
||||
|
||||
language: c
|
||||
cache: ccache
|
||||
git:
|
||||
submodules: false
|
||||
quiet: true
|
||||
|
||||
before_install:
|
||||
- if [ -n "$COVERALLS" ]; then
|
||||
pip install --user cpp-coveralls;
|
||||
fi;
|
||||
- if expr "$CONFIG_OPTS" ":" ".*enable-external-tests" > /dev/null; then
|
||||
git submodule update --init --recursive;
|
||||
fi;
|
||||
|
||||
os:
|
||||
- linux
|
||||
- osx
|
||||
|
||||
compiler:
|
||||
- clang
|
||||
- gcc
|
||||
|
||||
env:
|
||||
- CONFIG_OPTS="" DESTDIR="_install"
|
||||
- CONFIG_OPTS="no-asm -Werror --debug no-afalgeng no-shared enable-crypto-mdebug enable-rc5 enable-md2"
|
||||
- CONFIG_OPTS="no-asm no-makedepend --strict-warnings -std=c89 -D_DEFAULT_SOURCE" BUILDONLY="yes" CHECKDOCS="yes" GENERATE="yes"
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- os: linux-ppc64le
|
||||
sudo: false
|
||||
compiler: clang
|
||||
env: CONFIG_OPTS="--strict-warnings -D__NO_STRING_INLINES"
|
||||
- os: linux
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- gcc-5
|
||||
- g++-5
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
compiler: gcc-5
|
||||
env: CONFIG_OPTS="--strict-warnings" COMMENT="Move to the BORINGTEST build when interoperable"
|
||||
- os: linux
|
||||
compiler: clang
|
||||
env: CONFIG_OPTS="--strict-warnings -D__NO_STRING_INLINES no-deprecated" BUILDONLY="yes"
|
||||
- os: linux
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- binutils-mingw-w64
|
||||
- gcc-mingw-w64
|
||||
compiler: i686-w64-mingw32-gcc
|
||||
env: CONFIG_OPTS="no-stdio" BUILDONLY="yes"
|
||||
# Uncomment if there is reason to believe that PPC-specific problem
|
||||
# can be diagnosed with this possibly >30 mins sanitizer build...
|
||||
#- os: linux-ppc64le
|
||||
# sudo: false
|
||||
# compiler: gcc
|
||||
# env: EXTENDED_TEST="yes" CONFIG_OPTS="no-asm enable-asan enable-ubsan no-shared -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -D__NO_STRING_INLINES"
|
||||
- os: linux
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- gcc-5
|
||||
- g++-5
|
||||
- golang-1.6
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
compiler: gcc-5
|
||||
env: EXTENDED_TEST="yes" CONFIG_OPTS="--debug --coverage no-asm enable-rc5 enable-md2 enable-ec_nistp_64_gcc_128 enable-ssl3 enable-ssl3-method enable-nextprotoneg enable-weak-ssl-ciphers no-shared -DPEDANTIC -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION" COVERALLS="yes" BORINGSSL_TESTS="yes" CXX="g++-5"
|
||||
- os: linux
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- gcc-5
|
||||
- g++-5
|
||||
- golang-1.6
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
compiler: gcc-5
|
||||
env: EXTENDED_TEST="yes" CONFIG_OPTS="--debug enable-ssl3 enable-ssl3-method enable-weak-ssl-ciphers enable-external-tests" BORINGSSL_TESTS="yes" CXX="g++-5" TESTS=95
|
||||
- os: linux
|
||||
compiler: clang
|
||||
env: EXTENDED_TEST="yes" CONFIG_OPTS="enable-msan -D__NO_STRING_INLINES -Wno-unused-command-line-argument"
|
||||
- os: linux
|
||||
compiler: clang
|
||||
env: EXTENDED_TEST="yes" CONFIG_OPTS="no-asm enable-ubsan enable-rc5 enable-md2 enable-ssl3 enable-ssl3-method enable-nextprotoneg no-shared -fno-sanitize=alignment -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -D__NO_STRING_INLINES -Wno-unused-command-line-argument"
|
||||
- os: linux
|
||||
compiler: clang
|
||||
env: EXTENDED_TEST="yes" CONFIG_OPTS="no-asm enable-asan enable-rc5 enable-md2 no-shared -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -D__NO_STRING_INLINES -Wno-unused-command-line-argument"
|
||||
- os: linux
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- gcc-5
|
||||
- g++-5
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
compiler: gcc-5
|
||||
env: UBUNTU_GCC_HACK="yes" EXTENDED_TEST="yes" CONFIG_OPTS="--debug no-asm enable-ubsan enable-rc5 enable-md2 -DPEDANTIC" OPENSSL_TEST_RAND_ORDER=0
|
||||
- os: linux
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- binutils-mingw-w64
|
||||
- gcc-mingw-w64
|
||||
compiler: i686-w64-mingw32-gcc
|
||||
env: EXTENDED_TEST="yes" CONFIG_OPTS="no-pic"
|
||||
- os: linux
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- binutils-mingw-w64
|
||||
- gcc-mingw-w64
|
||||
compiler: x86_64-w64-mingw32-gcc
|
||||
env: EXTENDED_TEST="yes" CONFIG_OPTS="no-pic"
|
||||
exclude:
|
||||
- os: linux
|
||||
compiler: clang
|
||||
- os: osx
|
||||
compiler: gcc
|
||||
|
||||
before_script:
|
||||
- env
|
||||
- if [ "$TRAVIS_PULL_REQUEST" != "false" -a -n "$EXTENDED_TEST" ]; then
|
||||
(git log -1 $TRAVIS_COMMIT_RANGE | grep '\[extended tests\]' > /dev/null) || exit 0;
|
||||
fi
|
||||
- if [ -n "$DESTDIR" ]; then
|
||||
sh .travis-create-release.sh $TRAVIS_OS_NAME;
|
||||
tar -xzf _srcdist.tar.gz;
|
||||
mkdir _build;
|
||||
cd _build;
|
||||
srcdir=../_srcdist;
|
||||
top=..;
|
||||
else
|
||||
srcdir=.;
|
||||
top=.;
|
||||
fi
|
||||
- if [ -n "$UBUNTU_GCC_HACK" ]; then
|
||||
$CC -dumpspecs | sed "s/--push-state//g; s/--pop-state/--as-needed/g" > gcc-specs.txt;
|
||||
CC="$CC -specs=gcc-specs.txt";
|
||||
fi
|
||||
- if [ "$CC" = i686-w64-mingw32-gcc ]; then
|
||||
export CROSS_COMPILE=${CC%%gcc}; unset CC;
|
||||
$srcdir/Configure mingw $CONFIG_OPTS -Wno-pedantic-ms-format;
|
||||
elif [ "$CC" = x86_64-w64-mingw32-gcc ]; then
|
||||
export CROSS_COMPILE=${CC%%gcc}; unset CC;
|
||||
$srcdir/Configure mingw64 $CONFIG_OPTS -Wno-pedantic-ms-format;
|
||||
else
|
||||
if [ "$CC" = clang-3.9 ]; then
|
||||
sudo cp .travis-apt-pin.preferences /etc/apt/preferences.d/no-ubuntu-clang;
|
||||
curl -sSL "http://apt.llvm.org/llvm-snapshot.gpg.key" | sudo -E apt-key add -;
|
||||
echo "deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-3.9 main" | sudo tee -a /etc/apt/sources.list > /dev/null;
|
||||
sudo -E apt-add-repository -y "ppa:ubuntu-toolchain-r/test";
|
||||
sudo -E apt-get -yq update;
|
||||
sudo -E apt-get -yq --no-install-suggests --no-install-recommends --force-yes install clang-3.9;
|
||||
elif which ccache >/dev/null; then
|
||||
CC="ccache $CC";
|
||||
fi;
|
||||
$srcdir/config -v $CONFIG_OPTS;
|
||||
fi
|
||||
- ./configdata.pm --dump
|
||||
- cd $top
|
||||
|
||||
script:
|
||||
- if [ -z "$BUILDONLY" ]; then
|
||||
make="make -s";
|
||||
else
|
||||
make="make";
|
||||
fi
|
||||
- if [ -n "$GENERATE" ]; then
|
||||
make2="$make PERL=no-perl";
|
||||
else
|
||||
make2="$make";
|
||||
fi
|
||||
- top=${PWD}
|
||||
- if [ -n "$DESTDIR" ]; then
|
||||
cd _build;
|
||||
fi
|
||||
- if $make update; then
|
||||
echo -e '+\057 MAKE UPDATE OK';
|
||||
else
|
||||
echo -e '+\057 MAKE UPDATE FAILED'; false;
|
||||
fi
|
||||
- git diff --exit-code
|
||||
- if [ -n "$CHECKDOCS" ]; then
|
||||
if $make doc-nits; then
|
||||
echo -e '+\057\057 MAKE DOC-NITS OK';
|
||||
else
|
||||
echo -e '+\057\057 MAKE DOC-NITS FAILED'; false;
|
||||
fi;
|
||||
fi
|
||||
- if [ -n "$GENERATE" ]; then
|
||||
if $make build_all_generated; then
|
||||
echo -e '+\057\057\057 MAKE BUILD_ALL_GENERATED OK';
|
||||
else
|
||||
echo -e '+\057\057\057 MAKE BUILD_ALL_GENERATED FAILED'; false;
|
||||
fi;
|
||||
fi
|
||||
- if $make2; then
|
||||
echo -e '+\057\057\057\057 MAKE OK';
|
||||
else
|
||||
echo -e '+\057\057\057\057 MAKE FAILED'; false;
|
||||
fi;
|
||||
- if [ -z "$BUILDONLY" ]; then
|
||||
if [ -n "$CROSS_COMPILE" ]; then
|
||||
sudo dpkg --add-architecture i386;
|
||||
sudo apt-get update;
|
||||
sudo apt-get -yq --no-install-suggests --no-install-recommends --force-yes install wine;
|
||||
export EXE_SHELL="wine" WINEPREFIX=`pwd`;
|
||||
fi;
|
||||
if [ -e krb5/src ]; then
|
||||
sudo apt-get -yq install bison dejagnu gettext keyutils ldap-utils libldap2-dev libkeyutils-dev python-cjson python-paste python-pyrad slapd tcl-dev tcsh;
|
||||
fi;
|
||||
if HARNESS_VERBOSE=yes BORING_RUNNER_DIR=$top/boringssl/ssl/test/runner make test; then
|
||||
echo -e '+\057\057\057\057\057 MAKE TEST OK';
|
||||
else
|
||||
echo -e '+\057\057\057\057\057 MAKE TEST FAILED'; false;
|
||||
fi;
|
||||
else
|
||||
if $make build_tests >~/build.log 2>&1; then
|
||||
echo -e '+\057\057\057\057\057\057 MAKE BUILD_TESTS OK';
|
||||
else
|
||||
echo -e '+\057\057\057\057\057\057 MAKE BUILD_TESTS FAILED';
|
||||
cat ~/build.log
|
||||
false;
|
||||
fi;
|
||||
fi
|
||||
- if [ -n "$DESTDIR" ]; then
|
||||
mkdir "$top/$DESTDIR";
|
||||
if $make install DESTDIR="$top/$DESTDIR" >~/install.log 2>&1 ; then
|
||||
echo -e '+\057\057\057\057\057\057\057 MAKE INSTALL OK';
|
||||
else
|
||||
echo -e '+\057\057\057\057\057\057\057 MAKE INSTALL FAILED';
|
||||
cat ~/install.log;
|
||||
false;
|
||||
fi;
|
||||
fi
|
||||
- cd $top
|
||||
|
||||
after_success:
|
||||
- if [ -n "$COVERALLS" ]; then
|
||||
coveralls -b . --gcov gcov-5 --gcov-options '\-lpbc';
|
||||
fi;
|
||||
|
||||
notifications:
|
||||
email:
|
||||
secure: "xeGNgWO7aoaDgRvcZubposqMsj36aU8c6F0oHfw+rUqltCQ14IgYCUwzocmR2O+Pa7B3Cx5VjMfBFHbQaajZsfod8vu7g+aGq/zkjwbhsr/SR4dljJjFJXLGZjIalm9KgP6KInmVDuINfCqP+MHIY5lZkNI7DMcyHDhVc5nSKvCXV7xTDNgmstvh8rB/z51WfHDqGqfBtiuK5FDNxmvYK8OFJ5W94Lu9LDlizcxwK3GAj7arOui7Z5w8bQ6p4seUE3IvJL1Zbj0pZHxvNb6Zeb2Pn8QF1qLlN8YmBktD4aiw0ce4wYRiL87uLgcOxZY7SVXtv2XYFIYWapU/FKjCqa6vK93V/H9eZWEIYNMKnN3wXm2beqVdnKek3OeGJ8v0y7MbSfuLfRtBqbTSNYnpU1Zuo4MQAvHvEPuwCAYkYQajOSRplMH5sULFKptuVqNtOMfjL8jHb8AEoL1acYIk43ydxeYrzzas4fqgCDJ52573/u0RNdF1lkQBLkuM365OB8VRqtpnoxcdEIY/qBc/8TzZ24fxyrs5qdHFcxGSgpN2EP6cJMqpvkemnCNSdhxUqfzm22N7a3O8+4LFSBGOnHto/PwdsvF/01yGYL0LoZTnoO1i6x7AMJPBh+eyDU0ZjGhj/msjmqeb9C8vRqQ+1WjHrIS1iqCD0Czib8tUPD4="
|
||||
58
ABOUT.html
58
ABOUT.html
@@ -1,58 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>About Tix</TITLE>
|
||||
<!-- $Id: ABOUT.html,v 1.5 2001/12/09 05:23:39 idiscovery Exp $ -->
|
||||
</HEAD>
|
||||
<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#800000" ALINK="#800080">
|
||||
<FONT FACE="Tahoma, Arial, Helvetica">
|
||||
|
||||
<H2>About Tix</H2>
|
||||
|
||||
<blockquote>
|
||||
|
||||
Tix, which stands for Tk Interface Extension, is an extension
|
||||
library for Tcl/Tk. Tix adds many <a
|
||||
href="man/html/TixCmd/TixIntro.htm"> new widgets </a>, <a
|
||||
href="man/html/TixCmd/TixIntro.htm"> image types </a> and <a
|
||||
href="man/html/TixCmd/TixIntro.htm"> other commands </a> that
|
||||
allows you to create compelling Tcl/Tk-based GUI applications. <p>
|
||||
|
||||
The following sample screen shows some widgets provided by Tix,
|
||||
such as such as <a href="man/html/TixCmd/tixHList.htm">Hierarchical
|
||||
Listbox</a>, <a href="man/html/TixCmd/tixNoteBook.htm">NoteBook </a>
|
||||
and <a href="man/html/TixCmd/tixComboBox.htm">ComboBox </a>.
|
||||
|
||||
|
||||
For a list of all the features in Tix, as well as how to use Tix
|
||||
in your applications, see the <a
|
||||
href="man/index.html"> Tix Manual Index</a>. <p>
|
||||
|
||||
One advantage of Tix over other Tk widget libraries is many of the
|
||||
Tix core widgets are implemented in native code. This enhances
|
||||
performance and provides native look-and-feel for your
|
||||
applications. <p>
|
||||
|
||||
|
||||
Tix is open-source software. See <a
|
||||
href="license.terms">license.terms</a> for details. <p>
|
||||
|
||||
</blockquote>
|
||||
|
||||
<h3>Getting more information about Tix</h3>
|
||||
|
||||
<blockquote>
|
||||
|
||||
To contact the Tix Project Group, reach your fellow Tix users,
|
||||
submit patches or bug reports, and find a range of other
|
||||
information, please visit our web site at <a
|
||||
HREF="http://tix.sourceforge.net">http://tix.sourceforge.net</A>.
|
||||
|
||||
</blockquote>
|
||||
|
||||
<hr>
|
||||
|
||||
<a href=index.html>Documentation Index</a><br>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
|
||||
2
ACKNOWLEDGEMENTS
Normal file
2
ACKNOWLEDGEMENTS
Normal file
@@ -0,0 +1,2 @@
|
||||
Please https://www.openssl.org/community/thanks.html for the current
|
||||
acknowledgements.
|
||||
35
AUTHORS
Normal file
35
AUTHORS
Normal file
@@ -0,0 +1,35 @@
|
||||
# This is the list of OpenSSL authors for copyright purposes.
|
||||
#
|
||||
# This does not necessarily list everyone who has contributed code, since in
|
||||
# some cases, their employer may be the copyright holder. To see the full list
|
||||
# of contributors, see the revision history in source control.
|
||||
OpenSSL Software Services, Inc.
|
||||
OpenSSL Software Foundation, Inc.
|
||||
|
||||
# Individuals
|
||||
Andy Polyakov
|
||||
Ben Laurie
|
||||
Ben Kaduk
|
||||
Bernd Edlinger
|
||||
Bodo Möller
|
||||
David Benjamin
|
||||
Emilia Käsper
|
||||
Eric Young
|
||||
Geoff Thorpe
|
||||
Holger Reif
|
||||
Kurt Roeckx
|
||||
Lutz Jänicke
|
||||
Mark J. Cox
|
||||
Matt Caswell
|
||||
Matthias St. Pierre
|
||||
Nils Larsch
|
||||
Paul Dale
|
||||
Paul C. Sutton
|
||||
Ralf S. Engelschall
|
||||
Rich Salz
|
||||
Richard Levitte
|
||||
Stephen Henson
|
||||
Steve Marquess
|
||||
Tim Hudson
|
||||
Ulf Möller
|
||||
Viktor Dukhovni
|
||||
72
CONTRIBUTING
Normal file
72
CONTRIBUTING
Normal file
@@ -0,0 +1,72 @@
|
||||
HOW TO CONTRIBUTE TO OpenSSL
|
||||
----------------------------
|
||||
|
||||
(Please visit https://www.openssl.org/community/getting-started.html for
|
||||
other ideas about how to contribute.)
|
||||
|
||||
Development is done on GitHub, https://github.com/openssl/openssl.
|
||||
|
||||
To request new features or report bugs, please open an issue on GitHub
|
||||
|
||||
To submit a patch, please open a pull request on GitHub. If you are thinking
|
||||
of making a large contribution, open an issue for it before starting work,
|
||||
to get comments from the community. Someone may be already working on
|
||||
the same thing or there may be reasons why that feature isn't implemented.
|
||||
|
||||
To make it easier to review and accept your pull request, please follow these
|
||||
guidelines:
|
||||
|
||||
1. Anything other than a trivial contribution requires a Contributor
|
||||
License Agreement (CLA), giving us permission to use your code. See
|
||||
https://www.openssl.org/policies/cla.html for details. If your
|
||||
contribution is too small to require a CLA, put "CLA: trivial" on a
|
||||
line by itself in your commit message body.
|
||||
|
||||
2. All source files should start with the following text (with
|
||||
appropriate comment characters at the start of each line and the
|
||||
year(s) updated):
|
||||
|
||||
Copyright 20xx-20yy The OpenSSL Project Authors. All Rights Reserved.
|
||||
|
||||
Licensed under the OpenSSL license (the "License"). You may not use
|
||||
this file except in compliance with the License. You can obtain a copy
|
||||
in the file LICENSE in the source distribution or at
|
||||
https://www.openssl.org/source/license.html
|
||||
|
||||
3. Patches should be as current as possible; expect to have to rebase
|
||||
often. We do not accept merge commits, you will have to remove them
|
||||
(usually by rebasing) before it will be acceptable.
|
||||
|
||||
4. Patches should follow our coding style (see
|
||||
https://www.openssl.org/policies/codingstyle.html) and compile
|
||||
without warnings. Where gcc or clang is available you should use the
|
||||
--strict-warnings Configure option. OpenSSL compiles on many varied
|
||||
platforms: try to ensure you only use portable features. Clean builds
|
||||
via Travis and AppVeyor are required, and they are started automatically
|
||||
whenever a PR is created or updated.
|
||||
|
||||
5. When at all possible, patches should include tests. These can
|
||||
either be added to an existing test, or completely new. Please see
|
||||
test/README for information on the test framework.
|
||||
|
||||
6. New features or changed functionality must include
|
||||
documentation. Please look at the "pod" files in doc/man[1357] for
|
||||
examples of our style. Run "make doc-nits" to make sure that your
|
||||
documentation changes are clean.
|
||||
|
||||
7. For user visible changes (API changes, behaviour changes, ...),
|
||||
consider adding a note in CHANGES. This could be a summarising
|
||||
description of the change, and could explain the grander details.
|
||||
Have a look through existing entries for inspiration.
|
||||
Please note that this is NOT simply a copy of git-log oneliners.
|
||||
Also note that security fixes get an entry in CHANGES.
|
||||
This file helps users get more in depth information of what comes
|
||||
with a specific release without having to sift through the higher
|
||||
noise ratio in git-log.
|
||||
|
||||
8. For larger or more important user visible changes, as well as
|
||||
security fixes, please add a line in NEWS. On exception, it might be
|
||||
worth adding a multi-line entry (such as the entry that announces all
|
||||
the types that became opaque with OpenSSL 1.1.0).
|
||||
This file helps users get a very quick summary of what comes with a
|
||||
specific release, to see if an upgrade is worth the effort.
|
||||
423
ChangeLog
423
ChangeLog
@@ -1,423 +0,0 @@
|
||||
2008-03-17 Jeff Hobbs <jeffh@ActiveState.com>
|
||||
|
||||
**** 8.4.3 TAGGED ****
|
||||
|
||||
* win/makefile.vc: Use rd/md instead of old bat files [Bug 1455369]
|
||||
Use default libs to build [Bug 1455375]
|
||||
|
||||
* win/make_pkgIndex.tcl: Tix dll should be found in lib dir.
|
||||
[Bug 1455377]
|
||||
|
||||
* library/Tix.tcl (tixAppContext:getimage): don't add '.' [Bug 1863977]
|
||||
|
||||
* demos/widget: add tix initstyle. [Bug 1611197]
|
||||
|
||||
* library/pref/WmDefault.tcl (setup-kde): allow space in font
|
||||
name. [Bug 1907828]
|
||||
improve code quality - use Tcl 8.4-isms.
|
||||
|
||||
2008-02-28 Jeff Hobbs <jeffh@ActiveState.com>
|
||||
|
||||
* generic/tixNBFrame.c (DrawTab): ensure anchor isn't NULL.
|
||||
[Bug 1644742]
|
||||
|
||||
* library/ComboBox.tcl (tixComboBox:EscKey): return 0 when
|
||||
disabled. [Bug 1190201]
|
||||
|
||||
* win/makefile.vc: update to v8.4.3 and use TCLSH_EXE for test driver
|
||||
|
||||
* generic/tixInit.c (configSpecs): change tixSchemePriority to use
|
||||
-schemepriority (was dup of -scheme). [Bug 1167592]
|
||||
|
||||
* library/pref/tixmkpref: s/Bacground/Background/g [Bug 1165876]
|
||||
|
||||
2008-02-27 Jeff Hobbs <jeffh@ActiveState.com>
|
||||
|
||||
* generic/tix.h (TIX_PATCH_LEVEL): updated to 8.4.3
|
||||
* library/Init.tcl, README.txt, configure.in, configure:
|
||||
|
||||
* generic/tixInt.h, generic/tixUtils.c, tixWidget.c: reduce
|
||||
touches into tcl internals, remove ERR_IN_PROGRESS usage.
|
||||
|
||||
* generic/tixClass.c (SetupDefault): use safer method to add
|
||||
options to the defaults.
|
||||
|
||||
* generic/tixTList.c, generic/tixNBFrame.c, generic/tixMethod.c:
|
||||
* generic/tixInputO.c, generic/tixImgXpm.c, generic/tixImgCmp.c:
|
||||
* generic/tixHList.c, generic/tixGrSort.c, generic/tixOption.c:
|
||||
* generic/tixAppInit.c, generic/tixGrid.c: remove refs to interp->result
|
||||
|
||||
* generic/tix.h: include string.h and stdlib.h
|
||||
|
||||
* library/Console.tcl, library/Balloon.tcl: remove use of left_ptr
|
||||
* demos/samples/SListBox.tcl: and fix Aqua handling
|
||||
for balloon help.
|
||||
|
||||
2007-02-21 Jeff Hobbs <jeffh@ActiveState.com>
|
||||
|
||||
* configure.in, configure, tclconfig/tcl.m4: TEA 3.6 update
|
||||
|
||||
2006-11-16 Jeff Hobbs <jeffh@ActiveState.com>
|
||||
|
||||
**** 8.4.2 TAGGED ****
|
||||
|
||||
* generic/tix.h (TIX_PATCH_LEVEL): updated to 8.4.2
|
||||
* library/Init.tcl, README.txt, configure.in, configure:
|
||||
|
||||
* generic/tixInit.c, generic/tixInitScript.h: inline initScript
|
||||
into tixInit.c, use patchlevel info for tcl_findLibrary.
|
||||
|
||||
* win/makefile.vc: note that this isn't actually maintained.
|
||||
|
||||
* Makefile.in (dist): make simple and effective dist target.
|
||||
Changes source tarball to Tix$patchLevel-src.tar.gz.
|
||||
|
||||
2006-11-15 Jeff Hobbs <jeffh@ActiveState.com>
|
||||
|
||||
**** 8.4.1 TAGGED ****
|
||||
|
||||
* generic/tix.h (TIX_PATCH_LEVEL): updated to 8.4.1
|
||||
* library/Init.tcl:
|
||||
* README.txt, configure.in, configure, tclconfig/tcl.m4:
|
||||
|
||||
* unix/tixUnixXpm.c: define TkPutImage to XPutImage on X11.
|
||||
|
||||
* generic/tixInit.c (Tix_Init): provide patchlevel version detail.
|
||||
|
||||
2006-04-11 Jeff Hobbs <jeffh@ActiveState.com>
|
||||
|
||||
* win/make_pkgIndex.tcl: correctly escape \$dir.
|
||||
|
||||
* generic/tix.h (strcasecmp): define to _stricmp on Win32, as
|
||||
VS2005 requires this (and that works still with VC6).
|
||||
|
||||
2006-01-25 Jeff Hobbs <jeffh@ActiveState.com>
|
||||
|
||||
* configure, configure.in: update to TEA 3.5
|
||||
* tclconfig/tcl.m4: TEA rcs 1.89 2006/01/25 21:25:02
|
||||
|
||||
2005-03-25 Jeff Hobbs <jeffh@ActiveState.com>
|
||||
|
||||
* tclconfig/tcl.m4, configure, configure.in: update to TEA 3.2
|
||||
* generic/tixGeometry.c, generic/tixInit.c: OS X patch from Steffen
|
||||
* generic/tixInputO.c, generic/tixPort.h:
|
||||
* generic/tixUtils.c, generic/tixWidget.c:
|
||||
* man/index.html, unix/tixUnixDraw.c, unix/tixUnixMwm.c:
|
||||
* unix/tixUnixPort.h, unix/tixUnixWm.c, unix/tixUnixXpm.c:
|
||||
|
||||
2004-12-23 Jeff Hobbs <jeffh@ActiveState.com>
|
||||
|
||||
**** 8.4.0 TAGGED ****
|
||||
|
||||
* README.txt, index.html: updated with 8.4.0 release info
|
||||
* docs/Files.txt, docs/Release.html, docs/Release-8.4.0.txt:
|
||||
|
||||
* generic/tixInit.c (Tix_Init): remove USE_TIX_SAM refs
|
||||
|
||||
* tools/README.txt: update for removed tools
|
||||
* tools/icon.tcl, tools/etags.tcl, tools/Makefile (removed):
|
||||
* tools/tixverify.tcl, tools/tclc_s.tcl (removed):
|
||||
* tools/makescript.tcl, tools/makebitmap.tcl (removed):
|
||||
* tools/doconfig.tcl, tools/domakefile.tcl (removed):
|
||||
* tools/doxx.tcl, tools/dosstrip.tcl (removed): removed old tools
|
||||
|
||||
* Makefile.in: add 'demo' makefile target
|
||||
|
||||
* library/Tix.tcl (tixAppContext:Constructor): init
|
||||
tixOption(fixed_font) to Courier
|
||||
|
||||
* demos/tixwidgets.tcl: add 'tix initstyle', use real menus,
|
||||
remove impotent "Manager Widgets" tab.
|
||||
|
||||
* docs/SAModule.txt (removed):
|
||||
* docs/FAQ.txt, docs/FAQ.html: removed old info
|
||||
|
||||
* man/tix.n:
|
||||
* library/Tix.tcl (tixAppContext:Constructor, tix initstyle):
|
||||
* library/Init.tcl: reintroduce the 'tixAppContext tix' removed on
|
||||
2004-04-09 as that defines the 'tix' command. Instead, move the
|
||||
style initialization in that to an explicit 'tix initstyle'
|
||||
command. This preserves the 'tix' command as well as separation
|
||||
of package require and use of tix style.
|
||||
|
||||
* library/pkgIndex.tcl (removed): this is now generated by the TEA
|
||||
configure/makefile script. Other makefiles not creating this need
|
||||
to be fixed.
|
||||
|
||||
* tests/class.test: fix test to note updated args handling
|
||||
|
||||
* tests/method.test: remove dead code
|
||||
|
||||
2004-10-08 Jeff Hobbs <jeffh@ActiveState.com>
|
||||
|
||||
* Makefile.in (PKG_CFLAGS): removed EXTRA_CFLAGS ref
|
||||
|
||||
2004-10-01 Jeff Hobbs <jeffh@ActiveState.com>
|
||||
|
||||
* generic/tk8.0/console.tcl, generic/tk8.0/tk.tcl (removed): no
|
||||
longer relevant
|
||||
|
||||
* configure, configure.in, tclconfig/tcl.m4: updated to TEA 3.1
|
||||
This corrects some unix 64-bit builds.
|
||||
|
||||
* README.txt, unix/README.txt, win/README.txt: updated notes to be
|
||||
not so out of date.
|
||||
|
||||
* win/example.vc6, win/makefile.vc: made these more relevant, but
|
||||
no attempt to actually test them.
|
||||
|
||||
* README.html, Roadmap.html (removed): Removed lots of
|
||||
* unix/Makefile.in, unix/aclocal.m4 (removed): crufty build stuff
|
||||
* unix/configure, unix/configure.in (removed): that is no longer
|
||||
* unix/install-sh, unix/mkIndex.tcl.in (removed): supported and/or
|
||||
* unix/pkgIndex.tcl.in, unix/tcl.m4 (removed): correct.
|
||||
* unix/tixConfig.sh.in (removed):
|
||||
* win/makefile.gnu, win/patch_win_main.tcl (removed):
|
||||
* win/common.mak, win/example.gnu (removed): There is only the
|
||||
* win/example.vc5, win/makefile.bc (removed): Tix as library
|
||||
* win/winMain_patch.c (removed): now.
|
||||
* win/rc/tixwish.ico, win/rc/tixwish.rc (removed):
|
||||
|
||||
* Makefile.in: set TIX_LIBRARY to $(srcdir)/library
|
||||
|
||||
2004-04-09 Jeff Hobbs <jeffh@ActiveState.com>
|
||||
|
||||
* library/pref/WmDefault.tcl: improve default font sizes.
|
||||
|
||||
* generic/tixInit.c: lower Tix default scheme prio to 20 from 79.
|
||||
**** POTENTIAL INCOMPATABILITY ****
|
||||
|
||||
* library/Event.tcl (tixEvalCmdBinding): account for the case that
|
||||
tixAppContext has not been called.
|
||||
|
||||
* library/SHList.tcl (tixScrolledHList:GeometryInfo): handle case
|
||||
that child frame isn't a true Frame.
|
||||
|
||||
* library/Tree.tcl: make Tree recognize HList methods and pass
|
||||
them on accordingly.
|
||||
|
||||
* library/Tix.tcl (tixAppContext:Constructor): do not reset
|
||||
certain toplevel config options (like -menu). Remove all refs to
|
||||
monochrome scheme settings.
|
||||
|
||||
* library/Init.tcl: DO NOT CALL 'tixAppContext tix' on init.
|
||||
This means that the Tix defaults do not kick in on the package
|
||||
require of Tix. You must call 'tixAppContext tix' after the
|
||||
package require to kick in Tix' defaults.
|
||||
**** POTENTIAL INCOMPATABILITY ****
|
||||
|
||||
2004-03-27 Jeff Hobbs <jeffh@ActiveState.com>
|
||||
|
||||
* win/tixWinXpm.c (TixpXpmRealizePixmap): fix unreleased DC that
|
||||
caused palette panic on exit
|
||||
|
||||
* ChangeLog.txt (removed), ChangeLog (new): renamed ChangeLog to
|
||||
editor-standard unprefixed version
|
||||
|
||||
* config/acinclude.m4 (removed):
|
||||
* Makefile.in, aclocal.m4, configure, configure.in,
|
||||
* tclconfig/* (new):
|
||||
new TEA based build system. This build Tix as a standard Tcl
|
||||
extension, and does not have support for stand-alone tixwish.
|
||||
|
||||
* generic/tixMwm.c (removed), unix/tixUnixMwm.c (new): renamed
|
||||
* generic/tix.h, generic/tixClass.c, generic/tixCmds.c
|
||||
* generic/tixDItem.c, generic/tixDef.h, generic/tixDiITxt.c
|
||||
* generic/tixDiImg.c, generic/tixDiStyle.c, generic/tixDiText.c
|
||||
* generic/tixDiWin.c, generic/tixError.c, generic/tixForm.c
|
||||
* generic/tixForm.h, generic/tixFormMisc.c, generic/tixGeometry.c
|
||||
* generic/tixGrData.c, generic/tixGrFmt.c, generic/tixGrRC.c
|
||||
* generic/tixGrSel.c, generic/tixGrSort.c, generic/tixGrUtl.c
|
||||
* generic/tixGrid.c, generic/tixGrid.h, generic/tixHLCol.c
|
||||
* generic/tixHLHdr.c, generic/tixHLInd.c, generic/tixHList.c
|
||||
* generic/tixHList.h, generic/tixImgCmp.c, generic/tixImgXpm.c
|
||||
* generic/tixInit.c, generic/tixInitScript.h, generic/tixInputO.c
|
||||
* generic/tixInt.h, generic/tixMethod.c, generic/tixNBFrame.c
|
||||
* generic/tixOption.c, generic/tixPort.h, generic/tixScroll.c
|
||||
* generic/tixTList.c, generic/tixUtils.c, generic/tixWidget.c
|
||||
* unix/tixUnixDraw.c, unix/tixUnixXpm.c
|
||||
* win/tixWCmpt.c, win/tixWinDraw.c, win/tixWinPort.h
|
||||
* win/tixWinXpm.c:
|
||||
rewrite for proper CONST-ification and various code cleanup.
|
||||
|
||||
* library/Balloon.tcl, library/ChkList.tcl, library/ComboBox.tcl
|
||||
* library/Compat.tcl, library/Control.tcl, library/DialogS.tcl
|
||||
* library/DirBox.tcl, library/DirList.tcl, library/DirTree.tcl
|
||||
* library/EFileBox.tcl, library/Event.tcl, library/FileBox.tcl
|
||||
* library/FileCbx.tcl, library/FileEnt.tcl, library/FloatEnt.tcl
|
||||
* library/Grid.tcl, library/HList.tcl, library/Init.tcl
|
||||
* library/LabEntry.tcl, library/ListNBk.tcl, library/NoteBook.tcl
|
||||
* library/OldUtil.tcl, library/PanedWin.tcl, library/PopMenu.tcl
|
||||
* library/Primitiv.tcl, library/SHList.tcl, library/SListBox.tcl
|
||||
* library/StackWin.tcl, library/Tix.tcl, library/Utils.tcl
|
||||
* library/VResize.tcl, library/VStack.tcl, library/VTree.tcl
|
||||
* library/fs.tcl, library/pkgIndex.tcl, library/pref/WmDefault.tcl:
|
||||
Code cleanup to use newer Tcl 8.4 code features.
|
||||
Rewrite of FS handling routines using Tcl core features.
|
||||
|
||||
* library/FileCmpt.tcl (removed): removed or consolidated cruft.
|
||||
* library/FileUtil.tcl (removed):
|
||||
* library/TAGS (removed):
|
||||
* library/UnixFile.tcl (removed):
|
||||
* library/Verify.tcl (removed):
|
||||
* library/Version.tcl (removed):
|
||||
* library/WinFile.tcl (removed):
|
||||
* library/tclIndex (removed):
|
||||
|
||||
* demos/MkChoose.tcl:
|
||||
* demos/MkDirLis.tcl:
|
||||
* demos/tixwidgets.tcl:
|
||||
* demos/samples/STList3.tcl: minor demo updates
|
||||
|
||||
* docs/Files.txt: note FS docs are out of date.
|
||||
|
||||
* tests/basic.test: minor changes. The tests likely don't
|
||||
* tests/general/dirbox.tcl: work right now as they have references
|
||||
* tests/general/fs.tcl: to a lot of old FS routines.
|
||||
* tests/hlist/DirList.tcl:
|
||||
* tests/library/CaseData.tcl:
|
||||
* tests/library/TestLib.tcl:
|
||||
|
||||
*** Start of major revision to Tix ***
|
||||
*** Tcl/Tk 8.4+ compatible from here on ***
|
||||
*** Use older versions for earlier Tcl/Tk ***
|
||||
|
||||
2002-01-25 Mike Clarkson <mikeclarkson@users.sourceforge.net>
|
||||
|
||||
* win/: Fixed Windows makefile.vc and rc/tixwish.rc
|
||||
|
||||
* Released as tix-8.2.0b3
|
||||
|
||||
2002-01-23 Mike Clarkson <mikeclarkson@users.sourceforge.net>
|
||||
|
||||
* unix/: Fixed unix configure, configure.in and Makefile.in
|
||||
|
||||
* Released as tix-8.2.0b2
|
||||
|
||||
2001-12-01 Mike Clarkson <mikeclarkson@users.sourceforge.net>
|
||||
|
||||
* library/Tix.tcl: Restored fontsets and schemes that were
|
||||
missing from 8.2.0EA. Defaults to WmDefault like 8.1.3.
|
||||
|
||||
* tests/general/samples.tcl: Restored the 8.1.x widgets demo
|
||||
missing from 8.2.0EA and renamed them to tixwidgets.tcl -
|
||||
they give a more visual overview and are used by the test suite.
|
||||
|
||||
2001-11-21 Mike Clarkson <mikeclarkson@users.sourceforge.net>
|
||||
|
||||
* library/pref/: Added WmDefault.* files, a Package for making Tix
|
||||
apps use the CDE/GNOME/KDE/Windows scheme.
|
||||
* library/: Many minor bug fixes to the library files.
|
||||
* demo/samples/: Removed font and color overrides from the demos,
|
||||
so that the native look and feel would be preserved.
|
||||
* On Windows, initialize the console even if there is no script.
|
||||
See the release notes for details of the $TIX_CONSOLE
|
||||
* A site wide initialization file tixwishrc.tcl is now used.
|
||||
See the release notes for details of the tixwishrc.tcl file.
|
||||
* Removed the patches to Tkinter.py as it is now standard in Python.
|
||||
* Released as 8.1.2.
|
||||
|
||||
2001-01-21 Ioi K. Lam <ioilam@users.sourceforge.net>
|
||||
* Added new tools/tix-man2html.tcl for generating HTML version
|
||||
of the Tix man pages.
|
||||
* Files in man/*.html are now auto-generated (with
|
||||
GNUmakefile) so they are no longer kept in the CVS tree.
|
||||
* Renamed the man pages like HList.n to tixHList.n so that
|
||||
they can be easily picked up by the Unix man command (e.g.,
|
||||
man tixHList).
|
||||
|
||||
2001-01-14 Ioi K. Lam <ioilam@users.sourceforge.net>
|
||||
* The DItem API has been changed to better separate the DItem
|
||||
rendering from the host widgets. Now background, highlight
|
||||
and anchor line rendering are all done by the DItems
|
||||
themselves.
|
||||
|
||||
2001-01-11 Ioi K. Lam <ioilam@users.sourceforge.net>
|
||||
* Removed old4176.zip. There has been many incompatible changes
|
||||
that made building Tix with pre-8.0 Tcl very difficult.
|
||||
|
||||
2001-01-08 Ioi K. Lam <ioilam@users.sourceforge.net>
|
||||
* Tix_LoadTclLibrary() is removed. Use tcl_findLibrary instead.
|
||||
|
||||
2001-01-07 Ioi K. Lam <ioilam@users.sourceforge.net>
|
||||
* SAM support for the Tix library itself has been restored
|
||||
(unix only). You can use the --enable-sam option for
|
||||
unix/configure to include all the Tix script files in
|
||||
libtix.{a,so}.
|
||||
|
||||
There is no SAM support for building the TCL and TK
|
||||
libraries, though.
|
||||
|
||||
Also, there is no libtixsam.{a,so} anymore. The Tix scripts
|
||||
are linked into libtix.{a,so} directly if SAM is enabled.
|
||||
----------------------------------------------------------------------
|
||||
2001-01-05 Ioi K. Lam <ioilam@users.sourceforge.net>
|
||||
* Tix 8.2.0 EA released.
|
||||
----------------------------------------------------------------------
|
||||
2001-01-04 Ioi K. Lam <ioilam@users.sourceforge.net>
|
||||
* New file win/makefile.gnu for building Tix with the free
|
||||
Cygwin tools instead of VC++.
|
||||
|
||||
2001-01-03 Ioi K. Lam <ioilam@users.sourceforge.net>
|
||||
* Tix version changed to Tix 8.2.0.
|
||||
|
||||
2000-12-29 Ioi K. Lam <ioilam@users.sourceforge.net>
|
||||
* New "HTML-like" widget demo front-end "demos/widget", copied
|
||||
from Tk 8.x.
|
||||
|
||||
2000-12-28 Ioi K. Lam <ioilam@users.sourceforge.net>
|
||||
* Windows build is updated to the standard procedure defined in
|
||||
the Tcl Extension Architecture (TEA). Only VC++ makefile
|
||||
is supported in the moment.
|
||||
* New win32 executable tixwishc81.exe uses the "DOS" console
|
||||
instead of the GUI TK console. This is usually better for
|
||||
debugging purposes during Tix core development. The old
|
||||
tixwish81.exe remains, without change, for end-user apps.
|
||||
* Support for ET (Embedded Tk) is now officially removed. See
|
||||
notes about Stand-Alone Module (SAM) below.
|
||||
|
||||
2000-12-26 Ioi K. Lam <ioilam@users.sourceforge.net>
|
||||
* !!! FEATURE REMOVED !!!
|
||||
The Stand-Alone Module (SAM) feature is now dropped from
|
||||
Tix. If you wish to package scripts inside an executable
|
||||
binary, use one of the "wrap" extensions (such as ProWrap)
|
||||
instead. The following files are removed from the
|
||||
repository:
|
||||
unix/tixUnixSam.c
|
||||
unix/samAppInit.c
|
||||
* Namespace handling code has been updated to the Tcl 8.0+
|
||||
API. Therefore, the old special handling code for Itcl is no
|
||||
longer necessary. The following files are removed from the
|
||||
repository:
|
||||
generic/tixItcl.h
|
||||
generic/tixItcl.c
|
||||
* Unix build is updated to the standard procedure defined in
|
||||
the Tcl Extension Architecture (TEA). Now there is a single
|
||||
configure script that builds Tix for different versions of
|
||||
Tcl 8.x. All the old build subdirectories such as unix/tk8.3
|
||||
are now removed.
|
||||
|
||||
This new build procedure also uses the "Stubs" interface to
|
||||
link to Tcl and Tk. This way, the same libtix.so can be
|
||||
loaded into any version of wish that supports stubs.
|
||||
|
||||
2000-12-23 Ioi K. Lam <ioilam@users.sourceforge.net>
|
||||
* New option -usetkdialog for tixFileEntry widget.
|
||||
* !!! INCOMPATIBILITY !!! -scheme and -fontset options are now
|
||||
silently ignored in the [tix] command. This is done to achieve
|
||||
better native look-and-feel. Support for the -fontset and
|
||||
-scheme options will be reimplemented in a future version.
|
||||
|
||||
2000-12-16 Ioi K. Lam <ioilam@users.sourceforge.net>
|
||||
!!! INCOMPATIBILITY !!!
|
||||
* [tixWidgetClass] behavior has changed in incompatible ways:
|
||||
(1) Tcl-style comments (prefixed by #) are no longer allowed.
|
||||
The second argument to [tixWidgetClass] is treated strictly
|
||||
as a list accepted by Tcl_SplitList().
|
||||
(2) the [subst] command is no longer applied on certained
|
||||
entries in the second argument to [tixWidgetClass]. If you
|
||||
want substitution to happen, use [tixWidgetClassEx] instead.
|
||||
|
||||
======================================================================
|
||||
Log started 2000-12-16
|
||||
======================================================================
|
||||
356
Configurations/00-base-templates.conf
Normal file
356
Configurations/00-base-templates.conf
Normal file
@@ -0,0 +1,356 @@
|
||||
# -*- Mode: perl -*-
|
||||
my %targets=(
|
||||
DEFAULTS => {
|
||||
template => 1,
|
||||
|
||||
cflags => "",
|
||||
cppflags => "",
|
||||
lflags => "",
|
||||
defines => [],
|
||||
includes => [],
|
||||
lib_cflags => "",
|
||||
lib_cppflags => "",
|
||||
lib_defines => [],
|
||||
thread_scheme => "(unknown)", # Assume we don't know
|
||||
thread_defines => [],
|
||||
|
||||
apps_aux_src => "",
|
||||
apps_init_src => "",
|
||||
cpuid_asm_src => "mem_clr.c",
|
||||
uplink_aux_src => "",
|
||||
bn_asm_src => "bn_asm.c",
|
||||
ec_asm_src => "",
|
||||
des_asm_src => "des_enc.c fcrypt_b.c",
|
||||
aes_asm_src => "aes_core.c aes_cbc.c",
|
||||
bf_asm_src => "bf_enc.c",
|
||||
md5_asm_src => "",
|
||||
cast_asm_src => "c_enc.c",
|
||||
rc4_asm_src => "rc4_enc.c rc4_skey.c",
|
||||
rmd160_asm_src => "",
|
||||
rc5_asm_src => "rc5_enc.c",
|
||||
wp_asm_src => "wp_block.c",
|
||||
cmll_asm_src => "camellia.c cmll_misc.c cmll_cbc.c",
|
||||
modes_asm_src => "",
|
||||
padlock_asm_src => "",
|
||||
chacha_asm_src => "chacha_enc.c",
|
||||
poly1305_asm_src => "",
|
||||
keccak1600_asm_src => "keccak1600.c",
|
||||
|
||||
unistd => "<unistd.h>",
|
||||
shared_target => "",
|
||||
shared_cflag => "",
|
||||
shared_defines => [],
|
||||
shared_ldflag => "",
|
||||
shared_rcflag => "",
|
||||
shared_extension => "",
|
||||
|
||||
#### Defaults for the benefit of the config targets who don't inherit
|
||||
#### a BASE and assume Unix defaults
|
||||
#### THESE WILL DISAPPEAR IN OpenSSL 1.2
|
||||
build_scheme => [ "unified", "unix" ],
|
||||
build_file => "Makefile",
|
||||
|
||||
AR => "ar",
|
||||
ARFLAGS => "r",
|
||||
CC => "cc",
|
||||
HASHBANGPERL => "/usr/bin/env perl",
|
||||
RANLIB => sub { which("$config{cross_compile_prefix}ranlib")
|
||||
? "ranlib" : "" },
|
||||
RC => "windres",
|
||||
|
||||
#### THESE WILL BE ENABLED IN OpenSSL 1.2
|
||||
#HASHBANGPERL => "PERL", # Only Unix actually cares
|
||||
},
|
||||
|
||||
BASE_common => {
|
||||
template => 1,
|
||||
|
||||
enable => [],
|
||||
disable => [],
|
||||
|
||||
defines =>
|
||||
sub {
|
||||
my @defs = ();
|
||||
push @defs, "ZLIB" unless $disabled{zlib};
|
||||
push @defs, "ZLIB_SHARED" unless $disabled{"zlib-dynamic"};
|
||||
return [ @defs ];
|
||||
},
|
||||
includes =>
|
||||
sub {
|
||||
my @incs = ();
|
||||
push @incs, $withargs{zlib_include}
|
||||
if !$disabled{zlib} && $withargs{zlib_include};
|
||||
return [ @incs ];
|
||||
},
|
||||
},
|
||||
|
||||
BASE_unix => {
|
||||
inherit_from => [ "BASE_common" ],
|
||||
template => 1,
|
||||
|
||||
AR => "ar",
|
||||
ARFLAGS => "r",
|
||||
CC => "cc",
|
||||
lflags =>
|
||||
sub { $withargs{zlib_lib} ? "-L".$withargs{zlib_lib} : () },
|
||||
ex_libs =>
|
||||
sub { !defined($disabled{zlib})
|
||||
&& defined($disabled{"zlib-dynamic"})
|
||||
? "-lz" : () },
|
||||
HASHBANGPERL => "/usr/bin/env perl", # Only Unix actually cares
|
||||
RANLIB => sub { which("$config{cross_compile_prefix}ranlib")
|
||||
? "ranlib" : "" },
|
||||
RC => "windres",
|
||||
|
||||
shared_extension => ".so",
|
||||
|
||||
build_scheme => [ "unified", "unix" ],
|
||||
build_file => "Makefile",
|
||||
},
|
||||
|
||||
BASE_Windows => {
|
||||
inherit_from => [ "BASE_common" ],
|
||||
template => 1,
|
||||
|
||||
lib_defines =>
|
||||
sub {
|
||||
my @defs = ();
|
||||
unless ($disabled{"zlib-dynamic"}) {
|
||||
my $zlib = $withargs{zlib_lib} // "ZLIB1";
|
||||
push @defs, 'LIBZ=' . (quotify("perl", $zlib))[0];
|
||||
}
|
||||
return [ @defs ];
|
||||
},
|
||||
ex_libs =>
|
||||
sub {
|
||||
unless ($disabled{zlib}) {
|
||||
if (defined($disabled{"zlib-dynamic"})) {
|
||||
return $withargs{zlib_lib} // "ZLIB1";
|
||||
}
|
||||
}
|
||||
return ();
|
||||
},
|
||||
|
||||
LD => "link",
|
||||
LDFLAGS => "/nologo",
|
||||
ldoutflag => "/out:",
|
||||
AR => "lib",
|
||||
ARFLAGS => "/nologo",
|
||||
aroutflag => "/out:",
|
||||
RC => "rc",
|
||||
rcoutflag => "/fo",
|
||||
MT => "mt",
|
||||
MTFLAGS => "-nologo",
|
||||
mtinflag => "-manifest ",
|
||||
mtoutflag => "-outputresource:",
|
||||
|
||||
shared_extension => ".dll",
|
||||
|
||||
build_file => "makefile",
|
||||
build_scheme => [ "unified", "windows" ],
|
||||
},
|
||||
|
||||
BASE_VMS => {
|
||||
inherit_from => [ "BASE_common" ],
|
||||
template => 1,
|
||||
|
||||
includes =>
|
||||
add(sub {
|
||||
my @incs = ();
|
||||
# GNV$ZLIB_INCLUDE is the standard logical name for later
|
||||
# zlib incarnations.
|
||||
push @incs, 'GNV$ZLIB_INCLUDE:'
|
||||
if !$disabled{zlib} && !$withargs{zlib_include};
|
||||
return [ @incs ];
|
||||
}),
|
||||
|
||||
shared_extension => ".exe",
|
||||
|
||||
build_file => "descrip.mms",
|
||||
build_scheme => [ "unified", "VMS" ],
|
||||
},
|
||||
|
||||
uplink_common => {
|
||||
template => 1,
|
||||
apps_init_src => add("../ms/applink.c"),
|
||||
uplink_aux_src => add("../ms/uplink.c"),
|
||||
defines => add("OPENSSL_USE_APPLINK"),
|
||||
},
|
||||
x86_uplink => {
|
||||
inherit_from => [ "uplink_common" ],
|
||||
template => 1,
|
||||
uplink_aux_src => add("uplink-x86.s"),
|
||||
},
|
||||
x86_64_uplink => {
|
||||
inherit_from => [ "uplink_common" ],
|
||||
template => 1,
|
||||
uplink_aux_src => add("uplink-x86_64.s"),
|
||||
},
|
||||
ia64_uplink => {
|
||||
inherit_from => [ "uplink_common" ],
|
||||
template => 1,
|
||||
uplink_aux_src => add("uplink-ia64.s"),
|
||||
},
|
||||
|
||||
x86_asm => {
|
||||
template => 1,
|
||||
cpuid_asm_src => "x86cpuid.s",
|
||||
bn_asm_src => "bn-586.s co-586.s x86-mont.s x86-gf2m.s",
|
||||
ec_asm_src => "ecp_nistz256.c ecp_nistz256-x86.s",
|
||||
des_asm_src => "des-586.s crypt586.s",
|
||||
aes_asm_src => "aes-586.s vpaes-x86.s aesni-x86.s",
|
||||
bf_asm_src => "bf-586.s",
|
||||
md5_asm_src => "md5-586.s",
|
||||
cast_asm_src => "cast-586.s",
|
||||
sha1_asm_src => "sha1-586.s sha256-586.s sha512-586.s",
|
||||
rc4_asm_src => "rc4-586.s",
|
||||
rmd160_asm_src => "rmd-586.s",
|
||||
rc5_asm_src => "rc5-586.s",
|
||||
wp_asm_src => "wp_block.c wp-mmx.s",
|
||||
cmll_asm_src => "cmll-x86.s",
|
||||
modes_asm_src => "ghash-x86.s",
|
||||
padlock_asm_src => "e_padlock-x86.s",
|
||||
chacha_asm_src => "chacha-x86.s",
|
||||
poly1305_asm_src=> "poly1305-x86.s",
|
||||
},
|
||||
x86_elf_asm => {
|
||||
template => 1,
|
||||
inherit_from => [ "x86_asm" ],
|
||||
perlasm_scheme => "elf"
|
||||
},
|
||||
x86_64_asm => {
|
||||
template => 1,
|
||||
cpuid_asm_src => "x86_64cpuid.s",
|
||||
bn_asm_src => "asm/x86_64-gcc.c x86_64-mont.s x86_64-mont5.s x86_64-gf2m.s rsaz_exp.c rsaz-x86_64.s rsaz-avx2.s",
|
||||
ec_asm_src => "ecp_nistz256.c ecp_nistz256-x86_64.s x25519-x86_64.s",
|
||||
aes_asm_src => "aes-x86_64.s vpaes-x86_64.s bsaes-x86_64.s aesni-x86_64.s aesni-sha1-x86_64.s aesni-sha256-x86_64.s aesni-mb-x86_64.s",
|
||||
md5_asm_src => "md5-x86_64.s",
|
||||
sha1_asm_src => "sha1-x86_64.s sha256-x86_64.s sha512-x86_64.s sha1-mb-x86_64.s sha256-mb-x86_64.s",
|
||||
rc4_asm_src => "rc4-x86_64.s rc4-md5-x86_64.s",
|
||||
wp_asm_src => "wp-x86_64.s",
|
||||
cmll_asm_src => "cmll-x86_64.s cmll_misc.c",
|
||||
modes_asm_src => "ghash-x86_64.s aesni-gcm-x86_64.s",
|
||||
padlock_asm_src => "e_padlock-x86_64.s",
|
||||
chacha_asm_src => "chacha-x86_64.s",
|
||||
poly1305_asm_src=> "poly1305-x86_64.s",
|
||||
keccak1600_asm_src => "keccak1600-x86_64.s",
|
||||
},
|
||||
ia64_asm => {
|
||||
template => 1,
|
||||
cpuid_asm_src => "ia64cpuid.s",
|
||||
bn_asm_src => "bn-ia64.s ia64-mont.s",
|
||||
aes_asm_src => "aes_core.c aes_cbc.c aes-ia64.s",
|
||||
sha1_asm_src => "sha1-ia64.s sha256-ia64.s sha512-ia64.s",
|
||||
modes_asm_src => "ghash-ia64.s",
|
||||
perlasm_scheme => "void"
|
||||
},
|
||||
sparcv9_asm => {
|
||||
template => 1,
|
||||
cpuid_asm_src => "sparcv9cap.c sparccpuid.S",
|
||||
bn_asm_src => "asm/sparcv8plus.S sparcv9-mont.S sparcv9a-mont.S vis3-mont.S sparct4-mont.S sparcv9-gf2m.S",
|
||||
ec_asm_src => "ecp_nistz256.c ecp_nistz256-sparcv9.S",
|
||||
des_asm_src => "des_enc-sparc.S fcrypt_b.c dest4-sparcv9.S",
|
||||
aes_asm_src => "aes_core.c aes_cbc.c aes-sparcv9.S aest4-sparcv9.S aesfx-sparcv9.S",
|
||||
md5_asm_src => "md5-sparcv9.S",
|
||||
sha1_asm_src => "sha1-sparcv9.S sha256-sparcv9.S sha512-sparcv9.S",
|
||||
cmll_asm_src => "camellia.c cmll_misc.c cmll_cbc.c cmllt4-sparcv9.S",
|
||||
modes_asm_src => "ghash-sparcv9.S",
|
||||
poly1305_asm_src=> "poly1305-sparcv9.S",
|
||||
perlasm_scheme => "void"
|
||||
},
|
||||
sparcv8_asm => {
|
||||
template => 1,
|
||||
cpuid_asm_src => "",
|
||||
bn_asm_src => "asm/sparcv8.S",
|
||||
des_asm_src => "des_enc-sparc.S fcrypt_b.c",
|
||||
perlasm_scheme => "void"
|
||||
},
|
||||
alpha_asm => {
|
||||
template => 1,
|
||||
cpuid_asm_src => "alphacpuid.s",
|
||||
bn_asm_src => "bn_asm.c alpha-mont.S",
|
||||
sha1_asm_src => "sha1-alpha.S",
|
||||
modes_asm_src => "ghash-alpha.S",
|
||||
perlasm_scheme => "void"
|
||||
},
|
||||
mips32_asm => {
|
||||
template => 1,
|
||||
bn_asm_src => "bn-mips.S mips-mont.S",
|
||||
aes_asm_src => "aes_cbc.c aes-mips.S",
|
||||
sha1_asm_src => "sha1-mips.S sha256-mips.S",
|
||||
},
|
||||
mips64_asm => {
|
||||
inherit_from => [ "mips32_asm" ],
|
||||
template => 1,
|
||||
sha1_asm_src => add("sha512-mips.S"),
|
||||
poly1305_asm_src=> "poly1305-mips.S",
|
||||
},
|
||||
s390x_asm => {
|
||||
template => 1,
|
||||
cpuid_asm_src => "s390xcap.c s390xcpuid.S",
|
||||
bn_asm_src => "asm/s390x.S s390x-mont.S s390x-gf2m.s",
|
||||
aes_asm_src => "aes-s390x.S aes-ctr.fake aes-xts.fake",
|
||||
sha1_asm_src => "sha1-s390x.S sha256-s390x.S sha512-s390x.S",
|
||||
rc4_asm_src => "rc4-s390x.s",
|
||||
modes_asm_src => "ghash-s390x.S",
|
||||
chacha_asm_src => "chacha-s390x.S",
|
||||
poly1305_asm_src=> "poly1305-s390x.S",
|
||||
keccak1600_asm_src => "keccak1600-s390x.S",
|
||||
},
|
||||
armv4_asm => {
|
||||
template => 1,
|
||||
cpuid_asm_src => "armcap.c armv4cpuid.S",
|
||||
bn_asm_src => "bn_asm.c armv4-mont.S armv4-gf2m.S",
|
||||
ec_asm_src => "ecp_nistz256.c ecp_nistz256-armv4.S",
|
||||
aes_asm_src => "aes_cbc.c aes-armv4.S bsaes-armv7.S aesv8-armx.S",
|
||||
sha1_asm_src => "sha1-armv4-large.S sha256-armv4.S sha512-armv4.S",
|
||||
modes_asm_src => "ghash-armv4.S ghashv8-armx.S",
|
||||
chacha_asm_src => "chacha-armv4.S",
|
||||
poly1305_asm_src=> "poly1305-armv4.S",
|
||||
keccak1600_asm_src => "keccak1600-armv4.S",
|
||||
perlasm_scheme => "void"
|
||||
},
|
||||
aarch64_asm => {
|
||||
template => 1,
|
||||
cpuid_asm_src => "armcap.c arm64cpuid.S",
|
||||
ec_asm_src => "ecp_nistz256.c ecp_nistz256-armv8.S",
|
||||
bn_asm_src => "bn_asm.c armv8-mont.S",
|
||||
aes_asm_src => "aes_core.c aes_cbc.c aesv8-armx.S vpaes-armv8.S",
|
||||
sha1_asm_src => "sha1-armv8.S sha256-armv8.S sha512-armv8.S",
|
||||
modes_asm_src => "ghashv8-armx.S",
|
||||
chacha_asm_src => "chacha-armv8.S",
|
||||
poly1305_asm_src=> "poly1305-armv8.S",
|
||||
keccak1600_asm_src => "keccak1600-armv8.S",
|
||||
},
|
||||
parisc11_asm => {
|
||||
template => 1,
|
||||
cpuid_asm_src => "pariscid.s",
|
||||
bn_asm_src => "bn_asm.c parisc-mont.s",
|
||||
aes_asm_src => "aes_core.c aes_cbc.c aes-parisc.s",
|
||||
sha1_asm_src => "sha1-parisc.s sha256-parisc.s sha512-parisc.s",
|
||||
rc4_asm_src => "rc4-parisc.s",
|
||||
modes_asm_src => "ghash-parisc.s",
|
||||
perlasm_scheme => "32"
|
||||
},
|
||||
parisc20_64_asm => {
|
||||
template => 1,
|
||||
inherit_from => [ "parisc11_asm" ],
|
||||
perlasm_scheme => "64",
|
||||
},
|
||||
ppc32_asm => {
|
||||
template => 1,
|
||||
cpuid_asm_src => "ppccpuid.s ppccap.c",
|
||||
bn_asm_src => "bn-ppc.s ppc-mont.s",
|
||||
aes_asm_src => "aes_core.c aes_cbc.c aes-ppc.s vpaes-ppc.s aesp8-ppc.s",
|
||||
sha1_asm_src => "sha1-ppc.s sha256-ppc.s sha512-ppc.s sha256p8-ppc.s sha512p8-ppc.s",
|
||||
modes_asm_src => "ghashp8-ppc.s",
|
||||
chacha_asm_src => "chacha-ppc.s",
|
||||
poly1305_asm_src=> "poly1305-ppc.s poly1305-ppcfp.s",
|
||||
},
|
||||
ppc64_asm => {
|
||||
inherit_from => [ "ppc32_asm" ],
|
||||
template => 1,
|
||||
ec_asm_src => "ecp_nistz256.c ecp_nistz256-ppc64.s x25519-ppc64.s",
|
||||
keccak1600_asm_src => "keccak1600-ppc64.s",
|
||||
},
|
||||
);
|
||||
1803
Configurations/10-main.conf
Normal file
1803
Configurations/10-main.conf
Normal file
File diff suppressed because it is too large
Load Diff
255
Configurations/15-android.conf
Normal file
255
Configurations/15-android.conf
Normal file
@@ -0,0 +1,255 @@
|
||||
#### Android...
|
||||
#
|
||||
# See NOTES.ANDROID for details, and don't miss platform-specific
|
||||
# comments below...
|
||||
|
||||
{
|
||||
use File::Spec::Functions;
|
||||
|
||||
my $android_ndk = {};
|
||||
my %triplet = (
|
||||
arm => "arm-linux-androideabi",
|
||||
arm64 => "aarch64-linux-android",
|
||||
mips => "mipsel-linux-android",
|
||||
mips64 => "mips64el-linux-android",
|
||||
x86 => "i686-linux-android",
|
||||
x86_64 => "x86_64-linux-android",
|
||||
);
|
||||
|
||||
sub android_ndk {
|
||||
unless (%$android_ndk) {
|
||||
if ($now_printing =~ m|^android|) {
|
||||
return $android_ndk = { bn_ops => "BN_AUTO" };
|
||||
}
|
||||
|
||||
my $ndk = $ENV{ANDROID_NDK};
|
||||
die "\$ANDROID_NDK is not defined" if (!$ndk);
|
||||
if (!-d "$ndk/platforms" && !-f "$ndk/AndroidVersion.txt") {
|
||||
# $ndk/platforms is traditional "all-inclusive" NDK, while
|
||||
# $ndk/AndroidVersion.txt is so-called standalone toolchain
|
||||
# tailored for specific target down to API level.
|
||||
die "\$ANDROID_NDK=$ndk is invalid";
|
||||
}
|
||||
$ndk = canonpath($ndk);
|
||||
|
||||
my $ndkver = undef;
|
||||
|
||||
if (open my $fh, "<$ndk/source.properties") {
|
||||
local $_;
|
||||
while(<$fh>) {
|
||||
if (m|Pkg\.Revision\s*=\s*([0-9]+)|) {
|
||||
$ndkver = $1;
|
||||
last;
|
||||
}
|
||||
}
|
||||
close $fh;
|
||||
}
|
||||
|
||||
my ($sysroot, $api, $arch);
|
||||
|
||||
$config{target} =~ m|[^-]+-([^-]+)$|; # split on dash
|
||||
$arch = $1;
|
||||
|
||||
if ($sysroot = $ENV{CROSS_SYSROOT}) {
|
||||
$sysroot =~ m|/android-([0-9]+)/arch-(\w+)/?$|;
|
||||
($api, $arch) = ($1, $2);
|
||||
} elsif (-f "$ndk/AndroidVersion.txt") {
|
||||
$sysroot = "$ndk/sysroot";
|
||||
} else {
|
||||
$api = "*";
|
||||
|
||||
# see if user passed -D__ANDROID_API__=N
|
||||
foreach (@{$useradd{CPPDEFINES}}, @{$user{CPPFLAGS}}) {
|
||||
if (m|__ANDROID_API__=([0-9]+)|) {
|
||||
$api = $1;
|
||||
last;
|
||||
}
|
||||
}
|
||||
|
||||
# list available platforms (numerically)
|
||||
my @platforms = sort { $a =~ m/-([0-9]+)$/; my $aa = $1;
|
||||
$b =~ m/-([0-9]+)$/; $aa <=> $1;
|
||||
} glob("$ndk/platforms/android-$api");
|
||||
die "no $ndk/platforms/android-$api" if ($#platforms < 0);
|
||||
|
||||
$sysroot = "@platforms[$#platforms]/arch-$arch";
|
||||
$sysroot =~ m|/android-([0-9]+)/arch-$arch|;
|
||||
$api = $1;
|
||||
}
|
||||
die "no sysroot=$sysroot" if (!-d $sysroot);
|
||||
|
||||
my $triarch = $triplet{$arch};
|
||||
my $cflags;
|
||||
my $cppflags;
|
||||
|
||||
# see if there is NDK clang on $PATH, "universal" or "standalone"
|
||||
if (which("clang") =~ m|^$ndk/.*/prebuilt/([^/]+)/|) {
|
||||
my $host=$1;
|
||||
# harmonize with gcc default
|
||||
my $arm = $ndkver > 16 ? "armv7a" : "armv5te";
|
||||
(my $tridefault = $triarch) =~ s/^arm-/$arm-/;
|
||||
(my $tritools = $triarch) =~ s/(?:x|i6)86(_64)?-.*/x86$1/;
|
||||
$cflags .= " -target $tridefault "
|
||||
. "-gcc-toolchain \$(ANDROID_NDK)/toolchains"
|
||||
. "/$tritools-4.9/prebuilt/$host";
|
||||
$user{CC} = "clang" if ($user{CC} !~ m|clang|);
|
||||
$user{CROSS_COMPILE} = undef;
|
||||
if (which("llvm-ar") =~ m|^$ndk/.*/prebuilt/([^/]+)/|) {
|
||||
$user{AR} = "llvm-ar";
|
||||
$user{ARFLAGS} = [ "rs" ];
|
||||
$user{RANLIB} = ":";
|
||||
}
|
||||
} elsif (-f "$ndk/AndroidVersion.txt") { #"standalone toolchain"
|
||||
my $cc = $user{CC} // "clang";
|
||||
# One can probably argue that both clang and gcc should be
|
||||
# probed, but support for "standalone toolchain" was added
|
||||
# *after* announcement that gcc is being phased out, so
|
||||
# favouring clang is considered adequate. Those who insist
|
||||
# have option to enforce test for gcc with CC=gcc.
|
||||
if (which("$triarch-$cc") !~ m|^$ndk|) {
|
||||
die "no NDK $triarch-$cc on \$PATH";
|
||||
}
|
||||
$user{CC} = $cc;
|
||||
$user{CROSS_COMPILE} = "$triarch-";
|
||||
} elsif ($user{CC} eq "clang") {
|
||||
die "no NDK clang on \$PATH";
|
||||
} else {
|
||||
if (which("$triarch-gcc") !~ m|^$ndk/.*/prebuilt/([^/]+)/|) {
|
||||
die "no NDK $triarch-gcc on \$PATH";
|
||||
}
|
||||
$cflags .= " -mandroid";
|
||||
$user{CROSS_COMPILE} = "$triarch-";
|
||||
}
|
||||
|
||||
if (!-d "$sysroot/usr/include") {
|
||||
my $incroot = "$ndk/sysroot/usr/include";
|
||||
die "no $incroot" if (!-d $incroot);
|
||||
die "no $incroot/$triarch" if (!-d "$incroot/$triarch");
|
||||
$incroot =~ s|^$ndk/||;
|
||||
$cppflags = "-D__ANDROID_API__=$api";
|
||||
$cppflags .= " -isystem \$(ANDROID_NDK)/$incroot/$triarch";
|
||||
$cppflags .= " -isystem \$(ANDROID_NDK)/$incroot";
|
||||
}
|
||||
|
||||
$sysroot =~ s|^$ndk/||;
|
||||
$android_ndk = {
|
||||
cflags => "$cflags --sysroot=\$(ANDROID_NDK)/$sysroot",
|
||||
cppflags => $cppflags,
|
||||
bn_ops => $arch =~ m/64$/ ? "SIXTY_FOUR_BIT_LONG"
|
||||
: "BN_LLONG",
|
||||
};
|
||||
}
|
||||
|
||||
return $android_ndk;
|
||||
}
|
||||
}
|
||||
|
||||
my %targets = (
|
||||
"android" => {
|
||||
inherit_from => [ "linux-generic32" ],
|
||||
template => 1,
|
||||
################################################################
|
||||
# Special note about -pie. The underlying reason is that
|
||||
# Lollipop refuses to run non-PIE. But what about older systems
|
||||
# and NDKs? -fPIC was never problem, so the only concern is -pie.
|
||||
# Older toolchains, e.g. r4, appear to handle it and binaries
|
||||
# turn out mostly functional. "Mostly" means that oldest
|
||||
# Androids, such as Froyo, fail to handle executable, but newer
|
||||
# systems are perfectly capable of executing binaries targeting
|
||||
# Froyo. Keep in mind that in the nutshell Android builds are
|
||||
# about JNI, i.e. shared libraries, not applications.
|
||||
cflags => add(sub { android_ndk()->{cflags} }),
|
||||
cppflags => add(sub { android_ndk()->{cppflags} }),
|
||||
cxxflags => add(sub { android_ndk()->{cflags} }),
|
||||
bn_ops => sub { android_ndk()->{bn_ops} },
|
||||
bin_cflags => "-pie",
|
||||
enable => [ ],
|
||||
},
|
||||
"android-arm" => {
|
||||
################################################################
|
||||
# Contemporary Android applications can provide multiple JNI
|
||||
# providers in .apk, targeting multiple architectures. Among
|
||||
# them there is "place" for two ARM flavours: generic eabi and
|
||||
# armv7-a/hard-float. However, it should be noted that OpenSSL's
|
||||
# ability to engage NEON is not constrained by ABI choice, nor
|
||||
# is your ability to call OpenSSL from your application code
|
||||
# compiled with floating-point ABI other than default 'soft'.
|
||||
# (Latter thanks to __attribute__((pcs("aapcs"))) declaration.)
|
||||
# This means that choice of ARM libraries you provide in .apk
|
||||
# is driven by application needs. For example if application
|
||||
# itself benefits from NEON or is floating-point intensive, then
|
||||
# it might be appropriate to provide both libraries. Otherwise
|
||||
# just generic eabi would do. But in latter case it would be
|
||||
# appropriate to
|
||||
#
|
||||
# ./Configure android-arm -D__ARM_MAX_ARCH__=8
|
||||
#
|
||||
# in order to build "universal" binary and allow OpenSSL take
|
||||
# advantage of NEON when it's available.
|
||||
#
|
||||
# Keep in mind that (just like with linux-armv4) we rely on
|
||||
# compiler defaults, which is not necessarily what you had
|
||||
# in mind, in which case you would have to pass additional
|
||||
# -march and/or -mfloat-abi flags. NDK defaults to armv5te.
|
||||
# Newer NDK versions reportedly require additional -latomic.
|
||||
#
|
||||
inherit_from => [ "android", asm("armv4_asm") ],
|
||||
bn_ops => add("RC4_CHAR"),
|
||||
},
|
||||
"android-arm64" => {
|
||||
inherit_from => [ "android", asm("aarch64_asm") ],
|
||||
bn_ops => add("RC4_CHAR"),
|
||||
perlasm_scheme => "linux64",
|
||||
},
|
||||
|
||||
"android-mips" => {
|
||||
inherit_from => [ "android", asm("mips32_asm") ],
|
||||
bn_ops => add("RC4_CHAR"),
|
||||
perlasm_scheme => "o32",
|
||||
},
|
||||
"android-mips64" => {
|
||||
################################################################
|
||||
# You are more than likely have to specify target processor
|
||||
# on ./Configure command line. Trouble is that toolchain's
|
||||
# default is MIPS64r6 (at least in r10d), but there are no
|
||||
# such processors around (or they are too rare to spot one).
|
||||
# Actual problem is that MIPS64r6 is binary incompatible
|
||||
# with previous MIPS ISA versions, in sense that unlike
|
||||
# prior versions original MIPS binary code will fail.
|
||||
#
|
||||
inherit_from => [ "android", asm("mips64_asm") ],
|
||||
bn_ops => add("RC4_CHAR"),
|
||||
perlasm_scheme => "64",
|
||||
},
|
||||
|
||||
"android-x86" => {
|
||||
inherit_from => [ "android", asm("x86_asm") ],
|
||||
CFLAGS => add(picker(release => "-fomit-frame-pointer")),
|
||||
bn_ops => add("RC4_INT"),
|
||||
perlasm_scheme => "android",
|
||||
},
|
||||
"android-x86_64" => {
|
||||
inherit_from => [ "android", asm("x86_64_asm") ],
|
||||
bn_ops => add("RC4_INT"),
|
||||
perlasm_scheme => "elf",
|
||||
},
|
||||
|
||||
####################################################################
|
||||
# Backward compatible targets, (might) requre $CROSS_SYSROOT
|
||||
#
|
||||
"android-armeabi" => {
|
||||
inherit_from => [ "android-arm" ],
|
||||
},
|
||||
"android64" => {
|
||||
inherit_from => [ "android" ],
|
||||
},
|
||||
"android64-aarch64" => {
|
||||
inherit_from => [ "android-arm64" ],
|
||||
},
|
||||
"android64-x86_64" => {
|
||||
inherit_from => [ "android-x86_64" ],
|
||||
},
|
||||
"android64-mips64" => {
|
||||
inherit_from => [ "android-mips64" ],
|
||||
},
|
||||
);
|
||||
62
Configurations/15-ios.conf
Normal file
62
Configurations/15-ios.conf
Normal file
@@ -0,0 +1,62 @@
|
||||
#### iPhoneOS/iOS
|
||||
#
|
||||
# It takes recent enough XCode to use following two targets. It shouldn't
|
||||
# be a problem by now, but if they don't work, original targets below
|
||||
# that depend on manual definition of environment variables should still
|
||||
# work...
|
||||
#
|
||||
my %targets = (
|
||||
"ios-common" => {
|
||||
template => 1,
|
||||
inherit_from => [ "darwin-common" ],
|
||||
sys_id => "iOS",
|
||||
disable => [ "engine", "async" ],
|
||||
},
|
||||
"ios-xcrun" => {
|
||||
inherit_from => [ "ios-common", asm("armv4_asm") ],
|
||||
# It should be possible to go below iOS 6 and even add -arch armv6,
|
||||
# thus targeting iPhone pre-3GS, but it's assumed to be irrelevant
|
||||
# at this point.
|
||||
CC => "xcrun -sdk iphoneos cc",
|
||||
cflags => add("-arch armv7 -mios-version-min=6.0.0 -fno-common"),
|
||||
perlasm_scheme => "ios32",
|
||||
},
|
||||
"ios64-xcrun" => {
|
||||
inherit_from => [ "ios-common", asm("aarch64_asm") ],
|
||||
CC => "xcrun -sdk iphoneos cc",
|
||||
cflags => add("-arch arm64 -mios-version-min=7.0.0 -fno-common"),
|
||||
bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
|
||||
perlasm_scheme => "ios64",
|
||||
},
|
||||
"iossimulator-xcrun" => {
|
||||
inherit_from => [ "ios-common" ],
|
||||
CC => "xcrun -sdk iphonesimulator cc",
|
||||
},
|
||||
# It takes three prior-set environment variables to make it work:
|
||||
#
|
||||
# CROSS_COMPILE=/where/toolchain/is/usr/bin/ [note ending slash]
|
||||
# CROSS_TOP=/where/SDKs/are
|
||||
# CROSS_SDK=iPhoneOSx.y.sdk
|
||||
#
|
||||
# Exact paths vary with Xcode releases, but for couple of last ones
|
||||
# they would look like this:
|
||||
#
|
||||
# CROSS_COMPILE=`xcode-select --print-path`/Toolchains/XcodeDefault.xctoolchain/usr/bin/
|
||||
# CROSS_TOP=`xcode-select --print-path`/Platforms/iPhoneOS.platform/Developer
|
||||
# CROSS_SDK=iPhoneOS.sdk
|
||||
#
|
||||
"iphoneos-cross" => {
|
||||
inherit_from => [ "ios-common" ],
|
||||
cflags => add("-isysroot \$(CROSS_TOP)/SDKs/\$(CROSS_SDK) -fno-common"),
|
||||
},
|
||||
"ios-cross" => {
|
||||
inherit_from => [ "ios-xcrun" ],
|
||||
CC => "cc",
|
||||
cflags => add("-isysroot \$(CROSS_TOP)/SDKs/\$(CROSS_SDK)"),
|
||||
},
|
||||
"ios64-cross" => {
|
||||
inherit_from => [ "ios64-xcrun" ],
|
||||
CC => "cc",
|
||||
cflags => add("-isysroot \$(CROSS_TOP)/SDKs/\$(CROSS_SDK)"),
|
||||
},
|
||||
);
|
||||
17
Configurations/50-djgpp.conf
Normal file
17
Configurations/50-djgpp.conf
Normal file
@@ -0,0 +1,17 @@
|
||||
# We can't make any commitment to support the DJGPP platform,
|
||||
# and rely entirely on the OpenSSL community to help is fine
|
||||
# tune and test.
|
||||
|
||||
my %targets = (
|
||||
"DJGPP" => {
|
||||
inherit_from => [ asm("x86_asm") ],
|
||||
CC => "gcc",
|
||||
CFLAGS => "-fomit-frame-pointer -O2 -Wall",
|
||||
cflags => "-I/dev/env/WATT_ROOT/inc -DTERMIOS -DL_ENDIAN",
|
||||
sys_id => "MSDOS",
|
||||
lflags => add("-L/dev/env/WATT_ROOT/lib"),
|
||||
ex_libs => add("-lwatt"),
|
||||
bn_ops => "BN_LLONG",
|
||||
perlasm_scheme => "a.out",
|
||||
},
|
||||
);
|
||||
30
Configurations/50-haiku.conf
Normal file
30
Configurations/50-haiku.conf
Normal file
@@ -0,0 +1,30 @@
|
||||
my %targets = (
|
||||
"haiku-common" => {
|
||||
template => 1,
|
||||
CC => "cc",
|
||||
CFLAGS => add_before(picker(default => "-Wall",
|
||||
debug => "-g -O0",
|
||||
release => "-O2")),
|
||||
cflags => add_before("-DL_ENDIAN -include \$(SRCDIR)/os-dep/haiku.h",
|
||||
threads("-D_REENTRANT")),
|
||||
sys_id => "HAIKU",
|
||||
ex_libs => "-lnetwork",
|
||||
perlasm_scheme => "elf",
|
||||
thread_scheme => "pthreads",
|
||||
dso_scheme => "dlfcn",
|
||||
shared_target => "gnu-shared",
|
||||
shared_cflag => "-fPIC",
|
||||
shared_ldflag => "-shared",
|
||||
shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)",
|
||||
},
|
||||
"haiku-x86" => {
|
||||
inherit_from => [ "haiku-common", asm("x86_elf_asm") ],
|
||||
CFLAGS => add(picker(release => "-fomit-frame-pointer")),
|
||||
bn_ops => "BN_LLONG",
|
||||
},
|
||||
"haiku-x86_64" => {
|
||||
inherit_from => [ "haiku-common" ],
|
||||
cflags => add("-m64"),
|
||||
bn_ops => "SIXTY_FOUR_BIT_LONG",
|
||||
},
|
||||
);
|
||||
23
Configurations/50-masm.conf
Normal file
23
Configurations/50-masm.conf
Normal file
@@ -0,0 +1,23 @@
|
||||
# We can't make commitment to supporting Microsoft assembler,
|
||||
# because it would mean supporting all masm versions. This in
|
||||
# in turn is because masm is not really an interchangeable option,
|
||||
# while users tend to have reasons to stick with specific Visual
|
||||
# Studio versions. It's usually lesser hassle to make it work
|
||||
# with latest assembler, but tweaking for older versions had
|
||||
# proven to be daunting task. This is experimental target, for
|
||||
# production builds stick with [up-to-date version of] nasm.
|
||||
|
||||
my %targets = (
|
||||
"VC-WIN64A-masm" => {
|
||||
inherit_from => [ "VC-WIN64-common", asm("x86_64_asm"),
|
||||
sub { $disabled{shared} ? () : "x86_64_uplink" } ],
|
||||
AS => "ml64",
|
||||
ASFLAGS => "/nologo /Zi",
|
||||
asoutflag => "/Fo",
|
||||
asflags => "/c /Cp /Cx",
|
||||
sys_id => "WIN64A",
|
||||
bn_asm_src => sub { return undef unless @_;
|
||||
my $r=join(" ",@_); $r=~s|asm/x86_64-gcc|bn_asm|; $r; },
|
||||
perlasm_scheme => "masm",
|
||||
},
|
||||
);
|
||||
64
Configurations/50-win-onecore.conf
Normal file
64
Configurations/50-win-onecore.conf
Normal file
@@ -0,0 +1,64 @@
|
||||
# Windows OneCore targets.
|
||||
#
|
||||
# OneCore is new API stability "contract" that transends Desktop, IoT and
|
||||
# Mobile[?] Windows editions. It's a set up "umbrella" libraries that
|
||||
# export subset of Win32 API that are common to all Windows 10 devices.
|
||||
#
|
||||
# OneCore Configuration temporarly dedicated for console applications
|
||||
# due to disabled event logging, which is incompatible with one core.
|
||||
# Error messages are provided via standard error only.
|
||||
# TODO: extend error handling to use ETW based eventing
|
||||
# (Or rework whole error messaging)
|
||||
|
||||
my %targets = (
|
||||
"VC-WIN32-ONECORE" => {
|
||||
inherit_from => [ "VC-WIN32" ],
|
||||
# /NODEFAULTLIB:kernel32.lib is needed, because MSVCRT.LIB has
|
||||
# hidden reference to kernel32.lib, but we don't actually want
|
||||
# it in "onecore" build.
|
||||
lflags => add("/NODEFAULTLIB:kernel32.lib"),
|
||||
defines => add("OPENSSL_SYS_WIN_CORE"),
|
||||
ex_libs => "onecore.lib",
|
||||
},
|
||||
"VC-WIN64A-ONECORE" => {
|
||||
inherit_from => [ "VC-WIN64A" ],
|
||||
lflags => add("/NODEFAULTLIB:kernel32.lib"),
|
||||
defines => add("OPENSSL_SYS_WIN_CORE"),
|
||||
ex_libs => "onecore.lib",
|
||||
},
|
||||
|
||||
# Windows on ARM targets. ARM compilers are additional components in
|
||||
# VS2017, i.e. they are not installed by default. And when installed,
|
||||
# there are no "ARM Tool Command Prompt"s on Start menu, you have
|
||||
# to locate vcvarsall.bat and act accordingly. VC-WIN32-ARM has
|
||||
# received limited testing with evp_test.exe on Windows 10 IoT Core,
|
||||
# but not VC-WIN64-ARM, no hardware... In other words they are not
|
||||
# actually supported...
|
||||
#
|
||||
# Another thing to keep in mind [in cross-compilation scenario such
|
||||
# as this one] is that target's file system has nothing to do with
|
||||
# compilation system's one. This means that you're are likely to use
|
||||
# --prefix and --openssldir with target-specific values. 'nmake install'
|
||||
# step is effectively meaningless in cross-compilation case, though
|
||||
# it might be useful to 'nmake install DESTDIR=S:\ome\where' where you
|
||||
# can point Visual Studio to when compiling custom application code.
|
||||
|
||||
"VC-WIN32-ARM" => {
|
||||
inherit_from => [ "VC-noCE-common" ],
|
||||
defines => add("_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE",
|
||||
"OPENSSL_SYS_WIN_CORE"),
|
||||
bn_ops => "BN_LLONG RC4_CHAR EXPORT_VAR_AS_FN",
|
||||
lflags => add("/NODEFAULTLIB:kernel32.lib"),
|
||||
ex_libs => "onecore.lib",
|
||||
multilib => "-arm",
|
||||
},
|
||||
"VC-WIN64-ARM" => {
|
||||
inherit_from => [ "VC-noCE-common" ],
|
||||
defines => add("_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE",
|
||||
"OPENSSL_SYS_WIN_CORE"),
|
||||
bn_ops => "SIXTY_FOUR_BIT RC4_CHAR EXPORT_VAR_AS_FN",
|
||||
lflags => add("/NODEFAULTLIB:kernel32.lib"),
|
||||
ex_libs => "onecore.lib",
|
||||
multilib => "-arm64",
|
||||
},
|
||||
);
|
||||
136
Configurations/INTERNALS.Configure
Normal file
136
Configurations/INTERNALS.Configure
Normal file
@@ -0,0 +1,136 @@
|
||||
Configure Internals
|
||||
===================
|
||||
|
||||
[ note: this file uses markdown for formatting ]
|
||||
|
||||
Intro
|
||||
-----
|
||||
|
||||
This is a collection of notes that are hopefully of interest to those
|
||||
who decide to dive into Configure and what it does. This is a living
|
||||
document and anyone is encouraged to add to it and submit changes.
|
||||
There's no claim for this document to be complete at any time, but it
|
||||
will hopefully reach such a point in time.
|
||||
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Parsing build.info files, processing conditions
|
||||
-----------------------------------------------
|
||||
|
||||
Processing conditions in build.info files is done with the help of a
|
||||
condition stack that tell if a build.info should be processed or if it
|
||||
should just be skipped over. The possible states of the stack top are
|
||||
expressed in the following comment from Configure:
|
||||
|
||||
# The top item of this stack has the following values
|
||||
# -2 positive already run and we found ELSE (following ELSIF should fail)
|
||||
# -1 positive already run (skip until ENDIF)
|
||||
# 0 negatives so far (if we're at a condition, check it)
|
||||
# 1 last was positive (don't skip lines until next ELSE, ELSIF or ENDIF)
|
||||
# 2 positive ELSE (following ELSIF should fail)
|
||||
|
||||
Ground rule is that non-condition lines are skipped over if the
|
||||
stack top is > 0. Condition lines (IF, ELSIF, ELSE and ENDIF
|
||||
statements) need to be processed either way to keep track of the skip
|
||||
stack states, so they are a little more intricate.
|
||||
|
||||
Instead of trying to describe in words, here are some example of what
|
||||
the skip stack should look like after each line is processed:
|
||||
|
||||
Example 1:
|
||||
|
||||
| IF[1] | 1 | |
|
||||
| ... whatever ... | | this line is processed |
|
||||
| IF[1] | 1 1 | |
|
||||
| ... whatever ... | | this line is processed |
|
||||
| ELSIF[1] | 1 -1 | |
|
||||
| ... whatever ... | | this line is skipped over |
|
||||
| ELSE | 1 -2 | |
|
||||
| ... whatever ... | | this line is skipped over |
|
||||
| ENDIF | 1 | |
|
||||
| ... whatever ... | | this line is processed |
|
||||
| ELSIF[1] | -1 | |
|
||||
| ... whatever ... | | this line is skipped over |
|
||||
| IF[1] | -1 -1 | |
|
||||
| ... whatever ... | | this line is skipped over |
|
||||
| ELSIF[1] | -1 -1 | |
|
||||
| ... whatever ... | | this line is skipped over |
|
||||
| ELSE | -1 -2 | |
|
||||
| ... whatever ... | | this line is skipped over |
|
||||
| ENDIF | -1 | |
|
||||
| ... whatever ... | | this line is skipped over |
|
||||
| ENDIF | | |
|
||||
|
||||
Example 2:
|
||||
|
||||
| IF[0] | 0 | |
|
||||
| ... whatever ... | | this line is skipped over |
|
||||
| IF[1] | 0 -1 | |
|
||||
| ... whatever ... | | this line is skipped over |
|
||||
| ELSIF[1] | 0 -1 | |
|
||||
| ... whatever ... | | this line is skipped over |
|
||||
| ELSE | 0 -2 | |
|
||||
| ... whatever ... | | this line is skipped over |
|
||||
| ENDIF | 0 | |
|
||||
| ... whatever ... | | this line is skipped over |
|
||||
| ELSIF[1] | 1 | |
|
||||
| ... whatever ... | | this line is processed |
|
||||
| IF[1] | 1 1 | |
|
||||
| ... whatever ... | | this line is processed |
|
||||
| ELSIF[1] | 1 -1 | |
|
||||
| ... whatever ... | | this line is skipped over |
|
||||
| ELSE | 1 -2 | |
|
||||
| ... whatever ... | | this line is skipped over |
|
||||
| ENDIF | 1 | |
|
||||
| ... whatever ... | | this line is processed |
|
||||
| ENDIF | | |
|
||||
|
||||
Example 3:
|
||||
|
||||
| IF[0] | 0 | |
|
||||
| ... whatever ... | | this line is skipped over |
|
||||
| IF[0] | 0 -1 | |
|
||||
| ... whatever ... | | this line is skipped over |
|
||||
| ELSIF[1] | 0 -1 | |
|
||||
| ... whatever ... | | this line is skipped over |
|
||||
| ELSE | 0 -2 | |
|
||||
| ... whatever ... | | this line is skipped over |
|
||||
| ENDIF | 0 | |
|
||||
| ... whatever ... | | this line is skipped over |
|
||||
| ELSIF[1] | 1 | |
|
||||
| ... whatever ... | | this line is processed |
|
||||
| IF[0] | 1 0 | |
|
||||
| ... whatever ... | | this line is skipped over |
|
||||
| ELSIF[1] | 1 1 | |
|
||||
| ... whatever ... | | this line is processed |
|
||||
| ELSE | 1 -2 | |
|
||||
| ... whatever ... | | this line is skipped over |
|
||||
| ENDIF | 1 | |
|
||||
| ... whatever ... | | this line is processed |
|
||||
| ENDIF | | |
|
||||
|
||||
Example 4:
|
||||
|
||||
| IF[0] | 0 | |
|
||||
| ... whatever ... | | this line is skipped over |
|
||||
| IF[0] | 0 -1 | |
|
||||
| ... whatever ... | | this line is skipped over |
|
||||
| ELSIF[0] | 0 -1 | |
|
||||
| ... whatever ... | | this line is skipped over |
|
||||
| ELSE | 0 -2 | |
|
||||
| ... whatever ... | | this line is skipped over |
|
||||
| ENDIF | 0 | |
|
||||
| ... whatever ... | | this line is skipped over |
|
||||
| ELSIF[1] | 1 | |
|
||||
| ... whatever ... | | this line is processed |
|
||||
| IF[0] | 1 0 | |
|
||||
| ... whatever ... | | this line is skipped over |
|
||||
| ELSIF[0] | 1 0 | |
|
||||
| ... whatever ... | | this line is skipped over |
|
||||
| ELSE | 1 2 | |
|
||||
| ... whatever ... | | this line is processed |
|
||||
| ENDIF | 1 | |
|
||||
| ... whatever ... | | this line is processed |
|
||||
| ENDIF | | |
|
||||
|
||||
763
Configurations/README
Normal file
763
Configurations/README
Normal file
@@ -0,0 +1,763 @@
|
||||
Intro
|
||||
=====
|
||||
|
||||
This directory contains a few sets of files that are used for
|
||||
configuration in diverse ways:
|
||||
|
||||
*.conf Target platform configurations, please read
|
||||
'Configurations of OpenSSL target platforms' for more
|
||||
information.
|
||||
*.tmpl Build file templates, please read 'Build-file
|
||||
programming with the "unified" build system' as well
|
||||
as 'Build info files' for more information.
|
||||
*.pm Helper scripts / modules for the main `Configure`
|
||||
script. See 'Configure helper scripts for more
|
||||
information.
|
||||
|
||||
|
||||
Configurations of OpenSSL target platforms
|
||||
==========================================
|
||||
|
||||
Configuration targets are a collection of facts that we know about
|
||||
different platforms and their capabilities. We organise them in a
|
||||
hash table, where each entry represent a specific target.
|
||||
|
||||
Note that configuration target names must be unique across all config
|
||||
files. The Configure script does check that a config file doesn't
|
||||
have config targets that shadow config targets from other files.
|
||||
|
||||
In each table entry, the following keys are significant:
|
||||
|
||||
inherit_from => Other targets to inherit values from.
|
||||
Explained further below. [1]
|
||||
template => Set to 1 if this isn't really a platform
|
||||
target. Instead, this target is a template
|
||||
upon which other targets can be built.
|
||||
Explained further below. [1]
|
||||
|
||||
sys_id => System identity for systems where that
|
||||
is difficult to determine automatically.
|
||||
|
||||
enable => Enable specific configuration features.
|
||||
This MUST be an array of words.
|
||||
disable => Disable specific configuration features.
|
||||
This MUST be an array of words.
|
||||
Note: if the same feature is both enabled
|
||||
and disabled, disable wins.
|
||||
|
||||
as => The assembler command. This is not always
|
||||
used (for example on Unix, where the C
|
||||
compiler is used instead).
|
||||
asflags => Default assembler command flags [4].
|
||||
cpp => The C preprocessor command, normally not
|
||||
given, as the build file defaults are
|
||||
usually good enough.
|
||||
cppflags => Default C preprocessor flags [4].
|
||||
defines => As an alternative, macro definitions may be
|
||||
given here instead of in `cppflags' [4].
|
||||
If given here, they MUST be as an array of
|
||||
the string such as "MACRO=value", or just
|
||||
"MACRO" for definitions without value.
|
||||
includes => As an alternative, inclusion directories
|
||||
may be given here instead of in `cppflags'
|
||||
[4]. If given here, the MUST be an array
|
||||
of strings, one directory specification
|
||||
each.
|
||||
cc => The C compiler command, usually one of "cc",
|
||||
"gcc" or "clang". This command is normally
|
||||
also used to link object files and
|
||||
libraries into the final program.
|
||||
cxx => The C++ compiler command, usually one of
|
||||
"c++", "g++" or "clang++". This command is
|
||||
also used when linking a program where at
|
||||
least one of the object file is made from
|
||||
C++ source.
|
||||
cflags => Defaults C compiler flags [4].
|
||||
cxxflags => Default C++ compiler flags [4]. If unset,
|
||||
it gets the same value as cflags.
|
||||
|
||||
(linking is a complex thing, see [3] below)
|
||||
ld => Linker command, usually not defined
|
||||
(meaning the compiler command is used
|
||||
instead).
|
||||
(NOTE: this is here for future use, it's
|
||||
not implemented yet)
|
||||
lflags => Default flags used when linking apps,
|
||||
shared libraries or DSOs [4].
|
||||
ex_libs => Extra libraries that are needed when
|
||||
linking shared libraries, DSOs or programs.
|
||||
The value is also assigned to Libs.private
|
||||
in $(libdir)/pkgconfig/libcrypto.pc.
|
||||
|
||||
shared_cppflags => Extra C preprocessor flags used when
|
||||
processing C files for shared libraries.
|
||||
shared_cflag => Extra C compiler flags used when compiling
|
||||
for shared libraries, typically something
|
||||
like "-fPIC".
|
||||
shared_ldflag => Extra linking flags used when linking
|
||||
shared libraries.
|
||||
module_cppflags
|
||||
module_cflags
|
||||
module_ldflags => Has the same function as the corresponding
|
||||
`shared_' attributes, but for building DSOs.
|
||||
When unset, they get the same values as the
|
||||
corresponding `shared_' attributes.
|
||||
|
||||
ar => The library archive command, the default is
|
||||
"ar".
|
||||
(NOTE: this is here for future use, it's
|
||||
not implemented yet)
|
||||
arflags => Flags to be used with the library archive
|
||||
command. On Unix, this includes the
|
||||
command letter, 'r' by default.
|
||||
|
||||
ranlib => The library archive indexing command, the
|
||||
default is 'ranlib' it it exists.
|
||||
|
||||
unistd => An alternative header to the typical
|
||||
'<unistd.h>'. This is very rarely needed.
|
||||
|
||||
shared_extension => File name extension used for shared
|
||||
libraries.
|
||||
obj_extension => File name extension used for object files.
|
||||
On unix, this defaults to ".o" (NOTE: this
|
||||
is here for future use, it's not
|
||||
implemented yet)
|
||||
exe_extension => File name extension used for executable
|
||||
files. On unix, this defaults to "" (NOTE:
|
||||
this is here for future use, it's not
|
||||
implemented yet)
|
||||
shlib_variant => A "variant" identifier inserted between the base
|
||||
shared library name and the extension. On "unixy"
|
||||
platforms (BSD, Linux, Solaris, MacOS/X, ...) this
|
||||
supports installation of custom OpenSSL libraries
|
||||
that don't conflict with other builds of OpenSSL
|
||||
installed on the system. The variant identifier
|
||||
becomes part of the SONAME of the library and also
|
||||
any symbol versions (symbol versions are not used or
|
||||
needed with MacOS/X). For example, on a system
|
||||
where a default build would normally create the SSL
|
||||
shared library as 'libssl.so -> libssl.so.1.1' with
|
||||
the value of the symlink as the SONAME, a target
|
||||
definition that sets 'shlib_variant => "-abc"' will
|
||||
create 'libssl.so -> libssl-abc.so.1.1', again with
|
||||
an SONAME equal to the value of the symlink. The
|
||||
symbol versions associated with the variant library
|
||||
would then be 'OPENSSL_ABC_<version>' rather than
|
||||
the default 'OPENSSL_<version>'. The string inserted
|
||||
into symbol versions is obtained by mapping all
|
||||
letters in the "variant" identifier to upper case
|
||||
and all non-alphanumeric characters to '_'.
|
||||
|
||||
thread_scheme => The type of threads is used on the
|
||||
configured platform. Currently known
|
||||
values are "(unknown)", "pthreads",
|
||||
"uithreads" (a.k.a solaris threads) and
|
||||
"winthreads". Except for "(unknown)", the
|
||||
actual value is currently ignored but may
|
||||
be used in the future. See further notes
|
||||
below [2].
|
||||
dso_scheme => The type of dynamic shared objects to build
|
||||
for. This mostly comes into play with
|
||||
engines, but can be used for other purposes
|
||||
as well. Valid values are "DLFCN"
|
||||
(dlopen() et al), "DLFCN_NO_H" (for systems
|
||||
that use dlopen() et al but do not have
|
||||
fcntl.h), "DL" (shl_load() et al), "WIN32"
|
||||
and "VMS".
|
||||
perlasm_scheme => The perlasm method used to create the
|
||||
assembler files used when compiling with
|
||||
assembler implementations.
|
||||
shared_target => The shared library building method used.
|
||||
This is a target found in Makefile.shared.
|
||||
build_scheme => The scheme used to build up a Makefile.
|
||||
In its simplest form, the value is a string
|
||||
with the name of the build scheme.
|
||||
The value may also take the form of a list
|
||||
of strings, if the build_scheme is to have
|
||||
some options. In this case, the first
|
||||
string in the list is the name of the build
|
||||
scheme.
|
||||
Currently recognised build scheme is "unified".
|
||||
For the "unified" build scheme, this item
|
||||
*must* be an array with the first being the
|
||||
word "unified" and the second being a word
|
||||
to identify the platform family.
|
||||
|
||||
multilib => On systems that support having multiple
|
||||
implementations of a library (typically a
|
||||
32-bit and a 64-bit variant), this is used
|
||||
to have the different variants in different
|
||||
directories.
|
||||
|
||||
bn_ops => Building options (was just bignum options in
|
||||
the earlier history of this option, hence the
|
||||
name). This is a string of words that describe
|
||||
algorithms' implementation parameters that
|
||||
are optimal for the designated target platform,
|
||||
such as the type of integers used to build up
|
||||
the bignum, different ways to implement certain
|
||||
ciphers and so on. To fully comprehend the
|
||||
meaning, the best is to read the affected
|
||||
source.
|
||||
The valid words are:
|
||||
|
||||
THIRTY_TWO_BIT bignum limbs are 32 bits,
|
||||
this is default if no
|
||||
option is specified, it
|
||||
works on any supported
|
||||
system [unless "wider"
|
||||
limb size is implied in
|
||||
assembly code];
|
||||
BN_LLONG bignum limbs are 32 bits,
|
||||
but 64-bit 'unsigned long
|
||||
long' is used internally
|
||||
in calculations;
|
||||
SIXTY_FOUR_BIT_LONG bignum limbs are 64 bits
|
||||
and sizeof(long) is 8;
|
||||
SIXTY_FOUR_BIT bignums limbs are 64 bits,
|
||||
but execution environment
|
||||
is ILP32;
|
||||
RC4_CHAR RC4 key schedule is made
|
||||
up of 'unsigned char's;
|
||||
RC4_INT RC4 key schedule is made
|
||||
up of 'unsigned int's;
|
||||
EXPORT_VAR_AS_FN for shared libraries,
|
||||
export vars as
|
||||
accessor functions.
|
||||
|
||||
apps_aux_src => Extra source to build apps/openssl and other
|
||||
apps, as needed by the target and that can be
|
||||
collected in a library.
|
||||
apps_init_src => Init source to build apps/openssl and other
|
||||
apps, as needed by the target. This code
|
||||
cannot be placed in a library, as the rest
|
||||
of the code isn't expected to link to it
|
||||
explicitly.
|
||||
cpuid_asm_src => assembler implementation of cpuid code as
|
||||
well as OPENSSL_cleanse().
|
||||
Default to mem_clr.c
|
||||
bn_asm_src => Assembler implementation of core bignum
|
||||
functions.
|
||||
Defaults to bn_asm.c
|
||||
ec_asm_src => Assembler implementation of core EC
|
||||
functions.
|
||||
des_asm_src => Assembler implementation of core DES
|
||||
encryption functions.
|
||||
Defaults to 'des_enc.c fcrypt_b.c'
|
||||
aes_asm_src => Assembler implementation of core AES
|
||||
functions.
|
||||
Defaults to 'aes_core.c aes_cbc.c'
|
||||
bf_asm_src => Assembler implementation of core BlowFish
|
||||
functions.
|
||||
Defaults to 'bf_enc.c'
|
||||
md5_asm_src => Assembler implementation of core MD5
|
||||
functions.
|
||||
sha1_asm_src => Assembler implementation of core SHA1,
|
||||
functions, and also possibly SHA256 and
|
||||
SHA512 ones.
|
||||
cast_asm_src => Assembler implementation of core CAST
|
||||
functions.
|
||||
Defaults to 'c_enc.c'
|
||||
rc4_asm_src => Assembler implementation of core RC4
|
||||
functions.
|
||||
Defaults to 'rc4_enc.c rc4_skey.c'
|
||||
rmd160_asm_src => Assembler implementation of core RMD160
|
||||
functions.
|
||||
rc5_asm_src => Assembler implementation of core RC5
|
||||
functions.
|
||||
Defaults to 'rc5_enc.c'
|
||||
wp_asm_src => Assembler implementation of core WHIRLPOOL
|
||||
functions.
|
||||
cmll_asm_src => Assembler implementation of core CAMELLIA
|
||||
functions.
|
||||
Defaults to 'camellia.c cmll_misc.c cmll_cbc.c'
|
||||
modes_asm_src => Assembler implementation of cipher modes,
|
||||
currently the functions gcm_gmult_4bit and
|
||||
gcm_ghash_4bit.
|
||||
padlock_asm_src => Assembler implementation of core parts of
|
||||
the padlock engine. This is mandatory on
|
||||
any platform where the padlock engine might
|
||||
actually be built.
|
||||
|
||||
|
||||
[1] as part of the target configuration, one can have a key called
|
||||
'inherit_from' that indicate what other configurations to inherit
|
||||
data from. These are resolved recursively.
|
||||
|
||||
Inheritance works as a set of default values that can be overridden
|
||||
by corresponding key values in the inheriting configuration.
|
||||
|
||||
Note 1: any configuration table can be used as a template.
|
||||
Note 2: pure templates have the attribute 'template => 1' and
|
||||
cannot be used as build targets.
|
||||
|
||||
If several configurations are given in the 'inherit_from' array,
|
||||
the values of same attribute are concatenated with space
|
||||
separation. With this, it's possible to have several smaller
|
||||
templates for different configuration aspects that can be combined
|
||||
into a complete configuration.
|
||||
|
||||
instead of a scalar value or an array, a value can be a code block
|
||||
of the form 'sub { /* your code here */ }'. This code block will
|
||||
be called with the list of inherited values for that key as
|
||||
arguments. In fact, the concatenation of strings is really done
|
||||
by using 'sub { join(" ",@_) }' on the list of inherited values.
|
||||
|
||||
An example:
|
||||
|
||||
"foo" => {
|
||||
template => 1,
|
||||
haha => "ha ha",
|
||||
hoho => "ho",
|
||||
ignored => "This should not appear in the end result",
|
||||
},
|
||||
"bar" => {
|
||||
template => 1,
|
||||
haha => "ah",
|
||||
hoho => "haho",
|
||||
hehe => "hehe"
|
||||
},
|
||||
"laughter" => {
|
||||
inherit_from => [ "foo", "bar" ],
|
||||
hehe => sub { join(" ",(@_,"!!!")) },
|
||||
ignored => "",
|
||||
}
|
||||
|
||||
The entry for "laughter" will become as follows after processing:
|
||||
|
||||
"laughter" => {
|
||||
haha => "ha ha ah",
|
||||
hoho => "ho haho",
|
||||
hehe => "hehe !!!",
|
||||
ignored => ""
|
||||
}
|
||||
|
||||
[2] OpenSSL is built with threading capabilities unless the user
|
||||
specifies 'no-threads'. The value of the key 'thread_scheme' may
|
||||
be "(unknown)", in which case the user MUST give some compilation
|
||||
flags to Configure.
|
||||
|
||||
[3] OpenSSL has three types of things to link from object files or
|
||||
static libraries:
|
||||
|
||||
- shared libraries; that would be libcrypto and libssl.
|
||||
- shared objects (sometimes called dynamic libraries); that would
|
||||
be the engines.
|
||||
- applications; those are apps/openssl and all the test apps.
|
||||
|
||||
Very roughly speaking, linking is done like this (words in braces
|
||||
represent the configuration settings documented at the beginning
|
||||
of this file):
|
||||
|
||||
shared libraries:
|
||||
{ld} $(CFLAGS) {lflags} {shared_ldflag} -o libfoo.so \
|
||||
foo/something.o foo/somethingelse.o {ex_libs}
|
||||
|
||||
shared objects:
|
||||
{ld} $(CFLAGS) {lflags} {module_ldflags} -o libeng.so \
|
||||
blah1.o blah2.o -lcrypto {ex_libs}
|
||||
|
||||
applications:
|
||||
{ld} $(CFLAGS) {lflags} -o app \
|
||||
app1.o utils.o -lssl -lcrypto {ex_libs}
|
||||
|
||||
[4] There are variants of these attribute, prefixed with `lib_',
|
||||
`dso_' or `bin_'. Those variants replace the unprefixed attribute
|
||||
when building library, DSO or program modules specifically.
|
||||
|
||||
Historically, the target configurations came in form of a string with
|
||||
values separated by colons. This use is deprecated. The string form
|
||||
looked like this:
|
||||
|
||||
"target" => "{cc}:{cflags}:{unistd}:{thread_cflag}:{sys_id}:{lflags}:{bn_ops}:{cpuid_obj}:{bn_obj}:{ec_obj}:{des_obj}:{aes_obj}:{bf_obj}:{md5_obj}:{sha1_obj}:{cast_obj}:{rc4_obj}:{rmd160_obj}:{rc5_obj}:{wp_obj}:{cmll_obj}:{modes_obj}:{padlock_obj}:{perlasm_scheme}:{dso_scheme}:{shared_target}:{shared_cflag}:{shared_ldflag}:{shared_extension}:{ranlib}:{arflags}:{multilib}"
|
||||
|
||||
|
||||
Build info files
|
||||
================
|
||||
|
||||
The build.info files that are spread over the source tree contain the
|
||||
minimum information needed to build and distribute OpenSSL. It uses a
|
||||
simple and yet fairly powerful language to determine what needs to be
|
||||
built, from what sources, and other relationships between files.
|
||||
|
||||
For every build.info file, all file references are relative to the
|
||||
directory of the build.info file for source files, and the
|
||||
corresponding build directory for built files if the build tree
|
||||
differs from the source tree.
|
||||
|
||||
When processed, every line is processed with the perl module
|
||||
Text::Template, using the delimiters "{-" and "-}". The hashes
|
||||
%config and %target are passed to the perl fragments, along with
|
||||
$sourcedir and $builddir, which are the locations of the source
|
||||
directory for the current build.info file and the corresponding build
|
||||
directory, all relative to the top of the build tree.
|
||||
|
||||
To begin with, things to be built are declared by setting specific
|
||||
variables:
|
||||
|
||||
PROGRAMS=foo bar
|
||||
LIBS=libsomething
|
||||
ENGINES=libeng
|
||||
SCRIPTS=myhack
|
||||
EXTRA=file1 file2
|
||||
|
||||
Note that the files mentioned for PROGRAMS, LIBS and ENGINES *must* be
|
||||
without extensions. The build file templates will figure them out.
|
||||
|
||||
For each thing to be built, it is then possible to say what sources
|
||||
they are built from:
|
||||
|
||||
PROGRAMS=foo bar
|
||||
SOURCE[foo]=foo.c common.c
|
||||
SOURCE[bar]=bar.c extra.c common.c
|
||||
|
||||
It's also possible to tell some other dependencies:
|
||||
|
||||
DEPEND[foo]=libsomething
|
||||
DEPEND[libbar]=libsomethingelse
|
||||
|
||||
(it could be argued that 'libsomething' and 'libsomethingelse' are
|
||||
source as well. However, the files given through SOURCE are expected
|
||||
to be located in the source tree while files given through DEPEND are
|
||||
expected to be located in the build tree)
|
||||
|
||||
It's also possible to depend on static libraries explicitly:
|
||||
|
||||
DEPEND[foo]=libsomething.a
|
||||
DEPEND[libbar]=libsomethingelse.a
|
||||
|
||||
This should be rarely used, and care should be taken to make sure it's
|
||||
only used when supported. For example, native Windows build doesn't
|
||||
support building static libraries and DLLs at the same time, so using
|
||||
static libraries on Windows can only be done when configured
|
||||
'no-shared'.
|
||||
|
||||
One some platforms, shared libraries come with a name that's different
|
||||
from their static counterpart. That's declared as follows:
|
||||
|
||||
SHARED_NAME[libfoo]=cygfoo-{- $config{shlibver} -}
|
||||
|
||||
The example is from Cygwin, which has a required naming convention.
|
||||
|
||||
Sometimes, it makes sense to rename an output file, for example a
|
||||
library:
|
||||
|
||||
RENAME[libfoo]=libbar
|
||||
|
||||
That line has "libfoo" renamed to "libbar". While it makes no
|
||||
sense at all to just have a rename like that (why not just use
|
||||
"libbar" everywhere?), it does make sense when it can be used
|
||||
conditionally. See a little further below for an example.
|
||||
|
||||
In some cases, it's desirable to include some source files in the
|
||||
shared form of a library only:
|
||||
|
||||
SHARED_SOURCE[libfoo]=dllmain.c
|
||||
|
||||
For any file to be built, it's also possible to tell what extra
|
||||
include paths the build of their source files should use:
|
||||
|
||||
INCLUDE[foo]=include
|
||||
|
||||
In some cases, one might want to generate some source files from
|
||||
others, that's done as follows:
|
||||
|
||||
GENERATE[foo.s]=asm/something.pl $(CFLAGS)
|
||||
GENERATE[bar.s]=asm/bar.S
|
||||
|
||||
The value of each GENERATE line is a command line or part of it.
|
||||
Configure places no rules on the command line, except that the first
|
||||
item must be the generator file. It is, however, entirely up to the
|
||||
build file template to define exactly how those command lines should
|
||||
be handled, how the output is captured and so on.
|
||||
|
||||
Sometimes, the generator file itself depends on other files, for
|
||||
example if it is a perl script that depends on other perl modules.
|
||||
This can be expressed using DEPEND like this:
|
||||
|
||||
DEPEND[asm/something.pl]=../perlasm/Foo.pm
|
||||
|
||||
There may also be cases where the exact file isn't easily specified,
|
||||
but an inclusion directory still needs to be specified. INCLUDE can
|
||||
be used in that case:
|
||||
|
||||
INCLUDE[asm/something.pl]=../perlasm
|
||||
|
||||
NOTE: GENERATE lines are limited to one command only per GENERATE.
|
||||
|
||||
As a last resort, it's possible to have raw build file lines, between
|
||||
BEGINRAW and ENDRAW lines as follows:
|
||||
|
||||
BEGINRAW[Makefile(unix)]
|
||||
haha.h: {- $builddir -}/Makefile
|
||||
echo "/* haha */" > haha.h
|
||||
ENDRAW[Makefile(unix)]
|
||||
|
||||
The word within square brackets is the build_file configuration item
|
||||
or the build_file configuration item followed by the second word in the
|
||||
build_scheme configuration item for the configured target within
|
||||
parenthesis as shown above. For example, with the following relevant
|
||||
configuration items:
|
||||
|
||||
build_file => "build.ninja"
|
||||
build_scheme => [ "unified", "unix" ]
|
||||
|
||||
... these lines will be considered:
|
||||
|
||||
BEGINRAW[build.ninja]
|
||||
build haha.h: echo "/* haha */" > haha.h
|
||||
ENDRAW[build.ninja]
|
||||
|
||||
BEGINRAW[build.ninja(unix)]
|
||||
build hoho.h: echo "/* hoho */" > hoho.h
|
||||
ENDRAW[build.ninja(unix)]
|
||||
|
||||
Should it be needed because the recipes within a RAW section might
|
||||
clash with those generated by Configure, it's possible to tell it
|
||||
not to generate them with the use of OVERRIDES, for example:
|
||||
|
||||
SOURCE[libfoo]=foo.c bar.c
|
||||
|
||||
OVERRIDES=bar.o
|
||||
BEGINRAW[Makefile(unix)]
|
||||
bar.o: bar.c
|
||||
$(CC) $(CFLAGS) -DSPECIAL -c -o $@ $<
|
||||
ENDRAW[Makefile(unix)]
|
||||
|
||||
See the documentation further up for more information on configuration
|
||||
items.
|
||||
|
||||
Finally, you can have some simple conditional use of the build.info
|
||||
information, looking like this:
|
||||
|
||||
IF[1]
|
||||
something
|
||||
ELSIF[2]
|
||||
something other
|
||||
ELSE
|
||||
something else
|
||||
ENDIF
|
||||
|
||||
The expression in square brackets is interpreted as a string in perl,
|
||||
and will be seen as true if perl thinks it is, otherwise false. For
|
||||
example, the above would have "something" used, since 1 is true.
|
||||
|
||||
Together with the use of Text::Template, this can be used as
|
||||
conditions based on something in the passed variables, for example:
|
||||
|
||||
IF[{- $disabled{shared} -}]
|
||||
LIBS=libcrypto
|
||||
SOURCE[libcrypto]=...
|
||||
ELSE
|
||||
LIBS=libfoo
|
||||
SOURCE[libfoo]=...
|
||||
ENDIF
|
||||
|
||||
or:
|
||||
|
||||
# VMS has a cultural standard where all libraries are prefixed.
|
||||
# For OpenSSL, the choice is 'ossl_'
|
||||
IF[{- $config{target} =~ /^vms/ -}]
|
||||
RENAME[libcrypto]=ossl_libcrypto
|
||||
RENAME[libssl]=ossl_libssl
|
||||
ENDIF
|
||||
|
||||
|
||||
Build-file programming with the "unified" build system
|
||||
======================================================
|
||||
|
||||
"Build files" are called "Makefile" on Unix-like operating systems,
|
||||
"descrip.mms" for MMS on VMS, "makefile" for nmake on Windows, etc.
|
||||
|
||||
To use the "unified" build system, the target configuration needs to
|
||||
set the three items 'build_scheme', 'build_file' and 'build_command'.
|
||||
In the rest of this section, we will assume that 'build_scheme' is set
|
||||
to "unified" (see the configurations documentation above for the
|
||||
details).
|
||||
|
||||
For any name given by 'build_file', the "unified" system expects a
|
||||
template file in Configurations/ named like the build file, with
|
||||
".tmpl" appended, or in case of possible ambiguity, a combination of
|
||||
the second 'build_scheme' list item and the 'build_file' name. For
|
||||
example, if 'build_file' is set to "Makefile", the template could be
|
||||
Configurations/Makefile.tmpl or Configurations/unix-Makefile.tmpl.
|
||||
In case both Configurations/unix-Makefile.tmpl and
|
||||
Configurations/Makefile.tmpl are present, the former takes
|
||||
precedence.
|
||||
|
||||
The build-file template is processed with the perl module
|
||||
Text::Template, using "{-" and "-}" as delimiters that enclose the
|
||||
perl code fragments that generate configuration-dependent content.
|
||||
Those perl fragments have access to all the hash variables from
|
||||
configdata.pem.
|
||||
|
||||
The build-file template is expected to define at least the following
|
||||
perl functions in a perl code fragment enclosed with "{-" and "-}".
|
||||
They are all expected to return a string with the lines they produce.
|
||||
|
||||
generatesrc - function that produces build file lines to generate
|
||||
a source file from some input.
|
||||
|
||||
It's called like this:
|
||||
|
||||
generatesrc(src => "PATH/TO/tobegenerated",
|
||||
generator => [ "generatingfile", ... ]
|
||||
generator_incs => [ "INCL/PATH", ... ]
|
||||
generator_deps => [ "dep1", ... ]
|
||||
generator => [ "generatingfile", ... ]
|
||||
incs => [ "INCL/PATH", ... ],
|
||||
deps => [ "dep1", ... ],
|
||||
intent => one of "libs", "dso", "bin" );
|
||||
|
||||
'src' has the name of the file to be generated.
|
||||
'generator' is the command or part of command to
|
||||
generate the file, of which the first item is
|
||||
expected to be the file to generate from.
|
||||
generatesrc() is expected to analyse and figure out
|
||||
exactly how to apply that file and how to capture
|
||||
the result. 'generator_incs' and 'generator_deps'
|
||||
are include directories and files that the generator
|
||||
file itself depends on. 'incs' and 'deps' are
|
||||
include directories and files that are used if $(CC)
|
||||
is used as an intermediary step when generating the
|
||||
end product (the file indicated by 'src'). 'intent'
|
||||
indicates what the generated file is going to be
|
||||
used for.
|
||||
|
||||
src2obj - function that produces build file lines to build an
|
||||
object file from source files and associated data.
|
||||
|
||||
It's called like this:
|
||||
|
||||
src2obj(obj => "PATH/TO/objectfile",
|
||||
srcs => [ "PATH/TO/sourcefile", ... ],
|
||||
deps => [ "dep1", ... ],
|
||||
incs => [ "INCL/PATH", ... ]
|
||||
intent => one of "lib", "dso", "bin" );
|
||||
|
||||
'obj' has the intended object file *without*
|
||||
extension, src2obj() is expected to add that.
|
||||
'srcs' has the list of source files to build the
|
||||
object file, with the first item being the source
|
||||
file that directly corresponds to the object file.
|
||||
'deps' is a list of explicit dependencies. 'incs'
|
||||
is a list of include file directories. Finally,
|
||||
'intent' indicates what this object file is going
|
||||
to be used for.
|
||||
|
||||
obj2lib - function that produces build file lines to build a
|
||||
static library file ("libfoo.a" in Unix terms) from
|
||||
object files.
|
||||
|
||||
called like this:
|
||||
|
||||
obj2lib(lib => "PATH/TO/libfile",
|
||||
objs => [ "PATH/TO/objectfile", ... ]);
|
||||
|
||||
'lib' has the intended library file name *without*
|
||||
extension, obj2lib is expected to add that. 'objs'
|
||||
has the list of object files (also *without*
|
||||
extension) to build this library.
|
||||
|
||||
libobj2shlib - function that produces build file lines to build a
|
||||
shareable object library file ("libfoo.so" in Unix
|
||||
terms) from the corresponding static library file
|
||||
or object files.
|
||||
|
||||
called like this:
|
||||
|
||||
libobj2shlib(shlib => "PATH/TO/shlibfile",
|
||||
lib => "PATH/TO/libfile",
|
||||
objs => [ "PATH/TO/objectfile", ... ],
|
||||
deps => [ "PATH/TO/otherlibfile", ... ]);
|
||||
|
||||
'lib' has the intended library file name *without*
|
||||
extension, libobj2shlib is expected to add that.
|
||||
'shlib' has the corresponding shared library name
|
||||
*without* extension. 'deps' has the list of other
|
||||
libraries (also *without* extension) this library
|
||||
needs to be linked with. 'objs' has the list of
|
||||
object files (also *without* extension) to build
|
||||
this library.
|
||||
|
||||
This function has a choice; it can use the
|
||||
corresponding static library as input to make the
|
||||
shared library, or the list of object files.
|
||||
|
||||
obj2dso - function that produces build file lines to build a
|
||||
dynamic shared object file from object files.
|
||||
|
||||
called like this:
|
||||
|
||||
obj2dso(lib => "PATH/TO/libfile",
|
||||
objs => [ "PATH/TO/objectfile", ... ],
|
||||
deps => [ "PATH/TO/otherlibfile",
|
||||
... ]);
|
||||
|
||||
This is almost the same as libobj2shlib, but the
|
||||
intent is to build a shareable library that can be
|
||||
loaded in runtime (a "plugin"...). The differences
|
||||
are subtle, one of the most visible ones is that the
|
||||
resulting shareable library is produced from object
|
||||
files only.
|
||||
|
||||
obj2bin - function that produces build file lines to build an
|
||||
executable file from object files.
|
||||
|
||||
called like this:
|
||||
|
||||
obj2bin(bin => "PATH/TO/binfile",
|
||||
objs => [ "PATH/TO/objectfile", ... ],
|
||||
deps => [ "PATH/TO/libfile", ... ]);
|
||||
|
||||
'bin' has the intended executable file name
|
||||
*without* extension, obj2bin is expected to add
|
||||
that. 'objs' has the list of object files (also
|
||||
*without* extension) to build this library. 'deps'
|
||||
has the list of library files (also *without*
|
||||
extension) that the programs needs to be linked
|
||||
with.
|
||||
|
||||
in2script - function that produces build file lines to build a
|
||||
script file from some input.
|
||||
|
||||
called like this:
|
||||
|
||||
in2script(script => "PATH/TO/scriptfile",
|
||||
sources => [ "PATH/TO/infile", ... ]);
|
||||
|
||||
'script' has the intended script file name.
|
||||
'sources' has the list of source files to build the
|
||||
resulting script from.
|
||||
|
||||
In all cases, file file paths are relative to the build tree top, and
|
||||
the build file actions run with the build tree top as current working
|
||||
directory.
|
||||
|
||||
Make sure to end the section with these functions with a string that
|
||||
you thing is appropriate for the resulting build file. If nothing
|
||||
else, end it like this:
|
||||
|
||||
""; # Make sure no lingering values end up in the Makefile
|
||||
-}
|
||||
|
||||
|
||||
Configure helper scripts
|
||||
========================
|
||||
|
||||
Configure uses helper scripts in this directory:
|
||||
|
||||
Checker scripts
|
||||
---------------
|
||||
|
||||
These scripts are per platform family, to check the integrity of the
|
||||
tools used for configuration and building. The checker script used is
|
||||
either {build_platform}-{build_file}-checker.pm or
|
||||
{build_platform}-checker.pm, where {build_platform} is the second
|
||||
'build_scheme' list element from the configuration target data, and
|
||||
{build_file} is 'build_file' from the same target data.
|
||||
|
||||
If the check succeeds, the script is expected to end with a non-zero
|
||||
expression. If the check fails, the script can end with a zero, or
|
||||
with a `die`.
|
||||
623
Configurations/README.design
Normal file
623
Configurations/README.design
Normal file
@@ -0,0 +1,623 @@
|
||||
Design document for the unified scheme data
|
||||
===========================================
|
||||
|
||||
How are things connected?
|
||||
-------------------------
|
||||
|
||||
The unified scheme takes all its data from the build.info files seen
|
||||
throughout the source tree. These files hold the minimum information
|
||||
needed to build end product files from diverse sources. See the
|
||||
section on build.info files below.
|
||||
|
||||
From the information in build.info files, Configure builds up an
|
||||
information database as a hash table called %unified_info, which is
|
||||
stored in configdata.pm, found at the top of the build tree (which may
|
||||
or may not be the same as the source tree).
|
||||
|
||||
Configurations/common.tmpl uses the data from %unified_info to
|
||||
generate the rules for building end product files as well as
|
||||
intermediary files with the help of a few functions found in the
|
||||
build-file templates. See the section on build-file templates further
|
||||
down for more information.
|
||||
|
||||
build.info files
|
||||
----------------
|
||||
|
||||
As mentioned earlier, build.info files are meant to hold the minimum
|
||||
information needed to build output files, and therefore only (with a
|
||||
few possible exceptions [1]) have information about end products (such
|
||||
as scripts, library files and programs) and source files (such as C
|
||||
files, C header files, assembler files, etc). Intermediate files such
|
||||
as object files are rarely directly referred to in build.info files (and
|
||||
when they are, it's always with the file name extension .o), they are
|
||||
inferred by Configure. By the same rule of minimalism, end product
|
||||
file name extensions (such as .so, .a, .exe, etc) are never mentioned
|
||||
in build.info. Their file name extensions will be inferred by the
|
||||
build-file templates, adapted for the platform they are meant for (see
|
||||
sections on %unified_info and build-file templates further down).
|
||||
|
||||
The variables PROGRAMS, LIBS, ENGINES and SCRIPTS are used to declare
|
||||
end products. There are variants for them with '_NO_INST' as suffix
|
||||
(PROGRAM_NO_INST etc) to specify end products that shouldn't get
|
||||
installed.
|
||||
|
||||
The variables SOURCE, DEPEND and INCLUDE are indexed by a produced
|
||||
file, and their values are the source used to produce that particular
|
||||
produced file, extra dependencies, and include directories needed.
|
||||
|
||||
All their values in all the build.info throughout the source tree are
|
||||
collected together and form a set of programs, libraries, engines and
|
||||
scripts to be produced, source files, dependencies, etc etc etc.
|
||||
|
||||
Let's have a pretend example, a very limited contraption of OpenSSL,
|
||||
composed of the program 'apps/openssl', the libraries 'libssl' and
|
||||
'libcrypto', an engine 'engines/ossltest' and their sources and
|
||||
dependencies.
|
||||
|
||||
# build.info
|
||||
LIBS=libcrypto libssl
|
||||
INCLUDE[libcrypto]=include
|
||||
INCLUDE[libssl]=include
|
||||
DEPEND[libssl]=libcrypto
|
||||
|
||||
This is the top directory build.info file, and it tells us that two
|
||||
libraries are to be built, the include directory 'include/' shall be
|
||||
used throughout when building anything that will end up in each
|
||||
library, and that the library 'libssl' depend on the library
|
||||
'libcrypto' to function properly.
|
||||
|
||||
# apps/build.info
|
||||
PROGRAMS=openssl
|
||||
SOURCE[openssl]=openssl.c
|
||||
INCLUDE[openssl]=.. ../include
|
||||
DEPEND[openssl]=../libssl
|
||||
|
||||
This is the build.info file in 'apps/', one may notice that all file
|
||||
paths mentioned are relative to the directory the build.info file is
|
||||
located in. This one tells us that there's a program to be built
|
||||
called 'apps/openssl' (the file name extension will depend on the
|
||||
platform and is therefore not mentioned in the build.info file). It's
|
||||
built from one source file, 'apps/openssl.c', and building it requires
|
||||
the use of '.' and 'include' include directories (both are declared
|
||||
from the point of view of the 'apps/' directory), and that the program
|
||||
depends on the library 'libssl' to function properly.
|
||||
|
||||
# crypto/build.info
|
||||
LIBS=../libcrypto
|
||||
SOURCE[../libcrypto]=aes.c evp.c cversion.c
|
||||
DEPEND[cversion.o]=buildinf.h
|
||||
|
||||
GENERATE[buildinf.h]=../util/mkbuildinf.pl "$(CC) $(CFLAGS)" "$(PLATFORM)"
|
||||
DEPEND[buildinf.h]=../Makefile
|
||||
DEPEND[../util/mkbuildinf.pl]=../util/Foo.pm
|
||||
|
||||
This is the build.info file in 'crypto', and it tells us a little more
|
||||
about what's needed to produce 'libcrypto'. LIBS is used again to
|
||||
declare that 'libcrypto' is to be produced. This declaration is
|
||||
really unnecessary as it's already mentioned in the top build.info
|
||||
file, but can make the info file easier to understand. This is to
|
||||
show that duplicate information isn't an issue.
|
||||
|
||||
This build.info file informs us that 'libcrypto' is built from a few
|
||||
source files, 'crypto/aes.c', 'crypto/evp.c' and 'crypto/cversion.c'.
|
||||
It also shows us that building the object file inferred from
|
||||
'crypto/cversion.c' depends on 'crypto/buildinf.h'. Finally, it
|
||||
also shows the possibility to declare how some files are generated
|
||||
using some script, in this case a perl script, and how such scripts
|
||||
can be declared to depend on other files, in this case a perl module.
|
||||
|
||||
Two things are worth an extra note:
|
||||
|
||||
'DEPEND[cversion.o]' mentions an object file. DEPEND indexes is the
|
||||
only location where it's valid to mention them
|
||||
|
||||
Lines in 'BEGINRAW'..'ENDRAW' sections must always mention files as
|
||||
seen from the top directory, no exception.
|
||||
|
||||
# ssl/build.info
|
||||
LIBS=../libssl
|
||||
SOURCE[../libssl]=tls.c
|
||||
|
||||
This is the build.info file in 'ssl/', and it tells us that the
|
||||
library 'libssl' is built from the source file 'ssl/tls.c'.
|
||||
|
||||
# engines/build.info
|
||||
ENGINES=dasync
|
||||
SOURCE[dasync]=e_dasync.c
|
||||
DEPEND[dasync]=../libcrypto
|
||||
INCLUDE[dasync]=../include
|
||||
|
||||
ENGINES_NO_INST=ossltest
|
||||
SOURCE[ossltest]=e_ossltest.c
|
||||
DEPEND[ossltest]=../libcrypto.a
|
||||
INCLUDE[ossltest]=../include
|
||||
|
||||
This is the build.info file in 'engines/', telling us that two engines
|
||||
called 'engines/dasync' and 'engines/ossltest' shall be built, that
|
||||
dasync's source is 'engines/e_dasync.c' and ossltest's source is
|
||||
'engines/e_ossltest.c' and that the include directory 'include/' may
|
||||
be used when building anything that will be part of these engines.
|
||||
Also, both engines depend on the library 'libcrypto' to function
|
||||
properly. ossltest is explicitly linked with the static variant of
|
||||
the library 'libcrypto'. Finally, only dasync is being installed, as
|
||||
ossltest is only for internal testing.
|
||||
|
||||
When Configure digests these build.info files, the accumulated
|
||||
information comes down to this:
|
||||
|
||||
LIBS=libcrypto libssl
|
||||
SOURCE[libcrypto]=crypto/aes.c crypto/evp.c crypto/cversion.c
|
||||
DEPEND[crypto/cversion.o]=crypto/buildinf.h
|
||||
INCLUDE[libcrypto]=include
|
||||
SOURCE[libssl]=ssl/tls.c
|
||||
INCLUDE[libssl]=include
|
||||
DEPEND[libssl]=libcrypto
|
||||
|
||||
PROGRAMS=apps/openssl
|
||||
SOURCE[apps/openssl]=apps/openssl.c
|
||||
INCLUDE[apps/openssl]=. include
|
||||
DEPEND[apps/openssl]=libssl
|
||||
|
||||
ENGINES=engines/dasync
|
||||
SOURCE[engines/dasync]=engines/e_dasync.c
|
||||
DEPEND[engines/dasync]=libcrypto
|
||||
INCLUDE[engines/dasync]=include
|
||||
|
||||
ENGINES_NO_INST=engines/ossltest
|
||||
SOURCE[engines/ossltest]=engines/e_ossltest.c
|
||||
DEPEND[engines/ossltest]=libcrypto.a
|
||||
INCLUDE[engines/ossltest]=include
|
||||
|
||||
GENERATE[crypto/buildinf.h]=util/mkbuildinf.pl "$(CC) $(CFLAGS)" "$(PLATFORM)"
|
||||
DEPEND[crypto/buildinf.h]=Makefile
|
||||
DEPEND[util/mkbuildinf.pl]=util/Foo.pm
|
||||
|
||||
|
||||
A few notes worth mentioning:
|
||||
|
||||
LIBS may be used to declare routine libraries only.
|
||||
|
||||
PROGRAMS may be used to declare programs only.
|
||||
|
||||
ENGINES may be used to declare engines only.
|
||||
|
||||
The indexes for SOURCE must only be end product files, such as
|
||||
libraries, programs or engines. The values of SOURCE variables must
|
||||
only be source files (possibly generated).
|
||||
|
||||
INCLUDE and DEPEND shows a relationship between different files
|
||||
(usually produced files) or between files and directories, such as a
|
||||
program depending on a library, or between an object file and some
|
||||
extra source file.
|
||||
|
||||
When Configure processes the build.info files, it will take it as
|
||||
truth without question, and will therefore perform very few checks.
|
||||
If the build tree is separate from the source tree, it will assume
|
||||
that all built files and up in the build directory and that all source
|
||||
files are to be found in the source tree, if they can be found there.
|
||||
Configure will assume that source files that can't be found in the
|
||||
source tree (such as 'crypto/bildinf.h' in the example above) are
|
||||
generated and will be found in the build tree.
|
||||
|
||||
|
||||
The %unified_info database
|
||||
--------------------------
|
||||
|
||||
The information in all the build.info get digested by Configure and
|
||||
collected into the %unified_info database, divided into the following
|
||||
indexes:
|
||||
|
||||
depends => a hash table containing 'file' => [ 'dependency' ... ]
|
||||
pairs. These are directly inferred from the DEPEND
|
||||
variables in build.info files.
|
||||
|
||||
engines => a list of engines. These are directly inferred from
|
||||
the ENGINES variable in build.info files.
|
||||
|
||||
generate => a hash table containing 'file' => [ 'generator' ... ]
|
||||
pairs. These are directly inferred from the GENERATE
|
||||
variables in build.info files.
|
||||
|
||||
includes => a hash table containing 'file' => [ 'include' ... ]
|
||||
pairs. These are directly inferred from the INCLUDE
|
||||
variables in build.info files.
|
||||
|
||||
install => a hash table containing 'type' => [ 'file' ... ] pairs.
|
||||
The types are 'programs', 'libraries', 'engines' and
|
||||
'scripts', and the array of files list the files of
|
||||
that type that should be installed.
|
||||
|
||||
libraries => a list of libraries. These are directly inferred from
|
||||
the LIBS variable in build.info files.
|
||||
|
||||
programs => a list of programs. These are directly inferred from
|
||||
the PROGRAMS variable in build.info files.
|
||||
|
||||
rawlines => a list of build-file lines. These are a direct copy of
|
||||
the BEGINRAW..ENDRAW lines in build.info files. Note:
|
||||
only the BEGINRAW..ENDRAW section for the current
|
||||
platform are copied, the rest are ignored.
|
||||
|
||||
scripts => a list of scripts. There are directly inferred from
|
||||
the SCRIPTS variable in build.info files.
|
||||
|
||||
sources => a hash table containing 'file' => [ 'sourcefile' ... ]
|
||||
pairs. These are indirectly inferred from the SOURCE
|
||||
variables in build.info files. Object files are
|
||||
mentioned in this hash table, with source files from
|
||||
SOURCE variables, and AS source files for programs and
|
||||
libraries.
|
||||
|
||||
shared_sources =>
|
||||
a hash table just like 'sources', but only as source
|
||||
files (object files) for building shared libraries.
|
||||
|
||||
As an example, here is how the build.info files example from the
|
||||
section above would be digested into a %unified_info table:
|
||||
|
||||
our %unified_info = (
|
||||
"depends" =>
|
||||
{
|
||||
"apps/openssl" =>
|
||||
[
|
||||
"libssl",
|
||||
],
|
||||
"crypto/buildinf.h" =>
|
||||
[
|
||||
"Makefile",
|
||||
],
|
||||
"crypto/cversion.o" =>
|
||||
[
|
||||
"crypto/buildinf.h",
|
||||
],
|
||||
"engines/dasync" =>
|
||||
[
|
||||
"libcrypto",
|
||||
],
|
||||
"engines/ossltest" =>
|
||||
[
|
||||
"libcrypto.a",
|
||||
],
|
||||
"libssl" =>
|
||||
[
|
||||
"libcrypto",
|
||||
],
|
||||
"util/mkbuildinf.pl" =>
|
||||
[
|
||||
"util/Foo.pm",
|
||||
],
|
||||
},
|
||||
"engines" =>
|
||||
[
|
||||
"engines/dasync",
|
||||
"engines/ossltest",
|
||||
],
|
||||
"generate" =>
|
||||
{
|
||||
"crypto/buildinf.h" =>
|
||||
[
|
||||
"util/mkbuildinf.pl",
|
||||
"\"\$(CC)",
|
||||
"\$(CFLAGS)\"",
|
||||
"\"$(PLATFORM)\"",
|
||||
],
|
||||
},
|
||||
"includes" =>
|
||||
{
|
||||
"apps/openssl" =>
|
||||
[
|
||||
".",
|
||||
"include",
|
||||
],
|
||||
"engines/ossltest" =>
|
||||
[
|
||||
"include"
|
||||
],
|
||||
"libcrypto" =>
|
||||
[
|
||||
"include",
|
||||
],
|
||||
"libssl" =>
|
||||
[
|
||||
"include",
|
||||
],
|
||||
"util/mkbuildinf.pl" =>
|
||||
[
|
||||
"util",
|
||||
],
|
||||
}
|
||||
"install" =>
|
||||
{
|
||||
"engines" =>
|
||||
[
|
||||
"engines/dasync",
|
||||
],
|
||||
"libraries" =>
|
||||
[
|
||||
"libcrypto",
|
||||
"libssl",
|
||||
],
|
||||
"programs" =>
|
||||
[
|
||||
"apps/openssl",
|
||||
],
|
||||
},
|
||||
"libraries" =>
|
||||
[
|
||||
"libcrypto",
|
||||
"libssl",
|
||||
],
|
||||
"programs" =>
|
||||
[
|
||||
"apps/openssl",
|
||||
],
|
||||
"rawlines" =>
|
||||
[
|
||||
],
|
||||
"sources" =>
|
||||
{
|
||||
"apps/openssl" =>
|
||||
[
|
||||
"apps/openssl.o",
|
||||
],
|
||||
"apps/openssl.o" =>
|
||||
[
|
||||
"apps/openssl.c",
|
||||
],
|
||||
"crypto/aes.o" =>
|
||||
[
|
||||
"crypto/aes.c",
|
||||
],
|
||||
"crypto/cversion.o" =>
|
||||
[
|
||||
"crypto/cversion.c",
|
||||
],
|
||||
"crypto/evp.o" =>
|
||||
[
|
||||
"crypto/evp.c",
|
||||
],
|
||||
"engines/e_dasync.o" =>
|
||||
[
|
||||
"engines/e_dasync.c",
|
||||
],
|
||||
"engines/dasync" =>
|
||||
[
|
||||
"engines/e_dasync.o",
|
||||
],
|
||||
"engines/e_ossltest.o" =>
|
||||
[
|
||||
"engines/e_ossltest.c",
|
||||
],
|
||||
"engines/ossltest" =>
|
||||
[
|
||||
"engines/e_ossltest.o",
|
||||
],
|
||||
"libcrypto" =>
|
||||
[
|
||||
"crypto/aes.c",
|
||||
"crypto/cversion.c",
|
||||
"crypto/evp.c",
|
||||
],
|
||||
"libssl" =>
|
||||
[
|
||||
"ssl/tls.c",
|
||||
],
|
||||
"ssl/tls.o" =>
|
||||
[
|
||||
"ssl/tls.c",
|
||||
],
|
||||
},
|
||||
);
|
||||
|
||||
As can be seen, everything in %unified_info is fairly simple suggest
|
||||
of information. Still, it tells us that to build all programs, we
|
||||
must build 'apps/openssl', and to build the latter, we will need to
|
||||
build all its sources ('apps/openssl.o' in this case) and all the
|
||||
other things it depends on (such as 'libssl'). All those dependencies
|
||||
need to be built as well, using the same logic, so to build 'libssl',
|
||||
we need to build 'ssl/tls.o' as well as 'libcrypto', and to build the
|
||||
latter...
|
||||
|
||||
|
||||
Build-file templates
|
||||
--------------------
|
||||
|
||||
Build-file templates are essentially build-files (such as Makefile on
|
||||
Unix) with perl code fragments mixed in. Those perl code fragment
|
||||
will generate all the configuration dependent data, including all the
|
||||
rules needed to build end product files and intermediary files alike.
|
||||
At a minimum, there must be a perl code fragment that defines a set of
|
||||
functions that are used to generates specific build-file rules, to
|
||||
build static libraries from object files, to build shared libraries
|
||||
from static libraries, to programs from object files and libraries,
|
||||
etc.
|
||||
|
||||
generatesrc - function that produces build file lines to generate
|
||||
a source file from some input.
|
||||
|
||||
It's called like this:
|
||||
|
||||
generatesrc(src => "PATH/TO/tobegenerated",
|
||||
generator => [ "generatingfile", ... ]
|
||||
generator_incs => [ "INCL/PATH", ... ]
|
||||
generator_deps => [ "dep1", ... ]
|
||||
incs => [ "INCL/PATH", ... ],
|
||||
deps => [ "dep1", ... ],
|
||||
intent => one of "libs", "dso", "bin" );
|
||||
|
||||
'src' has the name of the file to be generated.
|
||||
'generator' is the command or part of command to
|
||||
generate the file, of which the first item is
|
||||
expected to be the file to generate from.
|
||||
generatesrc() is expected to analyse and figure out
|
||||
exactly how to apply that file and how to capture
|
||||
the result. 'generator_incs' and 'generator_deps'
|
||||
are include directories and files that the generator
|
||||
file itself depends on. 'incs' and 'deps' are
|
||||
include directories and files that are used if $(CC)
|
||||
is used as an intermediary step when generating the
|
||||
end product (the file indicated by 'src'). 'intent'
|
||||
indicates what the generated file is going to be
|
||||
used for.
|
||||
|
||||
src2obj - function that produces build file lines to build an
|
||||
object file from source files and associated data.
|
||||
|
||||
It's called like this:
|
||||
|
||||
src2obj(obj => "PATH/TO/objectfile",
|
||||
srcs => [ "PATH/TO/sourcefile", ... ],
|
||||
deps => [ "dep1", ... ],
|
||||
incs => [ "INCL/PATH", ... ]
|
||||
intent => one of "lib", "dso", "bin" );
|
||||
|
||||
'obj' has the intended object file *without*
|
||||
extension, src2obj() is expected to add that.
|
||||
'srcs' has the list of source files to build the
|
||||
object file, with the first item being the source
|
||||
file that directly corresponds to the object file.
|
||||
'deps' is a list of explicit dependencies. 'incs'
|
||||
is a list of include file directories. Finally,
|
||||
'intent' indicates what this object file is going
|
||||
to be used for.
|
||||
|
||||
obj2lib - function that produces build file lines to build a
|
||||
static library file ("libfoo.a" in Unix terms) from
|
||||
object files.
|
||||
|
||||
called like this:
|
||||
|
||||
obj2lib(lib => "PATH/TO/libfile",
|
||||
objs => [ "PATH/TO/objectfile", ... ]);
|
||||
|
||||
'lib' has the intended library file name *without*
|
||||
extension, obj2lib is expected to add that. 'objs'
|
||||
has the list of object files (also *without*
|
||||
extension) to build this library.
|
||||
|
||||
libobj2shlib - function that produces build file lines to build a
|
||||
shareable object library file ("libfoo.so" in Unix
|
||||
terms) from the corresponding static library file
|
||||
or object files.
|
||||
|
||||
called like this:
|
||||
|
||||
libobj2shlib(shlib => "PATH/TO/shlibfile",
|
||||
lib => "PATH/TO/libfile",
|
||||
objs => [ "PATH/TO/objectfile", ... ],
|
||||
deps => [ "PATH/TO/otherlibfile", ... ]);
|
||||
|
||||
'lib' has the intended library file name *without*
|
||||
extension, libobj2shlib is expected to add that.
|
||||
'shlib' has the corresponding shared library name
|
||||
*without* extension. 'deps' has the list of other
|
||||
libraries (also *without* extension) this library
|
||||
needs to be linked with. 'objs' has the list of
|
||||
object files (also *without* extension) to build
|
||||
this library.
|
||||
|
||||
This function has a choice; it can use the
|
||||
corresponding static library as input to make the
|
||||
shared library, or the list of object files.
|
||||
|
||||
obj2dynlib - function that produces build file lines to build a
|
||||
dynamically loadable library file ("libfoo.so" on
|
||||
Unix) from object files.
|
||||
|
||||
called like this:
|
||||
|
||||
obj2dynlib(lib => "PATH/TO/libfile",
|
||||
objs => [ "PATH/TO/objectfile", ... ],
|
||||
deps => [ "PATH/TO/otherlibfile",
|
||||
... ]);
|
||||
|
||||
This is almost the same as libobj2shlib, but the
|
||||
intent is to build a shareable library that can be
|
||||
loaded in runtime (a "plugin"...). The differences
|
||||
are subtle, one of the most visible ones is that the
|
||||
resulting shareable library is produced from object
|
||||
files only.
|
||||
|
||||
obj2bin - function that produces build file lines to build an
|
||||
executable file from object files.
|
||||
|
||||
called like this:
|
||||
|
||||
obj2bin(bin => "PATH/TO/binfile",
|
||||
objs => [ "PATH/TO/objectfile", ... ],
|
||||
deps => [ "PATH/TO/libfile", ... ]);
|
||||
|
||||
'bin' has the intended executable file name
|
||||
*without* extension, obj2bin is expected to add
|
||||
that. 'objs' has the list of object files (also
|
||||
*without* extension) to build this library. 'deps'
|
||||
has the list of library files (also *without*
|
||||
extension) that the programs needs to be linked
|
||||
with.
|
||||
|
||||
in2script - function that produces build file lines to build a
|
||||
script file from some input.
|
||||
|
||||
called like this:
|
||||
|
||||
in2script(script => "PATH/TO/scriptfile",
|
||||
sources => [ "PATH/TO/infile", ... ]);
|
||||
|
||||
'script' has the intended script file name.
|
||||
'sources' has the list of source files to build the
|
||||
resulting script from.
|
||||
|
||||
Along with the build-file templates is the driving engine
|
||||
Configurations/common.tmpl, which looks through all the information in
|
||||
%unified_info and generates all the rulesets to build libraries,
|
||||
programs and all intermediate files, using the rule generating
|
||||
functions defined in the build-file template.
|
||||
|
||||
As an example with the smaller build.info set we've seen as an
|
||||
example, producing the rules to build 'libcrypto' would result in the
|
||||
following calls:
|
||||
|
||||
# Note: libobj2shlib will only be called if shared libraries are
|
||||
# to be produced.
|
||||
# Note 2: libobj2shlib gets both the name of the static library
|
||||
# and the names of all the object files that go into it. It's up
|
||||
# to the implementation to decide which to use as input.
|
||||
# Note 3: common.tmpl peals off the ".o" extension from all object
|
||||
# files, as the platform at hand may have a different one.
|
||||
libobj2shlib(shlib => "libcrypto",
|
||||
lib => "libcrypto",
|
||||
objs => [ "crypto/aes", "crypto/evp", "crypto/cversion" ],
|
||||
deps => [ ]);
|
||||
|
||||
obj2lib(lib => "libcrypto"
|
||||
objs => [ "crypto/aes", "crypto/evp", "crypto/cversion" ]);
|
||||
|
||||
src2obj(obj => "crypto/aes"
|
||||
srcs => [ "crypto/aes.c" ],
|
||||
deps => [ ],
|
||||
incs => [ "include" ],
|
||||
intent => "lib");
|
||||
|
||||
src2obj(obj => "crypto/evp"
|
||||
srcs => [ "crypto/evp.c" ],
|
||||
deps => [ ],
|
||||
incs => [ "include" ],
|
||||
intent => "lib");
|
||||
|
||||
src2obj(obj => "crypto/cversion"
|
||||
srcs => [ "crypto/cversion.c" ],
|
||||
deps => [ "crypto/buildinf.h" ],
|
||||
incs => [ "include" ],
|
||||
intent => "lib");
|
||||
|
||||
generatesrc(src => "crypto/buildinf.h",
|
||||
generator => [ "util/mkbuildinf.pl", "\"$(CC)",
|
||||
"$(CFLAGS)\"", "\"$(PLATFORM)\"" ],
|
||||
generator_incs => [ "util" ],
|
||||
generator_deps => [ "util/Foo.pm" ],
|
||||
incs => [ ],
|
||||
deps => [ ],
|
||||
intent => "lib");
|
||||
|
||||
The returned strings from all those calls are then concatenated
|
||||
together and written to the resulting build-file.
|
||||
221
Configurations/common.tmpl
Normal file
221
Configurations/common.tmpl
Normal file
@@ -0,0 +1,221 @@
|
||||
{- # -*- Mode: perl -*-
|
||||
|
||||
use File::Basename;
|
||||
|
||||
# A cache of objects for which a recipe has already been generated
|
||||
my %cache;
|
||||
|
||||
# resolvedepends and reducedepends work in tandem to make sure
|
||||
# there are no duplicate dependencies and that they are in the
|
||||
# right order. This is especially used to sort the list of
|
||||
# libraries that a build depends on.
|
||||
sub extensionlesslib {
|
||||
my @result = map { $_ =~ /(\.a)?$/; $` } @_;
|
||||
return @result if wantarray;
|
||||
return $result[0];
|
||||
}
|
||||
sub resolvedepends {
|
||||
my $thing = shift;
|
||||
my $extensionlessthing = extensionlesslib($thing);
|
||||
my @listsofar = @_; # to check if we're looping
|
||||
my @list = @{$unified_info{depends}->{$thing} //
|
||||
$unified_info{depends}->{$extensionlessthing}};
|
||||
my @newlist = ();
|
||||
if (scalar @list) {
|
||||
foreach my $item (@list) {
|
||||
my $extensionlessitem = extensionlesslib($item);
|
||||
# It's time to break off when the dependency list starts looping
|
||||
next if grep { extensionlesslib($_) eq $extensionlessitem } @listsofar;
|
||||
push @newlist, $item, resolvedepends($item, @listsofar, $item);
|
||||
}
|
||||
}
|
||||
@newlist;
|
||||
}
|
||||
sub reducedepends {
|
||||
my @list = @_;
|
||||
my @newlist = ();
|
||||
my %replace = ();
|
||||
while (@list) {
|
||||
my $item = shift @list;
|
||||
my $extensionlessitem = extensionlesslib($item);
|
||||
if (grep { $extensionlessitem eq extensionlesslib($_) } @list) {
|
||||
if ($item ne $extensionlessitem) {
|
||||
# If this instance of the library is explicitly static, we
|
||||
# prefer that to any shared library name, since it must have
|
||||
# been done on purpose.
|
||||
$replace{$extensionlessitem} = $item;
|
||||
}
|
||||
} else {
|
||||
push @newlist, $item;
|
||||
}
|
||||
}
|
||||
map { $replace{$_} // $_; } @newlist;
|
||||
}
|
||||
|
||||
# is_installed checks if a given file will be installed (i.e. they are
|
||||
# not defined _NO_INST in build.info)
|
||||
sub is_installed {
|
||||
my $product = shift;
|
||||
if (grep { $product eq $_ }
|
||||
map { (@{$unified_info{install}->{$_}}) }
|
||||
keys %{$unified_info{install}}) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
# dogenerate is responsible for producing all the recipes that build
|
||||
# generated source files. It recurses in case a dependency is also a
|
||||
# generated source file.
|
||||
sub dogenerate {
|
||||
my $src = shift;
|
||||
return "" if $cache{$src};
|
||||
my $obj = shift;
|
||||
my $bin = shift;
|
||||
my %opts = @_;
|
||||
if ($unified_info{generate}->{$src}) {
|
||||
die "$src is generated by Configure, should not appear in build file\n"
|
||||
if ref $unified_info{generate}->{$src} eq "";
|
||||
my $script = $unified_info{generate}->{$src}->[0];
|
||||
$OUT .= generatesrc(src => $src,
|
||||
generator => $unified_info{generate}->{$src},
|
||||
generator_incs => $unified_info{includes}->{$script},
|
||||
generator_deps => $unified_info{depends}->{$script},
|
||||
deps => $unified_info{depends}->{$src},
|
||||
incs => $unified_info{includes}->{$obj},
|
||||
%opts);
|
||||
foreach (@{$unified_info{depends}->{$src}}) {
|
||||
dogenerate($_, $obj, $bin, %opts);
|
||||
}
|
||||
}
|
||||
$cache{$src} = 1;
|
||||
}
|
||||
|
||||
# doobj is responsible for producing all the recipes that build
|
||||
# object files as well as dependency files.
|
||||
sub doobj {
|
||||
my $obj = shift;
|
||||
return "" if $cache{$obj};
|
||||
my $bin = shift;
|
||||
my %opts = @_;
|
||||
if (@{$unified_info{sources}->{$obj}}) {
|
||||
$OUT .= src2obj(obj => $obj,
|
||||
product => $bin,
|
||||
srcs => $unified_info{sources}->{$obj},
|
||||
deps => $unified_info{depends}->{$obj},
|
||||
incs => $unified_info{includes}->{$obj},
|
||||
%opts);
|
||||
foreach ((@{$unified_info{sources}->{$obj}},
|
||||
@{$unified_info{depends}->{$obj}})) {
|
||||
dogenerate($_, $obj, $bin, %opts);
|
||||
}
|
||||
}
|
||||
$cache{$obj} = 1;
|
||||
}
|
||||
|
||||
# dolib is responsible for building libraries. It will call
|
||||
# libobj2shlib is shared libraries are produced, and obj2lib in all
|
||||
# cases. It also makes sure all object files for the library are
|
||||
# built.
|
||||
sub dolib {
|
||||
my $lib = shift;
|
||||
return "" if $cache{$lib};
|
||||
unless ($disabled{shared} || $lib =~ /\.a$/) {
|
||||
$OUT .= libobj2shlib(shlib => $unified_info{sharednames}->{$lib},
|
||||
lib => $lib,
|
||||
objs => [ @{$unified_info{shared_sources}->{$lib}},
|
||||
@{$unified_info{sources}->{$lib}} ],
|
||||
deps => [ reducedepends(resolvedepends($lib)) ],
|
||||
installed => is_installed($lib));
|
||||
foreach ((@{$unified_info{shared_sources}->{$lib}},
|
||||
@{$unified_info{sources}->{$lib}})) {
|
||||
# If this is somehow a compiled object, take care of it that way
|
||||
# Otherwise, it might simply be generated
|
||||
if (defined $unified_info{sources}->{$_}) {
|
||||
doobj($_, $lib, intent => "lib", installed => is_installed($lib));
|
||||
} else {
|
||||
dogenerate($_, undef, undef, intent => "lib");
|
||||
}
|
||||
}
|
||||
}
|
||||
$OUT .= obj2lib(lib => $lib,
|
||||
objs => [ @{$unified_info{sources}->{$lib}} ]);
|
||||
foreach (@{$unified_info{sources}->{$lib}}) {
|
||||
doobj($_, $lib, intent => "lib", installed => is_installed($lib));
|
||||
}
|
||||
$cache{$lib} = 1;
|
||||
}
|
||||
|
||||
# doengine is responsible for building engines. It will call
|
||||
# obj2dso, and also makes sure all object files for the library
|
||||
# are built.
|
||||
sub doengine {
|
||||
my $lib = shift;
|
||||
return "" if $cache{$lib};
|
||||
$OUT .= obj2dso(lib => $lib,
|
||||
objs => [ @{$unified_info{sources}->{$lib}},
|
||||
@{$unified_info{shared_sources}->{$lib}} ],
|
||||
deps => [ resolvedepends($lib) ],
|
||||
installed => is_installed($lib));
|
||||
foreach ((@{$unified_info{sources}->{$lib}},
|
||||
@{$unified_info{shared_sources}->{$lib}})) {
|
||||
doobj($_, $lib, intent => "dso", installed => is_installed($lib));
|
||||
}
|
||||
$cache{$lib} = 1;
|
||||
}
|
||||
|
||||
# dobin is responsible for building programs. It will call obj2bin,
|
||||
# and also makes sure all object files for the library are built.
|
||||
sub dobin {
|
||||
my $bin = shift;
|
||||
return "" if $cache{$bin};
|
||||
my $deps = [ reducedepends(resolvedepends($bin)) ];
|
||||
$OUT .= obj2bin(bin => $bin,
|
||||
objs => [ @{$unified_info{sources}->{$bin}} ],
|
||||
deps => $deps,
|
||||
installed => is_installed($bin));
|
||||
foreach (@{$unified_info{sources}->{$bin}}) {
|
||||
doobj($_, $bin, intent => "bin", installed => is_installed($bin));
|
||||
}
|
||||
$cache{$bin} = 1;
|
||||
}
|
||||
|
||||
# dobin is responsible for building scripts from templates. It will
|
||||
# call in2script.
|
||||
sub doscript {
|
||||
my $script = shift;
|
||||
return "" if $cache{$script};
|
||||
$OUT .= in2script(script => $script,
|
||||
sources => $unified_info{sources}->{$script},
|
||||
installed => is_installed($script));
|
||||
$cache{$script} = 1;
|
||||
}
|
||||
|
||||
sub dodir {
|
||||
my $dir = shift;
|
||||
return "" if !exists(&generatedir) or $cache{$dir};
|
||||
$OUT .= generatedir(dir => $dir,
|
||||
deps => $unified_info{dirinfo}->{$dir}->{deps},
|
||||
%{$unified_info{dirinfo}->{$_}->{products}});
|
||||
$cache{$dir} = 1;
|
||||
}
|
||||
|
||||
# Start with populating the cache with all the overrides
|
||||
%cache = map { $_ => 1 } @{$unified_info{overrides}};
|
||||
|
||||
# Build mandatory generated headers
|
||||
foreach (@{$unified_info{depends}->{""}}) { dogenerate($_); }
|
||||
|
||||
# Build all known libraries, engines, programs and scripts.
|
||||
# Everything else will be handled as a consequence.
|
||||
foreach (@{$unified_info{libraries}}) { dolib($_); }
|
||||
foreach (@{$unified_info{engines}}) { doengine($_); }
|
||||
foreach (@{$unified_info{programs}}) { dobin($_); }
|
||||
foreach (@{$unified_info{scripts}}) { doscript($_); }
|
||||
|
||||
foreach (sort keys %{$unified_info{dirinfo}}) { dodir($_); }
|
||||
|
||||
# Finally, should there be any applicable BEGINRAW/ENDRAW sections,
|
||||
# they are added here.
|
||||
$OUT .= $_."\n" foreach @{$unified_info{rawlines}};
|
||||
-}
|
||||
31
Configurations/common0.tmpl
Normal file
31
Configurations/common0.tmpl
Normal file
@@ -0,0 +1,31 @@
|
||||
{- # -*- Mode: perl -*-
|
||||
|
||||
# Commonly used list of generated files
|
||||
# The reason for the complexity is that the build.info files provide
|
||||
# GENERATE rules for *all* platforms without discrimination, while the
|
||||
# build files only want those for a particular build. Therefore, we
|
||||
# need to extrapolate exactly what we need to generate. The way to do
|
||||
# that is to extract all possible source files from diverse tables and
|
||||
# filter out all that are not generated
|
||||
my %generatables =
|
||||
map { $_ => 1 }
|
||||
( # The sources of stuff may be generated
|
||||
( map { @{$unified_info{sources}->{$_}} }
|
||||
keys %{$unified_info{sources}} ),
|
||||
$disabled{shared}
|
||||
? ()
|
||||
: ( map { @{$unified_info{shared_sources}->{$_}} }
|
||||
keys %{$unified_info{shared_sources}} ),
|
||||
# Things we explicitly depend on are usually generated
|
||||
( map { $_ eq "" ? () : @{$unified_info{depends}->{$_}} }
|
||||
keys %{$unified_info{depends}} ));
|
||||
our @generated =
|
||||
sort ( ( grep { defined $unified_info{generate}->{$_} }
|
||||
sort keys %generatables ),
|
||||
# Scripts are assumed to be generated, so add thhem too
|
||||
( grep { defined $unified_info{sources}->{$_} }
|
||||
@{$unified_info{scripts}} ) );
|
||||
|
||||
# Avoid strange output
|
||||
"";
|
||||
-}
|
||||
1107
Configurations/descrip.mms.tmpl
Normal file
1107
Configurations/descrip.mms.tmpl
Normal file
File diff suppressed because it is too large
Load Diff
12
Configurations/dist.conf
Normal file
12
Configurations/dist.conf
Normal file
@@ -0,0 +1,12 @@
|
||||
## -*- mode: perl; -*-
|
||||
## Build configuration targets for openssl-team members
|
||||
|
||||
# This is to support 'make dist'
|
||||
my %targets = (
|
||||
"dist" => {
|
||||
inherit_from => [ 'BASE_unix' ],
|
||||
CC => "cc",
|
||||
CFLAGS => "-O",
|
||||
thread_scheme => "(unknown)",
|
||||
},
|
||||
);
|
||||
82
Configurations/shared-info.pl
Normal file
82
Configurations/shared-info.pl
Normal file
@@ -0,0 +1,82 @@
|
||||
#! /usr/bin/env perl
|
||||
# -*- mode: perl; -*-
|
||||
# Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the OpenSSL license (the "License"). You may not use
|
||||
# this file except in compliance with the License. You can obtain a copy
|
||||
# in the file LICENSE in the source distribution or at
|
||||
# https://www.openssl.org/source/license.html
|
||||
|
||||
# This is a collection of extra attributes to be used as input for creating
|
||||
# shared libraries, currently on any Unix variant, including Unix like
|
||||
# environments on Windows.
|
||||
|
||||
sub detect_gnu_ld {
|
||||
my @lines =
|
||||
`$config{CROSS_COMPILE}$config{CC} -Wl,-V /dev/null 2>&1`;
|
||||
return grep /^GNU ld/, @lines;
|
||||
}
|
||||
sub detect_gnu_cc {
|
||||
my @lines =
|
||||
`$config{CROSS_COMPILE}$config{CC} -v 2>&1`;
|
||||
return grep /gcc/, @lines;
|
||||
}
|
||||
|
||||
my %shared_info;
|
||||
%shared_info = (
|
||||
'gnu-shared' => {
|
||||
shared_ldflag => '-shared -Wl,-Bsymbolic',
|
||||
shared_sonameflag => '-Wl,-soname=',
|
||||
},
|
||||
'linux-shared' => sub {
|
||||
return {
|
||||
%{$shared_info{'gnu-shared'}},
|
||||
shared_defflag => '-Wl,--version-script=',
|
||||
};
|
||||
},
|
||||
'bsd-gcc-shared' => sub { return $shared_info{'linux-shared'}; },
|
||||
'bsd-shared' => sub {
|
||||
return $shared_info{'gnu-shared'} if detect_gnu_ld();
|
||||
return {
|
||||
shared_ldflag => '-shared -nostdlib',
|
||||
};
|
||||
},
|
||||
'darwin-shared' => {
|
||||
module_ldflags => '-bundle',
|
||||
shared_ldflag => '-dynamiclib -current_version $(SHLIB_VERSION_NUMBER) -compatibility_version $(SHLIB_VERSION_NUMBER)',
|
||||
shared_sonameflag => '-install_name $(INSTALLTOP)/$(LIBDIR)/',
|
||||
},
|
||||
'cygwin-shared' => {
|
||||
shared_ldflag => '-shared -Wl,--enable-auto-image-base',
|
||||
shared_impflag => '-Wl,--out-implib=',
|
||||
},
|
||||
'mingw-shared' => sub {
|
||||
return {
|
||||
%{$shared_info{'cygwin-shared'}},
|
||||
# def_flag made to empty string so it still generates
|
||||
# something
|
||||
shared_defflag => '',
|
||||
};
|
||||
},
|
||||
'alpha-osf1-shared' => sub {
|
||||
return $shared_info{'gnu-shared'} if detect_gnu_ld();
|
||||
return {
|
||||
module_ldflags => '-shared -Wl,-Bsymbolic',
|
||||
shared_ldflag => '-shared -Wl,-Bsymbolic -set_version $(SHLIB_VERSION_NUMBER)',
|
||||
};
|
||||
},
|
||||
'svr3-shared' => sub {
|
||||
return $shared_info{'gnu-shared'} if detect_gnu_ld();
|
||||
return {
|
||||
shared_ldflag => '-G',
|
||||
shared_sonameflag => '-h ',
|
||||
};
|
||||
},
|
||||
'svr5-shared' => sub {
|
||||
return $shared_info{'gnu-shared'} if detect_gnu_ld();
|
||||
return {
|
||||
shared_ldflag => detect_gnu_cc() ? '-shared' : '-G',
|
||||
shared_sonameflag => '-h ',
|
||||
};
|
||||
},
|
||||
);
|
||||
1281
Configurations/unix-Makefile.tmpl
Normal file
1281
Configurations/unix-Makefile.tmpl
Normal file
File diff suppressed because it is too large
Load Diff
22
Configurations/unix-checker.pm
Normal file
22
Configurations/unix-checker.pm
Normal file
@@ -0,0 +1,22 @@
|
||||
#! /usr/bin/perl
|
||||
|
||||
use Config;
|
||||
|
||||
# Check that the perl implementation file modules generate paths that
|
||||
# we expect for the platform
|
||||
use File::Spec::Functions qw(:DEFAULT rel2abs);
|
||||
|
||||
if (rel2abs('.') !~ m|/|) {
|
||||
die <<EOF;
|
||||
|
||||
******************************************************************************
|
||||
This perl implementation doesn't produce Unix like paths (with forward slash
|
||||
directory separators). Please use an implementation that matches your
|
||||
building platform.
|
||||
|
||||
This Perl version: $Config{version} for $Config{archname}
|
||||
******************************************************************************
|
||||
EOF
|
||||
}
|
||||
|
||||
1;
|
||||
22
Configurations/windows-checker.pm
Normal file
22
Configurations/windows-checker.pm
Normal file
@@ -0,0 +1,22 @@
|
||||
#! /usr/bin/perl
|
||||
|
||||
use Config;
|
||||
|
||||
# Check that the perl implementation file modules generate paths that
|
||||
# we expect for the platform
|
||||
use File::Spec::Functions qw(:DEFAULT rel2abs);
|
||||
|
||||
if (!$ENV{CONFIGURE_INSIST} && rel2abs('.') !~ m|\\|) {
|
||||
die <<EOF;
|
||||
|
||||
******************************************************************************
|
||||
This perl implementation doesn't produce Windows like paths (with backward
|
||||
slash directory separators). Please use an implementation that matches your
|
||||
building platform.
|
||||
|
||||
This Perl version: $Config{version} for $Config{archname}
|
||||
******************************************************************************
|
||||
EOF
|
||||
}
|
||||
|
||||
1;
|
||||
760
Configurations/windows-makefile.tmpl
Normal file
760
Configurations/windows-makefile.tmpl
Normal file
@@ -0,0 +1,760 @@
|
||||
##
|
||||
## Makefile for OpenSSL
|
||||
##
|
||||
## {- join("\n## ", @autowarntext) -}
|
||||
{-
|
||||
our $objext = $target{obj_extension} || ".obj";
|
||||
our $resext = $target{res_extension} || ".res";
|
||||
our $depext = $target{dep_extension} || ".d";
|
||||
our $exeext = $target{exe_extension} || ".exe";
|
||||
our $libext = $target{lib_extension} || ".lib";
|
||||
our $shlibext = $target{shared_extension} || ".dll";
|
||||
our $shlibextimport = $target{shared_import_extension} || ".lib";
|
||||
our $dsoext = $target{dso_extension} || ".dll";
|
||||
|
||||
(our $sover_dirname = $config{shlib_version_number}) =~ s|\.|_|g;
|
||||
|
||||
my $build_scheme = $target{build_scheme};
|
||||
my $install_flavour = $build_scheme->[$#$build_scheme]; # last element
|
||||
my $win_installenv =
|
||||
$install_flavour eq "VC-WOW" ? "ProgramFiles(x86)"
|
||||
: "ProgramW6432";
|
||||
my $win_commonenv =
|
||||
$install_flavour eq "VC-WOW" ? "CommonProgramFiles(x86)"
|
||||
: "CommonProgramW6432";
|
||||
our $win_installroot =
|
||||
defined($ENV{$win_installenv}) ? $win_installenv : 'ProgramFiles';
|
||||
our $win_commonroot =
|
||||
defined($ENV{$win_commonenv}) ? $win_commonenv : 'CommonProgramFiles';
|
||||
|
||||
# expand variables early
|
||||
$win_installroot = $ENV{$win_installroot};
|
||||
$win_commonroot = $ENV{$win_commonroot};
|
||||
|
||||
sub shlib {
|
||||
my $lib = shift;
|
||||
return () if $disabled{shared} || $lib =~ /\.a$/;
|
||||
return () unless defined $unified_info{sharednames}->{$lib};
|
||||
return $unified_info{sharednames}->{$lib} . $shlibext;
|
||||
}
|
||||
|
||||
sub lib {
|
||||
(my $lib = shift) =~ s/\.a$//;
|
||||
$lib .= '_static'
|
||||
if (defined $unified_info{sharednames}->{$lib});
|
||||
return $lib . $libext;
|
||||
}
|
||||
|
||||
sub shlib_import {
|
||||
my $lib = shift;
|
||||
return () if $disabled{shared} || $lib =~ /\.a$/;
|
||||
return $lib . $shlibextimport;
|
||||
}
|
||||
|
||||
sub dso {
|
||||
my $dso = shift;
|
||||
|
||||
return $dso . $dsoext;
|
||||
}
|
||||
# This makes sure things get built in the order they need
|
||||
# to. You're welcome.
|
||||
sub dependmagic {
|
||||
my $target = shift;
|
||||
|
||||
return "$target: build_generated\n\t\$(MAKE) /\$(MAKEFLAGS) depend && \$(MAKE) /\$(MAKEFLAGS) _$target\n_$target";
|
||||
}
|
||||
'';
|
||||
-}
|
||||
|
||||
PLATFORM={- $config{target} -}
|
||||
SRCDIR={- $config{sourcedir} -}
|
||||
BLDDIR={- $config{builddir} -}
|
||||
|
||||
VERSION={- $config{version} -}
|
||||
MAJOR={- $config{major} -}
|
||||
MINOR={- $config{minor} -}
|
||||
|
||||
SHLIB_VERSION_NUMBER={- $config{shlib_version_number} -}
|
||||
|
||||
LIBS={- join(" ", map { ( shlib_import($_), lib($_) ) } @{$unified_info{libraries}}) -}
|
||||
SHLIBS={- join(" ", map { shlib($_) } @{$unified_info{libraries}}) -}
|
||||
SHLIBPDBS={- join(" ", map { local $shlibext = ".pdb"; shlib($_) } @{$unified_info{libraries}}) -}
|
||||
ENGINES={- join(" ", map { dso($_) } @{$unified_info{engines}}) -}
|
||||
ENGINEPDBS={- join(" ", map { local $dsoext = ".pdb"; dso($_) } @{$unified_info{engines}}) -}
|
||||
PROGRAMS={- our @PROGRAMS = map { $_.$exeext } @{$unified_info{programs}}; join(" ", @PROGRAMS) -}
|
||||
PROGRAMPDBS={- join(" ", map { $_.".pdb" } @{$unified_info{programs}}) -}
|
||||
SCRIPTS={- join(" ", @{$unified_info{scripts}}) -}
|
||||
{- output_off() if $disabled{makedepend}; "" -}
|
||||
DEPS={- join(" ", map { (my $x = $_) =~ s|\.o$|$depext|; $x; }
|
||||
grep { $unified_info{sources}->{$_}->[0] =~ /\.c$/ }
|
||||
keys %{$unified_info{sources}}); -}
|
||||
{- output_on() if $disabled{makedepend}; "" -}
|
||||
GENERATED_MANDATORY={- join(" ", @{$unified_info{depends}->{""}} ) -}
|
||||
GENERATED={- # common0.tmpl provides @generated
|
||||
join(" ", map { (my $x = $_) =~ s|\.[sS]$|.asm|; $x }
|
||||
@generated) -}
|
||||
|
||||
INSTALL_LIBS={- join(" ", map { quotify1(shlib_import($_) or lib($_)) } @{$unified_info{install}->{libraries}}) -}
|
||||
INSTALL_SHLIBS={- join(" ", map { quotify_l(shlib($_)) } @{$unified_info{install}->{libraries}}) -}
|
||||
INSTALL_SHLIBPDBS={- join(" ", map { local $shlibext = ".pdb"; quotify_l(shlib($_)) } @{$unified_info{install}->{libraries}}) -}
|
||||
INSTALL_ENGINES={- join(" ", map { quotify1(dso($_)) } @{$unified_info{install}->{engines}}) -}
|
||||
INSTALL_ENGINEPDBS={- join(" ", map { local $dsoext = ".pdb"; quotify1(dso($_)) } @{$unified_info{install}->{engines}}) -}
|
||||
INSTALL_PROGRAMS={- join(" ", map { quotify1($_.$exeext) } grep { !m|^test\\| } @{$unified_info{install}->{programs}}) -}
|
||||
INSTALL_PROGRAMPDBS={- join(" ", map { quotify1($_.".pdb") } grep { !m|^test\\| } @{$unified_info{install}->{programs}}) -}
|
||||
{- output_off() if $disabled{apps}; "" -}
|
||||
BIN_SCRIPTS="$(BLDDIR)\tools\c_rehash.pl"
|
||||
MISC_SCRIPTS="$(BLDDIR)\apps\CA.pl" "$(BLDDIR)\apps\tsget.pl"
|
||||
{- output_on() if $disabled{apps}; "" -}
|
||||
|
||||
APPS_OPENSSL={- use File::Spec::Functions;
|
||||
"\"".catfile("apps","openssl")."\"" -}
|
||||
|
||||
# Do not edit these manually. Use Configure with --prefix or --openssldir
|
||||
# to change this! Short explanation in the top comment in Configure
|
||||
INSTALLTOP_dev={- # $prefix is used in the OPENSSLDIR perl snippet
|
||||
#
|
||||
use File::Spec::Functions qw(:DEFAULT splitpath);
|
||||
our $prefix = canonpath($config{prefix}
|
||||
|| "$win_installroot\\OpenSSL");
|
||||
our ($prefix_dev, $prefix_dir, $prefix_file) =
|
||||
splitpath($prefix, 1);
|
||||
$prefix_dev -}
|
||||
INSTALLTOP_dir={- canonpath($prefix_dir) -}
|
||||
OPENSSLDIR_dev={- #
|
||||
# The logic here is that if no --openssldir was given,
|
||||
# OPENSSLDIR will get the value "$win_commonroot\\SSL".
|
||||
# If --openssldir was given and the value is an absolute
|
||||
# path, OPENSSLDIR will get its value without change.
|
||||
# If the value from --openssldir is a relative path,
|
||||
# OPENSSLDIR will get $prefix with the --openssldir
|
||||
# value appended as a subdirectory.
|
||||
#
|
||||
use File::Spec::Functions qw(:DEFAULT splitpath);
|
||||
our $openssldir =
|
||||
$config{openssldir} ?
|
||||
(file_name_is_absolute($config{openssldir}) ?
|
||||
canonpath($config{openssldir})
|
||||
: catdir($prefix, $config{openssldir}))
|
||||
: canonpath("$win_commonroot\\SSL");
|
||||
our ($openssldir_dev, $openssldir_dir, $openssldir_file) =
|
||||
splitpath($openssldir, 1);
|
||||
$openssldir_dev -}
|
||||
OPENSSLDIR_dir={- canonpath($openssldir_dir) -}
|
||||
LIBDIR={- our $libdir = $config{libdir} || "lib";
|
||||
file_name_is_absolute($libdir) ? "" : $libdir -}
|
||||
ENGINESDIR_dev={- use File::Spec::Functions qw(:DEFAULT splitpath);
|
||||
our $enginesdir = catdir($prefix,$libdir,"engines-$sover_dirname");
|
||||
our ($enginesdir_dev, $enginesdir_dir, $enginesdir_file) =
|
||||
splitpath($enginesdir, 1);
|
||||
$enginesdir_dev -}
|
||||
ENGINESDIR_dir={- canonpath($enginesdir_dir) -}
|
||||
!IF "$(DESTDIR)" != ""
|
||||
INSTALLTOP=$(DESTDIR)$(INSTALLTOP_dir)
|
||||
OPENSSLDIR=$(DESTDIR)$(OPENSSLDIR_dir)
|
||||
ENGINESDIR=$(DESTDIR)$(ENGINESDIR_dir)
|
||||
!ELSE
|
||||
INSTALLTOP=$(INSTALLTOP_dev)$(INSTALLTOP_dir)
|
||||
OPENSSLDIR=$(OPENSSLDIR_dev)$(OPENSSLDIR_dir)
|
||||
ENGINESDIR=$(ENGINESDIR_dev)$(ENGINESDIR_dir)
|
||||
!ENDIF
|
||||
|
||||
# $(libdir) is chosen to be compatible with the GNU coding standards
|
||||
libdir={- file_name_is_absolute($libdir)
|
||||
? $libdir : '$(INSTALLTOP)\$(LIBDIR)' -}
|
||||
|
||||
##### User defined commands and flags ################################
|
||||
|
||||
CC={- $config{CC} -}
|
||||
CPP={- $config{CPP} -}
|
||||
CPPFLAGS={- our $cppflags1 = join(" ",
|
||||
(map { "-D".$_} @{$config{CPPDEFINES}}),
|
||||
(map { " /I ".$_} @{$config{CPPINCLUDES}}),
|
||||
@{$config{CPPFLAGS}}) -}
|
||||
CFLAGS={- join(' ', @{$config{CFLAGS}}) -}
|
||||
LD={- $config{LD} -}
|
||||
LDFLAGS={- join(' ', @{$config{LDFLAGS}}) -}
|
||||
EX_LIBS={- join(' ', @{$config{LDLIBS}}) -}
|
||||
|
||||
PERL={- $config{PERL} -}
|
||||
|
||||
AR={- $config{AR} -}
|
||||
ARFLAGS= {- join(' ', @{$config{ARFLAGS}}) -}
|
||||
|
||||
MT={- $config{MT} -}
|
||||
MTFLAGS= {- join(' ', @{$config{MTFLAGS}}) -}
|
||||
|
||||
AS={- $config{AS} -}
|
||||
ASFLAGS={- join(' ', @{$config{ASFLAGS}}) -}
|
||||
|
||||
RC={- $config{RC} -}
|
||||
|
||||
ECHO="$(PERL)" "$(SRCDIR)\util\echo.pl"
|
||||
|
||||
##### Special command flags ##########################################
|
||||
|
||||
COUTFLAG={- $target{coutflag} -}$(OSSL_EMPTY)
|
||||
LDOUTFLAG={- $target{ldoutflag} -}$(OSSL_EMPTY)
|
||||
AROUTFLAG={- $target{aroutflag} -}$(OSSL_EMPTY)
|
||||
MTINFLAG={- $target{mtinflag} -}$(OSSL_EMPTY)
|
||||
MTOUTFLAG={- $target{mtoutflag} -}$(OSSL_EMPTY)
|
||||
ASOUTFLAG={- $target{asoutflag} -}$(OSSL_EMPTY)
|
||||
RCOUTFLAG={- $target{rcoutflag} -}$(OSSL_EMPTY)
|
||||
|
||||
##### Project flags ##################################################
|
||||
|
||||
# Variables starting with CNF_ are common variables for all product types
|
||||
|
||||
CNF_ASFLAGS={- join(' ', $target{asflags} || (),
|
||||
@{$config{asflags}}) -}
|
||||
CNF_CPPFLAGS={- our $cppfags2 =
|
||||
join(' ', $target{cppflags} || (),
|
||||
(map { '-D'.quotify1($_) } @{$target{defines}},
|
||||
@{$config{defines}}),
|
||||
(map { '-I'.quotify1($_) } @{$target{includes}},
|
||||
@{$config{includes}}),
|
||||
@{$config{cppflags}}) -}
|
||||
CNF_CFLAGS={- join(' ', $target{cflags} || (),
|
||||
@{$config{cflags}}) -}
|
||||
CNF_CXXFLAGS={- join(' ', $target{cxxflags} || (),
|
||||
@{$config{cxxflags}}) -}
|
||||
CNF_LDFLAGS={- join(' ', $target{lflags} || (),
|
||||
@{$config{lflags}}) -}
|
||||
CNF_EX_LIBS={- join(' ', $target{ex_libs} || (),
|
||||
@{$config{ex_libs}}) -}
|
||||
|
||||
# Variables starting with LIB_ are used to build library object files
|
||||
# and shared libraries.
|
||||
# Variables starting with DSO_ are used to build DSOs and their object files.
|
||||
# Variables starting with BIN_ are used to build programs and their object
|
||||
# files.
|
||||
|
||||
LIB_ASFLAGS={- join(' ', $target{lib_asflags} || (),
|
||||
@{$config{lib_asflags}},
|
||||
'$(CNF_ASFLAGS)', '$(ASFLAGS)') -}
|
||||
LIB_CPPFLAGS={- our $lib_cppflags =
|
||||
join(' ', $target{lib_cppflags} || (),
|
||||
$target{shared_cppflag} || (),
|
||||
(map { '-D'.quotify1($_) }
|
||||
@{$target{lib_defines}},
|
||||
@{$target{shared_defines}},
|
||||
@{$config{lib_defines}},
|
||||
@{$config{shared_defines}}),
|
||||
(map { '-I'.quotify1($_) }
|
||||
@{$target{lib_includes}},
|
||||
@{$target{shared_includes}},
|
||||
@{$config{lib_includes}},
|
||||
@{$config{shared_includes}}),
|
||||
@{$config{lib_cppflags}},
|
||||
@{$config{shared_cppflag}});
|
||||
join(' ', $lib_cppflags,
|
||||
(map { '-D'.quotify1($_) }
|
||||
"OPENSSLDIR=\"$openssldir\"",
|
||||
"ENGINESDIR=\"$enginesdir\""),
|
||||
'$(CNF_CPPFLAGS)', '$(CPPFLAGS)') -}
|
||||
LIB_CFLAGS={- join(' ', $target{lib_cflags} || (),
|
||||
$target{shared_cflag} || (),
|
||||
@{$config{lib_cflags}},
|
||||
@{$config{shared_cflag}},
|
||||
'$(CNF_CFLAGS)', '$(CFLAGS)') -}
|
||||
LIB_LDFLAGS={- join(' ', $target{shared_ldflag} || (),
|
||||
$config{shared_ldflag} || (),
|
||||
'$(CNF_LDFLAGS)', '$(LDFLAGS)') -}
|
||||
LIB_EX_LIBS=$(CNF_EX_LIBS) $(EX_LIBS)
|
||||
DSO_ASFLAGS={- join(' ', $target{dso_asflags} || (),
|
||||
$target{module_asflags} || (),
|
||||
@{$config{dso_asflags}},
|
||||
@{$config{module_asflags}},
|
||||
'$(CNF_ASFLAGS)', '$(ASFLAGS)') -}
|
||||
DSO_CPPFLAGS={- join(' ', $target{dso_cppflags} || (),
|
||||
$target{module_cppflags} || (),
|
||||
@{$config{dso_cppflags}},
|
||||
@{$config{module_cppflags}},
|
||||
'$(CNF_CPPFLAGS)', '$(CPPFLAGS)') -}
|
||||
DSO_CFLAGS={- join(' ', $target{dso_cflags} || (),
|
||||
$target{module_cflags} || (),
|
||||
@{$config{dso_cflags}},
|
||||
@{$config{module_cflags}},
|
||||
'$(CNF_CFLAGS)', '$(CFLAGS)') -}
|
||||
DSO_LDFLAGS={- join(' ', $target{dso_lflags} || (),
|
||||
$target{module_ldflags} || (),
|
||||
@{$config{dso_lflags}},
|
||||
@{$config{module_ldflags}},
|
||||
'$(CNF_LDFLAGS)', '$(LDFLAGS)') -}
|
||||
DSO_EX_LIBS=$(CNF_EX_LIBS) $(EX_LIBS)
|
||||
BIN_ASFLAGS={- join(' ', $target{bin_asflags} || (),
|
||||
@{$config{bin_asflags}},
|
||||
'$(CNF_ASFLAGS)', '$(ASFLAGS)') -}
|
||||
BIN_CPPFLAGS={- join(' ', $target{bin_cppflags} || (),
|
||||
@{$config{bin_cppflags}},
|
||||
'$(CNF_CPPFLAGS)', '$(CPPFLAGS)') -}
|
||||
BIN_CFLAGS={- join(' ', $target{bin_cflags} || (),
|
||||
@{$config{bin_cflags}},
|
||||
'$(CNF_CFLAGS)', '$(CFLAGS)') -}
|
||||
BIN_LDFLAGS={- join(' ', $target{bin_lflags} || (),
|
||||
@{$config{bin_lflags}},
|
||||
'$(CNF_LDFLAGS)', '$(LDFLAGS)') -}
|
||||
BIN_EX_LIBS=$(CNF_EX_LIBS) $(EX_LIBS)
|
||||
|
||||
# CPPFLAGS_Q is used for one thing only: to build up buildinf.h
|
||||
CPPFLAGS_Q={- $cppflags1 =~ s|([\\"])|\\$1|g;
|
||||
$cppflags2 =~ s|([\\"])|\\$1|g;
|
||||
join(' ', $lib_cppflags || (), $cppflags2 || (),
|
||||
$cppflags1 || ()) -}
|
||||
|
||||
PERLASM_SCHEME= {- $target{perlasm_scheme} -}
|
||||
|
||||
PROCESSOR= {- $config{processor} -}
|
||||
|
||||
# The main targets ###################################################
|
||||
|
||||
{- dependmagic('all'); -}: build_libs_nodep build_engines_nodep build_programs_nodep
|
||||
{- dependmagic('build_libs'); -}: build_libs_nodep
|
||||
{- dependmagic('build_engines'); -}: build_engines_nodep
|
||||
{- dependmagic('build_programs'); -}: build_programs_nodep
|
||||
|
||||
build_generated: $(GENERATED_MANDATORY)
|
||||
build_libs_nodep: $(LIBS) {- join(" ",map { shlib_import($_) } @{$unified_info{libraries}}) -}
|
||||
build_engines_nodep: $(ENGINES)
|
||||
build_programs_nodep: $(PROGRAMS) $(SCRIPTS)
|
||||
|
||||
# Kept around for backward compatibility
|
||||
build_apps build_tests: build_programs
|
||||
|
||||
# Convenience target to prebuild all generated files, not just the mandatory
|
||||
# ones
|
||||
build_all_generated: $(GENERATED_MANDATORY) $(GENERATED)
|
||||
@{- output_off() if $disabled{makedepend}; "" -}
|
||||
@$(ECHO) "Warning: consider configuring with no-makedepend, because if"
|
||||
@$(ECHO) " target system doesn't have $(PERL),"
|
||||
@$(ECHO) " then make will fail..."
|
||||
@{- output_on() if $disabled{makedepend}; "" -}
|
||||
|
||||
test: tests
|
||||
{- dependmagic('tests'); -}: build_programs_nodep build_engines_nodep
|
||||
@{- output_off() if $disabled{tests}; "" -}
|
||||
-mkdir $(BLDDIR)\test\test-runs
|
||||
set SRCTOP=$(SRCDIR)
|
||||
set BLDTOP=$(BLDDIR)
|
||||
set RESULT_D=$(BLDDIR)\test\test-runs
|
||||
set PERL=$(PERL)
|
||||
set OPENSSL_ENGINES=$(MAKEDIR)\engines
|
||||
set OPENSSL_DEBUG_MEMORY=on
|
||||
"$(PERL)" "$(SRCDIR)\test\run_tests.pl" $(TESTS)
|
||||
@{- if ($disabled{tests}) { output_on(); } else { output_off(); } "" -}
|
||||
@$(ECHO) "Tests are not supported with your chosen Configure options"
|
||||
@{- output_on() if !$disabled{tests}; "" -}
|
||||
|
||||
list-tests:
|
||||
@{- output_off() if $disabled{tests}; "" -}
|
||||
@set SRCTOP=$(SRCDIR)
|
||||
@"$(PERL)" "$(SRCDIR)\test\run_tests.pl" list
|
||||
@{- if ($disabled{tests}) { output_on(); } else { output_off(); } "" -}
|
||||
@$(ECHO) "Tests are not supported with your chosen Configure options"
|
||||
@{- output_on() if !$disabled{tests}; "" -}
|
||||
|
||||
install: install_sw install_ssldirs install_docs
|
||||
|
||||
uninstall: uninstall_docs uninstall_sw
|
||||
|
||||
libclean:
|
||||
"$(PERL)" -e "map { m/(.*)\.dll$$/; unlink glob """{.,apps,test,fuzz}/$$1.*"""; } @ARGV" $(SHLIBS)
|
||||
-del /Q /F $(LIBS) libcrypto.* libssl.* ossl_static.pdb
|
||||
|
||||
clean: libclean
|
||||
{- join("\n\t", map { "-del /Q /F $_" } @PROGRAMS) -}
|
||||
-del /Q /F $(ENGINES)
|
||||
-del /Q /F $(SCRIPTS)
|
||||
-del /Q /F $(GENERATED_MANDATORY)
|
||||
-del /Q /F $(GENERATED)
|
||||
-del /Q /S /F *.d *.obj *.pdb *.ilk *.manifest
|
||||
-del /Q /S /F engines\*.lib engines\*.exp
|
||||
-del /Q /S /F apps\*.lib apps\*.rc apps\*.res apps\*.exp
|
||||
-del /Q /S /F test\*.exp
|
||||
-rmdir /Q /S test\test-runs
|
||||
|
||||
distclean: clean
|
||||
-del /Q /F configdata.pm
|
||||
-del /Q /F makefile
|
||||
|
||||
depend:
|
||||
@ {- output_off() if $disabled{makedepend}; "" -}
|
||||
@ "$(PERL)" "$(SRCDIR)\util\add-depends.pl" "VC"
|
||||
@ {- output_on() if $disabled{makedepend}; "" -}
|
||||
|
||||
# Install helper targets #############################################
|
||||
|
||||
install_sw: install_dev install_engines install_runtime
|
||||
|
||||
uninstall_sw: uninstall_runtime uninstall_engines uninstall_dev
|
||||
|
||||
install_docs: install_html_docs
|
||||
|
||||
uninstall_docs: uninstall_html_docs
|
||||
|
||||
install_ssldirs:
|
||||
@"$(PERL)" "$(SRCDIR)\util\mkdir-p.pl" "$(OPENSSLDIR)\certs"
|
||||
@"$(PERL)" "$(SRCDIR)\util\mkdir-p.pl" "$(OPENSSLDIR)\private"
|
||||
@"$(PERL)" "$(SRCDIR)\util\mkdir-p.pl" "$(OPENSSLDIR)\misc"
|
||||
@"$(PERL)" "$(SRCDIR)\util\copy.pl" "$(SRCDIR)\apps\openssl.cnf" \
|
||||
"$(OPENSSLDIR)\openssl.cnf.dist"
|
||||
@IF NOT EXIST "$(OPENSSLDIR)\openssl.cnf" \
|
||||
"$(PERL)" "$(SRCDIR)\util\copy.pl" "$(SRCDIR)\apps\openssl.cnf" \
|
||||
"$(OPENSSLDIR)\openssl.cnf"
|
||||
@"$(PERL)" "$(SRCDIR)\util\copy.pl" $(MISC_SCRIPTS) \
|
||||
"$(OPENSSLDIR)\misc"
|
||||
@"$(PERL)" "$(SRCDIR)\util\copy.pl" "$(SRCDIR)\apps\ct_log_list.cnf" \
|
||||
"$(OPENSSLDIR)\ct_log_list.cnf.dist"
|
||||
@IF NOT EXIST "$(OPENSSLDIR)\ct_log_list.cnf" \
|
||||
"$(PERL)" "$(SRCDIR)\util\copy.pl" "$(SRCDIR)\apps\ct_log_list.cnf" \
|
||||
"$(OPENSSLDIR)\ct_log_list.cnf"
|
||||
|
||||
install_dev: install_runtime_libs
|
||||
@if "$(INSTALLTOP)"=="" ( $(ECHO) "INSTALLTOP should not be empty" & exit 1 )
|
||||
@$(ECHO) "*** Installing development files"
|
||||
@"$(PERL)" "$(SRCDIR)\util\mkdir-p.pl" "$(INSTALLTOP)\include\openssl"
|
||||
@{- output_off() unless grep { $_ eq "OPENSSL_USE_APPLINK" } (@{$target{defines}}, @{$config{defines}}); "" -}
|
||||
@"$(PERL)" "$(SRCDIR)\util\copy.pl" "$(SRCDIR)\ms\applink.c" \
|
||||
"$(INSTALLTOP)\include\openssl"
|
||||
@{- output_on() unless grep { $_ eq "OPENSSL_USE_APPLINK" } (@{$target{defines}}, @{$config{defines}}); "" -}
|
||||
@"$(PERL)" "$(SRCDIR)\util\copy.pl" "-exclude_re=/__DECC_" \
|
||||
"$(SRCDIR)\include\openssl\*.h" \
|
||||
"$(INSTALLTOP)\include\openssl"
|
||||
@"$(PERL)" "$(SRCDIR)\util\copy.pl" "$(BLDDIR)\include\openssl\*.h" \
|
||||
"$(INSTALLTOP)\include\openssl"
|
||||
@"$(PERL)" "$(SRCDIR)\util\mkdir-p.pl" "$(libdir)"
|
||||
@"$(PERL)" "$(SRCDIR)\util\copy.pl" $(INSTALL_LIBS) "$(libdir)"
|
||||
@if "$(SHLIBS)"=="" \
|
||||
"$(PERL)" "$(SRCDIR)\util\copy.pl" ossl_static.pdb "$(libdir)"
|
||||
|
||||
uninstall_dev:
|
||||
|
||||
install_engines: install_runtime_libs build_engines
|
||||
@if "$(INSTALLTOP)"=="" ( $(ECHO) "INSTALLTOP should not be empty" & exit 1 )
|
||||
@$(ECHO) "*** Installing engines"
|
||||
@"$(PERL)" "$(SRCDIR)\util\mkdir-p.pl" "$(ENGINESDIR)"
|
||||
@if not "$(ENGINES)"=="" \
|
||||
"$(PERL)" "$(SRCDIR)\util\copy.pl" $(INSTALL_ENGINES) "$(ENGINESDIR)"
|
||||
@if not "$(ENGINES)"=="" \
|
||||
"$(PERL)" "$(SRCDIR)\util\copy.pl" $(INSTALL_ENGINEPDBS) "$(ENGINESDIR)"
|
||||
|
||||
uninstall_engines:
|
||||
|
||||
install_runtime: install_programs
|
||||
|
||||
install_runtime_libs: build_libs
|
||||
@if "$(INSTALLTOP)"=="" ( $(ECHO) "INSTALLTOP should not be empty" & exit 1 )
|
||||
@$(ECHO) "*** Installing runtime libraries"
|
||||
@"$(PERL)" "$(SRCDIR)\util\mkdir-p.pl" "$(INSTALLTOP)\bin"
|
||||
@if not "$(SHLIBS)"=="" \
|
||||
"$(PERL)" "$(SRCDIR)\util\copy.pl" $(INSTALL_SHLIBS) "$(INSTALLTOP)\bin"
|
||||
@if not "$(SHLIBS)"=="" \
|
||||
"$(PERL)" "$(SRCDIR)\util\copy.pl" $(INSTALL_SHLIBPDBS) \
|
||||
"$(INSTALLTOP)\bin"
|
||||
|
||||
install_programs: install_runtime_libs build_programs
|
||||
@if "$(INSTALLTOP)"=="" ( $(ECHO) "INSTALLTOP should not be empty" & exit 1 )
|
||||
@$(ECHO) "*** Installing runtime programs"
|
||||
@"$(PERL)" "$(SRCDIR)\util\mkdir-p.pl" "$(INSTALLTOP)\bin"
|
||||
@"$(PERL)" "$(SRCDIR)\util\copy.pl" $(INSTALL_PROGRAMS) \
|
||||
"$(INSTALLTOP)\bin"
|
||||
@"$(PERL)" "$(SRCDIR)\util\copy.pl" $(INSTALL_PROGRAMPDBS) \
|
||||
"$(INSTALLTOP)\bin"
|
||||
@"$(PERL)" "$(SRCDIR)\util\copy.pl" $(BIN_SCRIPTS) \
|
||||
"$(INSTALLTOP)\bin"
|
||||
|
||||
uninstall_runtime:
|
||||
|
||||
install_html_docs:
|
||||
"$(PERL)" "$(SRCDIR)\util\process_docs.pl" \
|
||||
"--destdir=$(INSTALLTOP)\html" --type=html
|
||||
|
||||
uninstall_html_docs:
|
||||
|
||||
# Building targets ###################################################
|
||||
|
||||
configdata.pm: "$(SRCDIR)\Configure" {- join(" ", map { '"'.$_.'"' } @{$config{build_file_templates}}, @{$config{build_infos}}, @{$config{conf_files}}) -}
|
||||
@$(ECHO) "Detected changed: $?"
|
||||
"$(PERL)" configdata.pm -r
|
||||
@$(ECHO) "**************************************************"
|
||||
@$(ECHO) "*** ***"
|
||||
@$(ECHO) "*** Please run the same make command again ***"
|
||||
@$(ECHO) "*** ***"
|
||||
@$(ECHO) "**************************************************"
|
||||
@exit 1
|
||||
|
||||
reconfigure reconf:
|
||||
"$(PERL)" configdata.pm -r
|
||||
|
||||
{-
|
||||
use File::Basename;
|
||||
use File::Spec::Functions qw/:DEFAULT abs2rel rel2abs/;
|
||||
|
||||
# Helper function to figure out dependencies on libraries
|
||||
# It takes a list of library names and outputs a list of dependencies
|
||||
sub compute_lib_depends {
|
||||
if ($disabled{shared}) {
|
||||
return map { lib($_) } @_;
|
||||
}
|
||||
return map { shlib_import($_) or lib($_) } @_;
|
||||
}
|
||||
|
||||
sub generatesrc {
|
||||
my %args = @_;
|
||||
(my $target = $args{src}) =~ s/\.[sS]$/.asm/;
|
||||
my ($gen0, @gens) = @{$args{generator}};
|
||||
my $generator = '"'.$gen0.'"'.join('', map { " $_" } @gens);
|
||||
my $generator_incs = join("", map { " -I \"$_\"" } @{$args{generator_incs}});
|
||||
my $incs = join("", map { " /I \"$_\"" } @{$args{incs}});
|
||||
my $deps = @{$args{deps}} ?
|
||||
'"'.join('" "', @{$args{generator_deps}}, @{$args{deps}}).'"' : '';
|
||||
|
||||
if ($target !~ /\.asm$/) {
|
||||
if ($args{generator}->[0] =~ m|^.*\.in$|) {
|
||||
my $dofile = abs2rel(rel2abs(catfile($config{sourcedir},
|
||||
"util", "dofile.pl")),
|
||||
rel2abs($config{builddir}));
|
||||
return <<"EOF";
|
||||
$target: "$args{generator}->[0]" $deps
|
||||
"\$(PERL)" "-I\$(BLDDIR)" -Mconfigdata "$dofile" \\
|
||||
"-o$target{build_file}" $generator > \$@
|
||||
EOF
|
||||
} else {
|
||||
return <<"EOF";
|
||||
$target: "$args{generator}->[0]" $deps
|
||||
"\$(PERL)"$generator_incs $generator > \$@
|
||||
EOF
|
||||
}
|
||||
} else {
|
||||
if ($args{generator}->[0] =~ /\.pl$/) {
|
||||
$generator = '"$(PERL)"'.$generator_incs.' '.$generator;
|
||||
} elsif ($args{generator}->[0] =~ /\.S$/) {
|
||||
$generator = undef;
|
||||
} else {
|
||||
die "Generator type for $src unknown: $generator\n";
|
||||
}
|
||||
|
||||
my $cppflags = $incs;
|
||||
$cppflags .= {
|
||||
lib => ' $(LIB_CFLAGS) $(LIB_CPPFLAGS)',
|
||||
dso => ' $(DSO_CFLAGS) $(DSO_CPPFLAGS)',
|
||||
bin => ' $(BIN_CFLAGS) $(BIN_CPPFLAGS)'
|
||||
} -> {$args{intent}};
|
||||
if (defined($generator)) {
|
||||
# If the target is named foo.S in build.info, we want to
|
||||
# end up generating foo.s in two steps.
|
||||
if ($args{src} =~ /\.S$/) {
|
||||
return <<"EOF";
|
||||
$target: "$args{generator}->[0]" $deps
|
||||
set ASM=\$(AS)
|
||||
$generator \$@.S
|
||||
\$(CPP) $cppflags \$@.S > \$@.i && move /Y \$@.i \$@
|
||||
del /Q \$@.S
|
||||
EOF
|
||||
}
|
||||
# Otherwise....
|
||||
return <<"EOF";
|
||||
$target: "$args{generator}->[0]" $deps
|
||||
set ASM=\$(AS)
|
||||
$generator \$@
|
||||
EOF
|
||||
}
|
||||
return <<"EOF";
|
||||
$target: "$args{generator}->[0]" $deps
|
||||
\$(CPP) $incs $cppflags "$args{generator}->[0]" > \$@.i && move /Y \$@.i \$@
|
||||
EOF
|
||||
}
|
||||
}
|
||||
|
||||
sub src2obj {
|
||||
my %args = @_;
|
||||
my @srcs = map { (my $x = $_) =~ s/\.s$/.asm/; $x
|
||||
} ( @{$args{srcs}} );
|
||||
my $srcs = '"'.join('" "', @srcs).'"';
|
||||
my $deps = '"'.join('" "', @srcs, @{$args{deps}}).'"';
|
||||
my $incs = join("", map { ' /I "'.$_.'"' } @{$args{incs}});
|
||||
my $cflags = { lib => ' $(LIB_CFLAGS)',
|
||||
dso => ' $(DSO_CFLAGS)',
|
||||
bin => ' $(BIN_CFLAGS)' } -> {$args{intent}};
|
||||
$cflags .= $incs;
|
||||
$cflags .= { lib => ' $(LIB_CPPFLAGS)',
|
||||
dso => ' $(DSO_CPPFLAGS)',
|
||||
bin => ' $(BIN_CPPFLAGS)' } -> {$args{intent}};
|
||||
my $asflags = { lib => ' $(LIB_ASFLAGS)',
|
||||
dso => ' $(DSO_ASFLAGS)',
|
||||
bin => ' $(BIN_ASFLAGS)' } -> {$args{intent}};
|
||||
my $makedepprog = $config{makedepprog};
|
||||
if ($srcs[0] =~ /\.rc$/) {
|
||||
return <<"EOF";
|
||||
$args{obj}: $deps
|
||||
\$(RC) \$(RCOUTFLAG)\$\@ $srcs
|
||||
EOF
|
||||
}
|
||||
(my $obj = $args{obj}) =~ s|\.o$||;
|
||||
if ($srcs[0] =~ /\.asm$/) {
|
||||
return <<"EOF";
|
||||
$obj$objext: $deps
|
||||
\$(AS) $asflags \$(ASOUTFLAG)\$\@ $srcs
|
||||
EOF
|
||||
} elsif ($srcs[0] =~ /.S$/) {
|
||||
return <<"EOF";
|
||||
$obj$objext: $deps
|
||||
\$(CC) /EP /D__ASSEMBLER__ $cflags $srcs > \$@.asm && \$(AS) $asflags \$(ASOUTFLAG)\$\@ \$@.asm
|
||||
EOF
|
||||
}
|
||||
my $recipe = <<"EOF";
|
||||
$obj$objext: $deps
|
||||
\$(CC) $cflags -c \$(COUTFLAG)\$\@ $srcs
|
||||
EOF
|
||||
$recipe .= <<"EOF" unless $disabled{makedepend};
|
||||
\$(CC) $cflags /Zs /showIncludes $srcs 2>&1 > $obj$depext
|
||||
EOF
|
||||
return $recipe;
|
||||
}
|
||||
|
||||
# We *know* this routine is only called when we've configure 'shared'.
|
||||
# Also, note that even though the import library built here looks like
|
||||
# a static library, it really isn't.
|
||||
sub libobj2shlib {
|
||||
my %args = @_;
|
||||
my $lib = $args{lib};
|
||||
my @objs = map { (my $x = $_) =~ s|\.o$|$objext|; $x }
|
||||
grep { $_ =~ m/\.(?:o|res)$/ }
|
||||
@{$args{objs}};
|
||||
my @defs = grep { $_ =~ /\.def$/ } @{$args{objs}};
|
||||
my @deps = compute_lib_depends(@{$args{deps}});
|
||||
die "More than one exported symbols list" if scalar @defs > 1;
|
||||
my $linklibs = join("", map { "$_\n" } @deps);
|
||||
my $objs = join("\n", @objs);
|
||||
my $deps = join(" ", @objs, @defs, @deps);
|
||||
my $import = shlib_import($lib);
|
||||
my $dll = shlib($lib);
|
||||
my $shared_def = join("", map { " /def:$_" } @defs);
|
||||
return <<"EOF"
|
||||
# The import library may look like a static library, but it is not.
|
||||
# We MUST make the import library depend on the DLL, in case someone
|
||||
# mistakenly removes the latter.
|
||||
$import: $dll
|
||||
$dll: $deps
|
||||
IF EXIST $full.manifest DEL /F /Q $full.manifest
|
||||
IF EXIST \$@ DEL /F /Q \$@
|
||||
\$(LD) \$(LDFLAGS) \$(LIB_LDFLAGS) \\
|
||||
/implib:$import \$(LDOUTFLAG)$dll$shared_def @<< || (DEL /Q \$(\@B).* $import && EXIT 1)
|
||||
$objs
|
||||
$linklibs\$(LIB_EX_LIBS)
|
||||
<<
|
||||
IF EXIST $dll.manifest \\
|
||||
\$(MT) \$(MTFLAGS) \$(MTINFLAG)$dll.manifest \$(MTOUTFLAG)$dll
|
||||
IF EXIST apps\\$dll DEL /Q /F apps\\$dll
|
||||
IF EXIST test\\$dll DEL /Q /F test\\$dll
|
||||
IF EXIST fuzz\\$dll DEL /Q /F fuzz\\$dll
|
||||
COPY $dll apps
|
||||
COPY $dll test
|
||||
COPY $dll fuzz
|
||||
EOF
|
||||
}
|
||||
sub obj2dso {
|
||||
my %args = @_;
|
||||
my $dso = $args{lib};
|
||||
my $dso_n = basename($dso);
|
||||
my @objs = map { (my $x = $_) =~ s|\.o$|$objext|; $x } @{$args{objs}};
|
||||
my @deps = compute_lib_depends(@{$args{deps}});
|
||||
my $objs = join("\n", @objs);
|
||||
my $linklibs = join("", map { "$_\n" } @deps);
|
||||
my $deps = join(" ", @objs, @deps);
|
||||
return <<"EOF";
|
||||
$dso$dsoext: $deps
|
||||
IF EXIST $dso$dsoext.manifest DEL /F /Q $dso$dsoext.manifest
|
||||
\$(LD) \$(LDFLAGS) \$(DSO_LDFLAGS) \$(LDOUTFLAG)$dso$dsoext /def:<< @<<
|
||||
LIBRARY $dso_n
|
||||
EXPORTS
|
||||
bind_engine @1
|
||||
v_check @2
|
||||
<<
|
||||
$objs
|
||||
$linklibs \$(DSO_EX_LIBS)
|
||||
<<
|
||||
IF EXIST $dso$dsoext.manifest \\
|
||||
\$(MT) \$(MTFLAGS) \$(MTINFLAG)$dso$dsoext.manifest \$(MTOUTFLAG)$dso$dsoext
|
||||
EOF
|
||||
}
|
||||
sub obj2lib {
|
||||
my %args = @_;
|
||||
my $lib = lib($args{lib});
|
||||
my @objs = map { (my $x = $_) =~ s|\.o$|$objext|; $x } @{$args{objs}};
|
||||
my $objs = join("\n", @objs);
|
||||
my $deps = join(" ", @objs);
|
||||
return <<"EOF";
|
||||
$lib: $deps
|
||||
\$(AR) \$(ARFLAGS) \$(AROUTFLAG)$lib @<<
|
||||
$objs
|
||||
<<
|
||||
EOF
|
||||
}
|
||||
sub obj2bin {
|
||||
my %args = @_;
|
||||
my $bin = $args{bin};
|
||||
my @objs = map { (my $x = $_) =~ s|\.o$|$objext|; $x } @{$args{objs}};
|
||||
my @deps = compute_lib_depends(@{$args{deps}});
|
||||
my $objs = join("\n", @objs);
|
||||
my $linklibs = join("", map { "$_\n" } @deps);
|
||||
my $deps = join(" ", @objs, @deps);
|
||||
return <<"EOF";
|
||||
$bin$exeext: $deps
|
||||
IF EXIST $bin$exeext.manifest DEL /F /Q $bin$exeext.manifest
|
||||
\$(LD) \$(LDFLAGS) \$(BIN_LDFLAGS) \$(LDOUTFLAG)$bin$exeext @<<
|
||||
$objs
|
||||
setargv.obj
|
||||
$linklibs\$(BIN_EX_LIBS)
|
||||
<<
|
||||
IF EXIST $bin$exeext.manifest \\
|
||||
\$(MT) \$(MTFLAGS) \$(MTINFLAG)$bin$exeext.manifest \$(MTOUTFLAG)$bin$exeext
|
||||
EOF
|
||||
}
|
||||
sub in2script {
|
||||
my %args = @_;
|
||||
my $script = $args{script};
|
||||
my $sources = '"'.join('" "', @{$args{sources}}).'"';
|
||||
my $dofile = abs2rel(rel2abs(catfile($config{sourcedir},
|
||||
"util", "dofile.pl")),
|
||||
rel2abs($config{builddir}));
|
||||
return <<"EOF";
|
||||
$script: $sources
|
||||
"\$(PERL)" "-I\$(BLDDIR)" -Mconfigdata "$dofile" \\
|
||||
"-o$target{build_file}" $sources > "$script"
|
||||
EOF
|
||||
}
|
||||
sub generatedir {
|
||||
my %args = @_;
|
||||
my $dir = $args{dir};
|
||||
my @deps = map { s|\.o$|$objext|; $_ } @{$args{deps}};
|
||||
my @actions = ();
|
||||
my %extinfo = ( dso => $dsoext,
|
||||
lib => $libext,
|
||||
bin => $exeext );
|
||||
|
||||
# We already have a 'test' target, and the top directory is just plain
|
||||
# silly
|
||||
return if $dir eq "test" || $dir eq ".";
|
||||
|
||||
foreach my $type (("dso", "lib", "bin", "script")) {
|
||||
next unless defined($unified_info{dirinfo}->{$dir}->{products}->{$type});
|
||||
# For lib object files, we could update the library. However,
|
||||
# LIB on Windows doesn't work that way, so we won't create any
|
||||
# actions for it, and the dependencies are already taken care of.
|
||||
if ($type ne "lib") {
|
||||
foreach my $prod (@{$unified_info{dirinfo}->{$dir}->{products}->{$type}}) {
|
||||
if (dirname($prod) eq $dir) {
|
||||
push @deps, $prod.$extinfo{$type};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
my $deps = join(" ", @deps);
|
||||
my $actions = join("\n", "", @actions);
|
||||
return <<"EOF";
|
||||
$dir $dir\\ : $deps$actions
|
||||
EOF
|
||||
}
|
||||
"" # Important! This becomes part of the template result.
|
||||
-}
|
||||
2
FAQ
Normal file
2
FAQ
Normal file
@@ -0,0 +1,2 @@
|
||||
The FAQ is now maintained on the web:
|
||||
https://www.openssl.org/docs/faq.html
|
||||
125
LICENSE
Normal file
125
LICENSE
Normal file
@@ -0,0 +1,125 @@
|
||||
|
||||
LICENSE ISSUES
|
||||
==============
|
||||
|
||||
The OpenSSL toolkit stays under a double license, i.e. both the conditions of
|
||||
the OpenSSL License and the original SSLeay license apply to the toolkit.
|
||||
See below for the actual license texts.
|
||||
|
||||
OpenSSL License
|
||||
---------------
|
||||
|
||||
/* ====================================================================
|
||||
* Copyright (c) 1998-2018 The OpenSSL Project. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* 3. All advertising materials mentioning features or use of this
|
||||
* software must display the following acknowledgment:
|
||||
* "This product includes software developed by the OpenSSL Project
|
||||
* for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
|
||||
*
|
||||
* 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
|
||||
* endorse or promote products derived from this software without
|
||||
* prior written permission. For written permission, please contact
|
||||
* openssl-core@openssl.org.
|
||||
*
|
||||
* 5. Products derived from this software may not be called "OpenSSL"
|
||||
* nor may "OpenSSL" appear in their names without prior written
|
||||
* permission of the OpenSSL Project.
|
||||
*
|
||||
* 6. Redistributions of any form whatsoever must retain the following
|
||||
* acknowledgment:
|
||||
* "This product includes software developed by the OpenSSL Project
|
||||
* for use in the OpenSSL Toolkit (http://www.openssl.org/)"
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
|
||||
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
|
||||
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* ====================================================================
|
||||
*
|
||||
* This product includes cryptographic software written by Eric Young
|
||||
* (eay@cryptsoft.com). This product includes software written by Tim
|
||||
* Hudson (tjh@cryptsoft.com).
|
||||
*
|
||||
*/
|
||||
|
||||
Original SSLeay License
|
||||
-----------------------
|
||||
|
||||
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
|
||||
* All rights reserved.
|
||||
*
|
||||
* This package is an SSL implementation written
|
||||
* by Eric Young (eay@cryptsoft.com).
|
||||
* The implementation was written so as to conform with Netscapes SSL.
|
||||
*
|
||||
* This library is free for commercial and non-commercial use as long as
|
||||
* the following conditions are aheared to. The following conditions
|
||||
* apply to all code found in this distribution, be it the RC4, RSA,
|
||||
* lhash, DES, etc., code; not just the SSL code. The SSL documentation
|
||||
* included with this distribution is covered by the same copyright terms
|
||||
* except that the holder is Tim Hudson (tjh@cryptsoft.com).
|
||||
*
|
||||
* Copyright remains Eric Young's, and as such any Copyright notices in
|
||||
* the code are not to be removed.
|
||||
* If this package is used in a product, Eric Young should be given attribution
|
||||
* as the author of the parts of the library used.
|
||||
* This can be in the form of a textual message at program startup or
|
||||
* in documentation (online or textual) provided with the package.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* "This product includes cryptographic software written by
|
||||
* Eric Young (eay@cryptsoft.com)"
|
||||
* The word 'cryptographic' can be left out if the rouines from the library
|
||||
* being used are not cryptographic related :-).
|
||||
* 4. If you include any Windows specific code (or a derivative thereof) from
|
||||
* the apps directory (application code) you must include an acknowledgement:
|
||||
* "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* The licence and distribution terms for any publically available version or
|
||||
* derivative of this code cannot be changed. i.e. this code cannot simply be
|
||||
* copied and put under another distribution licence
|
||||
* [including the GNU Public Licence.]
|
||||
*/
|
||||
|
||||
456
Makefile.in
456
Makefile.in
@@ -1,456 +0,0 @@
|
||||
# Makefile.in --
|
||||
#
|
||||
# This file is a Makefile for Sample TEA Extension. If it has the name
|
||||
# "Makefile.in" then it is a template for a Makefile; to generate the
|
||||
# actual Makefile, run "./configure", which is a configuration script
|
||||
# generated by the "autoconf" program (constructs like "@foo@" will get
|
||||
# replaced in the actual Makefile.
|
||||
#
|
||||
# Copyright (c) 1999 Scriptics Corporation.
|
||||
# Copyright 2004 ActiveState
|
||||
#
|
||||
# See the file "license.terms" for information on usage and redistribution
|
||||
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
#
|
||||
# RCS: @(#) $Id: Makefile.in,v 1.5 2006/11/16 22:33:42 hobbs Exp $
|
||||
|
||||
#========================================================================
|
||||
# Nothing of the variables below this line need to be changed. Please
|
||||
# check the TARGETS section below to make sure the make targets are
|
||||
# correct.
|
||||
#========================================================================
|
||||
|
||||
#========================================================================
|
||||
# The names of the source files is defined in the configure script.
|
||||
# The object files are used for linking into the final library.
|
||||
# This will be used when a dist target is added to the Makefile.
|
||||
# It is not important to specify the directory, as long as it is the
|
||||
# $(srcdir) or in the generic, win or unix subdirectory.
|
||||
#========================================================================
|
||||
|
||||
PKG_SOURCES = @PKG_SOURCES@
|
||||
PKG_OBJECTS = @PKG_OBJECTS@
|
||||
|
||||
#========================================================================
|
||||
# PKG_TCL_SOURCES identifies Tcl runtime files that are associated with
|
||||
# this package that need to be installed, if any.
|
||||
#========================================================================
|
||||
|
||||
PKG_TCL_SOURCES = \
|
||||
library/Init.tcl library/Balloon.tcl library/BtnBox.tcl \
|
||||
library/CObjView.tcl library/ChkList.tcl library/ComboBox.tcl \
|
||||
library/Compat.tcl library/Console.tcl library/Control.tcl \
|
||||
library/DefSchm.tcl library/DialogS.tcl library/DirBox.tcl \
|
||||
library/DirDlg.tcl library/DirList.tcl library/DirTree.tcl \
|
||||
library/DragDrop.tcl library/DtlList.tcl library/EFileBox.tcl \
|
||||
library/EFileDlg.tcl library/Event.tcl library/FileBox.tcl \
|
||||
library/FileCbx.tcl library/FileDlg.tcl \
|
||||
library/FileEnt.tcl library/FloatEnt.tcl library/Grid.tcl \
|
||||
library/HList.tcl library/HListDD.tcl library/IconView.tcl \
|
||||
library/LabEntry.tcl library/LabFrame.tcl library/LabWidg.tcl \
|
||||
library/ListNBk.tcl library/Meter.tcl library/MultView.tcl \
|
||||
library/NoteBook.tcl library/OldUtil.tcl library/OptMenu.tcl \
|
||||
library/PanedWin.tcl library/PopMenu.tcl library/Primitiv.tcl \
|
||||
library/ResizeH.tcl library/SGrid.tcl library/SHList.tcl \
|
||||
library/SListBox.tcl library/STList.tcl library/SText.tcl \
|
||||
library/SWidget.tcl library/SWindow.tcl library/Select.tcl \
|
||||
library/Shell.tcl library/SimpDlg.tcl library/StackWin.tcl \
|
||||
library/StatBar.tcl library/StdBBox.tcl library/StdShell.tcl \
|
||||
library/TList.tcl library/Tix.tcl library/Tree.tcl \
|
||||
library/Utils.tcl library/VResize.tcl library/VStack.tcl \
|
||||
library/VTree.tcl library/Variable.tcl \
|
||||
library/WInfo.tcl library/fs.tcl
|
||||
|
||||
#========================================================================
|
||||
# This is a list of public header files to be installed, if any.
|
||||
#========================================================================
|
||||
|
||||
PKG_HEADERS = @PKG_HEADERS@
|
||||
|
||||
PKG_EXTRA_FILES = license.terms README.txt
|
||||
|
||||
PKG_MAN_PAGES =
|
||||
|
||||
#========================================================================
|
||||
# "PKG_LIB_FILE" refers to the library (dynamic or static as per
|
||||
# configuration options) composed of the named objects.
|
||||
#========================================================================
|
||||
|
||||
PKG_LIB_FILE = @PKG_LIB_FILE@
|
||||
PKG_STUB_LIB_FILE = @PKG_STUB_LIB_FILE@
|
||||
|
||||
lib_BINARIES = $(PKG_LIB_FILE)
|
||||
BINARIES = $(lib_BINARIES)
|
||||
|
||||
SHELL = @SHELL@
|
||||
|
||||
srcdir = @srcdir@
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
|
||||
bindir = @bindir@
|
||||
libdir = @libdir@
|
||||
datadir = @datadir@
|
||||
mandir = @mandir@
|
||||
includedir = @includedir@
|
||||
|
||||
DESTDIR =
|
||||
|
||||
PKG_DIR = $(PACKAGE_NAME)$(PACKAGE_VERSION)
|
||||
pkgdatadir = $(datadir)/$(PKG_DIR)
|
||||
pkglibdir = $(libdir)/$(PKG_DIR)
|
||||
pkgincludedir = $(includedir)/$(PKG_DIR)
|
||||
|
||||
top_builddir = .
|
||||
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
CC = @CC@
|
||||
CFLAGS_DEFAULT = @CFLAGS_DEFAULT@
|
||||
CFLAGS_WARNING = @CFLAGS_WARNING@
|
||||
CLEANFILES = @CLEANFILES@
|
||||
EXEEXT = @EXEEXT@
|
||||
LDFLAGS_DEFAULT = @LDFLAGS_DEFAULT@
|
||||
MAKE_LIB = @MAKE_LIB@
|
||||
MAKE_SHARED_LIB = @MAKE_SHARED_LIB@
|
||||
MAKE_STATIC_LIB = @MAKE_STATIC_LIB@
|
||||
MAKE_STUB_LIB = @MAKE_STUB_LIB@
|
||||
OBJEXT = @OBJEXT@
|
||||
RANLIB = @RANLIB@
|
||||
RANLIB_STUB = @RANLIB_STUB@
|
||||
SHLIB_CFLAGS = @SHLIB_CFLAGS@
|
||||
SHLIB_LD = @SHLIB_LD@
|
||||
SHLIB_LD_FLAGS = @SHLIB_LD_FLAGS@
|
||||
SHLIB_LD_LIBS = @SHLIB_LD_LIBS@
|
||||
STLIB_LD = @STLIB_LD@
|
||||
TCL_DEFS = @TCL_DEFS@
|
||||
TCL_SRC_DIR = @TCL_SRC_DIR@
|
||||
TCL_BIN_DIR = @TCL_BIN_DIR@
|
||||
TK_SRC_DIR = @TK_SRC_DIR@
|
||||
TK_BIN_DIR = @TK_BIN_DIR@
|
||||
|
||||
# Not used by sample, but retained for reference of what Tcl required
|
||||
TCL_LIBS = @TCL_LIBS@
|
||||
TK_LIBS = @TK_LIBS@
|
||||
|
||||
#========================================================================
|
||||
# TCLLIBPATH seeds the auto_path in Tcl's init.tcl so we can test our
|
||||
# package without installing. The other environment variables allow us
|
||||
# to test against an uninstalled Tcl. Add special env vars that you
|
||||
# require for testing here (like TCLX_LIBRARY).
|
||||
#========================================================================
|
||||
|
||||
EXTRA_PATH = $(top_builddir):$(TCL_BIN_DIR):$(TK_BIN_DIR)
|
||||
TCLSH_ENV = TCL_LIBRARY=`@CYGPATH@ $(TCL_SRC_DIR)/library` \
|
||||
TK_LIBRARY=`@CYGPATH@ $(TK_SRC_DIR)/library` \
|
||||
TIX_LIBRARY=`@CYGPATH@ $(srcdir)/library` \
|
||||
@LD_LIBRARY_PATH_VAR@="$(EXTRA_PATH):$(@LD_LIBRARY_PATH_VAR@)" \
|
||||
PATH="$(EXTRA_PATH):$(PATH)" \
|
||||
TCLLIBPATH="$(top_builddir)"
|
||||
TCLSH_PROG = @TCLSH_PROG@
|
||||
WISH_PROG = @WISH_PROG@
|
||||
TCLSH = $(TCLSH_ENV) $(TCLSH_PROG)
|
||||
WISH = $(TCLSH_ENV) $(WISH_PROG)
|
||||
|
||||
# The local includes must come first, because the TK_XINCLUDES can be
|
||||
# just a comment
|
||||
INCLUDES = @PKG_INCLUDES@ \
|
||||
@TCL_INCLUDES@ @TK_INCLUDES@ @TK_XINCLUDES@
|
||||
|
||||
PKG_CFLAGS = @PKG_CFLAGS@
|
||||
|
||||
DEFS = @DEFS@ $(PKG_CFLAGS)
|
||||
|
||||
CONFIG_CLEAN_FILES = Makefile
|
||||
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
LIBS = @PKG_LIBS@ @LIBS@
|
||||
AR = ar
|
||||
CFLAGS = @CFLAGS@
|
||||
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
|
||||
#========================================================================
|
||||
# Start of user-definable TARGETS section
|
||||
#========================================================================
|
||||
|
||||
#========================================================================
|
||||
# TEA TARGETS. Please note that the "libraries:" target refers to platform
|
||||
# independent files, and the "binaries:" target inclues executable programs and
|
||||
# platform-dependent libraries. Modify these targets so that they install
|
||||
# the various pieces of your package. The make and install rules
|
||||
# for the BINARIES that you specified above have already been done.
|
||||
#========================================================================
|
||||
|
||||
all: binaries libraries doc
|
||||
|
||||
#========================================================================
|
||||
# The binaries target builds executable programs, Windows .dll's, unix
|
||||
# shared/static libraries, and any other platform-dependent files.
|
||||
# The list of targets to build for "binaries:" is specified at the top
|
||||
# of the Makefile, in the "BINARIES" variable.
|
||||
#========================================================================
|
||||
|
||||
binaries: $(BINARIES) pkgIndex.tcl
|
||||
|
||||
libraries:
|
||||
|
||||
doc:
|
||||
|
||||
install: all install-binaries install-libraries install-doc
|
||||
|
||||
install-binaries: binaries install-lib-binaries install-bin-binaries
|
||||
@mkdir -p $(DESTDIR)$(pkglibdir)
|
||||
$(INSTALL_DATA) pkgIndex.tcl $(DESTDIR)$(pkglibdir)
|
||||
@list='$(PKG_EXTRA_FILES)'; for p in $$list; do \
|
||||
if test -f $(srcdir)/$$p; then \
|
||||
destp=`basename $$p`; \
|
||||
echo " Install $$destp $(DESTDIR)$(pkglibdir)/$$destp"; \
|
||||
$(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(pkglibdir)/$$destp; \
|
||||
fi; \
|
||||
done
|
||||
|
||||
#========================================================================
|
||||
# This rule installs platform-independent files, such as header files.
|
||||
#========================================================================
|
||||
|
||||
install-libraries: libraries
|
||||
|
||||
#========================================================================
|
||||
# Install documentation. Unix manpages should go in the $(mandir)
|
||||
# directory.
|
||||
#========================================================================
|
||||
|
||||
install-doc: doc
|
||||
@mkdir -p $(DESTDIR)$(pkglibdir)/html
|
||||
@list='$(PKG_MAN_PAGES)'; for p in $$list; do \
|
||||
html=`basename $$p|sed -e 's/.[^.]*$$//'`.html; \
|
||||
$(INSTALL_DATA) $(srcdir)/doc/$$html $(DESTDIR)$(pkglibdir)/html/; \
|
||||
done
|
||||
|
||||
html:
|
||||
@cd $(srcdir)/doc; \
|
||||
list='$(PKG_MAN_PAGES)'; for p in $$list; do \
|
||||
html=`basename $$p|sed -e 's/.[^.]*$$//'`.html; \
|
||||
echo "Creating \"$$html\" from \"$$p\""; \
|
||||
rm -f $$html; \
|
||||
nroff -man $$p | rman -f HTML > $$html; \
|
||||
done
|
||||
|
||||
# Piping to cat is necessary on Windows to see the output, and
|
||||
# harmless on Unix
|
||||
test: binaries libraries
|
||||
$(WISH) `@CYGPATH@ $(srcdir)/tests/all.tcl` $(TESTFLAGS) | cat
|
||||
|
||||
shell: binaries libraries
|
||||
@$(WISH) $(SCRIPT)
|
||||
|
||||
demo: binaries libraries
|
||||
$(WISH) `@CYGPATH@ $(srcdir)/demos/tixwidgets.tcl` $(TESTFLAGS) | cat
|
||||
|
||||
gdb:
|
||||
$(TCLSH_ENV) gdb $(WISH_PROG) $(SCRIPT)
|
||||
|
||||
depend:
|
||||
|
||||
#========================================================================
|
||||
# $(PKG_LIB_FILE) should be listed as part of the BINARIES variable
|
||||
# mentioned above. That will ensure that this target is built when you
|
||||
# run "make binaries".
|
||||
#
|
||||
# The $(PKG_OBJECTS) objects are created and linked into the final
|
||||
# library. In most cases these object files will correspond to the
|
||||
# source files above.
|
||||
#========================================================================
|
||||
|
||||
$(PKG_LIB_FILE): $(PKG_OBJECTS)
|
||||
-rm -f $(PKG_LIB_FILE)
|
||||
${MAKE_LIB}
|
||||
$(RANLIB) $(PKG_LIB_FILE)
|
||||
|
||||
#========================================================================
|
||||
# In the following lines, $(srcdir) refers to the toplevel directory
|
||||
# containing your extension. If your sources are in a subdirectory,
|
||||
# you will have to modify the paths to reflect this:
|
||||
#
|
||||
# tkpkg.$(OBJEXT): $(srcdir)/src/win/tkpkg.c
|
||||
# $(COMPILE) -c `@CYGPATH@ $(srcdir)/generic/tkpkg.c` -o $@
|
||||
#
|
||||
# Setting the VPATH variable to a list of paths will cause the
|
||||
# makefile to look into these paths when resolving .c to .obj
|
||||
# dependencies.
|
||||
#========================================================================
|
||||
|
||||
VPATH = $(srcdir):$(srcdir)/generic:$(srcdir)/unix:$(srcdir)/win
|
||||
|
||||
.SUFFIXES: .c .$(OBJEXT)
|
||||
|
||||
.c.@OBJEXT@:
|
||||
$(COMPILE) -c `@CYGPATH@ $<`
|
||||
|
||||
pkgIndex.tcl:
|
||||
(\
|
||||
echo 'if {[catch {package require Tcl 8.4}]} return';\
|
||||
echo 'package ifneeded $(PACKAGE_NAME) $(PACKAGE_VERSION) \
|
||||
[list load [file join $$dir $(PKG_LIB_FILE)] $(PACKAGE_NAME)]'\
|
||||
) > pkgIndex.tcl
|
||||
|
||||
#========================================================================
|
||||
# End of user-definable section
|
||||
#========================================================================
|
||||
|
||||
#========================================================================
|
||||
# Don't modify the file to clean here. Instead, set the "CLEANFILES"
|
||||
# variable in configure.in
|
||||
#========================================================================
|
||||
|
||||
clean:
|
||||
-test -z "$(BINARIES)" || rm -f $(BINARIES)
|
||||
-rm -f *.$(OBJEXT) core *.core
|
||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||
|
||||
distclean: clean
|
||||
-rm -f *.tab.c
|
||||
-rm -f $(CONFIG_CLEAN_FILES)
|
||||
-rm -f config.cache config.log config.status
|
||||
|
||||
#========================================================================
|
||||
# Install binary object libraries. On Windows this includes both .dll and
|
||||
# .lib files. Because the .lib files are not explicitly listed anywhere,
|
||||
# we need to deduce their existence from the .dll file of the same name.
|
||||
#
|
||||
# You should not have to modify this target.
|
||||
#========================================================================
|
||||
|
||||
install-lib-binaries:
|
||||
@mkdir -p $(DESTDIR)$(pkglibdir)
|
||||
@list='$(lib_BINARIES)'; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p"; \
|
||||
$(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p; \
|
||||
echo " $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p"; \
|
||||
$(RANLIB) $(DESTDIR)$(pkglibdir)/$$p; \
|
||||
ext=`echo $$p|sed -e "s/.*\.//"`; \
|
||||
if test "x$$ext" = "xdll"; then \
|
||||
lib=`basename $$p|sed -e 's/.[^.]*$$//'`.lib; \
|
||||
if test -f $$lib; then \
|
||||
echo " $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib"; \
|
||||
$(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib; \
|
||||
fi; \
|
||||
fi; \
|
||||
fi; \
|
||||
done
|
||||
@echo "Installing library files to $(DESTDIR)$(pkglibdir)/$$destp";
|
||||
@list='$(PKG_TCL_SOURCES)'; for p in $$list; do \
|
||||
if test -f $(srcdir)/$$p; then \
|
||||
destp=`basename $$p`; \
|
||||
$(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(pkglibdir)/$$destp; \
|
||||
fi; \
|
||||
done
|
||||
@echo "Installing preference sets to $(DESTDIR)$(pkglibdir)/pref"
|
||||
@mkdir -p $(DESTDIR)$(pkglibdir)/pref
|
||||
@cp -p $(srcdir)/library/pref/*.* $(DESTDIR)$(pkglibdir)/pref/
|
||||
@echo "Installing bitmaps to $(DESTDIR)$(pkglibdir)/bitmaps"
|
||||
@mkdir -p $(DESTDIR)$(pkglibdir)/bitmaps
|
||||
@cp -p $(srcdir)/library/bitmaps/*.* $(DESTDIR)$(pkglibdir)/bitmaps/
|
||||
|
||||
#========================================================================
|
||||
# Install binary executables (e.g. .exe files)
|
||||
#
|
||||
# You should not have to modify this target.
|
||||
#========================================================================
|
||||
|
||||
install-bin-binaries:
|
||||
@mkdir -p $(DESTDIR)$(bindir)
|
||||
@list='$(bin_BINARIES)'; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p"; \
|
||||
$(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p; \
|
||||
fi; \
|
||||
done
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
uninstall-binaries:
|
||||
list='$(lib_BINARIES)'; for p in $$list; do \
|
||||
rm -f $(DESTDIR)$(pkglibdir)/$$p; \
|
||||
done
|
||||
list='$(PKG_TCL_SOURCES)'; for p in $$list; do \
|
||||
p=`basename $$p`; \
|
||||
rm -f $(DESTDIR)$(pkglibdir)/$$p; \
|
||||
done
|
||||
list='$(bin_BINARIES)'; for p in $$list; do \
|
||||
rm -f $(DESTDIR)$(bindir)/$$p; \
|
||||
done
|
||||
|
||||
#========================================================================
|
||||
# Starkit creation - requires ActiveTcl or compatible tclsh
|
||||
# You should not have to modify this target.
|
||||
#========================================================================
|
||||
|
||||
STARKIT_EXT = .kit.tcl
|
||||
STARKIT_TCLSH = $(TCLSH)
|
||||
STARKIT_BASE = tclsh
|
||||
STARKIT = $(PACKAGE_NAME)$(STARKIT_EXT)
|
||||
|
||||
starkit-clean:
|
||||
rm -f $(STARKIT)
|
||||
|
||||
starkit: starkit-clean
|
||||
@echo "Building $(STARKIT)"
|
||||
(\
|
||||
echo 'package require vfs'; \
|
||||
echo 'package require Mk4tcl'; \
|
||||
echo ''; \
|
||||
echo 'set HEADER {#!/bin/sh';\
|
||||
echo '# \\'; \
|
||||
echo 'exec %1s "$$0" $${1+"$$@"}'; \
|
||||
echo 'package require starkit'; \
|
||||
echo 'starkit::header mk4 -readonly}'; \
|
||||
echo ''; \
|
||||
echo 'set HEADER [format "$$HEADER\n%c" [file tail [info nameofexe]] 0x1a]'; \
|
||||
echo 'set file "$(STARKIT)"'; \
|
||||
echo 'set fid [open $$file w]'; \
|
||||
echo 'puts $$fid $$HEADER'; \
|
||||
echo 'close $$fid'; \
|
||||
echo ''; \
|
||||
echo 'vfs::mk4::Mount $$file $$file'; \
|
||||
echo 'file copy $(PKG_LIB_FILE) $$file/'; \
|
||||
echo 'vfs::unmount $$file'; \
|
||||
) | $(STARKIT_TCLSH)
|
||||
|
||||
#========================================================================
|
||||
# Distribution creation
|
||||
# You should not have to modify this target.
|
||||
#========================================================================
|
||||
|
||||
TAR = tar
|
||||
#COMPRESS = $(TAR) cvf $(PKG_DIR)-src.tar $(PKG_DIR); compress $(PKG_DIR).tar
|
||||
COMPRESS = $(TAR) zcvf $(PKG_DIR)-src.tar.gz $(PKG_DIR)
|
||||
DIST_ROOT = /tmp/dist
|
||||
DIST_DIR = $(DIST_ROOT)/$(PKG_DIR)
|
||||
|
||||
dist-clean:
|
||||
rm -rf $(DIST_DIR) $(DIST_ROOT)/$(PKG_DIR)-src.tar.*
|
||||
|
||||
dist: dist-clean
|
||||
mkdir -p $(DIST_DIR)
|
||||
cp -pr $(srcdir)/* $(DIST_DIR)/
|
||||
chmod 664 $(DIST_DIR)/Makefile.in $(DIST_DIR)/aclocal.m4
|
||||
chmod 775 $(DIST_DIR)/configure $(DIST_DIR)/configure.in
|
||||
|
||||
find $(DIST_DIR) -type d -name CVS | xargs rm -rf
|
||||
|
||||
(cd $(DIST_ROOT); $(COMPRESS);)
|
||||
|
||||
.PHONY: all binaries clean depend distclean doc install libraries test
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
925
NEWS
Normal file
925
NEWS
Normal file
@@ -0,0 +1,925 @@
|
||||
|
||||
NEWS
|
||||
====
|
||||
|
||||
This file gives a brief overview of the major changes between each OpenSSL
|
||||
release. For more details please read the CHANGES file.
|
||||
|
||||
Major changes between OpenSSL 1.1.1 and OpenSSL 1.1.1a [20 Nov 2018]
|
||||
|
||||
o Timing vulnerability in DSA signature generation (CVE-2018-0734)
|
||||
o Timing vulnerability in ECDSA signature generation (CVE-2018-0735)
|
||||
|
||||
Major changes between OpenSSL 1.1.0i and OpenSSL 1.1.1 [11 Sep 2018]
|
||||
|
||||
o Support for TLSv1.3 added (see https://wiki.openssl.org/index.php/TLS1.3
|
||||
for further important information). The TLSv1.3 implementation includes:
|
||||
o Fully compliant implementation of RFC8446 (TLSv1.3) on by default
|
||||
o Early data (0-RTT)
|
||||
o Post-handshake authentication and key update
|
||||
o Middlebox Compatibility Mode
|
||||
o TLSv1.3 PSKs
|
||||
o Support for all five RFC8446 ciphersuites
|
||||
o RSA-PSS signature algorithms (backported to TLSv1.2)
|
||||
o Configurable session ticket support
|
||||
o Stateless server support
|
||||
o Rewrite of the packet construction code for "safer" packet handling
|
||||
o Rewrite of the extension handling code
|
||||
o Complete rewrite of the OpenSSL random number generator to introduce the
|
||||
following capabilities
|
||||
o The default RAND method now utilizes an AES-CTR DRBG according to
|
||||
NIST standard SP 800-90Ar1.
|
||||
o Support for multiple DRBG instances with seed chaining.
|
||||
o There is a public and private DRBG instance.
|
||||
o The DRBG instances are fork-safe.
|
||||
o Keep all global DRBG instances on the secure heap if it is enabled.
|
||||
o The public and private DRBG instance are per thread for lock free
|
||||
operation
|
||||
o Support for various new cryptographic algorithms including:
|
||||
o SHA3
|
||||
o SHA512/224 and SHA512/256
|
||||
o EdDSA (both Ed25519 and Ed448) including X509 and TLS support
|
||||
o X448 (adding to the existing X25519 support in 1.1.0)
|
||||
o Multi-prime RSA
|
||||
o SM2
|
||||
o SM3
|
||||
o SM4
|
||||
o SipHash
|
||||
o ARIA (including TLS support)
|
||||
o Significant Side-Channel attack security improvements
|
||||
o Add a new ClientHello callback to provide the ability to adjust the SSL
|
||||
object at an early stage.
|
||||
o Add 'Maximum Fragment Length' TLS extension negotiation and support
|
||||
o A new STORE module, which implements a uniform and URI based reader of
|
||||
stores that can contain keys, certificates, CRLs and numerous other
|
||||
objects.
|
||||
o Move the display of configuration data to configdata.pm.
|
||||
o Allow GNU style "make variables" to be used with Configure.
|
||||
o Claim the namespaces OSSL and OPENSSL, represented as symbol prefixes
|
||||
o Rewrite of devcrypto engine
|
||||
|
||||
Major changes between OpenSSL 1.1.0h and OpenSSL 1.1.0i [under development]
|
||||
|
||||
o Client DoS due to large DH parameter (CVE-2018-0732)
|
||||
o Cache timing vulnerability in RSA Key Generation (CVE-2018-0737)
|
||||
|
||||
Major changes between OpenSSL 1.1.0g and OpenSSL 1.1.0h [under development]
|
||||
|
||||
o Constructed ASN.1 types with a recursive definition could exceed the
|
||||
stack (CVE-2018-0739)
|
||||
o Incorrect CRYPTO_memcmp on HP-UX PA-RISC (CVE-2018-0733)
|
||||
o rsaz_1024_mul_avx2 overflow bug on x86_64 (CVE-2017-3738)
|
||||
|
||||
Major changes between OpenSSL 1.1.0f and OpenSSL 1.1.0g [2 Nov 2017]
|
||||
|
||||
o bn_sqrx8x_internal carry bug on x86_64 (CVE-2017-3736)
|
||||
o Malformed X.509 IPAddressFamily could cause OOB read (CVE-2017-3735)
|
||||
|
||||
Major changes between OpenSSL 1.1.0e and OpenSSL 1.1.0f [25 May 2017]
|
||||
|
||||
o config now recognises 64-bit mingw and chooses mingw64 instead of mingw
|
||||
|
||||
Major changes between OpenSSL 1.1.0d and OpenSSL 1.1.0e [16 Feb 2017]
|
||||
|
||||
o Encrypt-Then-Mac renegotiation crash (CVE-2017-3733)
|
||||
|
||||
Major changes between OpenSSL 1.1.0c and OpenSSL 1.1.0d [26 Jan 2017]
|
||||
|
||||
o Truncated packet could crash via OOB read (CVE-2017-3731)
|
||||
o Bad (EC)DHE parameters cause a client crash (CVE-2017-3730)
|
||||
o BN_mod_exp may produce incorrect results on x86_64 (CVE-2017-3732)
|
||||
|
||||
Major changes between OpenSSL 1.1.0b and OpenSSL 1.1.0c [10 Nov 2016]
|
||||
|
||||
o ChaCha20/Poly1305 heap-buffer-overflow (CVE-2016-7054)
|
||||
o CMS Null dereference (CVE-2016-7053)
|
||||
o Montgomery multiplication may produce incorrect results (CVE-2016-7055)
|
||||
|
||||
Major changes between OpenSSL 1.1.0a and OpenSSL 1.1.0b [26 Sep 2016]
|
||||
|
||||
o Fix Use After Free for large message sizes (CVE-2016-6309)
|
||||
|
||||
Major changes between OpenSSL 1.1.0 and OpenSSL 1.1.0a [22 Sep 2016]
|
||||
|
||||
o OCSP Status Request extension unbounded memory growth (CVE-2016-6304)
|
||||
o SSL_peek() hang on empty record (CVE-2016-6305)
|
||||
o Excessive allocation of memory in tls_get_message_header()
|
||||
(CVE-2016-6307)
|
||||
o Excessive allocation of memory in dtls1_preprocess_fragment()
|
||||
(CVE-2016-6308)
|
||||
|
||||
Major changes between OpenSSL 1.0.2h and OpenSSL 1.1.0 [25 Aug 2016]
|
||||
|
||||
o Copyright text was shrunk to a boilerplate that points to the license
|
||||
o "shared" builds are now the default when possible
|
||||
o Added support for "pipelining"
|
||||
o Added the AFALG engine
|
||||
o New threading API implemented
|
||||
o Support for ChaCha20 and Poly1305 added to libcrypto and libssl
|
||||
o Support for extended master secret
|
||||
o CCM ciphersuites
|
||||
o Reworked test suite, now based on perl, Test::Harness and Test::More
|
||||
o *Most* libcrypto and libssl public structures were made opaque,
|
||||
including:
|
||||
BIGNUM and associated types, EC_KEY and EC_KEY_METHOD,
|
||||
DH and DH_METHOD, DSA and DSA_METHOD, RSA and RSA_METHOD,
|
||||
BIO and BIO_METHOD, EVP_MD_CTX, EVP_MD, EVP_CIPHER_CTX,
|
||||
EVP_CIPHER, EVP_PKEY and associated types, HMAC_CTX,
|
||||
X509, X509_CRL, X509_OBJECT, X509_STORE_CTX, X509_STORE,
|
||||
X509_LOOKUP, X509_LOOKUP_METHOD
|
||||
o libssl internal structures made opaque
|
||||
o SSLv2 support removed
|
||||
o Kerberos ciphersuite support removed
|
||||
o RC4 removed from DEFAULT ciphersuites in libssl
|
||||
o 40 and 56 bit cipher support removed from libssl
|
||||
o All public header files moved to include/openssl, no more symlinking
|
||||
o SSL/TLS state machine, version negotiation and record layer rewritten
|
||||
o EC revision: now operations use new EC_KEY_METHOD.
|
||||
o Support for OCB mode added to libcrypto
|
||||
o Support for asynchronous crypto operations added to libcrypto and libssl
|
||||
o Deprecated interfaces can now be disabled at build time either
|
||||
relative to the latest release via the "no-deprecated" Configure
|
||||
argument, or via the "--api=1.1.0|1.0.0|0.9.8" option.
|
||||
o Application software can be compiled with -DOPENSSL_API_COMPAT=version
|
||||
to ensure that features deprecated in that version are not exposed.
|
||||
o Support for RFC6698/RFC7671 DANE TLSA peer authentication
|
||||
o Change of Configure to use --prefix as the main installation
|
||||
directory location rather than --openssldir. The latter becomes
|
||||
the directory for certs, private key and openssl.cnf exclusively.
|
||||
o Reworked BIO networking library, with full support for IPv6.
|
||||
o New "unified" build system
|
||||
o New security levels
|
||||
o Support for scrypt algorithm
|
||||
o Support for X25519
|
||||
o Extended SSL_CONF support using configuration files
|
||||
o KDF algorithm support. Implement TLS PRF as a KDF.
|
||||
o Support for Certificate Transparency
|
||||
o HKDF support.
|
||||
|
||||
Major changes between OpenSSL 1.0.2g and OpenSSL 1.0.2h [3 May 2016]
|
||||
|
||||
o Prevent padding oracle in AES-NI CBC MAC check (CVE-2016-2107)
|
||||
o Fix EVP_EncodeUpdate overflow (CVE-2016-2105)
|
||||
o Fix EVP_EncryptUpdate overflow (CVE-2016-2106)
|
||||
o Prevent ASN.1 BIO excessive memory allocation (CVE-2016-2109)
|
||||
o EBCDIC overread (CVE-2016-2176)
|
||||
o Modify behavior of ALPN to invoke callback after SNI/servername
|
||||
callback, such that updates to the SSL_CTX affect ALPN.
|
||||
o Remove LOW from the DEFAULT cipher list. This removes singles DES from
|
||||
the default.
|
||||
o Only remove the SSLv2 methods with the no-ssl2-method option.
|
||||
|
||||
Major changes between OpenSSL 1.0.2f and OpenSSL 1.0.2g [1 Mar 2016]
|
||||
|
||||
o Disable weak ciphers in SSLv3 and up in default builds of OpenSSL.
|
||||
o Disable SSLv2 default build, default negotiation and weak ciphers
|
||||
(CVE-2016-0800)
|
||||
o Fix a double-free in DSA code (CVE-2016-0705)
|
||||
o Disable SRP fake user seed to address a server memory leak
|
||||
(CVE-2016-0798)
|
||||
o Fix BN_hex2bn/BN_dec2bn NULL pointer deref/heap corruption
|
||||
(CVE-2016-0797)
|
||||
o Fix memory issues in BIO_*printf functions (CVE-2016-0799)
|
||||
o Fix side channel attack on modular exponentiation (CVE-2016-0702)
|
||||
|
||||
Major changes between OpenSSL 1.0.2e and OpenSSL 1.0.2f [28 Jan 2016]
|
||||
|
||||
o DH small subgroups (CVE-2016-0701)
|
||||
o SSLv2 doesn't block disabled ciphers (CVE-2015-3197)
|
||||
|
||||
Major changes between OpenSSL 1.0.2d and OpenSSL 1.0.2e [3 Dec 2015]
|
||||
|
||||
o BN_mod_exp may produce incorrect results on x86_64 (CVE-2015-3193)
|
||||
o Certificate verify crash with missing PSS parameter (CVE-2015-3194)
|
||||
o X509_ATTRIBUTE memory leak (CVE-2015-3195)
|
||||
o Rewrite EVP_DecodeUpdate (base64 decoding) to fix several bugs
|
||||
o In DSA_generate_parameters_ex, if the provided seed is too short,
|
||||
return an error
|
||||
|
||||
Major changes between OpenSSL 1.0.2c and OpenSSL 1.0.2d [9 Jul 2015]
|
||||
|
||||
o Alternate chains certificate forgery (CVE-2015-1793)
|
||||
o Race condition handling PSK identify hint (CVE-2015-3196)
|
||||
|
||||
Major changes between OpenSSL 1.0.2b and OpenSSL 1.0.2c [12 Jun 2015]
|
||||
|
||||
o Fix HMAC ABI incompatibility
|
||||
|
||||
Major changes between OpenSSL 1.0.2a and OpenSSL 1.0.2b [11 Jun 2015]
|
||||
|
||||
o Malformed ECParameters causes infinite loop (CVE-2015-1788)
|
||||
o Exploitable out-of-bounds read in X509_cmp_time (CVE-2015-1789)
|
||||
o PKCS7 crash with missing EnvelopedContent (CVE-2015-1790)
|
||||
o CMS verify infinite loop with unknown hash function (CVE-2015-1792)
|
||||
o Race condition handling NewSessionTicket (CVE-2015-1791)
|
||||
|
||||
Major changes between OpenSSL 1.0.2 and OpenSSL 1.0.2a [19 Mar 2015]
|
||||
|
||||
o OpenSSL 1.0.2 ClientHello sigalgs DoS fix (CVE-2015-0291)
|
||||
o Multiblock corrupted pointer fix (CVE-2015-0290)
|
||||
o Segmentation fault in DTLSv1_listen fix (CVE-2015-0207)
|
||||
o Segmentation fault in ASN1_TYPE_cmp fix (CVE-2015-0286)
|
||||
o Segmentation fault for invalid PSS parameters fix (CVE-2015-0208)
|
||||
o ASN.1 structure reuse memory corruption fix (CVE-2015-0287)
|
||||
o PKCS7 NULL pointer dereferences fix (CVE-2015-0289)
|
||||
o DoS via reachable assert in SSLv2 servers fix (CVE-2015-0293)
|
||||
o Empty CKE with client auth and DHE fix (CVE-2015-1787)
|
||||
o Handshake with unseeded PRNG fix (CVE-2015-0285)
|
||||
o Use After Free following d2i_ECPrivatekey error fix (CVE-2015-0209)
|
||||
o X509_to_X509_REQ NULL pointer deref fix (CVE-2015-0288)
|
||||
o Removed the export ciphers from the DEFAULT ciphers
|
||||
|
||||
Major changes between OpenSSL 1.0.1l and OpenSSL 1.0.2 [22 Jan 2015]:
|
||||
|
||||
o Suite B support for TLS 1.2 and DTLS 1.2
|
||||
o Support for DTLS 1.2
|
||||
o TLS automatic EC curve selection.
|
||||
o API to set TLS supported signature algorithms and curves
|
||||
o SSL_CONF configuration API.
|
||||
o TLS Brainpool support.
|
||||
o ALPN support.
|
||||
o CMS support for RSA-PSS, RSA-OAEP, ECDH and X9.42 DH.
|
||||
|
||||
Major changes between OpenSSL 1.0.1k and OpenSSL 1.0.1l [15 Jan 2015]
|
||||
|
||||
o Build fixes for the Windows and OpenVMS platforms
|
||||
|
||||
Major changes between OpenSSL 1.0.1j and OpenSSL 1.0.1k [8 Jan 2015]
|
||||
|
||||
o Fix for CVE-2014-3571
|
||||
o Fix for CVE-2015-0206
|
||||
o Fix for CVE-2014-3569
|
||||
o Fix for CVE-2014-3572
|
||||
o Fix for CVE-2015-0204
|
||||
o Fix for CVE-2015-0205
|
||||
o Fix for CVE-2014-8275
|
||||
o Fix for CVE-2014-3570
|
||||
|
||||
Major changes between OpenSSL 1.0.1i and OpenSSL 1.0.1j [15 Oct 2014]
|
||||
|
||||
o Fix for CVE-2014-3513
|
||||
o Fix for CVE-2014-3567
|
||||
o Mitigation for CVE-2014-3566 (SSL protocol vulnerability)
|
||||
o Fix for CVE-2014-3568
|
||||
|
||||
Major changes between OpenSSL 1.0.1h and OpenSSL 1.0.1i [6 Aug 2014]
|
||||
|
||||
o Fix for CVE-2014-3512
|
||||
o Fix for CVE-2014-3511
|
||||
o Fix for CVE-2014-3510
|
||||
o Fix for CVE-2014-3507
|
||||
o Fix for CVE-2014-3506
|
||||
o Fix for CVE-2014-3505
|
||||
o Fix for CVE-2014-3509
|
||||
o Fix for CVE-2014-5139
|
||||
o Fix for CVE-2014-3508
|
||||
|
||||
Major changes between OpenSSL 1.0.1g and OpenSSL 1.0.1h [5 Jun 2014]
|
||||
|
||||
o Fix for CVE-2014-0224
|
||||
o Fix for CVE-2014-0221
|
||||
o Fix for CVE-2014-0198
|
||||
o Fix for CVE-2014-0195
|
||||
o Fix for CVE-2014-3470
|
||||
o Fix for CVE-2010-5298
|
||||
|
||||
Major changes between OpenSSL 1.0.1f and OpenSSL 1.0.1g [7 Apr 2014]
|
||||
|
||||
o Fix for CVE-2014-0160
|
||||
o Add TLS padding extension workaround for broken servers.
|
||||
o Fix for CVE-2014-0076
|
||||
|
||||
Major changes between OpenSSL 1.0.1e and OpenSSL 1.0.1f [6 Jan 2014]
|
||||
|
||||
o Don't include gmt_unix_time in TLS server and client random values
|
||||
o Fix for TLS record tampering bug CVE-2013-4353
|
||||
o Fix for TLS version checking bug CVE-2013-6449
|
||||
o Fix for DTLS retransmission bug CVE-2013-6450
|
||||
|
||||
Major changes between OpenSSL 1.0.1d and OpenSSL 1.0.1e [11 Feb 2013]:
|
||||
|
||||
o Corrected fix for CVE-2013-0169
|
||||
|
||||
Major changes between OpenSSL 1.0.1c and OpenSSL 1.0.1d [4 Feb 2013]:
|
||||
|
||||
o Fix renegotiation in TLS 1.1, 1.2 by using the correct TLS version.
|
||||
o Include the fips configuration module.
|
||||
o Fix OCSP bad key DoS attack CVE-2013-0166
|
||||
o Fix for SSL/TLS/DTLS CBC plaintext recovery attack CVE-2013-0169
|
||||
o Fix for TLS AESNI record handling flaw CVE-2012-2686
|
||||
|
||||
Major changes between OpenSSL 1.0.1b and OpenSSL 1.0.1c [10 May 2012]:
|
||||
|
||||
o Fix TLS/DTLS record length checking bug CVE-2012-2333
|
||||
o Don't attempt to use non-FIPS composite ciphers in FIPS mode.
|
||||
|
||||
Major changes between OpenSSL 1.0.1a and OpenSSL 1.0.1b [26 Apr 2012]:
|
||||
|
||||
o Fix compilation error on non-x86 platforms.
|
||||
o Make FIPS capable OpenSSL ciphers work in non-FIPS mode.
|
||||
o Fix SSL_OP_NO_TLSv1_1 clash with SSL_OP_ALL in OpenSSL 1.0.0
|
||||
|
||||
Major changes between OpenSSL 1.0.1 and OpenSSL 1.0.1a [19 Apr 2012]:
|
||||
|
||||
o Fix for ASN1 overflow bug CVE-2012-2110
|
||||
o Workarounds for some servers that hang on long client hellos.
|
||||
o Fix SEGV in AES code.
|
||||
|
||||
Major changes between OpenSSL 1.0.0h and OpenSSL 1.0.1 [14 Mar 2012]:
|
||||
|
||||
o TLS/DTLS heartbeat support.
|
||||
o SCTP support.
|
||||
o RFC 5705 TLS key material exporter.
|
||||
o RFC 5764 DTLS-SRTP negotiation.
|
||||
o Next Protocol Negotiation.
|
||||
o PSS signatures in certificates, requests and CRLs.
|
||||
o Support for password based recipient info for CMS.
|
||||
o Support TLS v1.2 and TLS v1.1.
|
||||
o Preliminary FIPS capability for unvalidated 2.0 FIPS module.
|
||||
o SRP support.
|
||||
|
||||
Major changes between OpenSSL 1.0.0g and OpenSSL 1.0.0h [12 Mar 2012]:
|
||||
|
||||
o Fix for CMS/PKCS#7 MMA CVE-2012-0884
|
||||
o Corrected fix for CVE-2011-4619
|
||||
o Various DTLS fixes.
|
||||
|
||||
Major changes between OpenSSL 1.0.0f and OpenSSL 1.0.0g [18 Jan 2012]:
|
||||
|
||||
o Fix for DTLS DoS issue CVE-2012-0050
|
||||
|
||||
Major changes between OpenSSL 1.0.0e and OpenSSL 1.0.0f [4 Jan 2012]:
|
||||
|
||||
o Fix for DTLS plaintext recovery attack CVE-2011-4108
|
||||
o Clear block padding bytes of SSL 3.0 records CVE-2011-4576
|
||||
o Only allow one SGC handshake restart for SSL/TLS CVE-2011-4619
|
||||
o Check parameters are not NULL in GOST ENGINE CVE-2012-0027
|
||||
o Check for malformed RFC3779 data CVE-2011-4577
|
||||
|
||||
Major changes between OpenSSL 1.0.0d and OpenSSL 1.0.0e [6 Sep 2011]:
|
||||
|
||||
o Fix for CRL vulnerability issue CVE-2011-3207
|
||||
o Fix for ECDH crashes CVE-2011-3210
|
||||
o Protection against EC timing attacks.
|
||||
o Support ECDH ciphersuites for certificates using SHA2 algorithms.
|
||||
o Various DTLS fixes.
|
||||
|
||||
Major changes between OpenSSL 1.0.0c and OpenSSL 1.0.0d [8 Feb 2011]:
|
||||
|
||||
o Fix for security issue CVE-2011-0014
|
||||
|
||||
Major changes between OpenSSL 1.0.0b and OpenSSL 1.0.0c [2 Dec 2010]:
|
||||
|
||||
o Fix for security issue CVE-2010-4180
|
||||
o Fix for CVE-2010-4252
|
||||
o Fix mishandling of absent EC point format extension.
|
||||
o Fix various platform compilation issues.
|
||||
o Corrected fix for security issue CVE-2010-3864.
|
||||
|
||||
Major changes between OpenSSL 1.0.0a and OpenSSL 1.0.0b [16 Nov 2010]:
|
||||
|
||||
o Fix for security issue CVE-2010-3864.
|
||||
o Fix for CVE-2010-2939
|
||||
o Fix WIN32 build system for GOST ENGINE.
|
||||
|
||||
Major changes between OpenSSL 1.0.0 and OpenSSL 1.0.0a [1 Jun 2010]:
|
||||
|
||||
o Fix for security issue CVE-2010-1633.
|
||||
o GOST MAC and CFB fixes.
|
||||
|
||||
Major changes between OpenSSL 0.9.8n and OpenSSL 1.0.0 [29 Mar 2010]:
|
||||
|
||||
o RFC3280 path validation: sufficient to process PKITS tests.
|
||||
o Integrated support for PVK files and keyblobs.
|
||||
o Change default private key format to PKCS#8.
|
||||
o CMS support: able to process all examples in RFC4134
|
||||
o Streaming ASN1 encode support for PKCS#7 and CMS.
|
||||
o Multiple signer and signer add support for PKCS#7 and CMS.
|
||||
o ASN1 printing support.
|
||||
o Whirlpool hash algorithm added.
|
||||
o RFC3161 time stamp support.
|
||||
o New generalised public key API supporting ENGINE based algorithms.
|
||||
o New generalised public key API utilities.
|
||||
o New ENGINE supporting GOST algorithms.
|
||||
o SSL/TLS GOST ciphersuite support.
|
||||
o PKCS#7 and CMS GOST support.
|
||||
o RFC4279 PSK ciphersuite support.
|
||||
o Supported points format extension for ECC ciphersuites.
|
||||
o ecdsa-with-SHA224/256/384/512 signature types.
|
||||
o dsa-with-SHA224 and dsa-with-SHA256 signature types.
|
||||
o Opaque PRF Input TLS extension support.
|
||||
o Updated time routines to avoid OS limitations.
|
||||
|
||||
Major changes between OpenSSL 0.9.8m and OpenSSL 0.9.8n [24 Mar 2010]:
|
||||
|
||||
o CFB cipher definition fixes.
|
||||
o Fix security issues CVE-2010-0740 and CVE-2010-0433.
|
||||
|
||||
Major changes between OpenSSL 0.9.8l and OpenSSL 0.9.8m [25 Feb 2010]:
|
||||
|
||||
o Cipher definition fixes.
|
||||
o Workaround for slow RAND_poll() on some WIN32 versions.
|
||||
o Remove MD2 from algorithm tables.
|
||||
o SPKAC handling fixes.
|
||||
o Support for RFC5746 TLS renegotiation extension.
|
||||
o Compression memory leak fixed.
|
||||
o Compression session resumption fixed.
|
||||
o Ticket and SNI coexistence fixes.
|
||||
o Many fixes to DTLS handling.
|
||||
|
||||
Major changes between OpenSSL 0.9.8k and OpenSSL 0.9.8l [5 Nov 2009]:
|
||||
|
||||
o Temporary work around for CVE-2009-3555: disable renegotiation.
|
||||
|
||||
Major changes between OpenSSL 0.9.8j and OpenSSL 0.9.8k [25 Mar 2009]:
|
||||
|
||||
o Fix various build issues.
|
||||
o Fix security issues (CVE-2009-0590, CVE-2009-0591, CVE-2009-0789)
|
||||
|
||||
Major changes between OpenSSL 0.9.8i and OpenSSL 0.9.8j [7 Jan 2009]:
|
||||
|
||||
o Fix security issue (CVE-2008-5077)
|
||||
o Merge FIPS 140-2 branch code.
|
||||
|
||||
Major changes between OpenSSL 0.9.8g and OpenSSL 0.9.8h [28 May 2008]:
|
||||
|
||||
o CryptoAPI ENGINE support.
|
||||
o Various precautionary measures.
|
||||
o Fix for bugs affecting certificate request creation.
|
||||
o Support for local machine keyset attribute in PKCS#12 files.
|
||||
|
||||
Major changes between OpenSSL 0.9.8f and OpenSSL 0.9.8g [19 Oct 2007]:
|
||||
|
||||
o Backport of CMS functionality to 0.9.8.
|
||||
o Fixes for bugs introduced with 0.9.8f.
|
||||
|
||||
Major changes between OpenSSL 0.9.8e and OpenSSL 0.9.8f [11 Oct 2007]:
|
||||
|
||||
o Add gcc 4.2 support.
|
||||
o Add support for AES and SSE2 assembly language optimization
|
||||
for VC++ build.
|
||||
o Support for RFC4507bis and server name extensions if explicitly
|
||||
selected at compile time.
|
||||
o DTLS improvements.
|
||||
o RFC4507bis support.
|
||||
o TLS Extensions support.
|
||||
|
||||
Major changes between OpenSSL 0.9.8d and OpenSSL 0.9.8e [23 Feb 2007]:
|
||||
|
||||
o Various ciphersuite selection fixes.
|
||||
o RFC3779 support.
|
||||
|
||||
Major changes between OpenSSL 0.9.8c and OpenSSL 0.9.8d [28 Sep 2006]:
|
||||
|
||||
o Introduce limits to prevent malicious key DoS (CVE-2006-2940)
|
||||
o Fix security issues (CVE-2006-2937, CVE-2006-3737, CVE-2006-4343)
|
||||
o Changes to ciphersuite selection algorithm
|
||||
|
||||
Major changes between OpenSSL 0.9.8b and OpenSSL 0.9.8c [5 Sep 2006]:
|
||||
|
||||
o Fix Daniel Bleichenbacher forged signature attack, CVE-2006-4339
|
||||
o New cipher Camellia
|
||||
|
||||
Major changes between OpenSSL 0.9.8a and OpenSSL 0.9.8b [4 May 2006]:
|
||||
|
||||
o Cipher string fixes.
|
||||
o Fixes for VC++ 2005.
|
||||
o Updated ECC cipher suite support.
|
||||
o New functions EVP_CIPHER_CTX_new() and EVP_CIPHER_CTX_free().
|
||||
o Zlib compression usage fixes.
|
||||
o Built in dynamic engine compilation support on Win32.
|
||||
o Fixes auto dynamic engine loading in Win32.
|
||||
|
||||
Major changes between OpenSSL 0.9.8 and OpenSSL 0.9.8a [11 Oct 2005]:
|
||||
|
||||
o Fix potential SSL 2.0 rollback, CVE-2005-2969
|
||||
o Extended Windows CE support
|
||||
|
||||
Major changes between OpenSSL 0.9.7g and OpenSSL 0.9.8 [5 Jul 2005]:
|
||||
|
||||
o Major work on the BIGNUM library for higher efficiency and to
|
||||
make operations more streamlined and less contradictory. This
|
||||
is the result of a major audit of the BIGNUM library.
|
||||
o Addition of BIGNUM functions for fields GF(2^m) and NIST
|
||||
curves, to support the Elliptic Crypto functions.
|
||||
o Major work on Elliptic Crypto; ECDH and ECDSA added, including
|
||||
the use through EVP, X509 and ENGINE.
|
||||
o New ASN.1 mini-compiler that's usable through the OpenSSL
|
||||
configuration file.
|
||||
o Added support for ASN.1 indefinite length constructed encoding.
|
||||
o New PKCS#12 'medium level' API to manipulate PKCS#12 files.
|
||||
o Complete rework of shared library construction and linking
|
||||
programs with shared or static libraries, through a separate
|
||||
Makefile.shared.
|
||||
o Rework of the passing of parameters from one Makefile to another.
|
||||
o Changed ENGINE framework to load dynamic engine modules
|
||||
automatically from specifically given directories.
|
||||
o New structure and ASN.1 functions for CertificatePair.
|
||||
o Changed the ZLIB compression method to be stateful.
|
||||
o Changed the key-generation and primality testing "progress"
|
||||
mechanism to take a structure that contains the ticker
|
||||
function and an argument.
|
||||
o New engine module: GMP (performs private key exponentiation).
|
||||
o New engine module: VIA PadLOck ACE extension in VIA C3
|
||||
Nehemiah processors.
|
||||
o Added support for IPv6 addresses in certificate extensions.
|
||||
See RFC 1884, section 2.2.
|
||||
o Added support for certificate policy mappings, policy
|
||||
constraints and name constraints.
|
||||
o Added support for multi-valued AVAs in the OpenSSL
|
||||
configuration file.
|
||||
o Added support for multiple certificates with the same subject
|
||||
in the 'openssl ca' index file.
|
||||
o Make it possible to create self-signed certificates using
|
||||
'openssl ca -selfsign'.
|
||||
o Make it possible to generate a serial number file with
|
||||
'openssl ca -create_serial'.
|
||||
o New binary search functions with extended functionality.
|
||||
o New BUF functions.
|
||||
o New STORE structure and library to provide an interface to all
|
||||
sorts of data repositories. Supports storage of public and
|
||||
private keys, certificates, CRLs, numbers and arbitrary blobs.
|
||||
This library is unfortunately unfinished and unused within
|
||||
OpenSSL.
|
||||
o New control functions for the error stack.
|
||||
o Changed the PKCS#7 library to support one-pass S/MIME
|
||||
processing.
|
||||
o Added the possibility to compile without old deprecated
|
||||
functionality with the OPENSSL_NO_DEPRECATED macro or the
|
||||
'no-deprecated' argument to the config and Configure scripts.
|
||||
o Constification of all ASN.1 conversion functions, and other
|
||||
affected functions.
|
||||
o Improved platform support for PowerPC.
|
||||
o New FIPS 180-2 algorithms (SHA-224, -256, -384 and -512).
|
||||
o New X509_VERIFY_PARAM structure to support parameterisation
|
||||
of X.509 path validation.
|
||||
o Major overhaul of RC4 performance on Intel P4, IA-64 and
|
||||
AMD64.
|
||||
o Changed the Configure script to have some algorithms disabled
|
||||
by default. Those can be explicitly enabled with the new
|
||||
argument form 'enable-xxx'.
|
||||
o Change the default digest in 'openssl' commands from MD5 to
|
||||
SHA-1.
|
||||
o Added support for DTLS.
|
||||
o New BIGNUM blinding.
|
||||
o Added support for the RSA-PSS encryption scheme
|
||||
o Added support for the RSA X.931 padding.
|
||||
o Added support for BSD sockets on NetWare.
|
||||
o Added support for files larger than 2GB.
|
||||
o Added initial support for Win64.
|
||||
o Added alternate pkg-config files.
|
||||
|
||||
Major changes between OpenSSL 0.9.7l and OpenSSL 0.9.7m [23 Feb 2007]:
|
||||
|
||||
o FIPS 1.1.1 module linking.
|
||||
o Various ciphersuite selection fixes.
|
||||
|
||||
Major changes between OpenSSL 0.9.7k and OpenSSL 0.9.7l [28 Sep 2006]:
|
||||
|
||||
o Introduce limits to prevent malicious key DoS (CVE-2006-2940)
|
||||
o Fix security issues (CVE-2006-2937, CVE-2006-3737, CVE-2006-4343)
|
||||
|
||||
Major changes between OpenSSL 0.9.7j and OpenSSL 0.9.7k [5 Sep 2006]:
|
||||
|
||||
o Fix Daniel Bleichenbacher forged signature attack, CVE-2006-4339
|
||||
|
||||
Major changes between OpenSSL 0.9.7i and OpenSSL 0.9.7j [4 May 2006]:
|
||||
|
||||
o Visual C++ 2005 fixes.
|
||||
o Update Windows build system for FIPS.
|
||||
|
||||
Major changes between OpenSSL 0.9.7h and OpenSSL 0.9.7i [14 Oct 2005]:
|
||||
|
||||
o Give EVP_MAX_MD_SIZE it's old value, except for a FIPS build.
|
||||
|
||||
Major changes between OpenSSL 0.9.7g and OpenSSL 0.9.7h [11 Oct 2005]:
|
||||
|
||||
o Fix SSL 2.0 Rollback, CVE-2005-2969
|
||||
o Allow use of fixed-length exponent on DSA signing
|
||||
o Default fixed-window RSA, DSA, DH private-key operations
|
||||
|
||||
Major changes between OpenSSL 0.9.7f and OpenSSL 0.9.7g [11 Apr 2005]:
|
||||
|
||||
o More compilation issues fixed.
|
||||
o Adaptation to more modern Kerberos API.
|
||||
o Enhanced or corrected configuration for Solaris64, Mingw and Cygwin.
|
||||
o Enhanced x86_64 assembler BIGNUM module.
|
||||
o More constification.
|
||||
o Added processing of proxy certificates (RFC 3820).
|
||||
|
||||
Major changes between OpenSSL 0.9.7e and OpenSSL 0.9.7f [22 Mar 2005]:
|
||||
|
||||
o Several compilation issues fixed.
|
||||
o Many memory allocation failure checks added.
|
||||
o Improved comparison of X509 Name type.
|
||||
o Mandatory basic checks on certificates.
|
||||
o Performance improvements.
|
||||
|
||||
Major changes between OpenSSL 0.9.7d and OpenSSL 0.9.7e [25 Oct 2004]:
|
||||
|
||||
o Fix race condition in CRL checking code.
|
||||
o Fixes to PKCS#7 (S/MIME) code.
|
||||
|
||||
Major changes between OpenSSL 0.9.7c and OpenSSL 0.9.7d [17 Mar 2004]:
|
||||
|
||||
o Security: Fix Kerberos ciphersuite SSL/TLS handshaking bug
|
||||
o Security: Fix null-pointer assignment in do_change_cipher_spec()
|
||||
o Allow multiple active certificates with same subject in CA index
|
||||
o Multiple X509 verification fixes
|
||||
o Speed up HMAC and other operations
|
||||
|
||||
Major changes between OpenSSL 0.9.7b and OpenSSL 0.9.7c [30 Sep 2003]:
|
||||
|
||||
o Security: fix various ASN1 parsing bugs.
|
||||
o New -ignore_err option to OCSP utility.
|
||||
o Various interop and bug fixes in S/MIME code.
|
||||
o SSL/TLS protocol fix for unrequested client certificates.
|
||||
|
||||
Major changes between OpenSSL 0.9.7a and OpenSSL 0.9.7b [10 Apr 2003]:
|
||||
|
||||
o Security: counter the Klima-Pokorny-Rosa extension of
|
||||
Bleichbacher's attack
|
||||
o Security: make RSA blinding default.
|
||||
o Configuration: Irix fixes, AIX fixes, better mingw support.
|
||||
o Support for new platforms: linux-ia64-ecc.
|
||||
o Build: shared library support fixes.
|
||||
o ASN.1: treat domainComponent correctly.
|
||||
o Documentation: fixes and additions.
|
||||
|
||||
Major changes between OpenSSL 0.9.7 and OpenSSL 0.9.7a [19 Feb 2003]:
|
||||
|
||||
o Security: Important security related bugfixes.
|
||||
o Enhanced compatibility with MIT Kerberos.
|
||||
o Can be built without the ENGINE framework.
|
||||
o IA32 assembler enhancements.
|
||||
o Support for new platforms: FreeBSD/IA64 and FreeBSD/Sparc64.
|
||||
o Configuration: the no-err option now works properly.
|
||||
o SSL/TLS: now handles manual certificate chain building.
|
||||
o SSL/TLS: certain session ID malfunctions corrected.
|
||||
|
||||
Major changes between OpenSSL 0.9.6 and OpenSSL 0.9.7 [30 Dec 2002]:
|
||||
|
||||
o New library section OCSP.
|
||||
o Complete rewrite of ASN1 code.
|
||||
o CRL checking in verify code and openssl utility.
|
||||
o Extension copying in 'ca' utility.
|
||||
o Flexible display options in 'ca' utility.
|
||||
o Provisional support for international characters with UTF8.
|
||||
o Support for external crypto devices ('engine') is no longer
|
||||
a separate distribution.
|
||||
o New elliptic curve library section.
|
||||
o New AES (Rijndael) library section.
|
||||
o Support for new platforms: Windows CE, Tandem OSS, A/UX, AIX 64-bit,
|
||||
Linux x86_64, Linux 64-bit on Sparc v9
|
||||
o Extended support for some platforms: VxWorks
|
||||
o Enhanced support for shared libraries.
|
||||
o Now only builds PIC code when shared library support is requested.
|
||||
o Support for pkg-config.
|
||||
o Lots of new manuals.
|
||||
o Makes symbolic links to or copies of manuals to cover all described
|
||||
functions.
|
||||
o Change DES API to clean up the namespace (some applications link also
|
||||
against libdes providing similar functions having the same name).
|
||||
Provide macros for backward compatibility (will be removed in the
|
||||
future).
|
||||
o Unify handling of cryptographic algorithms (software and engine)
|
||||
to be available via EVP routines for asymmetric and symmetric ciphers.
|
||||
o NCONF: new configuration handling routines.
|
||||
o Change API to use more 'const' modifiers to improve error checking
|
||||
and help optimizers.
|
||||
o Finally remove references to RSAref.
|
||||
o Reworked parts of the BIGNUM code.
|
||||
o Support for new engines: Broadcom ubsec, Accelerated Encryption
|
||||
Processing, IBM 4758.
|
||||
o A few new engines added in the demos area.
|
||||
o Extended and corrected OID (object identifier) table.
|
||||
o PRNG: query at more locations for a random device, automatic query for
|
||||
EGD style random sources at several locations.
|
||||
o SSL/TLS: allow optional cipher choice according to server's preference.
|
||||
o SSL/TLS: allow server to explicitly set new session ids.
|
||||
o SSL/TLS: support Kerberos cipher suites (RFC2712).
|
||||
Only supports MIT Kerberos for now.
|
||||
o SSL/TLS: allow more precise control of renegotiations and sessions.
|
||||
o SSL/TLS: add callback to retrieve SSL/TLS messages.
|
||||
o SSL/TLS: support AES cipher suites (RFC3268).
|
||||
|
||||
Major changes between OpenSSL 0.9.6j and OpenSSL 0.9.6k [30 Sep 2003]:
|
||||
|
||||
o Security: fix various ASN1 parsing bugs.
|
||||
o SSL/TLS protocol fix for unrequested client certificates.
|
||||
|
||||
Major changes between OpenSSL 0.9.6i and OpenSSL 0.9.6j [10 Apr 2003]:
|
||||
|
||||
o Security: counter the Klima-Pokorny-Rosa extension of
|
||||
Bleichbacher's attack
|
||||
o Security: make RSA blinding default.
|
||||
o Build: shared library support fixes.
|
||||
|
||||
Major changes between OpenSSL 0.9.6h and OpenSSL 0.9.6i [19 Feb 2003]:
|
||||
|
||||
o Important security related bugfixes.
|
||||
|
||||
Major changes between OpenSSL 0.9.6g and OpenSSL 0.9.6h [5 Dec 2002]:
|
||||
|
||||
o New configuration targets for Tandem OSS and A/UX.
|
||||
o New OIDs for Microsoft attributes.
|
||||
o Better handling of SSL session caching.
|
||||
o Better comparison of distinguished names.
|
||||
o Better handling of shared libraries in a mixed GNU/non-GNU environment.
|
||||
o Support assembler code with Borland C.
|
||||
o Fixes for length problems.
|
||||
o Fixes for uninitialised variables.
|
||||
o Fixes for memory leaks, some unusual crashes and some race conditions.
|
||||
o Fixes for smaller building problems.
|
||||
o Updates of manuals, FAQ and other instructive documents.
|
||||
|
||||
Major changes between OpenSSL 0.9.6f and OpenSSL 0.9.6g [9 Aug 2002]:
|
||||
|
||||
o Important building fixes on Unix.
|
||||
|
||||
Major changes between OpenSSL 0.9.6e and OpenSSL 0.9.6f [8 Aug 2002]:
|
||||
|
||||
o Various important bugfixes.
|
||||
|
||||
Major changes between OpenSSL 0.9.6d and OpenSSL 0.9.6e [30 Jul 2002]:
|
||||
|
||||
o Important security related bugfixes.
|
||||
o Various SSL/TLS library bugfixes.
|
||||
|
||||
Major changes between OpenSSL 0.9.6c and OpenSSL 0.9.6d [9 May 2002]:
|
||||
|
||||
o Various SSL/TLS library bugfixes.
|
||||
o Fix DH parameter generation for 'non-standard' generators.
|
||||
|
||||
Major changes between OpenSSL 0.9.6b and OpenSSL 0.9.6c [21 Dec 2001]:
|
||||
|
||||
o Various SSL/TLS library bugfixes.
|
||||
o BIGNUM library fixes.
|
||||
o RSA OAEP and random number generation fixes.
|
||||
o Object identifiers corrected and added.
|
||||
o Add assembler BN routines for IA64.
|
||||
o Add support for OS/390 Unix, UnixWare with gcc, OpenUNIX 8,
|
||||
MIPS Linux; shared library support for Irix, HP-UX.
|
||||
o Add crypto accelerator support for AEP, Baltimore SureWare,
|
||||
Broadcom and Cryptographic Appliance's keyserver
|
||||
[in 0.9.6c-engine release].
|
||||
|
||||
Major changes between OpenSSL 0.9.6a and OpenSSL 0.9.6b [9 Jul 2001]:
|
||||
|
||||
o Security fix: PRNG improvements.
|
||||
o Security fix: RSA OAEP check.
|
||||
o Security fix: Reinsert and fix countermeasure to Bleichbacher's
|
||||
attack.
|
||||
o MIPS bug fix in BIGNUM.
|
||||
o Bug fix in "openssl enc".
|
||||
o Bug fix in X.509 printing routine.
|
||||
o Bug fix in DSA verification routine and DSA S/MIME verification.
|
||||
o Bug fix to make PRNG thread-safe.
|
||||
o Bug fix in RAND_file_name().
|
||||
o Bug fix in compatibility mode trust settings.
|
||||
o Bug fix in blowfish EVP.
|
||||
o Increase default size for BIO buffering filter.
|
||||
o Compatibility fixes in some scripts.
|
||||
|
||||
Major changes between OpenSSL 0.9.6 and OpenSSL 0.9.6a [5 Apr 2001]:
|
||||
|
||||
o Security fix: change behavior of OpenSSL to avoid using
|
||||
environment variables when running as root.
|
||||
o Security fix: check the result of RSA-CRT to reduce the
|
||||
possibility of deducing the private key from an incorrectly
|
||||
calculated signature.
|
||||
o Security fix: prevent Bleichenbacher's DSA attack.
|
||||
o Security fix: Zero the premaster secret after deriving the
|
||||
master secret in DH ciphersuites.
|
||||
o Reimplement SSL_peek(), which had various problems.
|
||||
o Compatibility fix: the function des_encrypt() renamed to
|
||||
des_encrypt1() to avoid clashes with some Unixen libc.
|
||||
o Bug fixes for Win32, HP/UX and Irix.
|
||||
o Bug fixes in BIGNUM, SSL, PKCS#7, PKCS#12, X.509, CONF and
|
||||
memory checking routines.
|
||||
o Bug fixes for RSA operations in threaded environments.
|
||||
o Bug fixes in misc. openssl applications.
|
||||
o Remove a few potential memory leaks.
|
||||
o Add tighter checks of BIGNUM routines.
|
||||
o Shared library support has been reworked for generality.
|
||||
o More documentation.
|
||||
o New function BN_rand_range().
|
||||
o Add "-rand" option to openssl s_client and s_server.
|
||||
|
||||
Major changes between OpenSSL 0.9.5a and OpenSSL 0.9.6 [10 Oct 2000]:
|
||||
|
||||
o Some documentation for BIO and SSL libraries.
|
||||
o Enhanced chain verification using key identifiers.
|
||||
o New sign and verify options to 'dgst' application.
|
||||
o Support for DER and PEM encoded messages in 'smime' application.
|
||||
o New 'rsautl' application, low level RSA utility.
|
||||
o MD4 now included.
|
||||
o Bugfix for SSL rollback padding check.
|
||||
o Support for external crypto devices [1].
|
||||
o Enhanced EVP interface.
|
||||
|
||||
[1] The support for external crypto devices is currently a separate
|
||||
distribution. See the file README.ENGINE.
|
||||
|
||||
Major changes between OpenSSL 0.9.5 and OpenSSL 0.9.5a [1 Apr 2000]:
|
||||
|
||||
o Bug fixes for Win32, SuSE Linux, NeXTSTEP and FreeBSD 2.2.8
|
||||
o Shared library support for HPUX and Solaris-gcc
|
||||
o Support of Linux/IA64
|
||||
o Assembler support for Mingw32
|
||||
o New 'rand' application
|
||||
o New way to check for existence of algorithms from scripts
|
||||
|
||||
Major changes between OpenSSL 0.9.4 and OpenSSL 0.9.5 [25 May 2000]:
|
||||
|
||||
o S/MIME support in new 'smime' command
|
||||
o Documentation for the OpenSSL command line application
|
||||
o Automation of 'req' application
|
||||
o Fixes to make s_client, s_server work under Windows
|
||||
o Support for multiple fieldnames in SPKACs
|
||||
o New SPKAC command line utility and associated library functions
|
||||
o Options to allow passwords to be obtained from various sources
|
||||
o New public key PEM format and options to handle it
|
||||
o Many other fixes and enhancements to command line utilities
|
||||
o Usable certificate chain verification
|
||||
o Certificate purpose checking
|
||||
o Certificate trust settings
|
||||
o Support of authority information access extension
|
||||
o Extensions in certificate requests
|
||||
o Simplified X509 name and attribute routines
|
||||
o Initial (incomplete) support for international character sets
|
||||
o New DH_METHOD, DSA_METHOD and enhanced RSA_METHOD
|
||||
o Read only memory BIOs and simplified creation function
|
||||
o TLS/SSL protocol bugfixes: Accept TLS 'client hello' in SSL 3.0
|
||||
record; allow fragmentation and interleaving of handshake and other
|
||||
data
|
||||
o TLS/SSL code now "tolerates" MS SGC
|
||||
o Work around for Netscape client certificate hang bug
|
||||
o RSA_NULL option that removes RSA patent code but keeps other
|
||||
RSA functionality
|
||||
o Memory leak detection now allows applications to add extra information
|
||||
via a per-thread stack
|
||||
o PRNG robustness improved
|
||||
o EGD support
|
||||
o BIGNUM library bug fixes
|
||||
o Faster DSA parameter generation
|
||||
o Enhanced support for Alpha Linux
|
||||
o Experimental MacOS support
|
||||
|
||||
Major changes between OpenSSL 0.9.3 and OpenSSL 0.9.4 [9 Aug 1999]:
|
||||
|
||||
o Transparent support for PKCS#8 format private keys: these are used
|
||||
by several software packages and are more secure than the standard
|
||||
form
|
||||
o PKCS#5 v2.0 implementation
|
||||
o Password callbacks have a new void * argument for application data
|
||||
o Avoid various memory leaks
|
||||
o New pipe-like BIO that allows using the SSL library when actual I/O
|
||||
must be handled by the application (BIO pair)
|
||||
|
||||
Major changes between OpenSSL 0.9.2b and OpenSSL 0.9.3 [24 May 1999]:
|
||||
o Lots of enhancements and cleanups to the Configuration mechanism
|
||||
o RSA OEAP related fixes
|
||||
o Added `openssl ca -revoke' option for revoking a certificate
|
||||
o Source cleanups: const correctness, type-safe stacks and ASN.1 SETs
|
||||
o Source tree cleanups: removed lots of obsolete files
|
||||
o Thawte SXNet, certificate policies and CRL distribution points
|
||||
extension support
|
||||
o Preliminary (experimental) S/MIME support
|
||||
o Support for ASN.1 UTF8String and VisibleString
|
||||
o Full integration of PKCS#12 code
|
||||
o Sparc assembler bignum implementation, optimized hash functions
|
||||
o Option to disable selected ciphers
|
||||
|
||||
Major changes between OpenSSL 0.9.1c and OpenSSL 0.9.2b [22 Mar 1999]:
|
||||
o Fixed a security hole related to session resumption
|
||||
o Fixed RSA encryption routines for the p < q case
|
||||
o "ALL" in cipher lists now means "everything except NULL ciphers"
|
||||
o Support for Triple-DES CBCM cipher
|
||||
o Support of Optimal Asymmetric Encryption Padding (OAEP) for RSA
|
||||
o First support for new TLSv1 ciphers
|
||||
o Added a few new BIOs (syslog BIO, reliable BIO)
|
||||
o Extended support for DSA certificate/keys.
|
||||
o Extended support for Certificate Signing Requests (CSR)
|
||||
o Initial support for X.509v3 extensions
|
||||
o Extended support for compression inside the SSL record layer
|
||||
o Overhauled Win32 builds
|
||||
o Cleanups and fixes to the Big Number (BN) library
|
||||
o Support for ASN.1 GeneralizedTime
|
||||
o Splitted ASN.1 SETs from SEQUENCEs
|
||||
o ASN1 and PEM support for Netscape Certificate Sequences
|
||||
o Overhauled Perl interface
|
||||
o Lots of source tree cleanups.
|
||||
o Lots of memory leak fixes.
|
||||
o Lots of bug fixes.
|
||||
|
||||
Major changes between SSLeay 0.9.0b and OpenSSL 0.9.1c [23 Dec 1998]:
|
||||
o Integration of the popular NO_RSA/NO_DSA patches
|
||||
o Initial support for compression inside the SSL record layer
|
||||
o Added BIO proxy and filtering functionality
|
||||
o Extended Big Number (BN) library
|
||||
o Added RIPE MD160 message digest
|
||||
o Added support for RC2/64bit cipher
|
||||
o Extended ASN.1 parser routines
|
||||
o Adjustments of the source tree for CVS
|
||||
o Support for various new platforms
|
||||
76
NOTES.ANDROID
Normal file
76
NOTES.ANDROID
Normal file
@@ -0,0 +1,76 @@
|
||||
|
||||
NOTES FOR ANDROID PLATFORMS
|
||||
===========================
|
||||
|
||||
Requirement details
|
||||
-------------------
|
||||
|
||||
Beside basic tools like perl and make you'll need to download the Android
|
||||
NDK. It's available for Linux, Mac OS X and Windows, but only Linux
|
||||
version was actually tested. There is no reason to believe that Mac OS X
|
||||
wouldn't work. And as for Windows, it's unclear which "shell" would be
|
||||
suitable, MSYS2 might have best chances. NDK version should play lesser
|
||||
role, the goal is to support a range of most recent versions.
|
||||
|
||||
Configuration
|
||||
-------------
|
||||
|
||||
Android is naturally cross-compiled target and you can't use ./config.
|
||||
You have to use ./Configure and name your target explicitly; there are
|
||||
android-arm, android-arm64, android-mips, android-mip64, android-x86
|
||||
and android-x86_64. Do not pass --cross-compile-prefix (as you might
|
||||
be tempted), as it will be "calculated" automatically based on chosen
|
||||
platform. Though you still need to know the prefix to extend your PATH,
|
||||
in order to invoke $(CROSS_COMPILE)gcc and company. (Configure will fail
|
||||
and give you a hint if you get it wrong.) Apart from PATH adjustment
|
||||
you need to set ANDROID_NDK environment to point at NDK directory
|
||||
as /some/where/android-ndk-<ver>. Both variables are significant at both
|
||||
configuration and compilation times. NDK customarily supports multiple
|
||||
Android API levels, e.g. android-14, android-21, etc. By default latest
|
||||
one available is chosen. If you need to target older platform, pass
|
||||
additional -D__ANDROID_API__=N to Configure. N is numeric value of the
|
||||
target platform version. For example, to compile for ICS on ARM with
|
||||
NDK 10d:
|
||||
|
||||
export ANDROID_NDK=/some/where/android-ndk-10d
|
||||
PATH=$ANDROID_NDK/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin:$PATH
|
||||
./Configure android-arm -D__ANDROID_API__=14
|
||||
make
|
||||
|
||||
Caveat lector! Earlier OpenSSL versions relied on additional CROSS_SYSROOT
|
||||
variable set to $ANDROID_NDK/platforms/android-<api>/arch-<arch> to
|
||||
appoint headers-n-libraries' location. It's still recognized in order
|
||||
to facilitate migration from older projects. However, since API level
|
||||
appears in CROSS_SYSROOT value, passing -D__ANDROID_API__=N can be in
|
||||
conflict, and mixing the two is therefore not supported. Migration to
|
||||
CROSS_SYSROOT-less setup is recommended.
|
||||
|
||||
One can engage clang by adjusting PATH to cover same NDK's clang. Just
|
||||
keep in mind that if you miss it, Configure will try to use gcc...
|
||||
Also, PATH would need even further adjustment to cover unprefixed, yet
|
||||
target-specific, ar and ranlib. It's possible that you don't need to
|
||||
bother, if binutils-multiarch is installed on your Linux system.
|
||||
|
||||
Another option is to create so called "standalone toolchain" tailored
|
||||
for single specific platform including Android API level, and assign its
|
||||
location to ANDROID_NDK. In such case you have to pass matching target
|
||||
name to Configure and shouldn't use -D__ANDROID_API__=N. PATH adjusment
|
||||
becomes simpler, $ANDROID_NDK/bin:$PATH suffices.
|
||||
|
||||
Running tests (on Linux)
|
||||
------------------------
|
||||
|
||||
This is not actually supported. Notes are meant rather as inspiration.
|
||||
|
||||
Even though build output targets alien system, it's possible to execute
|
||||
test suite on Linux system by employing qemu-user. The trick is static
|
||||
linking. Pass -static to Configure, then edit generated Makefile and
|
||||
remove occurrences of -ldl and -pie flags. You would also need to pick
|
||||
API version that comes with usable static libraries, 42/2=21 used to
|
||||
work. Once built, you should be able to
|
||||
|
||||
env EXE_SHELL=qemu-<arch> make test
|
||||
|
||||
If you need to pass additional flag to qemu, quotes are your friend, e.g.
|
||||
|
||||
env EXE_SHELL="qemu-mips64el -cpu MIPS64R6-generic" make test
|
||||
48
NOTES.DJGPP
Normal file
48
NOTES.DJGPP
Normal file
@@ -0,0 +1,48 @@
|
||||
|
||||
|
||||
INSTALLATION ON THE DOS PLATFORM WITH DJGPP
|
||||
-------------------------------------------
|
||||
|
||||
OpenSSL has been ported to DJGPP, a Unix look-alike 32-bit run-time
|
||||
environment for 16-bit DOS, but only with long filename support.
|
||||
If you wish to compile on native DOS with 8+3 filenames, you will
|
||||
have to tweak the installation yourself, including renaming files
|
||||
with illegal or duplicate names.
|
||||
|
||||
You should have a full DJGPP environment installed, including the
|
||||
latest versions of DJGPP, GCC, BINUTILS, BASH, etc. This package
|
||||
requires that PERL and the PERL module Text::Template also be
|
||||
installed (see NOTES.PERL).
|
||||
|
||||
All of these can be obtained from the usual DJGPP mirror sites or
|
||||
directly at "http://www.delorie.com/pub/djgpp". For help on which
|
||||
files to download, see the DJGPP "ZIP PICKER" page at
|
||||
"http://www.delorie.com/djgpp/zip-picker.html". You also need to have
|
||||
the WATT-32 networking package installed before you try to compile
|
||||
OpenSSL. This can be obtained from "http://www.watt-32.net/".
|
||||
The Makefile assumes that the WATT-32 code is in the directory
|
||||
specified by the environment variable WATT_ROOT. If you have watt-32
|
||||
in directory "watt32" under your main DJGPP directory, specify
|
||||
WATT_ROOT="/dev/env/DJDIR/watt32".
|
||||
|
||||
To compile OpenSSL, start your BASH shell, then configure for DJGPP by
|
||||
running "./Configure" with appropriate arguments:
|
||||
|
||||
./Configure no-threads --prefix=/dev/env/DJDIR DJGPP
|
||||
|
||||
And finally fire up "make". You may run out of DPMI selectors when
|
||||
running in a DOS box under Windows. If so, just close the BASH
|
||||
shell, go back to Windows, and restart BASH. Then run "make" again.
|
||||
|
||||
RUN-TIME CAVEAT LECTOR
|
||||
--------------
|
||||
|
||||
Quoting FAQ:
|
||||
|
||||
"Cryptographic software needs a source of unpredictable data to work
|
||||
correctly. Many open source operating systems provide a "randomness
|
||||
device" (/dev/urandom or /dev/random) that serves this purpose."
|
||||
|
||||
As of version 0.9.7f DJGPP port checks upon /dev/urandom$ for a 3rd
|
||||
party "randomness" DOS driver. One such driver, NOISE.SYS, can be
|
||||
obtained from "http://www.rahul.net/dkaufman/index.html".
|
||||
119
NOTES.PERL
Normal file
119
NOTES.PERL
Normal file
@@ -0,0 +1,119 @@
|
||||
TOC
|
||||
===
|
||||
|
||||
- Notes on Perl
|
||||
- Notes on Perl on Windows
|
||||
- Notes on Perl modules we use
|
||||
- Notes on installing a perl module
|
||||
|
||||
Notes on Perl
|
||||
-------------
|
||||
|
||||
For our scripts, we rely quite a bit on Perl, and increasingly on
|
||||
some core Perl modules. These Perl modules are part of the Perl
|
||||
source, so if you build Perl on your own, you should be set.
|
||||
|
||||
However, if you install Perl as binary packages, the outcome might
|
||||
differ, and you may have to check that you do get the core modules
|
||||
installed properly. We do not claim to know them all, but experience
|
||||
has told us the following:
|
||||
|
||||
- on Linux distributions based on Debian, the package 'perl' will
|
||||
install the core Perl modules as well, so you will be fine.
|
||||
- on Linux distributions based on RPMs, you will need to install
|
||||
'perl-core' rather than just 'perl'.
|
||||
|
||||
You MUST have at least Perl version 5.10.0 installed. This minimum
|
||||
requirement is due to our use of regexp backslash sequence \R among
|
||||
other features that didn't exist in core Perl before that version.
|
||||
|
||||
Notes on Perl on Windows
|
||||
------------------------
|
||||
|
||||
There are a number of build targets that can be viewed as "Windows".
|
||||
Indeed, there are VC-* configs targeting VisualStudio C, as well as
|
||||
MinGW and Cygwin. The key recommendation is to use "matching" Perl,
|
||||
one that matches build environment. For example, if you will build
|
||||
on Cygwin be sure to use the Cygwin package manager to install Perl.
|
||||
For MSYS builds use the MSYS provided Perl. For VC-* builds we
|
||||
recommend ActiveState Perl, available from
|
||||
http://www.activestate.com/ActivePerl.
|
||||
|
||||
Notes on Perl on VMS
|
||||
--------------------
|
||||
|
||||
You will need to install Perl separately. One way to do so is to
|
||||
download the source from http://perl.org/, unpacking it, reading
|
||||
README.vms and follow the instructions. Another way is to download a
|
||||
.PCSI file from http://www.vmsperl.com/ and install it using the
|
||||
POLYCENTER install tool.
|
||||
|
||||
Notes on Perl modules we use
|
||||
----------------------------
|
||||
|
||||
We make increasing use of Perl modules, and do our best to limit
|
||||
ourselves to core Perl modules to keep the requirements down. There
|
||||
are just a few exceptions:
|
||||
|
||||
Test::More We require the minimum version to be 0.96, which
|
||||
appeared in Perl 5.13.4, because that version was
|
||||
the first to have all the features we're using.
|
||||
This module is required for testing only! If you
|
||||
don't plan on running the tests, you don't need to
|
||||
bother with this one.
|
||||
|
||||
Text::Template This module is not part of the core Perl modules.
|
||||
As a matter of fact, the core Perl modules do not
|
||||
include any templating module to date.
|
||||
This module is absolutely needed, configuration
|
||||
depends on it.
|
||||
|
||||
To avoid unnecessary initial hurdles, we have bundled a copy of the
|
||||
following modules in our source. They will work as fallbacks if
|
||||
these modules aren't already installed on the system.
|
||||
|
||||
Text::Template
|
||||
|
||||
Notes on installing a perl module
|
||||
---------------------------------
|
||||
|
||||
There are a number of ways to install a perl module. In all
|
||||
descriptions below, Text::Template will server as an example.
|
||||
|
||||
1. for Linux users, the easiest is to install with the use of your
|
||||
favorite package manager. Usually, all you need to do is search
|
||||
for the module name and to install the package that comes up.
|
||||
|
||||
On Debian based Linux distributions, it would go like this:
|
||||
|
||||
$ apt-cache search Text::Template
|
||||
...
|
||||
libtext-template-perl - perl module to process text templates
|
||||
$ sudo apt-get install libtext-template-perl
|
||||
|
||||
Perl modules in Debian based distributions use package names like
|
||||
the name of the module in question, with "lib" prepended and
|
||||
"-perl" appended.
|
||||
|
||||
2. Install using CPAN. This is very easy, but usually requires root
|
||||
access:
|
||||
|
||||
$ cpan -i Text::Template
|
||||
|
||||
Note that this runs all the tests that the module to be installed
|
||||
comes with. This is usually a smooth operation, but there are
|
||||
platforms where a failure is indicated even though the actual tests
|
||||
were successful. Should that happen, you can force an
|
||||
installation regardless (that should be safe since you've already
|
||||
seen the tests succeed!):
|
||||
|
||||
$ cpan -f -i Text::Template
|
||||
|
||||
Note: on VMS, you must quote any argument that contains upper case
|
||||
characters, so the lines above would be:
|
||||
|
||||
$ cpan -i "Text::Template"
|
||||
|
||||
and:
|
||||
|
||||
$ cpan -f -i "Text::Template"
|
||||
117
NOTES.UNIX
Normal file
117
NOTES.UNIX
Normal file
@@ -0,0 +1,117 @@
|
||||
|
||||
NOTES FOR UNIX LIKE PLATFORMS
|
||||
=============================
|
||||
|
||||
For Unix/POSIX runtime systems on Windows, please see NOTES.WIN.
|
||||
|
||||
|
||||
OpenSSL uses the compiler to link programs and shared libraries
|
||||
---------------------------------------------------------------
|
||||
|
||||
OpenSSL's generated Makefile uses the C compiler command line to
|
||||
link programs, shared libraries and dynamically loadable shared
|
||||
objects. Because of this, any linking option that's given to the
|
||||
configuration scripts MUST be in a form that the compiler can accept.
|
||||
This varies between systems, where some have compilers that accept
|
||||
linker flags directly, while others take them in '-Wl,' form. You need
|
||||
to read your compiler documentation to figure out what is acceptable,
|
||||
and ld(1) to figure out what linker options are available.
|
||||
|
||||
|
||||
Shared libraries and installation in non-default locations
|
||||
----------------------------------------------------------
|
||||
|
||||
Every Unix system has its own set of default locations for shared
|
||||
libraries, such as /lib, /usr/lib or possibly /usr/local/lib. If
|
||||
libraries are installed in non-default locations, dynamically linked
|
||||
binaries will not find them and therefore fail to run, unless they get
|
||||
a bit of help from a defined runtime shared library search path.
|
||||
|
||||
For OpenSSL's application (the 'openssl' command), our configuration
|
||||
scripts do NOT generally set the runtime shared library search path for
|
||||
you. It's therefore advisable to set it explicitly when configuring,
|
||||
unless the libraries are to be installed in directories that you know
|
||||
to be in the default list.
|
||||
|
||||
Runtime shared library search paths are specified with different
|
||||
linking options depending on operating system and versions thereof, and
|
||||
are talked about differently in their respective documentation;
|
||||
variations of RPATH are the most usual (note: ELF systems have two such
|
||||
tags, more on that below).
|
||||
|
||||
Possible options to set the runtime shared library search path include
|
||||
the following:
|
||||
|
||||
-Wl,-rpath,/whatever/path # Linux, *BSD, etc.
|
||||
-R /whatever/path # Solaris
|
||||
-Wl,-R,/whatever/path # AIX (-bsvr4 is passed internally)
|
||||
-Wl,+b,/whatever/path # HP-UX
|
||||
-rpath /whatever/path # Tru64, IRIX
|
||||
|
||||
OpenSSL's configuration scripts recognise all these options and pass
|
||||
them to the Makefile that they build. (In fact, all arguments starting
|
||||
with '-Wl,' are recognised as linker options.)
|
||||
|
||||
Please do not use verbatim directories in your runtime shared library
|
||||
search path! Some OpenSSL config targets add an extra directory level
|
||||
for multilib installations. To help with that, the produced Makefile
|
||||
includes the variable LIBRPATH, which is a convenience variable to be
|
||||
used with the runtime shared library search path options, as shown in
|
||||
this example:
|
||||
|
||||
$ ./config --prefix=/usr/local/ssl --openssldir=/usr/local/ssl \
|
||||
'-Wl,-rpath,$(LIBRPATH)'
|
||||
|
||||
On modern ELF based systems, there are two runtime search paths tags to
|
||||
consider, DT_RPATH and DT_RUNPATH. Shared objects are searched for in
|
||||
this order:
|
||||
|
||||
1. Using directories specified in DT_RPATH, unless DT_RUNPATH is
|
||||
also set.
|
||||
2. Using the environment variable LD_LIBRARY_PATH
|
||||
3. Using directories specified in DT_RUNPATH.
|
||||
4. Using system shared object caches and default directories.
|
||||
|
||||
This means that the values in the environment variable LD_LIBRARY_PATH
|
||||
won't matter if the library is found in the paths given by DT_RPATH
|
||||
(and DT_RUNPATH isn't set).
|
||||
|
||||
Exactly which of DT_RPATH or DT_RUNPATH is set by default appears to
|
||||
depend on the system. For example, according to documentation,
|
||||
DT_RPATH appears to be deprecated on Solaris in favor of DT_RUNPATH,
|
||||
while on Debian GNU/Linux, either can be set, and DT_RPATH is the
|
||||
default at the time of writing.
|
||||
|
||||
How to choose which runtime search path tag is to be set depends on
|
||||
your system, please refer to ld(1) for the exact information on your
|
||||
system. As an example, the way to ensure the DT_RUNPATH is set on
|
||||
Debian GNU/Linux systems rather than DT_RPATH is to tell the linker to
|
||||
set new dtags, like this:
|
||||
|
||||
$ ./config --prefix=/usr/local/ssl --openssldir=/usr/local/ssl \
|
||||
'-Wl,--enable-new-dtags,-rpath,$(LIBRPATH)'
|
||||
|
||||
It might be worth noting that some/most ELF systems implement support
|
||||
for runtime search path relative to the directory containing current
|
||||
executable, by interpreting $ORIGIN along with some other internal
|
||||
variables. Consult your system documentation.
|
||||
|
||||
Linking your application
|
||||
------------------------
|
||||
|
||||
Third-party applications dynamically linked with OpenSSL (or any other)
|
||||
shared library face exactly the same problem with non-default locations.
|
||||
The OpenSSL config options mentioned above might or might not have bearing
|
||||
on linking of the target application. "Might" means that under some
|
||||
circumstances it would be sufficient to link with OpenSSL shared library
|
||||
"naturally", i.e. with -L/whatever/path -lssl -lcrypto. But there are
|
||||
also cases when you'd have to explicitly specify runtime search path
|
||||
when linking your application. Consult your system documentation and use
|
||||
above section as inspiration...
|
||||
|
||||
Shared OpenSSL builds also install static libraries. Linking with the
|
||||
latter is likely to require special care, because linkers usually look
|
||||
for shared libraries first and tend to remain "blind" to static OpenSSL
|
||||
libraries. Referring to system documentation would suffice, if not for
|
||||
a corner case. On AIX static libraries (in shared build) are named
|
||||
differently, add _a suffix to link with them, e.g. -lcrypto_a.
|
||||
107
NOTES.VMS
Normal file
107
NOTES.VMS
Normal file
@@ -0,0 +1,107 @@
|
||||
|
||||
NOTES FOR THE OPENVMS PLATFORM
|
||||
==============================
|
||||
|
||||
Requirement details
|
||||
-------------------
|
||||
|
||||
In addition to the requirements and instructions listed in INSTALL,
|
||||
this are required as well:
|
||||
|
||||
* At least ODS-5 disk organization for source and build.
|
||||
Installation can be done on any existing disk organization.
|
||||
|
||||
|
||||
About ANSI C compiler
|
||||
---------------------
|
||||
|
||||
An ANSI C compiled is needed among other things. This means that
|
||||
VAX C is not and will not be supported.
|
||||
|
||||
We have only tested with DEC C (a.k.a HP VMS C / VSI C) and require
|
||||
version 7.1 or later. Compiling with a different ANSI C compiler may
|
||||
require some work.
|
||||
|
||||
Please avoid using C RTL feature logical names DECC$* when building
|
||||
and testing OpenSSL. Most of all, they can be disruptive when
|
||||
running the tests, as they affect the Perl interpreter.
|
||||
|
||||
|
||||
About ODS-5 directory names and Perl
|
||||
------------------------------------
|
||||
|
||||
It seems that the perl function canonpath() in the File::Spec module
|
||||
doesn't treat file specifications where the last directory name
|
||||
contains periods very well. Unfortunately, some versions of VMS tar
|
||||
will keep the periods in the OpenSSL source directory instead of
|
||||
converting them to underscore, thereby leaving your source in
|
||||
something like [.openssl-1^.1^.0]. This will lead to issues when
|
||||
configuring and building OpenSSL.
|
||||
|
||||
We have no replacement for Perl's canonpath(), so the best workaround
|
||||
for now is to rename the OpenSSL source directory, as follows (please
|
||||
adjust for the actual source directory name you have):
|
||||
|
||||
$ rename openssl-1^.1^.0.DIR openssl-1_1_0.DIR
|
||||
|
||||
|
||||
About MMS and DCL
|
||||
-----------------
|
||||
|
||||
MMS has certain limitations when it comes to line length, and DCL has
|
||||
certain limitations when it comes to total command length. We do
|
||||
what we can to mitigate, but there is the possibility that it's not
|
||||
enough. Should you run into issues, a very simple solution is to set
|
||||
yourself up a few logical names for the directory trees you're going
|
||||
to use.
|
||||
|
||||
|
||||
About debugging
|
||||
---------------
|
||||
|
||||
If you build for debugging, the default on VMS is that image
|
||||
activation starts the debugger automatically, giving you a debug
|
||||
prompt. Unfortunately, this disrupts all other uses, such as running
|
||||
test programs in the test framework.
|
||||
|
||||
Generally speaking, if you build for debugging, only use the programs
|
||||
directly for debugging. Do not try to use them from a script, such
|
||||
as running the test suite.
|
||||
|
||||
*The following is not available on Alpha*
|
||||
|
||||
As a compromise, we're turning off the flag that makes the debugger
|
||||
start automatically. If there is a program that you need to debug,
|
||||
you need to turn that flag back on first, for example:
|
||||
|
||||
$ set image /flag=call_debug [.test]evp_test.exe
|
||||
|
||||
Then just run it and you will find yourself in a debugging session.
|
||||
When done, we recommend that you turn that flag back off:
|
||||
|
||||
$ set image /flag=nocall_debug [.test]evp_test.exe
|
||||
|
||||
|
||||
Checking the distribution
|
||||
-------------------------
|
||||
|
||||
There have been reports of places where the distribution didn't quite
|
||||
get through, for example if you've copied the tree from a NFS-mounted
|
||||
Unix mount point.
|
||||
|
||||
The easiest way to check if everything got through as it should is to
|
||||
check for one of the following files:
|
||||
|
||||
[.crypto]opensslconf^.h.in
|
||||
|
||||
The best way to get a correct distribution is to download the gzipped
|
||||
tar file from ftp://ftp.openssl.org/source/, use GZIP -d to uncompress
|
||||
it and VMSTAR to unpack the resulting tar file.
|
||||
|
||||
Gzip and VMSTAR are available here:
|
||||
|
||||
http://antinode.info/dec/index.html#Software
|
||||
|
||||
Should you need it, you can find UnZip for VMS here:
|
||||
|
||||
http://www.info-zip.org/UnZip.html
|
||||
165
NOTES.WIN
Normal file
165
NOTES.WIN
Normal file
@@ -0,0 +1,165 @@
|
||||
|
||||
NOTES FOR THE WINDOWS PLATFORMS
|
||||
===============================
|
||||
|
||||
Windows targets can be classified as "native", ones that use Windows API
|
||||
directly, and "hosted" which rely on POSIX-compatible layer. "Native"
|
||||
targets are VC-* (where "VC" stems from abbreviating Microsoft Visual C
|
||||
compiler) and mingw[64]. "Hosted" platforms are Cygwin and MSYS[2]. Even
|
||||
though the latter is not directly supported by OpenSSL Team, it's #1
|
||||
popular choice for building MinGW targets. In the nutshell MinGW builds
|
||||
are always cross-compiled. On Linux and Cygwin they look exactly as such
|
||||
and require --cross-compile-prefix option. While on MSYS[2] it's solved
|
||||
rather by placing gcc that produces "MinGW binary" code 1st on $PATH.
|
||||
This is customarily source of confusion. "Hosted" applications "live" in
|
||||
emulated file system name space with POSIX-y root, mount points, /dev
|
||||
and even /proc. Confusion is intensified by the fact that MSYS2 shell
|
||||
(or rather emulated execve(2) call) examines the binary it's about to
|
||||
start, and if it's found *not* to be linked with MSYS2 POSIX-y thing,
|
||||
command line arguments that look like file names get translated from
|
||||
emulated name space to "native". For example '/c/some/where' becomes
|
||||
'c:\some\where', '/dev/null' - 'nul'. This creates an illusion that
|
||||
there is no difference between MSYS2 shell and "MinGW binary", but
|
||||
there is. Just keep in mind that "MinGW binary" "experiences" Windows
|
||||
system in exactly same way as one produced by VC, and in its essence
|
||||
is indistinguishable from the latter. (Which by the way is why
|
||||
it's referred to in quotes here, as "MinGW binary", it's just as
|
||||
"native" as it can get.)
|
||||
|
||||
Visual C++ builds, a.k.a. VC-*
|
||||
==============================
|
||||
|
||||
Requirement details
|
||||
-------------------
|
||||
|
||||
In addition to the requirements and instructions listed in INSTALL,
|
||||
these are required as well:
|
||||
|
||||
- Perl. We recommend ActiveState Perl, available from
|
||||
https://www.activestate.com/ActivePerl. Another viable alternative
|
||||
appears to be Strawberry Perl, http://strawberryperl.com.
|
||||
You also need the perl module Text::Template, available on CPAN.
|
||||
Please read NOTES.PERL for more information.
|
||||
|
||||
- Microsoft Visual C compiler. Since we can't test them all, there is
|
||||
unavoidable uncertainty about which versions are supported. Latest
|
||||
version along with couple of previous are certainly supported. On
|
||||
the other hand oldest one is known not to work. Everything between
|
||||
falls into best-effort category.
|
||||
|
||||
- Netwide Assembler, a.k.a. NASM, available from https://www.nasm.us,
|
||||
is required. Note that NASM is the only supported assembler. Even
|
||||
though Microsoft provided assembler is NOT supported, contemporary
|
||||
64-bit version is exercised through continuous integration of
|
||||
VC-WIN64A-masm target.
|
||||
|
||||
|
||||
Installation directories
|
||||
------------------------
|
||||
|
||||
The default installation directories are derived from environment
|
||||
variables.
|
||||
|
||||
For VC-WIN32, the following defaults are use:
|
||||
|
||||
PREFIX: %ProgramFiles(86)%\OpenSSL
|
||||
OPENSSLDIR: %CommonProgramFiles(86)%\SSL
|
||||
|
||||
For VC-WIN64, the following defaults are use:
|
||||
|
||||
PREFIX: %ProgramW6432%\OpenSSL
|
||||
OPENSSLDIR: %CommonProgramW6432%\SSL
|
||||
|
||||
Should those environment variables not exist (on a pure Win32
|
||||
installation for examples), these fallbacks are used:
|
||||
|
||||
PREFIX: %ProgramFiles%\OpenSSL
|
||||
OPENSSLDIR: %CommonProgramFiles%\SSL
|
||||
|
||||
ALSO NOTE that those directories are usually write protected, even if
|
||||
your account is in the Administrators group. To work around that,
|
||||
start the command prompt by right-clicking on it and choosing "Run as
|
||||
Administrator" before running 'nmake install'. The other solution
|
||||
is, of course, to choose a different set of directories by using
|
||||
--prefix and --openssldir when configuring.
|
||||
|
||||
mingw and mingw64
|
||||
=================
|
||||
|
||||
* MSYS2 shell and development environment installation:
|
||||
|
||||
Download MSYS2 from https://msys2.github.io/ and follow installation
|
||||
instructions. Once up and running install even make, perl, (git if
|
||||
needed,) mingw-w64-i686-gcc and/or mingw-w64-x86_64-gcc. You should
|
||||
have corresponding MinGW items on your start menu, use *them*, not
|
||||
generic MSYS2. As implied in opening note, difference between them
|
||||
is which compiler is found 1st on $PATH. At this point ./config
|
||||
should recognize correct target, roll as if it was Unix...
|
||||
|
||||
* It is also possible to build mingw[64] on Linux or Cygwin by
|
||||
configuring with corresponding --cross-compile-prefix= option. For
|
||||
example
|
||||
|
||||
./Configure mingw --cross-compile-prefix=i686-w64-mingw32- ...
|
||||
|
||||
or
|
||||
|
||||
./Configure mingw64 --cross-compile-prefix=x86_64-w64-mingw32- ...
|
||||
|
||||
This naturally implies that you've installed corresponding add-on
|
||||
packages.
|
||||
|
||||
Linking your application
|
||||
========================
|
||||
|
||||
This section applies to all "native" builds.
|
||||
|
||||
If you link with static OpenSSL libraries then you're expected to
|
||||
additionally link your application with WS2_32.LIB, GDI32.LIB,
|
||||
ADVAPI32.LIB, CRYPT32.LIB and USER32.LIB. Those developing
|
||||
non-interactive service applications might feel concerned about
|
||||
linking with GDI32.LIB and USER32.LIB, as they are justly associated
|
||||
with interactive desktop, which is not available to service
|
||||
processes. The toolkit is designed to detect in which context it's
|
||||
currently executed, GUI, console app or service, and act accordingly,
|
||||
namely whether or not to actually make GUI calls. Additionally those
|
||||
who wish to /DELAYLOAD:GDI32.DLL and /DELAYLOAD:USER32.DLL and
|
||||
actually keep them off service process should consider implementing
|
||||
and exporting from .exe image in question own _OPENSSL_isservice not
|
||||
relying on USER32.DLL. E.g., on Windows Vista and later you could:
|
||||
|
||||
__declspec(dllexport) __cdecl BOOL _OPENSSL_isservice(void)
|
||||
{ DWORD sess;
|
||||
if (ProcessIdToSessionId(GetCurrentProcessId(),&sess))
|
||||
return sess==0;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
If you link with OpenSSL .DLLs, then you're expected to include into
|
||||
your application code small "shim" snippet, which provides glue between
|
||||
OpenSSL BIO layer and your compiler run-time. See the OPENSSL_Applink
|
||||
manual page for further details.
|
||||
|
||||
Cygwin, "hosted" environment
|
||||
============================
|
||||
|
||||
Cygwin implements a Posix/Unix runtime system (cygwin1.dll) on top of the
|
||||
Windows subsystem and provides a bash shell and GNU tools environment.
|
||||
Consequently, a make of OpenSSL with Cygwin is virtually identical to the
|
||||
Unix procedure.
|
||||
|
||||
To build OpenSSL using Cygwin, you need to:
|
||||
|
||||
* Install Cygwin (see https://cygwin.com/)
|
||||
|
||||
* Install Cygwin Perl and ensure it is in the path. Recall that
|
||||
as least 5.10.0 is required.
|
||||
|
||||
* Run the Cygwin bash shell
|
||||
|
||||
Apart from that, follow the Unix instructions in INSTALL.
|
||||
|
||||
NOTE: "make test" and normal file operations may fail in directories
|
||||
mounted as text (i.e. mount -t c:\somewhere /home) due to Cygwin
|
||||
stripping of carriage returns. To avoid this ensure that a binary
|
||||
mount is used, e.g. mount -b c:\somewhere /home.
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,99 +0,0 @@
|
||||
*** Tkinter.py.dist Mon Oct 16 14:49:40 2000
|
||||
--- Tkinter.py Wed Nov 22 01:56:28 2000
|
||||
***************
|
||||
*** 45,51 ****
|
||||
|
||||
TkVersion = _string.atof(_tkinter.TK_VERSION)
|
||||
TclVersion = _string.atof(_tkinter.TCL_VERSION)
|
||||
!
|
||||
READABLE = _tkinter.READABLE
|
||||
WRITABLE = _tkinter.WRITABLE
|
||||
EXCEPTION = _tkinter.EXCEPTION
|
||||
--- 45,53 ----
|
||||
|
||||
TkVersion = _string.atof(_tkinter.TK_VERSION)
|
||||
TclVersion = _string.atof(_tkinter.TCL_VERSION)
|
||||
! try: TixVersion = _string.atof(_tkinter.TIX_VERSION)
|
||||
! except AttributeError: TixVersion = None
|
||||
!
|
||||
READABLE = _tkinter.READABLE
|
||||
WRITABLE = _tkinter.WRITABLE
|
||||
EXCEPTION = _tkinter.EXCEPTION
|
||||
***************
|
||||
*** 1770,1781 ****
|
||||
# XXX Obsolete -- better use self.tk.call directly!
|
||||
return self.tk.call((self._w, name) + args)
|
||||
|
||||
! class Widget(BaseWidget, Pack, Place, Grid):
|
||||
! """Internal class.
|
||||
!
|
||||
! Base class for a widget which can be positioned with the geometry managers
|
||||
! Pack, Place or Grid."""
|
||||
! pass
|
||||
|
||||
class Toplevel(BaseWidget, Wm):
|
||||
"""Toplevel widget, e.g. for dialogs."""
|
||||
--- 1772,1834 ----
|
||||
# XXX Obsolete -- better use self.tk.call directly!
|
||||
return self.tk.call((self._w, name) + args)
|
||||
|
||||
! if TixVersion:
|
||||
! # The Tix 'tixForm' geometry manager
|
||||
! class Form:
|
||||
! """The Tix Form geometry manager
|
||||
!
|
||||
! Widgets can be arranged by specifying attachments to other widgets.
|
||||
! See Tix documentation for complete details"""
|
||||
!
|
||||
! def config(self, cnf={}, **kw):
|
||||
! apply(self.tk.call, ('tixForm', self._w) + self._options(cnf, kw))
|
||||
! form = config
|
||||
!
|
||||
! def __setitem__(self, key, value):
|
||||
! Form.form({key: value})
|
||||
!
|
||||
! def check(self):
|
||||
! return self.tk.call('tixForm', 'check', self._w)
|
||||
!
|
||||
! def forget(self):
|
||||
! self.tk.call('tixForm', 'forget', self._w)
|
||||
!
|
||||
! def grid(self, xsize=0, ysize=0):
|
||||
! if (not xsize) and (not ysize):
|
||||
! x = self.tk.call('tixForm', 'grid', self._w)
|
||||
! y = self.tk.splitlist(x)
|
||||
! z = ()
|
||||
! for x in y:
|
||||
! z = z + (self.tk.getint(x),)
|
||||
! return z
|
||||
! self.tk.call('tixForm', 'grid', self._w, xsize, ysize)
|
||||
!
|
||||
! def info(self, option=None):
|
||||
! if not option:
|
||||
! return self.tk.call('tixForm', 'info', self._w)
|
||||
! if option[0] != '-':
|
||||
! option = '-' + option
|
||||
! return self.tk.call('tixForm', 'info', self._w, option)
|
||||
!
|
||||
! def slaves(self):
|
||||
! return map(self._nametowidget,
|
||||
! self.tk.splitlist(
|
||||
! self.tk.call(
|
||||
! 'tixForm', 'slaves', self._w)))
|
||||
!
|
||||
! class Widget(BaseWidget, Pack, Place, Grid, Form):
|
||||
! """Internal class.
|
||||
!
|
||||
! Base class for a widget which can be positioned with the geometry managers
|
||||
! Pack, Place, Grid or Form."""
|
||||
! pass
|
||||
! else:
|
||||
! class Widget(BaseWidget, Pack, Place, Grid):
|
||||
! """Internal class.
|
||||
!
|
||||
! Base class for a widget which can be positioned with the geometry managers
|
||||
! Pack, Place or Grid."""
|
||||
! pass
|
||||
|
||||
class Toplevel(BaseWidget, Wm):
|
||||
"""Toplevel widget, e.g. for dialogs."""
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,41 +0,0 @@
|
||||
*** _tkinter.c.dist Mon Oct 16 14:49:32 2000
|
||||
--- _tkinter.c Wed Nov 22 00:27:54 2000
|
||||
***************
|
||||
*** 43,48 ****
|
||||
--- 43,51 ----
|
||||
|
||||
#include <tcl.h>
|
||||
#include <tk.h>
|
||||
+ #ifdef WITH_TIX
|
||||
+ #include <tix.h>
|
||||
+ #endif
|
||||
|
||||
#define TKMAJORMINOR (TK_MAJOR_VERSION*1000 + TK_MINOR_VERSION)
|
||||
|
||||
***************
|
||||
*** 427,432 ****
|
||||
--- 430,441 ----
|
||||
PySys_WriteStderr("Tk_Init error: %s\n", Tcl_GetStringResult(interp));
|
||||
return TCL_ERROR;
|
||||
}
|
||||
+ #ifdef WITH_TIX
|
||||
+ if (Tix_Init(interp) == TCL_ERROR) {
|
||||
+ PySys_WriteStderr("Tix_Init error: %s\n", Tcl_GetStringResult(interp));
|
||||
+ return TCL_ERROR;
|
||||
+ }
|
||||
+ #endif
|
||||
return TCL_OK;
|
||||
}
|
||||
#endif /* !WITH_APPINIT */
|
||||
***************
|
||||
*** 2121,2126 ****
|
||||
--- 2130,2138 ----
|
||||
ins_long(d, "DONT_WAIT", TCL_DONT_WAIT);
|
||||
ins_string(d, "TK_VERSION", TK_VERSION);
|
||||
ins_string(d, "TCL_VERSION", TCL_VERSION);
|
||||
+ #ifdef WITH_TIX
|
||||
+ ins_string(d, "TIX_VERSION", TIX_VERSION);
|
||||
+ #endif
|
||||
|
||||
PyDict_SetItemString(d, "TkappType", (PyObject *)&Tkapp_Type);
|
||||
|
||||
@@ -1,94 +0,0 @@
|
||||
/* appinit.c -- Tcl and Tk application initialization.
|
||||
|
||||
The function Tcl_AppInit() below initializes various Tcl packages.
|
||||
It is called for each Tcl interpreter created by _tkinter.create().
|
||||
It needs to be compiled with -DWITH_<package> flags for each package
|
||||
that you are statically linking with. You may have to add sections
|
||||
for packages not yet listed below.
|
||||
|
||||
Note that those packages for which Tcl_StaticPackage() is called with
|
||||
a NULL first argument are known as "static loadable" packages to
|
||||
Tcl but not actually initialized. To use these, you have to load
|
||||
it explicitly, e.g. tkapp.eval("load {} Blt").
|
||||
*/
|
||||
|
||||
#include <tcl.h>
|
||||
#include <tk.h>
|
||||
|
||||
int
|
||||
Tcl_AppInit(Tcl_Interp *interp)
|
||||
{
|
||||
Tk_Window main_window;
|
||||
|
||||
if (Tcl_Init (interp) == TCL_ERROR)
|
||||
return TCL_ERROR;
|
||||
if (Tk_Init (interp) == TCL_ERROR)
|
||||
return TCL_ERROR;
|
||||
|
||||
|
||||
main_window = Tk_MainWindow(interp);
|
||||
|
||||
|
||||
#ifdef WITH_MOREBUTTONS
|
||||
{
|
||||
extern Tcl_CmdProc studButtonCmd;
|
||||
extern Tcl_CmdProc triButtonCmd;
|
||||
|
||||
Tcl_CreateCommand(interp, "studbutton", studButtonCmd,
|
||||
(ClientData) main_window, NULL);
|
||||
Tcl_CreateCommand(interp, "tributton", triButtonCmd,
|
||||
(ClientData) main_window, NULL);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef WITH_PIL /* 0.2b5 and later -- not yet released as of May 14 */
|
||||
{
|
||||
extern void TkImaging_Init(Tcl_Interp *);
|
||||
TkImaging_Init(interp);
|
||||
/* XXX TkImaging_Init() doesn't have the right return type */
|
||||
/*Tcl_StaticPackage(interp, "Imaging", TkImaging_Init, NULL);*/
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef WITH_PIL_OLD /* 0.2b4 and earlier */
|
||||
{
|
||||
extern void TkImaging_Init(void);
|
||||
/* XXX TkImaging_Init() doesn't have the right prototype */
|
||||
/*Tcl_StaticPackage(interp, "Imaging", TkImaging_Init, NULL);*/
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef WITH_TIX
|
||||
{
|
||||
extern int Tix_Init(Tcl_Interp *interp);
|
||||
extern int Tix_SafeInit(Tcl_Interp *interp);
|
||||
|
||||
if (Tix_Init(interp) == TCL_ERROR) {
|
||||
return TCL_ERROR;
|
||||
}
|
||||
Tcl_StaticPackage(interp, "Tix", Tix_Init, Tix_SafeInit);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef WITH_BLT
|
||||
{
|
||||
extern int Blt_Init(Tcl_Interp *);
|
||||
extern int Blt_SafeInit(Tcl_Interp *);
|
||||
Tcl_StaticPackage(NULL, "Blt", Blt_Init, Blt_SafeInit);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef WITH_TOGL
|
||||
{
|
||||
/* XXX I've heard rumors that this doesn't work */
|
||||
extern int Togl_Init(Tcl_Interp *);
|
||||
/* XXX Is there no Togl_SafeInit? */
|
||||
Tcl_StaticPackage(NULL, "Togl", Togl_Init, NULL);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef WITH_XXX
|
||||
|
||||
#endif
|
||||
return TCL_OK;
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
*** tkappinit.c.dist Mon Oct 16 14:49:34 2000
|
||||
--- tkappinit.c Wed Nov 22 02:00:13 2000
|
||||
***************
|
||||
*** 25,32 ****
|
||||
--- 25,34 ----
|
||||
if (Tk_Init (interp) == TCL_ERROR)
|
||||
return TCL_ERROR;
|
||||
|
||||
+
|
||||
main_window = Tk_MainWindow(interp);
|
||||
|
||||
+
|
||||
#ifdef WITH_MOREBUTTONS
|
||||
{
|
||||
extern Tcl_CmdProc studButtonCmd;
|
||||
***************
|
||||
*** 60,66 ****
|
||||
{
|
||||
extern int Tix_Init(Tcl_Interp *interp);
|
||||
extern int Tix_SafeInit(Tcl_Interp *interp);
|
||||
! Tcl_StaticPackage(NULL, "Tix", Tix_Init, Tix_SafeInit);
|
||||
}
|
||||
#endif
|
||||
|
||||
--- 62,72 ----
|
||||
{
|
||||
extern int Tix_Init(Tcl_Interp *interp);
|
||||
extern int Tix_SafeInit(Tcl_Interp *interp);
|
||||
!
|
||||
! if (Tix_Init(interp) == TCL_ERROR) {
|
||||
! return TCL_ERROR;
|
||||
! }
|
||||
! Tcl_StaticPackage(interp, "Tix", Tix_Init, Tix_SafeInit);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
1) The compound image stuff doesn't work. CmpImg core dumps.
|
||||
This seems to be something to do with Tcl/Tkinter
|
||||
|
||||
**** FIXED **** as of Tcl7.6, Tk4.2, Tix4.0.5
|
||||
|
||||
2) tk.call is used a lot in the demos. These functions should be
|
||||
encapsulated somewhere in Python (more mods to Tkinter ?)
|
||||
|
||||
3) Callback definition is not straightforward. A lot of the time
|
||||
a lambda definition has to be written. However, this is a
|
||||
general Tkinter problem.
|
||||
|
||||
4) In the Control widget, the callbacks for increment, decrement
|
||||
and validate should return a string to Tix. Find a way to do
|
||||
this.
|
||||
@@ -1,6 +0,0 @@
|
||||
$Id: BUGS-2.0.txt,v 1.1 2000/11/05 19:46:32 idiscovery Exp $
|
||||
|
||||
1) There seems to be a problem with ComboBox that shows up
|
||||
in the ExFileSelectBox demo. The popdown scrolled list widget
|
||||
is being created, then destroyed. This does not happen in Tcl Tix.
|
||||
|
||||
@@ -1,67 +0,0 @@
|
||||
$Id: ChangeLog,v 1.1 2000/11/05 19:46:02 idiscovery Exp $
|
||||
|
||||
PyTix version 2.0 alpha
|
||||
-----------------------
|
||||
|
||||
CHANGES
|
||||
-------
|
||||
1) Made diffs against Python 2.0 and put them in the 2.0 subdirectory.
|
||||
2) Changed _tkinter.c to define TIX_VERSION and call Tix_Init.
|
||||
|
||||
BUG FIXES
|
||||
---------
|
||||
1) Fixed demo/samples/CmpImg.py to make the images be descendents
|
||||
of the root window (see the Python FAQ for an explanation).
|
||||
|
||||
PyTix version 1.12
|
||||
------------------
|
||||
|
||||
CHANGES
|
||||
-------
|
||||
1) Tkinter.py now only has the addition of the Form class since
|
||||
the globalsetvar() etc. has been rolled into the 1.4 Tkinter
|
||||
|
||||
BUG FIXES
|
||||
---------
|
||||
1) Fixed typo in TixWidgets.subwidgets_all()
|
||||
2) Fixed bug in TixWidgets.subwidgets_all where some Tix internal
|
||||
widgets were causing an exception.
|
||||
3) Added new method config_all to set common configuration options
|
||||
for a tree of subwidgets
|
||||
4) The label subwidget of the ComboBox was inadvertently left out
|
||||
5) The orientation option of a PanedWindow was not marked static
|
||||
|
||||
|
||||
PyTix Version 1.11
|
||||
-------------------
|
||||
|
||||
ADDITIONS
|
||||
---------
|
||||
|
||||
Tix ver. 4.0.1 has enhanced HList functionality and an additional widget (Tree).
|
||||
Tix.py V1.11 has been updated to reflect these changes as well. However,
|
||||
it will still work with Tix v4.0 since there are no incompatible changes (only
|
||||
additions).
|
||||
|
||||
A new DisplayStyle class has been added (thanks to Steffen Kremser). This
|
||||
allows the user to create a display style and apply it to many items
|
||||
subsequently (via the -style switch).
|
||||
|
||||
BUG FIXES
|
||||
---------
|
||||
|
||||
0) In the __init__ methods for all the __dummy... Tix widgets, initialization
|
||||
of the subwidgets was missing in V1.1. Thanks to Guenter Kolousek for
|
||||
pointing this out.
|
||||
|
||||
1) Removed listbox child of ComboBox as result of (0). It can now be accessed
|
||||
as combobox.slistbox.listbox
|
||||
|
||||
2) The dirlist member in ExFileSelectBox was actually a DirList and not a
|
||||
ScrolledListBox.
|
||||
|
||||
3) The HList widget method 'column' was renamed and modified to 'column_width'
|
||||
|
||||
4) NoteBook.raised_page() renamed to NoteBook.raised()
|
||||
|
||||
5) Various other small bug fixes
|
||||
@@ -1,52 +0,0 @@
|
||||
Installing PyTix
|
||||
----------------
|
||||
|
||||
0) To use PyTix, you need Tcl (V7.6), Tk (V4.2), Tix (V4.0.5) and Python (V1.4).
|
||||
PyTix has been written and tested on a Sun Sparc running Solaris 2.5
|
||||
with the above mentioned packages.
|
||||
|
||||
Tcl7.5 and Tk4.1 should work just as well but I haven't tried it. If
|
||||
you are using Tcl7.4 and Tk4.0, there are bugs with the handling of
|
||||
compound images.
|
||||
|
||||
There is nothing OS-specific in PyTix itself so it should work on
|
||||
any machine with Tix and Python installed.
|
||||
|
||||
1) Build and install Tcl 7.6, Tk 4.2 and Tix 4.0.5.
|
||||
Ensure that Tix is properly installed by running tixwish and executing
|
||||
the demo programs
|
||||
|
||||
Note that Tix 4.0.5 does not compile with Tcl 7.6 / Tk 4.2 out of the
|
||||
box although it seems to compile and run OK. You might want to use
|
||||
Tcl 7.5/ Tk 4.1 instead.
|
||||
|
||||
2) Modify _tkinter.c in the Modules directory of the Python distribution.
|
||||
In the routine Tcl_AppInit(), add the following lines just after the
|
||||
block which calls to Tk_Init().
|
||||
|
||||
if (Tix_Init (interp) == TCL_ERROR) {
|
||||
fprintf(stderr, "Tix_Init error: %s\n", interp->result);
|
||||
return TCL_ERROR;
|
||||
}
|
||||
|
||||
The modified _tkinter.c is supplied.
|
||||
|
||||
3) Modify the Modules/Setup file to link in the Tix library. On Solaris,
|
||||
this looks like
|
||||
|
||||
tkinter tkintermodule.c -I/usr/local/include -L/usr/local/lib \
|
||||
-ltix4.0-tk4.1 -ltk4.2 -ltcl7.6 -lX11
|
||||
|
||||
4) Copy Tix.py and the modified Tkinter.py to Lib/tkinter. If you have
|
||||
modified Tkinter for any reason, just apply the diffs by hand. There
|
||||
are only a few changes (see Tkinter.diff)
|
||||
|
||||
5) Rebuild Python and reinstall.
|
||||
|
||||
You should now have a working Tix implementation in Python. To see if all
|
||||
is as it should be, run the 'tixwidgets.py' script in the demos directory.
|
||||
|
||||
If you find any bugs or have suggestions for improvement, please report them
|
||||
to me.
|
||||
|
||||
Sudhir Shenoy (sshenoy@gol.com)
|
||||
@@ -1,76 +0,0 @@
|
||||
$Id: INSTALL-2.0.txt,v 1.4 2000/11/23 02:32:30 idiscovery Exp $
|
||||
|
||||
Installing PyTix
|
||||
----------------
|
||||
|
||||
0) To use PyTix, you need Tcl/Tk (V8.[012]), Tix (V8.1) and Python (V2.0).
|
||||
PyTix has been written and tested on a Intel Pentium running RH Linux 5.2
|
||||
with the above mentioned packages.
|
||||
|
||||
There is nothing OS-specific in PyTix itself so it should work on
|
||||
any machine with Tix and Python installed.
|
||||
|
||||
1) Build and install Tcl/Tk 8.0 8.1 or 8.2 and Tix 8.1.
|
||||
Ensure that Tix is properly installed by running tixwish and executing
|
||||
the demo programs. Under Unix use the --enable-shared configure option
|
||||
for all three. We recommend tcl tcl8.2.3 for this release of PyTix.
|
||||
|
||||
Note that Tix 8.1 does not compile with Tcl 8.3 under Windows out of the
|
||||
box although it seems to compile and run OK. You might want to use
|
||||
Tcl 8.2 instead.
|
||||
|
||||
2) Modify _tkinter.c in the Modules directory of the Python distribution.
|
||||
The modified _tkinter.c is supplied in the 2.0 subdirectory.
|
||||
Modify tkappinit.c in the Modules directory of the Python distribution.
|
||||
The modified tkappinit.c is supplied in the 2.0 subdirectory.
|
||||
These modified files can be used for Tkinter with or without Tix.
|
||||
|
||||
3) Modify the Modules/Setup file to link in the Tix library according
|
||||
to the comments in the file. On Linux this looks like
|
||||
|
||||
# *** Always uncomment this (leave the leading underscore in!):
|
||||
_tkinter _tkinter.c tkappinit.c -DWITH_APPINIT \
|
||||
# *** Uncomment and edit to reflect where your Tcl/Tk headers are:
|
||||
-I/usr/local/src/tcl8.2.3/generic -I/usr/local/src/tk8.2.3/generic \
|
||||
# *** Uncomment and edit to reflect where your X11 header files are:
|
||||
-I/usr/X11R6/include \
|
||||
# *** Or uncomment this for Solaris:
|
||||
# -I/usr/openwin/include \
|
||||
# *** Uncomment and edit for Tix extension only:
|
||||
-DWITH_TIX -I/usr/local/src/tix-8.1.1/generic -L/usr/local/src/tix-8.1.1/unix/tk8.2 -ltix8.1.8.2 \
|
||||
# *** Uncomment and edit for BLT extension only:
|
||||
# -DWITH_BLT -I/usr/local/blt/blt8.0-unoff/include -lBLT8.0 \
|
||||
# *** Uncomment and edit for PIL (TkImaging) extension only:
|
||||
# -DWITH_PIL -I../Extensions/Imaging/libImaging tkImaging.c \
|
||||
# *** Uncomment and edit for TOGL extension only:
|
||||
# -DWITH_TOGL togl.c \
|
||||
# *** Uncomment and edit to reflect where your Tcl/Tk libraries are:
|
||||
-L/usr/local/src/tcl8.2.3/unix -L/usr/local/src/tk8.2.3/unix \
|
||||
# *** Uncomment and edit to reflect your Tcl/Tk versions:
|
||||
-ltk8.2 -ltcl8.2 \
|
||||
# *** Uncomment and edit to reflect where your X11 libraries are:
|
||||
-L/usr/X11R6/lib \
|
||||
# *** Or uncomment this for Solaris:
|
||||
# -L/usr/openwin/lib \
|
||||
# *** Uncomment these for TOGL extension only:
|
||||
# -lGL -lGLU -lXext -lXmu \
|
||||
# *** Uncomment for AIX:
|
||||
# -lld \
|
||||
# *** Always uncomment this; X11 libraries to link with:
|
||||
-lX11
|
||||
|
||||
4) Modify Tkinter.py in the Lib/lib-tk directory of the Python distribution.
|
||||
The modified Tkinter.py is supplied in the 2.0 subdirectory.
|
||||
This modified file can be used for Tkinter with or without Tix.
|
||||
|
||||
5) Copy Tix.py to the Lib/lib-tk directory of the Python distribution.
|
||||
|
||||
6) Rebuild Python and reinstall.
|
||||
|
||||
You should now have a working Tix implementation in Python. To see if all
|
||||
is as it should be, run the 'tixwidgets.py' script in the demos directory.
|
||||
|
||||
If you find any bugs or have suggestions for improvement, please report them
|
||||
via http://tix.sourceforge.net
|
||||
|
||||
|
||||
@@ -1,100 +0,0 @@
|
||||
About PyTix
|
||||
-----------
|
||||
|
||||
PyTix is based on an idea of Jean-Marc Lugrin (lugrin@ms.com) who wrote
|
||||
pytix (another Python-Tix marriage). Tix widgets are an attractive and
|
||||
useful extension to Tk. See http://www.cis.upenn.edu/~ioi/tix/tix.html
|
||||
for more details about Tix and how to get it.
|
||||
|
||||
PyTix differs from Pytix in the following ways -
|
||||
1) It is complete at least as far as the Tix documentation
|
||||
would allow !!
|
||||
2) Tix widgets are represented by classes in Python. Sub-widgets
|
||||
are members of the mega-widget class. For example, if a
|
||||
particular TixWidget (e.g. ScrolledText) has an embedded widget
|
||||
(Text in this case), it is possible to call the methods of the
|
||||
child directly.
|
||||
3) The members of the class are created automatically. In the case
|
||||
of widgets like ButtonBox, the members are added dynamically.
|
||||
|
||||
|
||||
Changes in Version 1.12 (see ChangeLog for details)
|
||||
-----------------------
|
||||
|
||||
1) Minor bug fixes
|
||||
2) Tested with Python 1.4, Tk 4.2, Tcl 7.6 and Tix 4.0.5
|
||||
3) Compound Images now work !!
|
||||
|
||||
Modifications to Tkinter
|
||||
------------------------
|
||||
|
||||
To support the full Tix functionality, the Tkinter module has been
|
||||
modified. The modifications are quite minor (see Tkinter.diff for a diff
|
||||
listing). Basically, in order to support the 'tixForm' geometry manager,
|
||||
a new class 'Form' has been added. The class 'Widget' now also inherits
|
||||
from this class.
|
||||
|
||||
|
||||
Tix.py
|
||||
------
|
||||
|
||||
PyTix has Tix.py as the wrapper for Tix widgets. It defines a couple of new
|
||||
classes (TixWidget and TixSubWidget) which do the dirty work of initializing
|
||||
a new widget instance.
|
||||
|
||||
The problem in Tix is that a single widget is actually a composite of many
|
||||
smaller widgets. For example, a LabelEntry widget contains a Label and
|
||||
and Entry. When we instantiate the LabelEntry widget, Python code is not
|
||||
aware of the subwidgets. This is a problem because we cannot refer to
|
||||
the widgets e.g. to change the color. We cannot instantiate a new widget
|
||||
either because this would send a call to Tk to create a widget that is
|
||||
already created. To separate the instantiation of the Python class and
|
||||
the Tk widget, we need to have the new classes.
|
||||
|
||||
The subwidgets instances in Python is properly subclassed from the
|
||||
appropriate base class. For example the 'entry' child of the LabelEntry
|
||||
widget is subclassed from the Entry class. Thus all the methods of the
|
||||
Entry class are known by the subwidget. This makes it possible to write
|
||||
code like
|
||||
|
||||
w = Tix.LabelEntry(master)
|
||||
w.text['bg'] = 'gray'
|
||||
w.text.insert(Tix.END, 'Hello, world')
|
||||
|
||||
The appropriate subwidgets are created automatically (they are kept in a
|
||||
list in the parent). Member access is provided by writing the __getattr__
|
||||
method.
|
||||
|
||||
There is a separate class for each Tix widget.
|
||||
There are a few Tix convenience routines defined at the end as well.
|
||||
|
||||
|
||||
How to install
|
||||
--------------
|
||||
|
||||
See the file INSTALL for installation directions
|
||||
|
||||
|
||||
How to use
|
||||
----------
|
||||
|
||||
You must import the module Tix in your program. You no longer have to
|
||||
import Tkinter since Tix.py does it for you.
|
||||
|
||||
See the sample programs in demos and demos/samples for an idea of how
|
||||
to use Tix.
|
||||
|
||||
The basic documentation remains the Tix man pages. Note that currently
|
||||
this documentation is not complete but it is expected to be so by Jan.
|
||||
1996.
|
||||
|
||||
Credits
|
||||
-------
|
||||
|
||||
The original pytix was written by Jean-Marc Lugrin (lugrin@ms.com).
|
||||
|
||||
PyTix (this package) is written by Sudhir Shenoy (sshenoy@gol.com)
|
||||
|
||||
Version 1.11 was only possible with help from Steffen Kremser(kremser@danet.de)
|
||||
who helped a lot on cleaning up the HList widget and also translated the HList
|
||||
demos from the Tix distribution
|
||||
@@ -1,19 +0,0 @@
|
||||
About PyTix
|
||||
-----------
|
||||
|
||||
PyTix is based on an idea of Jean-Marc Lugrin (lugrin@ms.com) who wrote
|
||||
pytix (another Python-Tix marriage). Tix widgets are an attractive and
|
||||
useful extension to Tk. See http://tix.sourceforge.net
|
||||
for more details about Tix and how to get it.
|
||||
|
||||
Features:
|
||||
1) It is almost complete.
|
||||
2) Tix widgets are represented by classes in Python. Sub-widgets
|
||||
are members of the mega-widget class. For example, if a
|
||||
particular TixWidget (e.g. ScrolledText) has an embedded widget
|
||||
(Text in this case), it is possible to call the methods of the
|
||||
child directly.
|
||||
3) The members of the class are created automatically. In the case
|
||||
of widgets like ButtonBox, the members are added dynamically.
|
||||
|
||||
|
||||
1097
PyTix-2.0/Tix.py
1097
PyTix-2.0/Tix.py
File diff suppressed because it is too large
Load Diff
@@ -1,50 +0,0 @@
|
||||
/* XPM */
|
||||
static char * about_xpm[] = {
|
||||
"50 40 7 1",
|
||||
" s None c None",
|
||||
". c black",
|
||||
"X c white",
|
||||
"o c gray70",
|
||||
"O c navy",
|
||||
"+ c red",
|
||||
"@ c yellow",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ................................. ",
|
||||
" ..XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXoo. ",
|
||||
" .XooooooooooooooooooooooooooooooXo. ",
|
||||
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooXo. ",
|
||||
" ..oooooooooooooooooooooooooooooooXo. ",
|
||||
" ...............................XoXo. ",
|
||||
" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo. ",
|
||||
" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo. ",
|
||||
" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo. ",
|
||||
" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo. ",
|
||||
" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo.++++ ",
|
||||
" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo+++ ",
|
||||
" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.Xo+++++ ",
|
||||
" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.Xo++++++ ",
|
||||
" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.Xo+++ + ",
|
||||
" .OOOOO@@@@@OOOOOOOOOOOOOOOOOOO.Xo++. ",
|
||||
" .OOOOOOO@OOOOO@OOOOOOOOOOOOOOO.XoXo. ",
|
||||
" .OOOOOOO@OOOOOOOOOOOOOOOOOOOOO.XoXo. ",
|
||||
" .OOOOOOO@OOOO@@OOO@OOO@OOOOOOO.XoXo. ",
|
||||
" .OOOOOOO@OOOOO@OOOO@O@OOOOOOOO.XoXo. ",
|
||||
" .OOOOOOO@OOOOO@OOOOO@OOOOOOOOO.XoXo. ",
|
||||
" .OOOOOOO@OOOOO@OOOOO@OOOOOOOOO.XoXo. ",
|
||||
" .OOOOOOO@OOOOO@OOOO@O@OOOOOOOO.XoXo. ",
|
||||
" .OOOOOOO@OOOO@@@OO@OOO@OOOOOOO.XoXo. ",
|
||||
" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo. ",
|
||||
" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo. ",
|
||||
" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo. ",
|
||||
" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo. ",
|
||||
" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo. ",
|
||||
" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo. ",
|
||||
" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.Xo.. ",
|
||||
" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.Xo ",
|
||||
" OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.X. ",
|
||||
" ............................. ",
|
||||
" ",
|
||||
" ",
|
||||
" "};
|
||||
@@ -1,6 +0,0 @@
|
||||
#define bold_width 16
|
||||
#define bold_height 16
|
||||
static unsigned char bold_bits[] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0xfc, 0x07, 0xfc, 0x0f, 0x18, 0x1c, 0x18, 0x18,
|
||||
0x18, 0x18, 0x18, 0x1c, 0xf8, 0x0f, 0xf8, 0x0f, 0x18, 0x18, 0x18, 0x30,
|
||||
0x18, 0x30, 0x18, 0x38, 0xfc, 0x3f, 0xfc, 0x1f};
|
||||
@@ -1,6 +0,0 @@
|
||||
#define capital_width 16
|
||||
#define capital_height 16
|
||||
static unsigned char capital_bits[] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x08, 0x30, 0x0c, 0x30, 0x06,
|
||||
0x30, 0x03, 0xb0, 0x01, 0xf0, 0x00, 0xf0, 0x00, 0xf0, 0x01, 0xb0, 0x03,
|
||||
0x30, 0x07, 0x30, 0x0e, 0x30, 0x1c, 0x00, 0x00};
|
||||
@@ -1,6 +0,0 @@
|
||||
#define centerj_width 16
|
||||
#define centerj_height 16
|
||||
static unsigned char centerj_bits[] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x3e, 0x00, 0x00, 0xc0, 0x0d,
|
||||
0x00, 0x00, 0x58, 0x77, 0x00, 0x00, 0xb0, 0x3b, 0x00, 0x00, 0xdc, 0xf7,
|
||||
0x00, 0x00, 0xf0, 0x3e, 0x00, 0x00, 0xd8, 0x7e};
|
||||
@@ -1,14 +0,0 @@
|
||||
#define combobox_width 32
|
||||
#define combobox_height 32
|
||||
static unsigned char combobox_bits[] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xfc, 0xff, 0xff, 0x3e, 0x04, 0x00, 0x80, 0x2a, 0x04, 0x00, 0x80, 0x2a,
|
||||
0x04, 0x00, 0x80, 0x2a, 0x04, 0x00, 0x80, 0x2b, 0xfc, 0xff, 0xff, 0x3e,
|
||||
0x08, 0x00, 0x00, 0x20, 0x08, 0x00, 0x00, 0x3e, 0x08, 0x00, 0x00, 0x2a,
|
||||
0x28, 0x49, 0x00, 0x2a, 0x08, 0x00, 0x00, 0x3e, 0x08, 0x00, 0x00, 0x22,
|
||||
0x08, 0x00, 0x00, 0x22, 0x28, 0x49, 0x12, 0x22, 0x08, 0x00, 0x00, 0x22,
|
||||
0x08, 0x00, 0x00, 0x22, 0x08, 0x00, 0x00, 0x22, 0x28, 0x49, 0x02, 0x22,
|
||||
0x08, 0x00, 0x00, 0x3e, 0x08, 0x00, 0x00, 0x2a, 0x08, 0x00, 0x00, 0x2a,
|
||||
0xf8, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
|
||||
@@ -1,49 +0,0 @@
|
||||
/* XPM */
|
||||
static char * combobox_xpm[] = {
|
||||
"50 40 6 1",
|
||||
" s None c None",
|
||||
". c black",
|
||||
"X c white",
|
||||
"o c #FFFF80808080",
|
||||
"O c gray70",
|
||||
"+ c #808000008080",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" .................................... XXXXXXX ",
|
||||
" .ooooooooooooooooooooooooooooooooooX X . . ",
|
||||
" .ooooooooooooooooooooooooooooooooooX X . . ",
|
||||
" .oooo.oooooooooooooooooooooooooooooX X . . ",
|
||||
" .oo.o..oo.o.oo.o.ooooooooooooooooooX X . . ",
|
||||
" .o..o.o.o.oo.oo.oo.ooooooooooooooooX X ... . ",
|
||||
" .oo.oo.oo.o.oo.ooo.ooooooooooooooooX X . . ",
|
||||
" .ooooooooooooooooooooooooooooooooooX X . ",
|
||||
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX X...... ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ",
|
||||
" X............................................ ",
|
||||
" X.OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOX.OOOOX. ",
|
||||
" X.O+OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOX.OX OX. ",
|
||||
" X.O++OOO+OO+++OOOOOOOOOOOOOOOOOOOOOOOX.X ..X. ",
|
||||
" X.O+O+O+OOO+O+OOOOOOOOOOOOOOOOOOOOOOOX.OOOOX. ",
|
||||
" X.O++OOO+OO+++OOOOOOOOOOOOOOOOOOOOOOOX.OOOOX. ",
|
||||
" X.OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOX.XXXXX. ",
|
||||
" X.O.....X..........................OOX.X .X. ",
|
||||
" X.OX...XXX.X.XX.XX.................OOX.X .X. ",
|
||||
" X.OX.X..X..X.XX..XX.X..............OOX.X .X. ",
|
||||
" X.O.X...X..X.X...X..X..............OOX.X .X. ",
|
||||
" X.OOOOOOOOOOOOOOOOOOOOOOOO+OOOOOOOOOOX.X .X. ",
|
||||
" X.OOOOOOOOO+OOO+OOOOO+OOOO+OOOOOOOOOOX.X .X. ",
|
||||
" X.O+++OO+OO+O+OO++O++OO+OO+OOOOOOOOOOX.X...X. ",
|
||||
" X.OO+OO++OO+O+OO+OOO+OO+O++OOOOOOOOOOX.OOOOX. ",
|
||||
" X.OOOOOOOO+OOOOO++OO+OOOOOOOOOOOOOOOOX.OOOOX. ",
|
||||
" X.OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOX.X .X. ",
|
||||
" X.OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOX.O .OX. ",
|
||||
" X.OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOX.OOOOX. ",
|
||||
" X.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXX. ",
|
||||
" X............................................ ",
|
||||
" ",
|
||||
" ",
|
||||
" "};
|
||||
@@ -1,47 +0,0 @@
|
||||
/* XPM */
|
||||
static char * combobox_xpm[] = {
|
||||
"50 40 4 1",
|
||||
" s None c None",
|
||||
". c black",
|
||||
"X c #FFFF80808080",
|
||||
"o c gray70",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" .................................... ....... ",
|
||||
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. . . . ",
|
||||
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. . . . ",
|
||||
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. . . . ",
|
||||
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. . . . ",
|
||||
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. . ... . ",
|
||||
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. . . . ",
|
||||
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. . . ",
|
||||
" .................................... ....... ",
|
||||
" ",
|
||||
" ............................................. ",
|
||||
" .ooooooooooooooooooooooooooooooooooooo.ooooo. ",
|
||||
" .ooooooooooooooooooooooooooooooooooooo.ooooo. ",
|
||||
" .o...................................o.ooooo. ",
|
||||
" .o...................................o.ooooo. ",
|
||||
" .o...................................o.ooooo. ",
|
||||
" .o...................................o.ooooo. ",
|
||||
" .ooooooooooooooooooooooooooooooooooooo.ooooo. ",
|
||||
" .ooooooooooooooooooooooooooooooooooooo.ooooo. ",
|
||||
" .ooooooooooooooooooooooooooooooooooooo.ooooo. ",
|
||||
" .ooooooooooooooooooooooooooooooooooooo.ooooo. ",
|
||||
" .ooooooooooooooooooooooooooooooooooooo.ooooo. ",
|
||||
" .ooooooooooooooooooooooooooooooooooooo.ooooo. ",
|
||||
" .ooooooooooooooooooooooooooooooooooooo.ooooo. ",
|
||||
" .ooooooooooooooooooooooooooooooooooooo.ooooo. ",
|
||||
" .ooooooooooooooooooooooooooooooooooooo.ooooo. ",
|
||||
" .ooooooooooooooooooooooooooooooooooooo.ooooo. ",
|
||||
" .ooooooooooooooooooooooooooooooooooooo.ooooo. ",
|
||||
" .ooooooooooooooooooooooooooooooooooooo.ooooo. ",
|
||||
" .ooooooooooooooooooooooooooooooooooooo.ooooo. ",
|
||||
" .ooooooooooooooooooooooooooooooooooooo.ooooo. ",
|
||||
" ............................................. ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" "};
|
||||
@@ -1,14 +0,0 @@
|
||||
#define drivea_width 32
|
||||
#define drivea_height 32
|
||||
static unsigned char drivea_bits[] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xf8, 0xff, 0xff, 0x1f, 0x08, 0x00, 0x00, 0x18, 0xa8, 0xaa, 0xaa, 0x1a,
|
||||
0x48, 0x55, 0xd5, 0x1d, 0xa8, 0xaa, 0xaa, 0x1b, 0x48, 0x55, 0x55, 0x1d,
|
||||
0xa8, 0xfa, 0xaf, 0x1a, 0xc8, 0xff, 0xff, 0x1d, 0xa8, 0xfa, 0xaf, 0x1a,
|
||||
0x48, 0x55, 0x55, 0x1d, 0xa8, 0xaa, 0xaa, 0x1a, 0x48, 0x55, 0x55, 0x1d,
|
||||
0xa8, 0xaa, 0xaa, 0x1a, 0xf8, 0xff, 0xff, 0x1f, 0xf8, 0xff, 0xff, 0x1f,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
|
||||
@@ -1,43 +0,0 @@
|
||||
/* XPM */
|
||||
static char * drivea_xpm[] = {
|
||||
/* width height ncolors chars_per_pixel */
|
||||
"32 32 5 1",
|
||||
/* colors */
|
||||
" s None c None",
|
||||
". c #000000000000",
|
||||
"X c white",
|
||||
"o c #c000c000c000",
|
||||
"O c #800080008000",
|
||||
/* pixels */
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" .......................... ",
|
||||
" .XXXXXXXXXXXXXXXXXXXXXXXo. ",
|
||||
" .XooooooooooooooooooooooO. ",
|
||||
" .Xooooooooooooooooo..oooO. ",
|
||||
" .Xooooooooooooooooo..oooO. ",
|
||||
" .XooooooooooooooooooooooO. ",
|
||||
" .Xoooooooo.......oooooooO. ",
|
||||
" .Xoo...................oO. ",
|
||||
" .Xoooooooo.......oooooooO. ",
|
||||
" .XooooooooooooooooooooooO. ",
|
||||
" .XooooooooooooooooooooooO. ",
|
||||
" .XooooooooooooooooooooooO. ",
|
||||
" .XooooooooooooooooooooooO. ",
|
||||
" .oOOOOOOOOOOOOOOOOOOOOOOO. ",
|
||||
" .......................... ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" "};
|
||||
@@ -1,48 +0,0 @@
|
||||
/* XPM */
|
||||
static char * exit_xpm[] = {
|
||||
"50 40 5 1",
|
||||
" s None c None",
|
||||
". c black",
|
||||
"X c white",
|
||||
"o c #000080800000",
|
||||
"O c yellow",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ....................................... ",
|
||||
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. ",
|
||||
" .XoooooooooooooooooooooooooooooooooooX. ",
|
||||
" .XoooooooooooooooooooooooooooooooooooX. ",
|
||||
" .XoooooooooooooooooooooooOoooooooooooX. ",
|
||||
" .XoooooooooooooooooooooooOOooooooooooX. ",
|
||||
" .XoooooooooooooooooooooooOOOoooooooooX. ",
|
||||
" .XoooooOOOOOOOOOOOOOOOOOOOOOOooooooooX. ",
|
||||
" .XoooooOOOOOOOOOOOOOOOOOOOOOOOoooooooX. ",
|
||||
" .XoooooOOOOOOOOOOOOOOOOOOOOOOOOooooooX. ",
|
||||
" .XoooooOOOOOOOOOOOOOOOOOOOOOOOOOoooooX. ",
|
||||
" .XoooooOOOOOOOOOOOOOOOOOOOOOOOOooooooX. ",
|
||||
" .XoooooOOOOOOOOOOOOOOOOOOOOOOOoooooooX. ",
|
||||
" .XoooooOOOOOOOOOOOOOOOOOOOOOOooooooooX. ",
|
||||
" .XoooooooooooooooooooooooOOOoooooooooX. ",
|
||||
" .XoooooooooooooooooooooooOOooooooooooX. ",
|
||||
" .XoooooooooooooooooooooooOoooooooooooX. ",
|
||||
" .XoooooooooooooooooooooooooooooooooooX. ",
|
||||
" .XoooooooooooooooooooooooooooooooooooX. ",
|
||||
" .XoooooooooooooooooooooooooooooooooooX. ",
|
||||
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. ",
|
||||
" ....................................... ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" "};
|
||||
@@ -1,14 +0,0 @@
|
||||
#define filebox_width 32
|
||||
#define filebox_height 32
|
||||
static unsigned char filebox_bits[] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0x3f, 0x04, 0x00, 0x00, 0x20,
|
||||
0xe4, 0xff, 0xff, 0x27, 0x24, 0x00, 0x00, 0x24, 0x24, 0x00, 0x00, 0x24,
|
||||
0xe4, 0xff, 0xff, 0x27, 0x04, 0x00, 0x00, 0x20, 0xe4, 0x7f, 0xfe, 0x27,
|
||||
0x24, 0x50, 0x02, 0x25, 0x24, 0x40, 0x02, 0x24, 0x24, 0x50, 0x02, 0x25,
|
||||
0x24, 0x40, 0x02, 0x24, 0x24, 0x50, 0x02, 0x25, 0x24, 0x40, 0x02, 0x24,
|
||||
0x24, 0x50, 0x02, 0x25, 0xe4, 0x7f, 0xfe, 0x27, 0x04, 0x00, 0x00, 0x20,
|
||||
0xe4, 0xff, 0xff, 0x27, 0x24, 0x00, 0x00, 0x24, 0x24, 0x00, 0x00, 0x24,
|
||||
0xe4, 0xff, 0xff, 0x27, 0x04, 0x00, 0x00, 0x20, 0xfc, 0xff, 0xff, 0x3f,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
|
||||
@@ -1,49 +0,0 @@
|
||||
/* XPM */
|
||||
static char * filebox_xpm[] = {
|
||||
"50 40 6 1",
|
||||
" s None c None",
|
||||
". c white",
|
||||
"X c gray80",
|
||||
"o c black",
|
||||
"O c #FFFF80808080",
|
||||
"+ c gray70",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ............................................ ",
|
||||
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
|
||||
" .XXooXooXoXooXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
|
||||
" .XXooXooXoXooXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
|
||||
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
|
||||
" .XXooooooooooooooooooooooooooooooooooooo.XXo ",
|
||||
" .XXoOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XXo ",
|
||||
" .XXoOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XXo ",
|
||||
" .XX......................................XXo ",
|
||||
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
|
||||
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
|
||||
" .XXoooooooooooooooo.XXXXoooooooooooooooo.XXo ",
|
||||
" .XXo+++++++++++++++.XXXXo+++++++++++++++.XXo ",
|
||||
" .XXo+++++++++++++++.XXXXo+++++++++++++++.XXo ",
|
||||
" .XXo+++++++++++++++.XXXXo+++++++++++++++.XXo ",
|
||||
" .XXo+++++++++++++++.XXXXo+++++++++++++++.XXo ",
|
||||
" .XXo+++++++++++++++.XXXXo+++++++++++++++.XXo ",
|
||||
" .XXo+++++++++++++++.XXXXo+++++++++++++++.XXo ",
|
||||
" .XXo+++++++++++++++.XXXXo+++++++++++++++.XXo ",
|
||||
" .XXo+++++++++++++++.XXXXo+++++++++++++++.XXo ",
|
||||
" .XXo+++++++++++++++.XXXXo+++++++++++++++.XXo ",
|
||||
" .XXo+++++++++++++++.XXXXo+++++++++++++++.XXo ",
|
||||
" .XXo+++++++++++++++.XXXXo+++++++++++++++.XXo ",
|
||||
" .XX.................XXXX.................XXo ",
|
||||
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
|
||||
" .XXooXooXoXooXoXXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
|
||||
" .XXooXooXoXooXoXooXXXXXXXXXXXXXXXXXXXXXXXXXo ",
|
||||
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
|
||||
" .XXoooooooooooooooooooooooooooooooooooooo.Xo ",
|
||||
" .XXoOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.Xo ",
|
||||
" .XXoOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.Xo ",
|
||||
" .XX.......................................Xo ",
|
||||
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
|
||||
" .ooooooooooooooooooooooooooooooooooooooooooo ",
|
||||
" ",
|
||||
" ",
|
||||
" "};
|
||||
@@ -1,6 +0,0 @@
|
||||
#define italic_width 16
|
||||
#define italic_height 16
|
||||
static unsigned char italic_bits[] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x80, 0x3f, 0x00, 0x06, 0x00, 0x06,
|
||||
0x00, 0x03, 0x00, 0x03, 0x80, 0x01, 0x80, 0x01, 0xc0, 0x00, 0xc0, 0x00,
|
||||
0x60, 0x00, 0x60, 0x00, 0xfc, 0x01, 0xfc, 0x01};
|
||||
@@ -1,6 +0,0 @@
|
||||
#define justify_width 16
|
||||
#define justify_height 16
|
||||
static unsigned char justify_bits[] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xec, 0xdb, 0x00, 0x00, 0x7c, 0xdb,
|
||||
0x00, 0x00, 0xbc, 0xf7, 0x00, 0x00, 0xdc, 0xde, 0x00, 0x00, 0x6c, 0xdf,
|
||||
0x00, 0x00, 0x6c, 0xef, 0x00, 0x00, 0xdc, 0xdf};
|
||||
@@ -1,6 +0,0 @@
|
||||
#define leftj_width 16
|
||||
#define leftj_height 16
|
||||
static unsigned char leftj_bits[] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0x6d, 0x00, 0x00, 0xdc, 0x01,
|
||||
0x00, 0x00, 0xec, 0x0e, 0x00, 0x00, 0xfc, 0x7e, 0x00, 0x00, 0xdc, 0x03,
|
||||
0x00, 0x00, 0x6c, 0x3b, 0x00, 0x00, 0x6c, 0x1f};
|
||||
@@ -1,14 +0,0 @@
|
||||
#define netw_width 32
|
||||
#define netw_height 32
|
||||
static unsigned char netw_bits[] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x7f, 0x00, 0x00, 0x02, 0x40,
|
||||
0x00, 0x00, 0xfa, 0x5f, 0x00, 0x00, 0x0a, 0x50, 0x00, 0x00, 0x0a, 0x52,
|
||||
0x00, 0x00, 0x0a, 0x52, 0x00, 0x00, 0x8a, 0x51, 0x00, 0x00, 0x0a, 0x50,
|
||||
0x00, 0x00, 0x4a, 0x50, 0x00, 0x00, 0x0a, 0x50, 0x00, 0x00, 0x0a, 0x50,
|
||||
0x00, 0x00, 0xfa, 0x5f, 0x00, 0x00, 0x02, 0x40, 0xfe, 0x7f, 0x52, 0x55,
|
||||
0x02, 0x40, 0xaa, 0x6a, 0xfa, 0x5f, 0xfe, 0x7f, 0x0a, 0x50, 0xfe, 0x7f,
|
||||
0x0a, 0x52, 0x80, 0x00, 0x0a, 0x52, 0x80, 0x00, 0x8a, 0x51, 0x80, 0x00,
|
||||
0x0a, 0x50, 0x80, 0x00, 0x4a, 0x50, 0x80, 0x00, 0x0a, 0x50, 0xe0, 0x03,
|
||||
0x0a, 0x50, 0x20, 0x02, 0xfa, 0xdf, 0x3f, 0x03, 0x02, 0x40, 0xa0, 0x02,
|
||||
0x52, 0x55, 0xe0, 0x03, 0xaa, 0x6a, 0x00, 0x00, 0xfe, 0x7f, 0x00, 0x00,
|
||||
0xfe, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
|
||||
@@ -1,45 +0,0 @@
|
||||
/* XPM */
|
||||
static char * netw_xpm[] = {
|
||||
/* width height ncolors chars_per_pixel */
|
||||
"32 32 7 1",
|
||||
/* colors */
|
||||
" s None c None",
|
||||
". c #000000000000",
|
||||
"X c white",
|
||||
"o c #c000c000c000",
|
||||
"O c #404040",
|
||||
"+ c blue",
|
||||
"@ c red",
|
||||
/* pixels */
|
||||
" ",
|
||||
" .............. ",
|
||||
" .XXXXXXXXXXXX. ",
|
||||
" .XooooooooooO. ",
|
||||
" .Xo.......XoO. ",
|
||||
" .Xo.++++o+XoO. ",
|
||||
" .Xo.++++o+XoO. ",
|
||||
" .Xo.++oo++XoO. ",
|
||||
" .Xo.++++++XoO. ",
|
||||
" .Xo.+o++++XoO. ",
|
||||
" .Xo.++++++XoO. ",
|
||||
" .Xo.XXXXXXXoO. ",
|
||||
" .XooooooooooO. ",
|
||||
" .Xo@ooo....oO. ",
|
||||
" .............. .XooooooooooO. ",
|
||||
" .XXXXXXXXXXXX. .XooooooooooO. ",
|
||||
" .XooooooooooO. .OOOOOOOOOOOO. ",
|
||||
" .Xo.......XoO. .............. ",
|
||||
" .Xo.++++o+XoO. @ ",
|
||||
" .Xo.++++o+XoO. @ ",
|
||||
" .Xo.++oo++XoO. @ ",
|
||||
" .Xo.++++++XoO. @ ",
|
||||
" .Xo.+o++++XoO. @ ",
|
||||
" .Xo.++++++XoO. ..... ",
|
||||
" .Xo.XXXXXXXoO. .XXX. ",
|
||||
" .XooooooooooO.@@@@@@.X O. ",
|
||||
" .Xo@ooo....oO. .OOO. ",
|
||||
" .XooooooooooO. ..... ",
|
||||
" .XooooooooooO. ",
|
||||
" .OOOOOOOOOOOO. ",
|
||||
" .............. ",
|
||||
" "};
|
||||
@@ -1,48 +0,0 @@
|
||||
/* XPM */
|
||||
static char * optmenu_xpm[] = {
|
||||
"50 40 5 1",
|
||||
" s None c None",
|
||||
". c white",
|
||||
"X c gray80",
|
||||
"o c gray50",
|
||||
"O c black",
|
||||
" ",
|
||||
" ",
|
||||
" .............................. ",
|
||||
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
|
||||
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
|
||||
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
|
||||
" .XXXOXOXXOXXOXXXXOOXXXXXXXXXXo ",
|
||||
" .XXXOXOXXOXOXXXOXXOXXXXXXXXXXo ",
|
||||
" .XXXXOXXOXXOXXXOXXXOXXXXXXXXXo ",
|
||||
" .XXXXOXXXOXXOOXXOXOXXXXXXXXXXo ",
|
||||
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
|
||||
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXo.............o ",
|
||||
" .............................o o ",
|
||||
" ..XXXOXXXXXOXXXXXXXXOXXXXXXXOo o ",
|
||||
" ..XXOXOXOXXOXOXXXOXXOXXXXXXXOo ...... o ",
|
||||
" ..XXXOXXXOXXOXXXOXXXOXXXXXXXOo . o o ",
|
||||
" ..XXOXXXOXXXOXOXXOXXOXXXXXXXOo . o o ",
|
||||
" ..XXXXXXXXXXXXXXXXXXXXXXXXXXOo .ooooo o ",
|
||||
" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOo o ",
|
||||
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXo o ",
|
||||
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXooooooooooooooo ",
|
||||
" .XXXXOXXXXXOXXXXXXXXXXXXXXXXXo ",
|
||||
" .XXXOXXXXXXXXXOXXXXXXXXXXXXXXo ",
|
||||
" .XXXXOXXOXXOXOXOXXXXXXXXXXXXXo ",
|
||||
" .XXXXXOXXOXOXXXXXXXXXXXXXXXXXo ",
|
||||
" .XXXXXXXXXXXXXOXXXXXXXXXXXXXXo ",
|
||||
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
|
||||
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
|
||||
" .XXXOXOXXXXXXXOXOXXXXXOXXXXXXo ",
|
||||
" .XXXXXOXOXOXXOXXXXXOXXOXXXXXXo ",
|
||||
" .XXXXOXXOXOXOXXXOXOXOXXOXXXXXo ",
|
||||
" .XXXOXXXXOXXOXXXOXXOXXXXOXXXXo ",
|
||||
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
|
||||
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
|
||||
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
|
||||
" oooooooooooooooooooooooooooooo ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" "};
|
||||
@@ -1,6 +0,0 @@
|
||||
#define rightj_width 16
|
||||
#define rightj_height 16
|
||||
static unsigned char rightj_bits[] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xdb, 0x00, 0x00, 0x70, 0xdb,
|
||||
0x00, 0x00, 0x00, 0xef, 0x00, 0x00, 0xd8, 0xde, 0x00, 0x00, 0xc0, 0xdd,
|
||||
0x00, 0x00, 0xa0, 0xef, 0x00, 0x00, 0xd8, 0xde};
|
||||
@@ -1,52 +0,0 @@
|
||||
/* XPM */
|
||||
static char * select_xpm[] = {
|
||||
"50 40 9 1",
|
||||
" s None c None",
|
||||
". c black",
|
||||
"X c gray95",
|
||||
"o c gray50",
|
||||
"O c gray70",
|
||||
"+ c navy",
|
||||
"@ c #000080800000",
|
||||
"# c #808000000000",
|
||||
"$ c white",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" .............................................. ",
|
||||
" .XXXXXXXXXXooooooooooooXXXXXXXXXXXoXXXXXXXXXX. ",
|
||||
" .X ooOOOOOOOOOOXX oX o. ",
|
||||
" .X ooOOOOOOOOOOXX oX o. ",
|
||||
" .X ++++ ooOOOOOOOOOOXX ... oX @ o. ",
|
||||
" .X +++++ ooOOOOOOOOOOXX . . oX @@@ o. ",
|
||||
" .X +++ + ooOOOOOOOOOOXX . . oX @ @ o. ",
|
||||
" .X + + ooOO#####OOOXX . . oX @ @ o. ",
|
||||
" .X + + ooOO#OOO##OOXX . oX @ @ o. ",
|
||||
" .X + + ooO##OOOO##OXX . oX @ @ o. ",
|
||||
" .X ++ ++ ooO###OOO#OOXX . oX @ @ o. ",
|
||||
" .X +++++++ ooO#######OOXX . oX @ @ o. ",
|
||||
" .X + + ooO##O#OO#OOXX . oX @ @ o. ",
|
||||
" .X + ++ ooO##OOOOO#OXX . . oX @ @ o. ",
|
||||
" .X + + ooOO#OOOOO#OXX . . oX @ @@ o. ",
|
||||
" .X + ++ ooOO#OOOOO#OXX .... oX @@@@@ o. ",
|
||||
" .X ooOO######OOXX oX o. ",
|
||||
" .X ooOOOOOOOOOOXX $oX o. ",
|
||||
" .XoooooooooooXXXXXXXXXXXoooooooooooXooooooooo. ",
|
||||
" .............................................. ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" "};
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 11 KiB |
@@ -1,6 +0,0 @@
|
||||
#define underline_width 16
|
||||
#define underline_height 16
|
||||
static unsigned char underline_bits[] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1c, 0x38, 0x1c,
|
||||
0x30, 0x0c, 0x30, 0x0c, 0x30, 0x0c, 0x30, 0x0c, 0x30, 0x0c, 0x70, 0x0e,
|
||||
0xf0, 0x0f, 0xe0, 0x07, 0x00, 0x00, 0xf8, 0x1f};
|
||||
@@ -1,536 +0,0 @@
|
||||
#! /usr/local/bin/python
|
||||
#
|
||||
#
|
||||
# $Id: pman.py,v 1.1 2000/11/05 19:52:02 idiscovery Exp $
|
||||
#
|
||||
# An xman like program. - Sudhir Shenoy, January 1996.
|
||||
#
|
||||
# Features:
|
||||
#
|
||||
# Can have multiple man pages open at the same time.
|
||||
#
|
||||
# Hypertext: Manual page cross references in the Apropos output or a man page
|
||||
# are highlighted when the mouse moves on top of them. Clicking button 1 over
|
||||
# the highlighted reference displays the relevant page.
|
||||
#
|
||||
# Regexp search in manual page window with wrap around.
|
||||
#
|
||||
# Handles MANPATH correctly. If the same man page (e.g. 'make') is in more
|
||||
# than one directory (/usr/man/man1 and /usr/local/man/man1), precedence is
|
||||
# decided by which dir appears first in the MANPATH.
|
||||
#
|
||||
# BUGS: Doesn't handle the case when the reference is split across two lines.
|
||||
# This can be fixed by sucking in the whole text from the text widget and then
|
||||
# doing the search e.g., in class ManWindow but this involves more work.
|
||||
#
|
||||
# Page display is slow.
|
||||
#
|
||||
|
||||
import os, regex, regsub, string, sys, Tix
|
||||
|
||||
BOLDFONT = '*-Courier-Bold-R-Normal-*-140-*'
|
||||
ITALICFONT = '*-Courier-Medium-O-Normal-*-140-*'
|
||||
|
||||
footer_pat = regex.compile('^ Page [1-9][0-9]*[ \t]+\|^.*Last change:.*[1-9][0-9]*\n')
|
||||
empty_pat = regex.compile('^[ \t]*\n')
|
||||
underline_pat = regex.compile('^[ \t]*[Xv!_][Xv!_ \t]*\n')
|
||||
link_pat = regex.compile('\([A-Za-z0-9._]+\)[ \t]*([ \t]*\([A-Za-z0-9]+\)[ \t]*)')
|
||||
|
||||
# Man Page display widget - borrowed from Guido's demos with minor changes.
|
||||
class ManPageWidget(Tix.ScrolledText):
|
||||
def __init__(self, master=None, cnf={}):
|
||||
# Initialize base class
|
||||
Tix.ScrolledText.__init__(self, master, cnf)
|
||||
self.text['state'] = 'disabled'
|
||||
|
||||
# Define tags for formatting styles
|
||||
self.text.tag_config('X', {'underline': 1})
|
||||
self.text.tag_config('!', {'font': BOLDFONT})
|
||||
self.text.tag_config('_', {'font': ITALICFONT})
|
||||
|
||||
# Set state to idle
|
||||
self.fp = None
|
||||
self.lineno = 0
|
||||
self.tagnum = 0
|
||||
|
||||
# Test whether we are busy parsing a file
|
||||
def busy(self):
|
||||
return self.fp != None
|
||||
|
||||
# Ensure we're not busy
|
||||
def kill(self):
|
||||
if self.busy():
|
||||
self._endparser()
|
||||
|
||||
# Parse a file, in the background
|
||||
def asyncparsefile(self, fp):
|
||||
self._startparser(fp)
|
||||
self.tk.createfilehandler(fp, Tix.READABLE, self._filehandler)
|
||||
|
||||
parsefile = asyncparsefile # Alias
|
||||
|
||||
# I/O handler used by background parsing
|
||||
def _filehandler(self, fp, mask):
|
||||
nextline = self.fp.readline()
|
||||
if not nextline:
|
||||
self._endparser()
|
||||
return
|
||||
self._parseline(nextline)
|
||||
|
||||
# Parse a file, now (cannot be aborted)
|
||||
def syncparsefile(self, fp):
|
||||
from select import select
|
||||
def avail(fp=fp, tout=0.0, select=select):
|
||||
return select([fp], [], [], tout)[0]
|
||||
height = self.getint(self['height'])
|
||||
self._startparser(fp)
|
||||
while 1:
|
||||
nextline = fp.readline()
|
||||
if not nextline:
|
||||
break
|
||||
self._parseline(nextline)
|
||||
self._endparser()
|
||||
|
||||
# Initialize parsing from a particular file -- must not be busy
|
||||
def _startparser(self, fp):
|
||||
if self.busy():
|
||||
raise RuntimeError, 'startparser: still busy'
|
||||
fp.fileno() # Test for file-ness
|
||||
self.fp = fp
|
||||
self.lineno = 0
|
||||
self.tagnum = 0
|
||||
self.ok = 0
|
||||
self.empty = 0
|
||||
self.buffer = None
|
||||
self.text['state'] = 'normal'
|
||||
self.text.delete('1.0', 'end')
|
||||
self.text['state'] = 'disabled'
|
||||
|
||||
# End parsing -- must be busy, need not be at EOF
|
||||
def _endparser(self):
|
||||
if not self.busy():
|
||||
raise RuntimeError, 'endparser: not busy'
|
||||
if self.buffer:
|
||||
self._parseline('')
|
||||
try:
|
||||
self.tk.deletefilehandler(self.fp)
|
||||
except Tix.TclError, msg:
|
||||
pass
|
||||
self.fp.close()
|
||||
self.fp = None
|
||||
del self.ok, self.empty, self.buffer
|
||||
|
||||
# Parse a single line
|
||||
def _parseline(self, nextline):
|
||||
if not self.buffer:
|
||||
# Save this line -- we need one line read-ahead
|
||||
self.buffer = nextline
|
||||
return
|
||||
if empty_pat.match(self.buffer) >= 0:
|
||||
# Buffered line was empty -- set a flag
|
||||
self.empty = 1
|
||||
self.buffer = nextline
|
||||
return
|
||||
textline = self.buffer
|
||||
if underline_pat.match(nextline) >= 0:
|
||||
# Next line is properties for buffered line
|
||||
propline = nextline
|
||||
self.buffer = None
|
||||
else:
|
||||
# Next line is read-ahead
|
||||
propline = None
|
||||
self.buffer = nextline
|
||||
if not self.ok:
|
||||
# First non blank line after footer must be header
|
||||
# -- skip that too
|
||||
self.ok = 1
|
||||
self.empty = 0
|
||||
return
|
||||
if footer_pat.match(textline) >= 0:
|
||||
# Footer -- start skipping until next non-blank line
|
||||
self.ok = 0
|
||||
self.empty = 0
|
||||
return
|
||||
self.text['state'] = 'normal'
|
||||
if Tix.TkVersion >= 4.0:
|
||||
self.text.mark_set('insert', 'end-1c')
|
||||
else:
|
||||
self.text.mark_set('insert', 'end')
|
||||
if self.empty:
|
||||
# One or more previous lines were empty
|
||||
# -- insert one blank line in the text
|
||||
self._insert_prop('\n')
|
||||
self.lineno = self.lineno + 1
|
||||
self.empty = 0
|
||||
if not propline:
|
||||
# No properties
|
||||
self._insert_prop(textline)
|
||||
else:
|
||||
# Search for properties
|
||||
p = ''
|
||||
j = 0
|
||||
for i in range(min(len(propline), len(textline))):
|
||||
if propline[i] != p:
|
||||
if j < i:
|
||||
self._insert_prop(textline[j:i], p)
|
||||
j = i
|
||||
p = propline[i]
|
||||
self._insert_prop(textline[j:])
|
||||
startpos = 0
|
||||
line = textline[:]
|
||||
while 1:
|
||||
pos = link_pat.search(line)
|
||||
if pos < 0:
|
||||
break
|
||||
pos = pos + startpos
|
||||
startpos = startpos + link_pat.regs[0][1]
|
||||
tag = self._w + `self.tagnum`
|
||||
self.tagnum = self.tagnum + 1
|
||||
self.text.tag_add(tag, '%d.%d' % (self.lineno + 1, pos),
|
||||
'%d.%d' % (self.lineno + 1, startpos))
|
||||
self.text.tag_bind(tag, '<Any-Enter>',
|
||||
lambda e=None,t=tag,w=self: w._highlight(t, 1))
|
||||
self.text.tag_bind(tag, '<Any-Leave>',
|
||||
lambda e=None,t=tag,w=self: w._highlight(t, 0))
|
||||
self.text.tag_bind(tag, '<1>',
|
||||
lambda e=None,w=self,t=textline[pos:startpos]:
|
||||
w._hyper_link(t))
|
||||
if startpos >= len(textline):
|
||||
break
|
||||
line = textline[startpos:]
|
||||
self.lineno = self.lineno + 1
|
||||
self.text['state'] = 'disabled'
|
||||
|
||||
def _highlight(self, tag, how):
|
||||
if how:
|
||||
self.text.tag_config(tag, background="#43ce80", relief=Tix.RAISED)
|
||||
else:
|
||||
self.text.tag_config(tag, background="", relief=Tix.FLAT)
|
||||
|
||||
def _hyper_link(self, txt):
|
||||
if link_pat.search(txt) < 0:
|
||||
print "Invalid man reference string"
|
||||
return
|
||||
pagename = txt[link_pat.regs[1][0]:link_pat.regs[1][1]]
|
||||
section = txt[link_pat.regs[2][0]:link_pat.regs[2][1]]
|
||||
mandirs = ManDirectories()
|
||||
pipe = mandirs.FormattedPipe(section, pagename)
|
||||
self.parsefile(pipe)
|
||||
|
||||
# Insert a string at the end, with at most one property (tag)
|
||||
def _insert_prop(self, str, prop = ' '):
|
||||
here = self.text.index('insert')
|
||||
self.text.insert('insert', str)
|
||||
if prop != ' ':
|
||||
self.text.tag_add(prop, here, 'insert')
|
||||
#end class ManPageWidget
|
||||
|
||||
|
||||
class ManDirectories:
|
||||
"""Find all man directories (using MANPATH if defined)
|
||||
|
||||
The section names are kept in the list sections.
|
||||
Descriptive names are in the dictionary section_names
|
||||
The full path name(s) for each section are in the dictionary secpaths."""
|
||||
|
||||
def __init__(self):
|
||||
known_names = {'1':'User Commands', '1b':'Commands: BSD',
|
||||
'1c':'Commands: Communications',
|
||||
'1f':'Commands: FMLI', '1m':'Commands: Maintenance',
|
||||
'1s':'Commands: SunOS specific',
|
||||
'2':'System Calls',
|
||||
'3':'Subroutines', '3b':'Routines: BSD',
|
||||
'3c':'Routines: C Library', '3e':'Routines: ELF',
|
||||
'3g':'Routines: General', '3i':'Routines: Wide Char',
|
||||
'3k':'Routines: Kernel VM', '3m':'Routines: Math',
|
||||
'3n':'Routines: Network', '3r':'Routines: Realtime',
|
||||
'3s':'Routines: Std. I/O', '3t':'Routines: Threads',
|
||||
'3x':'Routines: Misc.',
|
||||
'4':'File Formats', '4b':'Files: BSD',
|
||||
'5':'Miscellaneous',
|
||||
'6':'Games',
|
||||
'7':'Devices',
|
||||
'9':'Device Drivers', '9e':'Drivers: Entry Points',
|
||||
'9f':'Drivers: Functions',
|
||||
'9s':'Drivers: Data Structures',
|
||||
'l':'Local',
|
||||
'n':'New'}
|
||||
if os.environ.has_key('MANPATH'):
|
||||
manpath = os.environ["MANPATH"]
|
||||
if not manpath:
|
||||
manpath = "/usr/share/man"
|
||||
manpath = string.splitfields(manpath, ':')
|
||||
self.secpaths = {}
|
||||
for path in manpath:
|
||||
files = os.listdir(path)
|
||||
for f in files:
|
||||
if os.path.isdir(path + '/' + f) and len(f) > 3 and f[:3] == 'man':
|
||||
sec = f[3:]
|
||||
if self.secpaths.has_key(sec):
|
||||
temp = self.secpaths[sec] + ':'
|
||||
else:
|
||||
temp = ''
|
||||
self.secpaths[sec] = temp + path + '/' + f
|
||||
self.sections = self.secpaths.keys()
|
||||
self.sections.sort()
|
||||
self.section_names = {}
|
||||
for s in self.sections:
|
||||
if s in known_names.keys():
|
||||
self.section_names[s + ': ' + known_names[s]] = s
|
||||
else:
|
||||
self.section_names[s] = s
|
||||
|
||||
def Pages(self, secname):
|
||||
if not self.secpaths.has_key(secname):
|
||||
return []
|
||||
paths = string.splitfields(self.secpaths[secname], ':')
|
||||
wid = len(secname)
|
||||
names = []
|
||||
for path in paths:
|
||||
files = os.listdir(path)
|
||||
for file in files:
|
||||
if file[-(wid + 1):-wid] == '.' and file[-wid:] == secname:
|
||||
file = file[:-(wid + 1)]
|
||||
if file not in names:
|
||||
# if duplicate - preceding path takes precedence
|
||||
names.append(file)
|
||||
names.sort()
|
||||
return names
|
||||
|
||||
def FormattedPipe(self, secname, page):
|
||||
secname = string.lower(secname)
|
||||
if not self.secpaths.has_key(secname):
|
||||
raise ValueError
|
||||
file = page + '.' + secname
|
||||
paths = string.splitfields(self.secpaths[secname], ':')
|
||||
cwd = os.getcwd()
|
||||
for path in paths:
|
||||
files = os.listdir(path)
|
||||
if file in files:
|
||||
file = path + '/' + file
|
||||
os.chdir(path)
|
||||
os.chdir('..')
|
||||
break
|
||||
pipe = os.popen('nroff -man %s | ul -i' % file)
|
||||
os.chdir(cwd)
|
||||
return pipe
|
||||
#end class ManDirectories
|
||||
|
||||
|
||||
class ManPageWindow:
|
||||
def __init__(self, pipe):
|
||||
self.top = Tix.Toplevel()
|
||||
frame = Tix.Frame(self.top)
|
||||
frame2 = Tix.Frame(frame)
|
||||
self.search_str = Tix.StringVar()
|
||||
self.case_sensitive = Tix.StringVar()
|
||||
btn = Tix.Button(frame2, text='Regexp Search:', command=self.Search)
|
||||
entry = Tix.Entry(frame2, relief=Tix.SUNKEN)
|
||||
entry['textvariable'] = self.search_str
|
||||
entry.bind('<Return>', self.Search)
|
||||
casesense = Tix.Checkbutton(frame2, text='Case Sensitive',
|
||||
relief=Tix.FLAT,
|
||||
variable=self.case_sensitive)
|
||||
btn.pack(side=Tix.LEFT, expand=0)
|
||||
entry.pack(side=Tix.LEFT, expand=1, fill=Tix.X)
|
||||
casesense.pack(side=Tix.RIGHT, expand=0)
|
||||
self.man = ManPageWidget(frame)
|
||||
btn = Tix.Button(frame, text='Close', command=self.Quit)
|
||||
frame2.pack(side=Tix.TOP, expand=0, fill=Tix.X)
|
||||
self.man.pack(side=Tix.TOP, expand=1, fill=Tix.BOTH)
|
||||
btn.pack(side=Tix.BOTTOM, expand=0, fill=Tix.X)
|
||||
frame.pack(expand=1, fill=Tix.BOTH)
|
||||
self.man.parsefile(pipe)
|
||||
|
||||
def Search(self, event=None):
|
||||
str = self.search_str.get()
|
||||
if not str:
|
||||
self.top.bell()
|
||||
print "No search string ?"
|
||||
return
|
||||
try:
|
||||
if self.case_sensitive.get() == '1':
|
||||
pat = regex.compile(str, regex.casefold)
|
||||
else:
|
||||
pat = regex.compile(str)
|
||||
except regex.error, msg:
|
||||
self.top.bell()
|
||||
print "regex error"
|
||||
return
|
||||
pos = self.man.text.index('insert')
|
||||
lineno = string.atoi(pos[:string.find(pos, '.')])
|
||||
endpos = self.man.text.index('end')
|
||||
endlineno = string.atoi(endpos[:string.find(endpos, '.')])
|
||||
wraplineno = lineno
|
||||
found = 0
|
||||
while 1:
|
||||
lineno = lineno + 1
|
||||
if lineno > endlineno:
|
||||
if wraplineno <= 0:
|
||||
break
|
||||
endlineno = wraplineno
|
||||
lineno = 0
|
||||
wraplineno = 0
|
||||
line = self.man.text.get('%d.0 linestart' % lineno,
|
||||
'%d.0 lineend' % lineno)
|
||||
i = pat.search(line)
|
||||
if i >= 0:
|
||||
found = 1
|
||||
n = max(1, len(pat.group(0)))
|
||||
try:
|
||||
self.man.text.tag_remove('sel', 'sel.first', 'sel.last')
|
||||
except Tix.TclError:
|
||||
pass
|
||||
self.man.text.tag_add('sel', '%d.%d' % (lineno, i),
|
||||
'%d.%d' % (lineno, i+n))
|
||||
self.man.text.mark_set('insert', '%d.%d' % (lineno, i))
|
||||
self.man.text.yview_pickplace('insert')
|
||||
break
|
||||
|
||||
if not found:
|
||||
self.frame.bell()
|
||||
|
||||
def Quit(self):
|
||||
del self.search_str
|
||||
del self.case_sensitive
|
||||
self.top.destroy()
|
||||
#end class ManPageWindow
|
||||
|
||||
class AproposWindow:
|
||||
def __init__(self):
|
||||
self.top = Tix.Toplevel()
|
||||
frame = Tix.Frame(self.top)
|
||||
frame2 = Tix.Frame(frame)
|
||||
self.apropos_str = Tix.StringVar()
|
||||
btn = Tix.Button(frame2, text='Apropos:', command=self.Apropos)
|
||||
entry = Tix.Entry(frame2, relief=Tix.SUNKEN, width=20)
|
||||
entry['textvariable'] = self.apropos_str
|
||||
entry.bind('<Return>', self.Apropos)
|
||||
btn.pack(side=Tix.LEFT, expand=0)
|
||||
entry.pack(side=Tix.RIGHT, expand=1, fill=Tix.X)
|
||||
frame2.pack(side=Tix.TOP, expand=0, fill=Tix.X)
|
||||
self.stext = Tix.ScrolledText(frame)
|
||||
self.stext.text.tag_config('!', font=BOLDFONT)
|
||||
btn = Tix.Button(frame, text='Close', command=self.Quit)
|
||||
self.stext.pack(side=Tix.TOP, expand=1, fill=Tix.BOTH)
|
||||
btn.pack(side=Tix.BOTTOM, expand=0, fill=Tix.X)
|
||||
frame.pack(expand=1, fill=Tix.BOTH)
|
||||
|
||||
def Apropos(self, event=None):
|
||||
str = self.apropos_str.get()
|
||||
if not str:
|
||||
self.top.bell()
|
||||
print "No string ?"
|
||||
return
|
||||
pipe = os.popen('apropos ' + str, 'r')
|
||||
self.stext.text.delete('1.0', Tix.END)
|
||||
tabs = regex.compile('\011+')
|
||||
num = 1
|
||||
while 1:
|
||||
line = pipe.readline()
|
||||
if not line:
|
||||
break
|
||||
line = regsub.gsub(tabs, '\011', line)
|
||||
fields = string.splitfields(line, '\011')
|
||||
if len(fields) == 1:
|
||||
line = line[string.find(line, ' ') + 1:]
|
||||
line = regsub.gsub('^ *', '', line)
|
||||
fields = ['???', line]
|
||||
if len(fields) == 2:
|
||||
tmp = string.splitfields(fields[1], '-')
|
||||
fields = fields[0:1] + tmp
|
||||
num = num + 1
|
||||
self.stext.text.insert('insert', fields[0]+'\t', '!')
|
||||
self.stext.text.insert('insert', fields[1], `num`)
|
||||
self.stext.text.tag_bind(`num`, '<Any-Enter>',
|
||||
lambda e=None,t=`num`,w=self:
|
||||
w._highlight(t, 1))
|
||||
self.stext.text.tag_bind(`num`, '<Any-Leave>',
|
||||
lambda e=None,t=`num`,w=self:
|
||||
w._highlight(t, 0))
|
||||
self.stext.text.tag_bind(`num`, '<1>',
|
||||
lambda e=None,w=self,t=fields[1]:
|
||||
w._hyper_link(t))
|
||||
self.stext.text.insert('insert', fields[2])
|
||||
|
||||
def _highlight(self, tag, how):
|
||||
if how:
|
||||
self.stext.text.tag_config(tag, background="#43ce80",
|
||||
relief=Tix.RAISED)
|
||||
else:
|
||||
self.stext.text.tag_config(tag, background="", relief=Tix.FLAT)
|
||||
|
||||
def _hyper_link(self, txt):
|
||||
if link_pat.search(txt) < 0:
|
||||
print "Invalid man reference string"
|
||||
return
|
||||
pagename = txt[link_pat.regs[1][0]:link_pat.regs[1][1]]
|
||||
section = txt[link_pat.regs[2][0]:link_pat.regs[2][1]]
|
||||
mandirs = ManDirectories()
|
||||
pipe = mandirs.FormattedPipe(section, pagename)
|
||||
disp = ManPageWindow(pipe)
|
||||
|
||||
def Quit(self):
|
||||
del self.apropos_str
|
||||
self.top.destroy()
|
||||
|
||||
class PManWindow:
|
||||
def __init__(self, master=None):
|
||||
self.mandirs = ManDirectories()
|
||||
self.frame = Tix.Frame(master)
|
||||
self.section = Tix.StringVar()
|
||||
combo = Tix.ComboBox(self.frame, label='Section: ', dropdown=1,
|
||||
editable=0, variable=self.section,
|
||||
command=self.UpdatePageList)
|
||||
pagelist = Tix.ScrolledListBox(self.frame, scrollbar='auto')
|
||||
self.listbox = pagelist.listbox
|
||||
self.listbox.bind('<Double-1>', self.ShowPage)
|
||||
temp = self.mandirs.section_names.keys()
|
||||
temp.sort()
|
||||
for s in temp:
|
||||
combo.insert(Tix.END, s)
|
||||
box = Tix.ButtonBox(self.frame, orientation=Tix.HORIZONTAL)
|
||||
box.add('show', text='Show Page ...', underline=0, width=13,
|
||||
command=self.ShowPage)
|
||||
box.add('aprop', text='Apropos ...', underline=0, width=13,
|
||||
command=self.Apropos)
|
||||
box.add('quit', text='Quit', underline=0, width=13,
|
||||
command=self.Quit)
|
||||
combo.pack(side=Tix.TOP, expand=0, fill=Tix.X)
|
||||
pagelist.pack(side=Tix.TOP, expand=1, fill=Tix.BOTH)
|
||||
box.pack(side=Tix.BOTTOM, expand=0, fill=Tix.X)
|
||||
self.frame.pack(expand=1, fill=Tix.BOTH)
|
||||
|
||||
def UpdatePageList(self, event=None):
|
||||
secname = self.section.get()
|
||||
if not self.mandirs.section_names.has_key(secname):
|
||||
return
|
||||
secname = self.mandirs.section_names[secname]
|
||||
pages = self.mandirs.Pages(secname)
|
||||
self.listbox.delete(0, Tix.END)
|
||||
for page in pages:
|
||||
self.listbox.insert(Tix.END, page)
|
||||
|
||||
def ShowPage(self, event=None):
|
||||
secname = self.section.get()
|
||||
secname = self.mandirs.section_names[secname]
|
||||
idx = self.listbox.curselection()
|
||||
pagename = self.listbox.get(idx)
|
||||
pipe = self.mandirs.FormattedPipe(secname, pagename)
|
||||
page_display = ManPageWindow(pipe)
|
||||
|
||||
def Apropos(self):
|
||||
apropos_disp = AproposWindow()
|
||||
|
||||
def Quit(self):
|
||||
sys.exit()
|
||||
#end class PManWindow
|
||||
|
||||
def main():
|
||||
root = Tix.Tk()
|
||||
root.minsize(10, 10)
|
||||
win = PManWindow(root)
|
||||
root.mainloop()
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
@@ -1,45 +0,0 @@
|
||||
#!/usr/local/bin/python
|
||||
#
|
||||
# $Id: Balloon.py,v 1.1 2000/11/05 19:54:53 idiscovery Exp $
|
||||
#
|
||||
# Tix Demostration Program
|
||||
#
|
||||
# This sample program is structured in such a way so that it can be
|
||||
# executed from the Tix demo program "tixwidgets": it must have a
|
||||
# procedure called "RunSample". It should also have the "if" statment
|
||||
# at the end of this file so that it can be run as a standalone
|
||||
# program.
|
||||
|
||||
# This file demonstrates the use of the tixBalloon widget, which provides
|
||||
# a interesting way to give help tips about elements in your user interface.
|
||||
# Your can display the help message in a "balloon" and a status bar widget.
|
||||
#
|
||||
|
||||
import Tix
|
||||
|
||||
def RunSample(w):
|
||||
status = Tix.Label(w, width=40, relief=Tix.SUNKEN, bd=1)
|
||||
status.pack(side=Tix.BOTTOM, fill=Tix.Y, padx=2, pady=1)
|
||||
|
||||
# Create two mysterious widgets that need balloon help
|
||||
button1 = Tix.Button(w, text='Something Unexpected',
|
||||
command=lambda w=w: w.destroy())
|
||||
button2 = Tix.Button(w, text='Something Else Unexpected')
|
||||
button2['command'] = lambda w=button2: w.destroy()
|
||||
button1.pack(side=Tix.TOP, expand=1)
|
||||
button2.pack(side=Tix.TOP, expand=1)
|
||||
|
||||
# Create the balloon widget and associate it with the widgets that we want
|
||||
# to provide tips for:
|
||||
b = Tix.Balloon(w, statusbar=status)
|
||||
|
||||
b.bind_widget(button1, balloonmsg='Close Window',
|
||||
statusmsg='Press this button to close this window')
|
||||
b.bind_widget(button2, balloonmsg='Self-destruct button',
|
||||
statusmsg='Press this button and it will destroy itself')
|
||||
|
||||
if __name__ == '__main__':
|
||||
root = Tix.Tk()
|
||||
|
||||
RunSample(root)
|
||||
root.mainloop()
|
||||
@@ -1,44 +0,0 @@
|
||||
#!/usr/local/bin/python
|
||||
#
|
||||
# $Id: BtnBox.py,v 1.1 2000/11/05 19:56:48 idiscovery Exp $
|
||||
#
|
||||
# Tix Demostration Program
|
||||
#
|
||||
# This sample program is structured in such a way so that it can be
|
||||
# executed from the Tix demo program "tixwidgets": it must have a
|
||||
# procedure called "RunSample". It should also have the "if" statment
|
||||
# at the end of this file so that it can be run as a standalone
|
||||
# program.
|
||||
|
||||
# This file demonstrates the use of the tixButtonBox widget, which is a
|
||||
# group of TK buttons. You can use it to manage the buttons in a dialog box,
|
||||
# for example.
|
||||
#
|
||||
|
||||
import Tix
|
||||
|
||||
def RunSample(w):
|
||||
# Create the label on the top of the dialog box
|
||||
#
|
||||
top = Tix.Label(w, padx=20, pady=10, bd=1, relief=Tix.RAISED,
|
||||
anchor=Tix.CENTER, text='This dialog box is\n a demonstration of the\n tixButtonBox widget')
|
||||
|
||||
# Create the button box and add a few buttons in it. Set the
|
||||
# -width of all the buttons to the same value so that they
|
||||
# appear in the same size.
|
||||
#
|
||||
# Note that the -text, -underline, -command and -width options are all
|
||||
# standard options of the button widgets.
|
||||
#
|
||||
box = Tix.ButtonBox(w, orientation=Tix.HORIZONTAL)
|
||||
box.add('ok', text='OK', underline=0, width=5,
|
||||
command=lambda w=w: w.destroy())
|
||||
box.add('close', text='Cancel', underline=0, width=5,
|
||||
command=lambda w=w: w.destroy())
|
||||
box.pack(side=Tix.BOTTOM, fill=Tix.X)
|
||||
top.pack(side=Tix.TOP, fill=Tix.BOTH, expand=1)
|
||||
|
||||
if __name__ == '__main__':
|
||||
root = Tix.Tk()
|
||||
RunSample(root)
|
||||
root.mainloop()
|
||||
@@ -1,197 +0,0 @@
|
||||
#!/usr/local/bin/python
|
||||
#
|
||||
# $Id: CmpImg.py,v 1.1 2000/11/05 19:57:44 idiscovery Exp $
|
||||
#
|
||||
# Tix Demostration Program
|
||||
#
|
||||
# This sample program is structured in such a way so that it can be
|
||||
# executed from the Tix demo program "tixwidgets": it must have a
|
||||
# procedure called "RunSample". It should also have the "if" statment
|
||||
# at the end of this file so that it can be run as a standalone
|
||||
# program.
|
||||
|
||||
# This file demonstrates the use of the compound images: it uses compound
|
||||
# images to display a text string together with a pixmap inside
|
||||
# buttons
|
||||
#
|
||||
|
||||
import Tix
|
||||
|
||||
network_pixmap = """/* XPM */
|
||||
static char * netw_xpm[] = {
|
||||
/* width height ncolors chars_per_pixel */
|
||||
"32 32 7 1",
|
||||
/* colors */
|
||||
" s None c None",
|
||||
". c #000000000000",
|
||||
"X c white",
|
||||
"o c #c000c000c000",
|
||||
"O c #404040",
|
||||
"+ c blue",
|
||||
"@ c red",
|
||||
/* pixels */
|
||||
" ",
|
||||
" .............. ",
|
||||
" .XXXXXXXXXXXX. ",
|
||||
" .XooooooooooO. ",
|
||||
" .Xo.......XoO. ",
|
||||
" .Xo.++++o+XoO. ",
|
||||
" .Xo.++++o+XoO. ",
|
||||
" .Xo.++oo++XoO. ",
|
||||
" .Xo.++++++XoO. ",
|
||||
" .Xo.+o++++XoO. ",
|
||||
" .Xo.++++++XoO. ",
|
||||
" .Xo.XXXXXXXoO. ",
|
||||
" .XooooooooooO. ",
|
||||
" .Xo@ooo....oO. ",
|
||||
" .............. .XooooooooooO. ",
|
||||
" .XXXXXXXXXXXX. .XooooooooooO. ",
|
||||
" .XooooooooooO. .OOOOOOOOOOOO. ",
|
||||
" .Xo.......XoO. .............. ",
|
||||
" .Xo.++++o+XoO. @ ",
|
||||
" .Xo.++++o+XoO. @ ",
|
||||
" .Xo.++oo++XoO. @ ",
|
||||
" .Xo.++++++XoO. @ ",
|
||||
" .Xo.+o++++XoO. @ ",
|
||||
" .Xo.++++++XoO. ..... ",
|
||||
" .Xo.XXXXXXXoO. .XXX. ",
|
||||
" .XooooooooooO.@@@@@@.X O. ",
|
||||
" .Xo@ooo....oO. .OOO. ",
|
||||
" .XooooooooooO. ..... ",
|
||||
" .XooooooooooO. ",
|
||||
" .OOOOOOOOOOOO. ",
|
||||
" .............. ",
|
||||
" "};
|
||||
"""
|
||||
|
||||
hard_disk_pixmap = """/* XPM */
|
||||
static char * drivea_xpm[] = {
|
||||
/* width height ncolors chars_per_pixel */
|
||||
"32 32 5 1",
|
||||
/* colors */
|
||||
" s None c None",
|
||||
". c #000000000000",
|
||||
"X c white",
|
||||
"o c #c000c000c000",
|
||||
"O c #800080008000",
|
||||
/* pixels */
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" .......................... ",
|
||||
" .XXXXXXXXXXXXXXXXXXXXXXXo. ",
|
||||
" .XooooooooooooooooooooooO. ",
|
||||
" .Xooooooooooooooooo..oooO. ",
|
||||
" .Xooooooooooooooooo..oooO. ",
|
||||
" .XooooooooooooooooooooooO. ",
|
||||
" .Xoooooooo.......oooooooO. ",
|
||||
" .Xoo...................oO. ",
|
||||
" .Xoooooooo.......oooooooO. ",
|
||||
" .XooooooooooooooooooooooO. ",
|
||||
" .XooooooooooooooooooooooO. ",
|
||||
" .XooooooooooooooooooooooO. ",
|
||||
" .XooooooooooooooooooooooO. ",
|
||||
" .oOOOOOOOOOOOOOOOOOOOOOOO. ",
|
||||
" .......................... ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" "};
|
||||
"""
|
||||
|
||||
network_bitmap = """
|
||||
#define netw_width 32
|
||||
#define netw_height 32
|
||||
static unsigned char netw_bits[] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x7f, 0x00, 0x00, 0x02, 0x40,
|
||||
0x00, 0x00, 0xfa, 0x5f, 0x00, 0x00, 0x0a, 0x50, 0x00, 0x00, 0x0a, 0x52,
|
||||
0x00, 0x00, 0x0a, 0x52, 0x00, 0x00, 0x8a, 0x51, 0x00, 0x00, 0x0a, 0x50,
|
||||
0x00, 0x00, 0x4a, 0x50, 0x00, 0x00, 0x0a, 0x50, 0x00, 0x00, 0x0a, 0x50,
|
||||
0x00, 0x00, 0xfa, 0x5f, 0x00, 0x00, 0x02, 0x40, 0xfe, 0x7f, 0x52, 0x55,
|
||||
0x02, 0x40, 0xaa, 0x6a, 0xfa, 0x5f, 0xfe, 0x7f, 0x0a, 0x50, 0xfe, 0x7f,
|
||||
0x0a, 0x52, 0x80, 0x00, 0x0a, 0x52, 0x80, 0x00, 0x8a, 0x51, 0x80, 0x00,
|
||||
0x0a, 0x50, 0x80, 0x00, 0x4a, 0x50, 0x80, 0x00, 0x0a, 0x50, 0xe0, 0x03,
|
||||
0x0a, 0x50, 0x20, 0x02, 0xfa, 0xdf, 0x3f, 0x03, 0x02, 0x40, 0xa0, 0x02,
|
||||
0x52, 0x55, 0xe0, 0x03, 0xaa, 0x6a, 0x00, 0x00, 0xfe, 0x7f, 0x00, 0x00,
|
||||
0xfe, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
|
||||
"""
|
||||
|
||||
hard_disk_bitmap = """
|
||||
#define drivea_width 32
|
||||
#define drivea_height 32
|
||||
static unsigned char drivea_bits[] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xf8, 0xff, 0xff, 0x1f, 0x08, 0x00, 0x00, 0x18, 0xa8, 0xaa, 0xaa, 0x1a,
|
||||
0x48, 0x55, 0xd5, 0x1d, 0xa8, 0xaa, 0xaa, 0x1b, 0x48, 0x55, 0x55, 0x1d,
|
||||
0xa8, 0xfa, 0xaf, 0x1a, 0xc8, 0xff, 0xff, 0x1d, 0xa8, 0xfa, 0xaf, 0x1a,
|
||||
0x48, 0x55, 0x55, 0x1d, 0xa8, 0xaa, 0xaa, 0x1a, 0x48, 0x55, 0x55, 0x1d,
|
||||
0xa8, 0xaa, 0xaa, 0x1a, 0xf8, 0xff, 0xff, 0x1f, 0xf8, 0xff, 0xff, 0x1f,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
|
||||
"""
|
||||
|
||||
def RunSample(w):
|
||||
w.img0 = Tix.Image('pixmap', data=network_pixmap)
|
||||
if not w.img0:
|
||||
w.img0 = Tix.Image('bitmap', data=network_bitmap)
|
||||
w.img1 = Tix.Image('pixmap', data=hard_disk_pixmap)
|
||||
if not w.img0:
|
||||
w.img1 = Tix.Image('bitmap', data=hard_disk_bitmap)
|
||||
|
||||
hdd = Tix.Button(w, padx=4, pady=1, width=120)
|
||||
net = Tix.Button(w, padx=4, pady=1, width=120)
|
||||
|
||||
# Create the first image: we create a line, then put a string,
|
||||
# a space and a image into this line, from left to right.
|
||||
# The result: we have a one-line image that consists of three
|
||||
# individual items
|
||||
#
|
||||
# The tk.calls should be methods in Tix ...
|
||||
w.hdd_img = Tix.Image('compound', window=hdd)
|
||||
w.hdd_img.tk.call(str(w.hdd_img), 'add', 'line')
|
||||
w.hdd_img.tk.call(str(w.hdd_img), 'add', 'text', '-text', 'Hard Disk',
|
||||
'-underline', '0')
|
||||
w.hdd_img.tk.call(str(w.hdd_img), 'add', 'space', '-width', '7')
|
||||
w.hdd_img.tk.call(str(w.hdd_img), 'add', 'image', '-image', w.img1)
|
||||
|
||||
# Put this image into the first button
|
||||
#
|
||||
hdd['image'] = w.hdd_img
|
||||
|
||||
# Next button
|
||||
w.net_img = Tix.Image('compound', window=net)
|
||||
w.net_img.tk.call(str(w.net_img), 'add', 'line')
|
||||
w.net_img.tk.call(str(w.net_img), 'add', 'text', '-text', 'Network',
|
||||
'-underline', '0')
|
||||
w.net_img.tk.call(str(w.net_img), 'add', 'space', '-width', '7')
|
||||
w.net_img.tk.call(str(w.net_img), 'add', 'image', '-image', w.img0)
|
||||
|
||||
# Put this image into the first button
|
||||
#
|
||||
net['image'] = w.net_img
|
||||
|
||||
close = Tix.Button(w, pady=1, text='Close',
|
||||
command=lambda w=w: w.destroy())
|
||||
|
||||
hdd.pack(side=Tix.LEFT, padx=10, pady=10, fill=Tix.Y, expand=1)
|
||||
net.pack(side=Tix.LEFT, padx=10, pady=10, fill=Tix.Y, expand=1)
|
||||
close.pack(side=Tix.LEFT, padx=10, pady=10, fill=Tix.Y, expand=1)
|
||||
|
||||
if __name__ == '__main__':
|
||||
root = Tix.Tk()
|
||||
RunSample(root)
|
||||
root.mainloop()
|
||||
|
||||
@@ -1,100 +0,0 @@
|
||||
#!/usr/local/bin/python
|
||||
#
|
||||
# $Id: ComboBox.py,v 1.1 2000/11/05 19:58:00 idiscovery Exp $
|
||||
#
|
||||
# Tix Demostration Program
|
||||
#
|
||||
# This sample program is structured in such a way so that it can be
|
||||
# executed from the Tix demo program "tixwidgets": it must have a
|
||||
# procedure called "RunSample". It should also have the "if" statment
|
||||
# at the end of this file so that it can be run as a standalone
|
||||
# program.
|
||||
|
||||
# This file demonstrates the use of the tixComboBox widget, which is close
|
||||
# to the MS Window Combo Box control.
|
||||
#
|
||||
import Tix
|
||||
|
||||
def RunSample(w):
|
||||
global demo_month, demo_year
|
||||
|
||||
top = Tix.Frame(w, bd=1, relief=Tix.RAISED)
|
||||
|
||||
demo_month = Tix.StringVar()
|
||||
demo_year = Tix.StringVar()
|
||||
|
||||
# $w.top.a is a drop-down combo box. It is not editable -- who wants
|
||||
# to invent new months?
|
||||
#
|
||||
# [Hint] The -options switch sets the options of the subwidgets.
|
||||
# [Hint] We set the label.width subwidget option of both comboboxes to
|
||||
# be 10 so that their labels appear to be aligned.
|
||||
#
|
||||
a = Tix.ComboBox(top, label="Month: ", dropdown=1,
|
||||
command=select_month, editable=0, variable=demo_month,
|
||||
options='listbox.height 6 label.width 10 label.anchor e')
|
||||
|
||||
# $w.top.b is a non-drop-down combo box. It is not editable: we provide
|
||||
# four choices for the user, but he can enter an alternative year if he
|
||||
# wants to.
|
||||
#
|
||||
# [Hint] Use the padY and anchor options of the label subwidget to
|
||||
# align the label with the entry subwidget.
|
||||
# [Hint] Notice that you should use padY (the NAME of the option) and not
|
||||
# pady (the SWITCH of the option).
|
||||
#
|
||||
b = Tix.ComboBox(top, label="Year: ", dropdown=0,
|
||||
command=select_year, editable=1, variable=demo_year,
|
||||
options='listbox.height 4 label.padY 5 label.width 10 label.anchor ne')
|
||||
|
||||
a.pack(side=Tix.TOP, anchor=Tix.W)
|
||||
b.pack(side=Tix.TOP, anchor=Tix.W)
|
||||
|
||||
a.insert(Tix.END, 'January')
|
||||
a.insert(Tix.END, 'February')
|
||||
a.insert(Tix.END, 'March')
|
||||
a.insert(Tix.END, 'April')
|
||||
a.insert(Tix.END, 'May')
|
||||
a.insert(Tix.END, 'June')
|
||||
a.insert(Tix.END, 'July')
|
||||
a.insert(Tix.END, 'August')
|
||||
a.insert(Tix.END, 'September')
|
||||
a.insert(Tix.END, 'October')
|
||||
a.insert(Tix.END, 'November')
|
||||
a.insert(Tix.END, 'December')
|
||||
|
||||
b.insert(Tix.END, '1992')
|
||||
b.insert(Tix.END, '1993')
|
||||
b.insert(Tix.END, '1994')
|
||||
b.insert(Tix.END, '1995')
|
||||
b.insert(Tix.END, '1996')
|
||||
|
||||
# Use "tixSetSilent" to set the values of the combo box if you
|
||||
# don't want your -command procedures (cbx:select_month and
|
||||
# cbx:select_year) to be called.
|
||||
#
|
||||
a.set_silent('January')
|
||||
b.set_silent('1995')
|
||||
|
||||
box = Tix.ButtonBox(w, orientation=Tix.HORIZONTAL)
|
||||
box.add('ok', text='Ok', underline=0, width=6,
|
||||
command=lambda w=w: ok_command(w))
|
||||
box.add('cancel', text='Cancel', underline=0, width=6,
|
||||
command=lambda w=w: w.destroy())
|
||||
box.pack(side=Tix.BOTTOM, fill=Tix.X)
|
||||
top.pack(side=Tix.TOP, fill=Tix.BOTH, expand=1)
|
||||
|
||||
def select_month(event=None):
|
||||
print "Month =", demo_month.get()
|
||||
|
||||
def select_year(event=None):
|
||||
print "Year =", demo_year.get()
|
||||
|
||||
def ok_command(w):
|
||||
print "Month =", demo_month.get(), ", Year=", demo_year.get()
|
||||
w.destroy()
|
||||
|
||||
if __name__ == '__main__':
|
||||
root = Tix.Tk()
|
||||
RunSample(root)
|
||||
root.mainloop()
|
||||
@@ -1,102 +0,0 @@
|
||||
#!/usr/local/bin/python
|
||||
#
|
||||
# $Id: Control.py,v 1.1 2000/11/05 19:58:13 idiscovery Exp $
|
||||
#
|
||||
# Tix Demostration Program
|
||||
#
|
||||
# This sample program is structured in such a way so that it can be
|
||||
# executed from the Tix demo program "tixwidgets": it must have a
|
||||
# procedure called "RunSample". It should also have the "if" statment
|
||||
# at the end of this file so that it can be run as a standalone
|
||||
# program.
|
||||
|
||||
# This file demonstrates the use of the tixControl widget -- it is an
|
||||
# entry widget with up/down arrow buttons. You can use the arrow buttons
|
||||
# to adjust the value inside the entry widget.
|
||||
#
|
||||
# This example program uses three Control widgets. One lets you select
|
||||
# integer values; one lets you select floating point values and the last
|
||||
# one lets you select a few names.
|
||||
#
|
||||
import Tix
|
||||
|
||||
def RunSample(w):
|
||||
global demo_maker, demo_thrust, demo_num_engines
|
||||
|
||||
demo_maker = Tix.StringVar()
|
||||
demo_thrust = Tix.DoubleVar()
|
||||
demo_num_engines = Tix.IntVar()
|
||||
demo_maker.set('P&W')
|
||||
demo_thrust.set(20000.0)
|
||||
demo_num_engines.set(2)
|
||||
|
||||
top = Tix.Frame(w, bd=1, relief=Tix.RAISED)
|
||||
|
||||
# $w.top.a allows only integer values
|
||||
#
|
||||
# [Hint] The -options switch sets the options of the subwidgets.
|
||||
# [Hint] We set the label.width subwidget option of the Controls to
|
||||
# be 16 so that their labels appear to be aligned.
|
||||
#
|
||||
a = Tix.Control(top, label='Number of Engines: ', integer=1,
|
||||
variable=demo_num_engines, min=1, max=4,
|
||||
options='entry.width 10 label.width 20 label.anchor e')
|
||||
|
||||
b = Tix.Control(top, label='Thrust: ', integer=0,
|
||||
min='10000.0', max='60000.0', step=500,
|
||||
variable=demo_thrust,
|
||||
options='entry.width 10 label.width 20 label.anchor e')
|
||||
|
||||
c = Tix.Control(top, label='Engine Maker: ', value='P&W',
|
||||
variable=demo_maker,
|
||||
options='entry.width 10 label.width 20 label.anchor e')
|
||||
|
||||
# We can't define these in the init because the widget 'c' doesn't
|
||||
# exist yet and we need to reference it
|
||||
c['incrcmd'] = lambda w=c: adjust_maker(w, 1)
|
||||
c['decrcmd'] = lambda w=c: adjust_maker(w, -1)
|
||||
c['validatecmd'] = lambda w=c: validate_maker(w)
|
||||
|
||||
a.pack(side=Tix.TOP, anchor=Tix.W)
|
||||
b.pack(side=Tix.TOP, anchor=Tix.W)
|
||||
c.pack(side=Tix.TOP, anchor=Tix.W)
|
||||
|
||||
box = Tix.ButtonBox(w, orientation=Tix.HORIZONTAL)
|
||||
box.add('ok', text='Ok', underline=0, width=6,
|
||||
command=lambda w=w: ok_command(w))
|
||||
box.add('cancel', text='Cancel', underline=0, width=6,
|
||||
command=lambda w=w: w.destroy())
|
||||
box.pack(side=Tix.BOTTOM, fill=Tix.X)
|
||||
top.pack(side=Tix.TOP, fill=Tix.BOTH, expand=1)
|
||||
|
||||
maker_list = ['P&W', 'GE', 'Rolls Royce']
|
||||
|
||||
def adjust_maker(w, inc):
|
||||
i = maker_list.index(demo_maker.get())
|
||||
i = i + inc
|
||||
if i >= len(maker_list):
|
||||
i = 0
|
||||
elif i < 0:
|
||||
i = len(maker_list) - 1
|
||||
|
||||
# In Tcl/Tix we should return the string maker_list[i]. We can't
|
||||
# do that in Tkinter so we set the global variable. (This works).
|
||||
demo_maker.set(maker_list[i])
|
||||
|
||||
def validate_maker(w):
|
||||
try:
|
||||
i = maker_list.index(demo_maker.get())
|
||||
except:
|
||||
# Works here though. Why ? Beats me.
|
||||
return maker_list[0]
|
||||
# Works here though. Why ? Beats me.
|
||||
return maker_list[i]
|
||||
|
||||
def ok_command(w):
|
||||
print "Selected", demo_num_engines.get(), "of", demo_maker.get(), " engines each of thrust", demo_thrust.get()
|
||||
w.destroy()
|
||||
|
||||
if __name__ == '__main__':
|
||||
root = Tix.Tk()
|
||||
RunSample(root)
|
||||
root.mainloop()
|
||||
@@ -1,119 +0,0 @@
|
||||
#!/usr/local/bin/python
|
||||
#
|
||||
# $Id: NoteBook.py,v 1.1 2000/11/05 19:58:27 idiscovery Exp $
|
||||
#
|
||||
# Tix Demostration Program
|
||||
#
|
||||
# This sample program is structured in such a way so that it can be
|
||||
# executed from the Tix demo program "tixwidgets": it must have a
|
||||
# procedure called "RunSample". It should also have the "if" statment
|
||||
# at the end of this file so that it can be run as a standalone
|
||||
# program.
|
||||
|
||||
# This file demonstrates the use of the tixNoteBook widget, which allows
|
||||
# you to lay out your interface using a "notebook" metaphore
|
||||
#
|
||||
import Tix
|
||||
|
||||
def RunSample(w):
|
||||
global root
|
||||
root = w
|
||||
|
||||
# We use these options to set the sizes of the subwidgets inside the
|
||||
# notebook, so that they are well-aligned on the screen.
|
||||
prefix = Tix.OptionName(w)
|
||||
if prefix:
|
||||
prefix = '*'+prefix
|
||||
else:
|
||||
prefix = ''
|
||||
w.option_add(prefix+'*TixControl*entry.width', 10)
|
||||
w.option_add(prefix+'*TixControl*label.width', 18)
|
||||
w.option_add(prefix+'*TixControl*label.anchor', Tix.E)
|
||||
w.option_add(prefix+'*TixNoteBook*tagPadX', 8)
|
||||
|
||||
# Create the notebook widget and set its backpagecolor to gray.
|
||||
# Note that the -backpagecolor option belongs to the "nbframe"
|
||||
# subwidget.
|
||||
nb = Tix.NoteBook(w, name='nb', ipadx=6, ipady=6)
|
||||
nb['bg'] = 'gray'
|
||||
nb.nbframe['backpagecolor'] = 'gray'
|
||||
|
||||
# Create the two tabs on the notebook. The -underline option
|
||||
# puts a underline on the first character of the labels of the tabs.
|
||||
# Keyboard accelerators will be defined automatically according
|
||||
# to the underlined character.
|
||||
nb.add('hard_disk', label="Hard Disk", underline=0)
|
||||
nb.add('network', label="Network", underline=0)
|
||||
|
||||
nb.pack(expand=1, fill=Tix.BOTH, padx=5, pady=5 ,side=Tix.TOP)
|
||||
|
||||
#----------------------------------------
|
||||
# Create the first page
|
||||
#----------------------------------------
|
||||
# Create two frames: one for the common buttons, one for the
|
||||
# other widgets
|
||||
#
|
||||
tab=nb.hard_disk
|
||||
f = Tix.Frame(tab)
|
||||
common = Tix.Frame(tab)
|
||||
|
||||
f.pack(side=Tix.LEFT, padx=2, pady=2, fill=Tix.BOTH, expand=1)
|
||||
common.pack(side=Tix.RIGHT, padx=2, fill=Tix.Y)
|
||||
|
||||
a = Tix.Control(f, value=12, label='Access time: ')
|
||||
w = Tix.Control(f, value=400, label='Write Throughput: ')
|
||||
r = Tix.Control(f, value=400, label='Read Throughput: ')
|
||||
c = Tix.Control(f, value=1021, label='Capacity: ')
|
||||
|
||||
a.pack(side=Tix.TOP, padx=20, pady=2)
|
||||
w.pack(side=Tix.TOP, padx=20, pady=2)
|
||||
r.pack(side=Tix.TOP, padx=20, pady=2)
|
||||
c.pack(side=Tix.TOP, padx=20, pady=2)
|
||||
|
||||
# Create the common buttons
|
||||
createCommonButtons(common)
|
||||
|
||||
#----------------------------------------
|
||||
# Create the second page
|
||||
#----------------------------------------
|
||||
|
||||
tab = nb.network
|
||||
|
||||
f = Tix.Frame(tab)
|
||||
common = Tix.Frame(tab)
|
||||
|
||||
f.pack(side=Tix.LEFT, padx=2, pady=2, fill=Tix.BOTH, expand=1)
|
||||
common.pack(side=Tix.RIGHT, padx=2, fill=Tix.Y)
|
||||
|
||||
a = Tix.Control(f, value=12, label='Access time: ')
|
||||
w = Tix.Control(f, value=400, label='Write Throughput: ')
|
||||
r = Tix.Control(f, value=400, label='Read Throughput: ')
|
||||
c = Tix.Control(f, value=1021, label='Capacity: ')
|
||||
u = Tix.Control(f, value=10, label='Users: ')
|
||||
|
||||
a.pack(side=Tix.TOP, padx=20, pady=2)
|
||||
w.pack(side=Tix.TOP, padx=20, pady=2)
|
||||
r.pack(side=Tix.TOP, padx=20, pady=2)
|
||||
c.pack(side=Tix.TOP, padx=20, pady=2)
|
||||
u.pack(side=Tix.TOP, padx=20, pady=2)
|
||||
|
||||
createCommonButtons(common)
|
||||
|
||||
def doDestroy():
|
||||
global root
|
||||
root.destroy()
|
||||
|
||||
def createCommonButtons(master):
|
||||
ok = Tix.Button(master, name='ok', text='OK', width=6,
|
||||
command=doDestroy)
|
||||
cancel = Tix.Button(master, name='cancel',
|
||||
text='Cancel', width=6,
|
||||
command=doDestroy)
|
||||
|
||||
ok.pack(side=Tix.TOP, padx=2, pady=2)
|
||||
cancel.pack(side=Tix.TOP, padx=2, pady=2)
|
||||
|
||||
if __name__ == '__main__':
|
||||
root = Tix.Tk()
|
||||
RunSample(root)
|
||||
root.mainloop()
|
||||
@@ -1,68 +0,0 @@
|
||||
#!/usr/local/bin/python
|
||||
#
|
||||
# $Id: OptMenu.py,v 1.1 2000/11/05 19:58:41 idiscovery Exp $
|
||||
#
|
||||
# Tix Demostration Program
|
||||
#
|
||||
# This sample program is structured in such a way so that it can be
|
||||
# executed from the Tix demo program "tixwidgets": it must have a
|
||||
# procedure called "RunSample". It should also have the "if" statment
|
||||
# at the end of this file so that it can be run as a standalone
|
||||
# program.
|
||||
|
||||
# This file demonstrates the use of the tixOptionMenu widget -- you can
|
||||
# use it for the user to choose from a fixed set of options
|
||||
#
|
||||
import Tix
|
||||
|
||||
options = {'text':'Plain Text', 'post':'PostScript', 'html':'HTML',
|
||||
'tex':'LaTeX', 'rtf':'Rich Text Format'}
|
||||
|
||||
def RunSample(w):
|
||||
global demo_opt_from, demo_opt_to
|
||||
|
||||
demo_opt_from = Tix.StringVar()
|
||||
demo_opt_to = Tix.StringVar()
|
||||
|
||||
top = Tix.Frame(w, bd=1, relief=Tix.RAISED)
|
||||
|
||||
from_file = Tix.OptionMenu(top, label="From File Format : ",
|
||||
variable=demo_opt_from,
|
||||
options = 'label.width 19 label.anchor e menubutton.width 15')
|
||||
|
||||
to_file = Tix.OptionMenu(top, label="To File Format : ",
|
||||
variable=demo_opt_to,
|
||||
options='label.width 19 label.anchor e menubutton.width 15')
|
||||
|
||||
# Add the available options to the two OptionMenu widgets
|
||||
#
|
||||
# [Hint] You have to add the options first before you set the
|
||||
# global variables "demo_opt_from" and "demo_opt_to". Otherwise
|
||||
# the OptionMenu widget will complain about "unknown options"!
|
||||
#
|
||||
for opt in options.keys():
|
||||
from_file.add_command(opt, label=options[opt])
|
||||
to_file.add_command(opt, label=options[opt])
|
||||
|
||||
demo_opt_from.set('html')
|
||||
demo_opt_to.set('post')
|
||||
|
||||
from_file.pack(side=Tix.TOP, anchor=Tix.W, pady=3, padx=6)
|
||||
to_file.pack(side=Tix.TOP, anchor=Tix.W, pady=3, padx=6)
|
||||
|
||||
box = Tix.ButtonBox(w, orientation=Tix.HORIZONTAL)
|
||||
box.add('ok', text='Ok', underline=0, width=6,
|
||||
command=lambda w=w: ok_command(w))
|
||||
box.add('cancel', text='Cancel', underline=0, width=6,
|
||||
command=lambda w=w: w.destroy())
|
||||
box.pack(side=Tix.BOTTOM, fill=Tix.X)
|
||||
top.pack(side=Tix.TOP, fill=Tix.BOTH, expand=1)
|
||||
|
||||
def ok_command(w):
|
||||
print "Convert file from", demo_opt_from.get(), " to", demo_opt_to.get()
|
||||
w.destroy()
|
||||
|
||||
if __name__ == '__main__':
|
||||
root = Tix.Tk()
|
||||
RunSample(root)
|
||||
root.mainloop()
|
||||
@@ -1,56 +0,0 @@
|
||||
# Tix Demostration Program
|
||||
#
|
||||
# $Id: PopMenu.py,v 1.1 2000/11/05 19:58:57 idiscovery Exp $
|
||||
#
|
||||
#
|
||||
# This sample program is structured in such a way so that it can be
|
||||
# executed from the Tix demo program "widget": it must have a
|
||||
# procedure called "RunSample". It should also have the "if" statment
|
||||
# at the end of this file so that it can be run as a standalone
|
||||
# program using tixwish.
|
||||
|
||||
# This file demonstrates the use of the tixPopupMenu widget.
|
||||
#
|
||||
import Tix
|
||||
|
||||
def RunSample(w):
|
||||
# We create the frame and the button, then we'll bind the PopupMenu
|
||||
# to both widgets. The result is, when you press the right mouse
|
||||
# button over $w.top or $w.top.but, the PopupMenu will come up.
|
||||
#
|
||||
top = Tix.Frame(w, relief=Tix.RAISED, bd=1)
|
||||
but = Tix.Button(top, text='Press the right mouse button over this button or its surrounding area')
|
||||
but.pack(expand=1, fill=Tix.BOTH, padx=50, pady=50)
|
||||
|
||||
p = Tix.PopupMenu(top, title='Popup Test')
|
||||
p.bind_widget(top)
|
||||
p.bind_widget(but)
|
||||
|
||||
# Set the entries inside the PopupMenu widget.
|
||||
# [Hint] You have to manipulate the "menu" subwidget.
|
||||
# $w.top.p itself is NOT a menu widget.
|
||||
# [Hint] Watch carefully how the sub-menu is created
|
||||
#
|
||||
p.menu.add_command(label='Desktop', underline=0)
|
||||
p.menu.add_command(label='Select', underline=0)
|
||||
p.menu.add_command(label='Find', underline=0)
|
||||
p.menu.add_command(label='System', underline=1)
|
||||
p.menu.add_command(label='Help', underline=0)
|
||||
m1 = Tix.Menu(p.menu)
|
||||
m1.add_command(label='Hello')
|
||||
p.menu.add_cascade(label='More', menu=m1)
|
||||
|
||||
but.pack(side=Tix.TOP, padx=40, pady=50)
|
||||
|
||||
box = Tix.ButtonBox(w, orientation=Tix.HORIZONTAL)
|
||||
box.add('ok', text='Ok', underline=0, width=6,
|
||||
command=lambda w=w: w.destroy())
|
||||
box.add('cancel', text='Cancel', underline=0, width=6,
|
||||
command=lambda w=w: w.destroy())
|
||||
box.pack(side=Tix.BOTTOM, fill=Tix.X)
|
||||
top.pack(side=Tix.TOP, fill=Tix.BOTH, expand=1)
|
||||
|
||||
if __name__ == '__main__':
|
||||
root = Tix.Tk()
|
||||
RunSample(root)
|
||||
root.mainloop()
|
||||
@@ -1,107 +0,0 @@
|
||||
#!/usr/local/bin/python
|
||||
#
|
||||
# $Id: SHList1.py,v 1.1 2000/11/05 19:59:11 idiscovery Exp $
|
||||
#
|
||||
# Tix Demostration Program
|
||||
#
|
||||
# This sample program is structured in such a way so that it can be
|
||||
# executed from the Tix demo program "tixwidgets": it must have a
|
||||
# procedure called "RunSample". It should also have the "if" statment
|
||||
# at the end of this file so that it can be run as a standalone
|
||||
# program using tixwish.
|
||||
|
||||
# This file demonstrates the use of the tixScrolledHList widget.
|
||||
#
|
||||
|
||||
import Tix
|
||||
|
||||
def RunSample (w) :
|
||||
|
||||
# We create the frame and the ScrolledHList widget
|
||||
# at the top of the dialog box
|
||||
#
|
||||
top = Tix.Frame( w, relief=Tix.RAISED, bd=1)
|
||||
|
||||
# Put a simple hierachy into the HList (two levels). Use colors and
|
||||
# separator widgets (frames) to make the list look fancy
|
||||
#
|
||||
top.a = Tix.ScrolledHList(top)
|
||||
top.a.pack( expand=1, fill=Tix.BOTH, padx=10, pady=10, side=Tix.TOP)
|
||||
|
||||
|
||||
# This is our little relational database
|
||||
#
|
||||
bosses = [
|
||||
('jeff', 'Jeff Waxman'),
|
||||
('john', 'John Lee'),
|
||||
('peter', 'Peter Kenson')
|
||||
]
|
||||
|
||||
employees = [
|
||||
('alex', 'john', 'Alex Kellman'),
|
||||
('alan', 'john', 'Alan Adams'),
|
||||
('andy', 'peter', 'Andreas Crawford'),
|
||||
('doug', 'jeff', 'Douglas Bloom'),
|
||||
('jon', 'peter', 'Jon Baraki'),
|
||||
('chris', 'jeff', 'Chris Geoffrey'),
|
||||
('chuck', 'jeff', 'Chuck McLean')
|
||||
]
|
||||
|
||||
hlist=top.a.hlist
|
||||
|
||||
# Let configure the appearance of the HList subwidget
|
||||
#
|
||||
hlist.config( separator='.', width=25, drawbranch=0, indent=10)
|
||||
|
||||
count=0
|
||||
for boss,name in bosses :
|
||||
if count :
|
||||
f=Tix.Frame(hlist, name='sep%d' % count, height=2, width=150,
|
||||
bd=2, relief=Tix.SUNKEN, bg=hlist['bg'] )
|
||||
|
||||
hlist.add_child( itemtype=Tix.WINDOW,
|
||||
window=f, state=Tix.DISABLED )
|
||||
|
||||
hlist.add(boss, itemtype=Tix.TEXT, text=name)
|
||||
count = count+1
|
||||
|
||||
|
||||
for person,boss,name in employees :
|
||||
# '.' is the separator character we chose above
|
||||
#
|
||||
key= boss + '.' + person
|
||||
# ^^^^ ^^^^^^
|
||||
# parent entryPath / child's name
|
||||
|
||||
hlist.add( key, text=name )
|
||||
|
||||
# [Hint] Make sure the keys (e.g. 'boss.person') you choose
|
||||
# are unique names. If you cannot be sure of this (because of
|
||||
# the structure of your database, e.g.) you can use the
|
||||
# "add_child" command instead:
|
||||
#
|
||||
# hlist.addchild( boss, text=name)
|
||||
# ^^^^
|
||||
# parent entryPath
|
||||
|
||||
|
||||
# Use a ButtonBox to hold the buttons.
|
||||
#
|
||||
box= Tix.ButtonBox(top, orientation=Tix.HORIZONTAL )
|
||||
box.add( 'ok', text='Ok', underline=0, width=6,
|
||||
command = lambda w=w: w.destroy() )
|
||||
|
||||
box.add( 'cancel', text='Cancel', underline=0, width=6,
|
||||
command = lambda w=w: w.destroy() )
|
||||
|
||||
box.pack( side=Tix.BOTTOM, fill=Tix.X)
|
||||
top.pack( side=Tix.TOP, fill=Tix.BOTH, expand=1 )
|
||||
|
||||
|
||||
# This "if" statement makes it possible to run this script file inside or
|
||||
# outside of the main demo program "widget".
|
||||
#
|
||||
if __name__== '__main__' :
|
||||
root=Tix.Tk()
|
||||
RunSample(root)
|
||||
root.mainloop()
|
||||
@@ -1,148 +0,0 @@
|
||||
#!/usr/local/bin/python
|
||||
#
|
||||
# $Id: SHList2.py,v 1.1 2000/11/05 19:59:27 idiscovery Exp $
|
||||
#
|
||||
# Tix Demostration Program
|
||||
#
|
||||
# This sample program is structured in such a way so that it can be
|
||||
# executed from the PyTix demo program "tixwidget": it must have a
|
||||
# procedure called "RunSample". It should also have the "if" statment
|
||||
# at the end of this file so that it can be run as a standalone
|
||||
# program using tixwish.
|
||||
|
||||
# This file demonstrates how to use multiple columns and multiple styles
|
||||
# in the tixHList widget
|
||||
#
|
||||
# In a tixHList widget, you can have one ore more columns.
|
||||
#
|
||||
|
||||
import Tix
|
||||
|
||||
def RunSample (w) :
|
||||
|
||||
# We create the frame and the ScrolledHList widget
|
||||
# at the top of the dialog box
|
||||
#
|
||||
top = Tix.Frame( w, relief=Tix.RAISED, bd=1)
|
||||
|
||||
# Put a simple hierachy into the HList (two levels). Use colors and
|
||||
# separator widgets (frames) to make the list look fancy
|
||||
#
|
||||
top.a = Tix.ScrolledHList(top, options='hlist.columns 3 hlist.header 1' )
|
||||
|
||||
top.a.pack( expand=1, fill=Tix.BOTH, padx=10, pady=10, side=Tix.TOP)
|
||||
|
||||
hlist=top.a.hlist
|
||||
|
||||
# Create the title for the HList widget
|
||||
# >> Notice that we have set the hlist.header subwidget option to true
|
||||
# so that the header is displayed
|
||||
#
|
||||
|
||||
boldfont=hlist.tk.call('tix','option','get','bold_font')
|
||||
|
||||
# First some styles for the headers
|
||||
style={}
|
||||
style['header'] = Tix.DisplayStyle(Tix.TEXT, fg='black', refwindow=top,
|
||||
anchor=Tix.CENTER, padx=8, pady=2, font = boldfont )
|
||||
|
||||
hlist.header_create(0, itemtype=Tix.TEXT, text='Name',
|
||||
style=style['header'])
|
||||
hlist.header_create(1, itemtype=Tix.TEXT, text='Position',
|
||||
style=style['header'])
|
||||
|
||||
# Notice that we use 3 columns in the hlist widget. This way when the user
|
||||
# expands the windows wide, the right side of the header doesn't look
|
||||
# chopped off. The following line ensures that the 3 column header is
|
||||
# not shown unless the hlist window is wider than its contents.
|
||||
#
|
||||
hlist.column_width(2,0)
|
||||
|
||||
# This is our little relational database
|
||||
#
|
||||
boss = ('doe', 'John Doe', 'Director')
|
||||
|
||||
managers = [
|
||||
('jeff', 'Jeff Waxman', 'Manager'),
|
||||
('john', 'John Lee', 'Manager'),
|
||||
('peter', 'Peter Kenson', 'Manager')
|
||||
]
|
||||
|
||||
employees = [
|
||||
('alex', 'john', 'Alex Kellman', 'Clerk'),
|
||||
('alan', 'john', 'Alan Adams', 'Clerk'),
|
||||
('andy', 'peter', 'Andreas Crawford', 'Salesman'),
|
||||
('doug', 'jeff', 'Douglas Bloom', 'Clerk'),
|
||||
('jon', 'peter', 'Jon Baraki', 'Salesman'),
|
||||
('chris', 'jeff', 'Chris Geoffrey', 'Clerk'),
|
||||
('chuck', 'jeff', 'Chuck McLean', 'Cleaner')
|
||||
]
|
||||
|
||||
style['mgr_name'] = Tix.DisplayStyle(Tix.TEXT, refwindow=top,
|
||||
fg='#202060', selectforeground = '#202060', font = boldfont )
|
||||
|
||||
style['mgr_posn'] = Tix.DisplayStyle(Tix.TEXT, padx=8, refwindow=top,
|
||||
fg='#202060', selectforeground='#202060' )
|
||||
|
||||
style['empl_name'] = Tix.DisplayStyle(Tix.TEXT, refwindow=top,
|
||||
fg='#602020', selectforeground = '#602020', font = boldfont )
|
||||
|
||||
style['empl_posn'] = Tix.DisplayStyle(Tix.TEXT, padx=8, refwindow=top,
|
||||
fg='#602020', selectforeground = '#602020' )
|
||||
|
||||
# Let configure the appearance of the HList subwidget
|
||||
#
|
||||
hlist.config(separator='.', width=25, drawbranch=0, indent=10)
|
||||
hlist.column_width(0, chars=20)
|
||||
|
||||
# Create the boss
|
||||
#
|
||||
hlist.add ('.', itemtype=Tix.TEXT, text=boss[1],
|
||||
style=style['mgr_name'])
|
||||
hlist.item_create('.', 1, itemtype=Tix.TEXT, text=boss[2],
|
||||
style=style['mgr_posn'])
|
||||
|
||||
# Create the managers
|
||||
#
|
||||
|
||||
for key,name,posn in managers :
|
||||
e= '.'+ key
|
||||
hlist.add(e, itemtype=Tix.TEXT, text=name,
|
||||
style=style['mgr_name'])
|
||||
hlist.item_create(e, 1, itemtype=Tix.TEXT, text=posn,
|
||||
style=style['mgr_posn'])
|
||||
|
||||
|
||||
for key,mgr,name,posn in employees :
|
||||
# "." is the separator character we chose above
|
||||
|
||||
entrypath = '.' + mgr + '.' + key
|
||||
|
||||
# ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^
|
||||
# parent entryPath / child's name
|
||||
|
||||
hlist.add(entrypath, text=name, style=style['empl_name'])
|
||||
hlist.item_create(entrypath, 1, itemtype=Tix.TEXT,
|
||||
text = posn, style = style['empl_posn'] )
|
||||
|
||||
|
||||
# Use a ButtonBox to hold the buttons.
|
||||
#
|
||||
box= Tix.ButtonBox(top, orientation=Tix.HORIZONTAL )
|
||||
box.add( 'ok', text='Ok', underline=0, width=6,
|
||||
command = lambda w=w: w.destroy() )
|
||||
|
||||
box.add( 'cancel', text='Cancel', underline=0, width=6,
|
||||
command = lambda w=w: w.destroy() )
|
||||
|
||||
box.pack( side=Tix.BOTTOM, fill=Tix.X)
|
||||
top.pack( side=Tix.TOP, fill=Tix.BOTH, expand=1 )
|
||||
|
||||
|
||||
# This "if" statement makes it possible to run this script file inside or
|
||||
# outside of the main demo program "widget".
|
||||
#
|
||||
if __name__== '__main__' :
|
||||
root=Tix.Tk()
|
||||
RunSample(root)
|
||||
root.mainloop()
|
||||
@@ -1,80 +0,0 @@
|
||||
#!/usr/local/bin/python
|
||||
#
|
||||
# $Id: Tree.py,v 1.1 2000/11/05 19:59:48 idiscovery Exp $
|
||||
#
|
||||
# Tix Demostration Program
|
||||
#
|
||||
# This sample program is structured in such a way so that it can be
|
||||
# executed from the Tix demo program "tixwidgets": it must have a
|
||||
# procedure called "RunSample". It should also have the "if" statment
|
||||
# at the end of this file so that it can be run as a standalone
|
||||
# program.
|
||||
|
||||
# This file demonstrates how to use the TixTree widget to display
|
||||
# dynamic hierachical data (the files in the Unix file system)
|
||||
#
|
||||
|
||||
import Tix, os
|
||||
|
||||
def RunSample(w):
|
||||
top = Tix.Frame(w, relief=Tix.RAISED, bd=1)
|
||||
tree = Tix.Tree(top, options='separator "/"')
|
||||
tree.pack(expand=1, fill=Tix.BOTH, padx=10, pady=10, side=Tix.LEFT)
|
||||
tree['opencmd'] = lambda dir=None, w=tree: opendir(w, dir)
|
||||
|
||||
# The / directory is added in the "open" mode. The user can open it
|
||||
# and then browse its subdirectories ...
|
||||
adddir(tree, "/")
|
||||
|
||||
box = Tix.ButtonBox(w, orientation=Tix.HORIZONTAL)
|
||||
box.add('ok', text='Ok', underline=0, command=w.destroy, width=6)
|
||||
box.add('cancel', text='Cancel', underline=0, command=w.destroy, width=6)
|
||||
box.pack(side=Tix.BOTTOM, fill=Tix.X)
|
||||
top.pack(side=Tix.TOP, fill=Tix.BOTH, expand=1)
|
||||
|
||||
def adddir(tree, dir):
|
||||
if dir == '/':
|
||||
text = '/'
|
||||
else:
|
||||
text = os.path.basename(dir)
|
||||
tree.hlist.add(dir, itemtype=Tix.IMAGETEXT, text=text,
|
||||
image=tree.tk.call('tix', 'getimage', 'folder'))
|
||||
try:
|
||||
os.listdir(dir)
|
||||
tree.setmode(dir, 'open')
|
||||
except os.error:
|
||||
# No read permission ?
|
||||
pass
|
||||
|
||||
# This function is called whenever the user presses the (+) indicator or
|
||||
# double clicks on a directory whose mode is "open". It loads the files
|
||||
# inside that directory into the Tree widget.
|
||||
#
|
||||
# Note we didn't specify the closecmd option for the Tree widget, so it
|
||||
# performs the default action when the user presses the (-) indicator or
|
||||
# double clicks on a directory whose mode is "close": hide all of its child
|
||||
# entries
|
||||
def opendir(tree, dir):
|
||||
entries = tree.hlist.info_children(dir)
|
||||
if entries:
|
||||
# We have already loaded this directory. Let's just
|
||||
# show all the child entries
|
||||
#
|
||||
# Note: since we load the directory only once, it will not be
|
||||
# refreshed if the you add or remove files from this
|
||||
# directory.
|
||||
#
|
||||
for entry in entries:
|
||||
tree.hlist.show_entry(entry)
|
||||
files = os.listdir(dir)
|
||||
for file in files:
|
||||
if os.path.isdir(dir + '/' + file):
|
||||
adddir(tree, dir + '/' + file)
|
||||
else:
|
||||
tree.hlist.add(dir + '/' + file, itemtype=Tix.IMAGETEXT, text=file,
|
||||
image=tree.tk.call('tix', 'getimage', 'file'))
|
||||
|
||||
if __name__ == '__main__':
|
||||
root = Tix.Tk()
|
||||
RunSample(root)
|
||||
root.mainloop()
|
||||
@@ -1,823 +0,0 @@
|
||||
#! /usr/local/bin/python
|
||||
#
|
||||
# $Id: tixwidgets.py,v 1.2 2000/11/22 08:03:01 idiscovery Exp $
|
||||
#
|
||||
# tixwidgets.py --
|
||||
# This is a demo program of all Tix widgets available from Python. If
|
||||
# you have installed Python & Tix properly, you can execute this as
|
||||
#
|
||||
# % tixwidget.py
|
||||
#
|
||||
|
||||
import os, sys, Tix
|
||||
|
||||
class Demo:
|
||||
pass
|
||||
|
||||
root = Tix.Tk()
|
||||
demo = Demo()
|
||||
demo.dir = None # script directory
|
||||
demo.balloon = None # balloon widget
|
||||
demo.useBalloons = Tix.StringVar()
|
||||
demo.useBalloons.set('0')
|
||||
demo.statusbar = None # status bar widget
|
||||
demo.welmsg = None # Msg widget
|
||||
demo.welfont = '' # font name
|
||||
demo.welsize = '' # font size
|
||||
|
||||
def main():
|
||||
global demo, root
|
||||
|
||||
progname = sys.argv[0]
|
||||
dirname = os.path.dirname(progname)
|
||||
if dirname and dirname != os.curdir:
|
||||
demo.dir = dirname
|
||||
index = -1
|
||||
for i in range(len(sys.path)):
|
||||
p = sys.path[i]
|
||||
if p in ("", os.curdir):
|
||||
index = i
|
||||
if index >= 0:
|
||||
sys.path[index] = dirname
|
||||
else:
|
||||
sys.path.insert(0, dirname)
|
||||
else:
|
||||
demo.dir = os.getcwd()
|
||||
sys.path.insert(0, demo.dir+'/samples')
|
||||
|
||||
root.withdraw()
|
||||
root = Tix.Toplevel()
|
||||
root.title('Tix Widget Demonstration')
|
||||
root.geometry('780x570+50+50')
|
||||
|
||||
demo.balloon = Tix.Balloon(root)
|
||||
frame1 = MkMainMenu(root)
|
||||
frame2 = MkMainNotebook(root)
|
||||
frame3 = MkMainStatus(root)
|
||||
frame1.pack(side=Tix.TOP, fill=Tix.X)
|
||||
frame3.pack(side=Tix.BOTTOM, fill=Tix.X)
|
||||
frame2.pack(side=Tix.TOP, expand=1, fill=Tix.BOTH, padx=4, pady=4)
|
||||
demo.balloon['statusbar'] = demo.statusbar
|
||||
root.mainloop()
|
||||
|
||||
def exit_cmd(event=None):
|
||||
sys.exit()
|
||||
|
||||
def MkMainMenu(top):
|
||||
global demo
|
||||
|
||||
w = Tix.Frame(top, bd=2, relief=Tix.RAISED)
|
||||
file = Tix.Menubutton(w, text='File', underline=0, takefocus=0)
|
||||
help = Tix.Menubutton(w, text='Help', underline=0, takefocus=0)
|
||||
file.pack(side=Tix.LEFT)
|
||||
help.pack(side=Tix.RIGHT)
|
||||
fm = Tix.Menu(file)
|
||||
file['menu'] = fm
|
||||
hm = Tix.Menu(help)
|
||||
help['menu'] = hm
|
||||
|
||||
fm.add_command(label='Exit', underline=1, accelerator='Ctrl+X',
|
||||
command=exit_cmd)
|
||||
hm.add_checkbutton(label='BalloonHelp', underline=0, command=ToggleHelp,
|
||||
variable=demo.useBalloons)
|
||||
# The trace variable option doesn't seem to work, instead I use 'command'
|
||||
#apply(w.tk.call, ('trace', 'variable', demo.useBalloons, 'w',
|
||||
# ToggleHelp))
|
||||
top.bind_all("<Control-x>", exit_cmd)
|
||||
top.bind_all("<Control-X>", exit_cmd)
|
||||
return w
|
||||
|
||||
def MkMainNotebook(top):
|
||||
top.option_add('*TixNoteBook*tagPadX', 6)
|
||||
top.option_add('*TixNoteBook*tagPadY', 4)
|
||||
top.option_add('*TixNoteBook*borderWidth', 2)
|
||||
top.option_add('*TixNoteBook*font',
|
||||
'-*-helvetica-bold-o-normal-*-14-*-*-*-*-*-*-*')
|
||||
w = Tix.NoteBook(top, ipadx=5, ipady=5)
|
||||
w.add('wel', label='Welcome', underline=0,
|
||||
createcmd=lambda w=w, name='wel': MkWelcome(w, name))
|
||||
w.add('cho', label='Choosers', underline=0,
|
||||
createcmd=lambda w=w, name='cho': MkChoosers(w, name))
|
||||
w.add('scr', label='Scrolled Widgets', underline=0,
|
||||
createcmd=lambda w=w, name='scr': MkScroll(w, name))
|
||||
w.add('mgr', label='Manager Widgets', underline=0,
|
||||
createcmd=lambda w=w, name='mgr': MkManager(w, name))
|
||||
w.add('dir', label='Directory List', underline=0,
|
||||
createcmd=lambda w=w, name='dir': MkDirList(w, name))
|
||||
w.add('exp', label='Run Sample Programs', underline=0,
|
||||
createcmd=lambda w=w, name='exp': MkSample(w, name))
|
||||
return w
|
||||
|
||||
def MkMainStatus(top):
|
||||
global demo
|
||||
|
||||
w = Tix.Frame(top, relief=Tix.RAISED, bd=1)
|
||||
demo.statusbar = Tix.Label(w, relief=Tix.SUNKEN, bd=1, font='-*-helvetica-medium-r-normal-*-14-*-*-*-*-*-*-*')
|
||||
demo.statusbar.form(padx=3, pady=3, left=0, right='%70')
|
||||
return w
|
||||
|
||||
def MkWelcome(nb, name):
|
||||
w = nb.page(name)
|
||||
bar = MkWelcomeBar(w)
|
||||
text = MkWelcomeText(w)
|
||||
bar.pack(side=Tix.TOP, fill=Tix.X, padx=2, pady=2)
|
||||
text.pack(side=Tix.TOP, fill=Tix.BOTH, expand=1)
|
||||
|
||||
def MkWelcomeBar(top):
|
||||
global demo
|
||||
|
||||
w = Tix.Frame(top, bd=2, relief=Tix.GROOVE)
|
||||
b1 = Tix.ComboBox(w, command=lambda w=top: MainTextFont(w))
|
||||
b2 = Tix.ComboBox(w, command=lambda w=top: MainTextFont(w))
|
||||
b1.entry['width'] = 15
|
||||
b1.slistbox.listbox['height'] = 3
|
||||
b2.entry['width'] = 4
|
||||
b2.slistbox.listbox['height'] = 3
|
||||
|
||||
demo.welfont = b1
|
||||
demo.welsize = b2
|
||||
|
||||
b1.insert(Tix.END, 'Courier')
|
||||
b1.insert(Tix.END, 'Helvetica')
|
||||
b1.insert(Tix.END, 'Lucida')
|
||||
b1.insert(Tix.END, 'Times Roman')
|
||||
|
||||
b2.insert(Tix.END, '8')
|
||||
b2.insert(Tix.END, '10')
|
||||
b2.insert(Tix.END, '12')
|
||||
b2.insert(Tix.END, '14')
|
||||
b2.insert(Tix.END, '18')
|
||||
|
||||
b1.pick(1)
|
||||
b2.pick(3)
|
||||
|
||||
b1.pack(side=Tix.LEFT, padx=4, pady=4)
|
||||
b2.pack(side=Tix.LEFT, padx=4, pady=4)
|
||||
|
||||
demo.balloon.bind_widget(b1, msg='Choose\na font',
|
||||
statusmsg='Choose a font for this page')
|
||||
demo.balloon.bind_widget(b2, msg='Point size',
|
||||
statusmsg='Choose the font size for this page')
|
||||
return w
|
||||
|
||||
def MkWelcomeText(top):
|
||||
global demo
|
||||
|
||||
w = Tix.ScrolledWindow(top, scrollbar='auto')
|
||||
win = w.window
|
||||
title = Tix.Label(win, font='-*-times-bold-r-normal-*-18-*-*-*-*-*-*-*',
|
||||
bd=0, width=30, anchor=Tix.N, text='Welcome to TIX Version 4.0 from Python Version 1.3')
|
||||
msg = Tix.Message(win, font='-*-helvetica-bold-r-normal-*-14-*-*-*-*-*-*-*',
|
||||
bd=0, width=400, anchor=Tix.N,
|
||||
text='Tix 4.0 is a set of mega-widgets based on TK. This program \
|
||||
demonstrates the widgets in the Tix widget set. You can choose the pages \
|
||||
in this window to look at the corresponding widgets. \n\n\
|
||||
To quit this program, choose the "File | Exit" command.')
|
||||
title.pack(expand=1, fill=Tix.BOTH, padx=10, pady=10)
|
||||
msg.pack(expand=1, fill=Tix.BOTH, padx=10, pady=10)
|
||||
demo.welmsg = msg
|
||||
return w
|
||||
|
||||
def MainTextFont(w):
|
||||
global demo
|
||||
|
||||
if not demo.welmsg:
|
||||
return
|
||||
font = demo.welfont['value']
|
||||
point = demo.welsize['value']
|
||||
if font == 'Times Roman':
|
||||
font = 'times'
|
||||
fontstr = '-*-%s-bold-r-normal-*-%s-*-*-*-*-*-*-*' % (font, point)
|
||||
demo.welmsg['font'] = fontstr
|
||||
|
||||
def ToggleHelp():
|
||||
if demo.useBalloons.get() == '1':
|
||||
demo.balloon['state'] = 'both'
|
||||
else:
|
||||
demo.balloon['state'] = 'none'
|
||||
|
||||
def MkChoosers(nb, name):
|
||||
w = nb.page(name)
|
||||
prefix = Tix.OptionName(w)
|
||||
if not prefix:
|
||||
prefix = ''
|
||||
w.option_add('*' + prefix + '*TixLabelFrame*label.padX', 4)
|
||||
|
||||
til = Tix.LabelFrame(w, label='Chooser Widgets')
|
||||
cbx = Tix.LabelFrame(w, label='tixComboBox')
|
||||
ctl = Tix.LabelFrame(w, label='tixControl')
|
||||
sel = Tix.LabelFrame(w, label='tixSelect')
|
||||
opt = Tix.LabelFrame(w, label='tixOptionMenu')
|
||||
fil = Tix.LabelFrame(w, label='tixFileEntry')
|
||||
fbx = Tix.LabelFrame(w, label='tixFileSelectBox')
|
||||
tbr = Tix.LabelFrame(w, label='Tool Bar')
|
||||
|
||||
MkTitle(til.frame)
|
||||
MkCombo(cbx.frame)
|
||||
MkControl(ctl.frame)
|
||||
MkSelect(sel.frame)
|
||||
MkOptMenu(opt.frame)
|
||||
MkFileEnt(fil.frame)
|
||||
MkFileBox(fbx.frame)
|
||||
MkToolBar(tbr.frame)
|
||||
|
||||
# First column: comBox and selector
|
||||
cbx.form(top=0, left=0, right='%33')
|
||||
sel.form(left=0, right='&'+str(cbx), top=cbx)
|
||||
opt.form(left=0, right='&'+str(cbx), top=sel, bottom=-1)
|
||||
|
||||
# Second column: title .. etc
|
||||
til.form(left=cbx, top=0,right='%66')
|
||||
ctl.form(left=cbx, right='&'+str(til), top=til)
|
||||
fil.form(left=cbx, right='&'+str(til), top=ctl)
|
||||
tbr.form(left=cbx, right='&'+str(til), top=fil, bottom=-1)
|
||||
|
||||
#
|
||||
# Third column: file selection
|
||||
fbx.form(right=-1, top=0, left='%66')
|
||||
|
||||
def MkCombo(w):
|
||||
prefix = Tix.OptionName(w)
|
||||
if not prefix: prefix = ''
|
||||
w.option_add('*' + prefix + '*TixComboBox*label.width', 10)
|
||||
w.option_add('*' + prefix + '*TixComboBox*label.anchor', Tix.E)
|
||||
w.option_add('*' + prefix + '*TixComboBox*entry.width', 14)
|
||||
|
||||
static = Tix.ComboBox(w, label='Static', editable=0)
|
||||
editable = Tix.ComboBox(w, label='Editable', editable=1)
|
||||
history = Tix.ComboBox(w, label='History', editable=1, history=1,
|
||||
anchor=Tix.E)
|
||||
static.insert(Tix.END, 'January')
|
||||
static.insert(Tix.END, 'February')
|
||||
static.insert(Tix.END, 'March')
|
||||
static.insert(Tix.END, 'April')
|
||||
static.insert(Tix.END, 'May')
|
||||
static.insert(Tix.END, 'June')
|
||||
static.insert(Tix.END, 'July')
|
||||
static.insert(Tix.END, 'August')
|
||||
static.insert(Tix.END, 'September')
|
||||
static.insert(Tix.END, 'October')
|
||||
static.insert(Tix.END, 'November')
|
||||
static.insert(Tix.END, 'December')
|
||||
|
||||
editable.insert(Tix.END, 'Angola')
|
||||
editable.insert(Tix.END, 'Bangladesh')
|
||||
editable.insert(Tix.END, 'China')
|
||||
editable.insert(Tix.END, 'Denmark')
|
||||
editable.insert(Tix.END, 'Ecuador')
|
||||
|
||||
history.insert(Tix.END, '/usr/bin/ksh')
|
||||
history.insert(Tix.END, '/usr/local/lib/python')
|
||||
history.insert(Tix.END, '/var/adm')
|
||||
|
||||
static.pack(side=Tix.TOP, padx=5, pady=3)
|
||||
editable.pack(side=Tix.TOP, padx=5, pady=3)
|
||||
history.pack(side=Tix.TOP, padx=5, pady=3)
|
||||
|
||||
states = ['Bengal', 'Delhi', 'Karnataka', 'Tamil Nadu']
|
||||
|
||||
def spin_cmd(w, inc):
|
||||
idx = states.index(demo_spintxt.get()) + inc
|
||||
if idx < 0:
|
||||
idx = len(states) - 1
|
||||
elif idx >= len(states):
|
||||
idx = 0
|
||||
# following doesn't work.
|
||||
# return states[idx]
|
||||
demo_spintxt.set(states[idx]) # this works
|
||||
|
||||
def spin_validate(w):
|
||||
global states, demo_spintxt
|
||||
|
||||
try:
|
||||
i = states.index(demo_spintxt.get())
|
||||
except:
|
||||
return states[0]
|
||||
return states[i]
|
||||
# why this procedure works as opposed to the previous one beats me.
|
||||
|
||||
def MkControl(w):
|
||||
global demo_spintxt
|
||||
|
||||
prefix = Tix.OptionName(w)
|
||||
if not prefix: prefix = ''
|
||||
w.option_add('*' + prefix + '*TixControl*label.width', 10)
|
||||
w.option_add('*' + prefix + '*TixControl*label.anchor', Tix.E)
|
||||
w.option_add('*' + prefix + '*TixControl*entry.width', 13)
|
||||
|
||||
demo_spintxt = Tix.StringVar()
|
||||
demo_spintxt.set(states[0])
|
||||
simple = Tix.Control(w, label='Numbers')
|
||||
spintxt = Tix.Control(w, label='States', variable=demo_spintxt)
|
||||
spintxt['incrcmd'] = lambda w=spintxt: spin_cmd(w, 1)
|
||||
spintxt['decrcmd'] = lambda w=spintxt: spin_cmd(w, -1)
|
||||
spintxt['validatecmd'] = lambda w=spintxt: spin_validate(w)
|
||||
|
||||
simple.pack(side=Tix.TOP, padx=5, pady=3)
|
||||
spintxt.pack(side=Tix.TOP, padx=5, pady=3)
|
||||
|
||||
def MkSelect(w):
|
||||
prefix = Tix.OptionName(w)
|
||||
if not prefix: prefix = ''
|
||||
w.option_add('*' + prefix + '*TixSelect*label.anchor', Tix.CENTER)
|
||||
w.option_add('*' + prefix + '*TixSelect*orientation', Tix.VERTICAL)
|
||||
w.option_add('*' + prefix + '*TixSelect*labelSide', Tix.TOP)
|
||||
|
||||
sel1 = Tix.Select(w, label='Mere Mortals', allowzero=1, radio=1)
|
||||
sel2 = Tix.Select(w, label='Geeks', allowzero=1, radio=0)
|
||||
|
||||
sel1.add('eat', text='Eat')
|
||||
sel1.add('work', text='Work')
|
||||
sel1.add('play', text='Play')
|
||||
sel1.add('party', text='Party')
|
||||
sel1.add('sleep', text='Sleep')
|
||||
|
||||
sel2.add('eat', text='Eat')
|
||||
sel2.add('prog1', text='Program')
|
||||
sel2.add('prog2', text='Program')
|
||||
sel2.add('prog3', text='Program')
|
||||
sel2.add('sleep', text='Sleep')
|
||||
|
||||
sel1.pack(side=Tix.LEFT, padx=5, pady=3, fill=Tix.X)
|
||||
sel2.pack(side=Tix.LEFT, padx=5, pady=3, fill=Tix.X)
|
||||
|
||||
def MkOptMenu(w):
|
||||
prefix = Tix.OptionName(w)
|
||||
if not prefix: prefix = ''
|
||||
w.option_add('*' + prefix + '*TixOptionMenu*label.anchor', Tix.E)
|
||||
m = Tix.OptionMenu(w, label='File Format : ', options='menubutton.width 15')
|
||||
m.add_command('text', label='Plain Text')
|
||||
m.add_command('post', label='PostScript')
|
||||
m.add_command('format', label='Formatted Text')
|
||||
m.add_command('html', label='HTML')
|
||||
m.add_command('sep')
|
||||
m.add_command('tex', label='LaTeX')
|
||||
m.add_command('rtf', label='Rich Text Format')
|
||||
|
||||
m.pack(fill=Tix.X, padx=5, pady=3)
|
||||
|
||||
def MkFileEnt(w):
|
||||
msg = Tix.Message(w, font='-*-helvetica-bold-r-normal-*-14-*-*-*-*-*-*-*',
|
||||
relief=Tix.FLAT, width=240, anchor=Tix.N,
|
||||
text='Press the "open file" icon button and a TixFileSelectDialog will popup.')
|
||||
ent = Tix.FileEntry(w, label='Select a file : ')
|
||||
msg.pack(side=Tix.TOP, expand=1, fill=Tix.BOTH, padx=3, pady=3)
|
||||
ent.pack(side=Tix.TOP, fill=Tix.X, padx=3, pady=3)
|
||||
|
||||
def MkFileBox(w):
|
||||
msg = Tix.Message(w, font='-*-helvetica-bold-r-normal-*-14-*-*-*-*-*-*-*',
|
||||
relief=Tix.FLAT, width=240, anchor=Tix.N,
|
||||
text='The TixFileSelectBox is a Motif-style box with various enhancements. For example, you can adjust the size of the two listboxes and your past selections are recorded.')
|
||||
box = Tix.FileSelectBox(w)
|
||||
msg.pack(side=Tix.TOP, expand=1, fill=Tix.BOTH, padx=3, pady=3)
|
||||
box.pack(side=Tix.TOP, fill=Tix.X, padx=3, pady=3)
|
||||
|
||||
def MkToolBar(w):
|
||||
global demo
|
||||
|
||||
prefix = Tix.OptionName(w)
|
||||
if not prefix: prefix = ''
|
||||
w.option_add('*' + prefix + '*TixSelect*frame.borderWidth', 1)
|
||||
msg = Tix.Message(w, font='-*-helvetica-bold-r-normal-*-14-*-*-*-*-*-*-*',
|
||||
relief=Tix.FLAT, width=240, anchor=Tix.N,
|
||||
text='The Select widget is also good for arranging buttons in a tool bar.')
|
||||
bar = Tix.Frame(w, bd=2, relief=Tix.RAISED)
|
||||
font = Tix.Select(w, allowzero=1, radio=0, label='')
|
||||
para = Tix.Select(w, allowzero=0, radio=1, label='')
|
||||
|
||||
font.add('bold', bitmap='@' + demo.dir + '/bitmaps/bold.xbm')
|
||||
font.add('italic', bitmap='@' + demo.dir + '/bitmaps/italic.xbm')
|
||||
font.add('underline', bitmap='@' + demo.dir + '/bitmaps/underline.xbm')
|
||||
font.add('capital', bitmap='@' + demo.dir + '/bitmaps/capital.xbm')
|
||||
|
||||
para.add('left', bitmap='@' + demo.dir + '/bitmaps/leftj.xbm')
|
||||
para.add('right', bitmap='@' + demo.dir + '/bitmaps/rightj.xbm')
|
||||
para.add('center', bitmap='@' + demo.dir + '/bitmaps/centerj.xbm')
|
||||
para.add('justify', bitmap='@' + demo.dir + '/bitmaps/justify.xbm')
|
||||
|
||||
msg.pack(side=Tix.TOP, expand=1, fill=Tix.BOTH, padx=3, pady=3)
|
||||
bar.pack(side=Tix.TOP, fill=Tix.X, padx=3, pady=3)
|
||||
font.pack({'in':bar}, side=Tix.LEFT, padx=3, pady=3)
|
||||
para.pack({'in':bar}, side=Tix.LEFT, padx=3, pady=3)
|
||||
|
||||
def MkTitle(w):
|
||||
prefix = Tix.OptionName(w)
|
||||
if not prefix: prefix = ''
|
||||
w.option_add('*' + prefix + '*TixSelect*frame.borderWidth', 1)
|
||||
msg = Tix.Message(w, font='-*-helvetica-bold-r-normal-*-14-*-*-*-*-*-*-*',
|
||||
relief=Tix.FLAT, width=240, anchor=Tix.N,
|
||||
text='There are many types of "chooser" widgets that allow the user to input different types of information')
|
||||
msg.pack(side=Tix.TOP, expand=1, fill=Tix.BOTH, padx=3, pady=3)
|
||||
|
||||
def MkScroll(nb, name):
|
||||
w = nb.page(name)
|
||||
prefix = Tix.OptionName(w)
|
||||
if not prefix:
|
||||
prefix = ''
|
||||
w.option_add('*' + prefix + '*TixLabelFrame*label.padX', 4)
|
||||
|
||||
sls = Tix.LabelFrame(w, label='tixScrolledListBox')
|
||||
swn = Tix.LabelFrame(w, label='tixScrolledWindow')
|
||||
stx = Tix.LabelFrame(w, label='tixScrolledText')
|
||||
|
||||
MkSList(sls.frame)
|
||||
MkSWindow(swn.frame)
|
||||
MkSText(stx.frame)
|
||||
|
||||
sls.form(top=0, left=0, right='%33', bottom=-1)
|
||||
swn.form(top=0, left=sls, right='%66', bottom=-1)
|
||||
stx.form(top=0, left=swn, right=-1, bottom=-1)
|
||||
|
||||
def MkSList(w):
|
||||
top = Tix.Frame(w, width=300, height=330)
|
||||
bot = Tix.Frame(w)
|
||||
msg = Tix.Message(top, font='-*-helvetica-bold-r-normal-*-14-*-*-*-*-*-*-*',
|
||||
relief=Tix.FLAT, width=200, anchor=Tix.N,
|
||||
text='This TixScrolledListBox is configured so that it uses scrollbars only when it is necessary. Use the handles to resize the listbox and watch the scrollbars automatically appear and disappear.')
|
||||
|
||||
list = Tix.ScrolledListBox(top, scrollbar='auto')
|
||||
list.place(x=50, y=150, width=120, height=80)
|
||||
list.listbox.insert(Tix.END, 'Alabama')
|
||||
list.listbox.insert(Tix.END, 'California')
|
||||
list.listbox.insert(Tix.END, 'Montana')
|
||||
list.listbox.insert(Tix.END, 'New Jersey')
|
||||
list.listbox.insert(Tix.END, 'New York')
|
||||
list.listbox.insert(Tix.END, 'Pennsylvania')
|
||||
list.listbox.insert(Tix.END, 'Washington')
|
||||
|
||||
rh = Tix.ResizeHandle(top, bg='black',
|
||||
relief=Tix.RAISED,
|
||||
handlesize=8, gridded=1, minwidth=50, minheight=30)
|
||||
btn = Tix.Button(bot, text='Reset', command=lambda w=rh, x=list: SList_reset(w,x))
|
||||
top.propagate(0)
|
||||
msg.pack(fill=Tix.X)
|
||||
btn.pack(anchor=Tix.CENTER)
|
||||
top.pack(expand=1, fill=Tix.BOTH)
|
||||
bot.pack(fill=Tix.BOTH)
|
||||
list.bind('<Map>', func=lambda arg=0, rh=rh, list=list:
|
||||
list.tk.call('tixDoWhenIdle', str(rh), 'attachwidget', str(list)))
|
||||
|
||||
def SList_reset(rh, list):
|
||||
list.place(x=50, y=150, width=120, height=80)
|
||||
list.update()
|
||||
rh.attach_widget(list)
|
||||
|
||||
def MkSWindow(w):
|
||||
global demo
|
||||
|
||||
top = Tix.Frame(w, width=330, height=330)
|
||||
bot = Tix.Frame(w)
|
||||
msg = Tix.Message(top, font='-*-helvetica-bold-r-normal-*-14-*-*-*-*-*-*-*',
|
||||
relief=Tix.FLAT, width=200, anchor=Tix.N,
|
||||
text='The TixScrolledWindow widget allows you to scroll any kind of Tk widget. It is more versatile than a scrolled canvas widget.')
|
||||
win = Tix.ScrolledWindow(top, scrollbar='auto')
|
||||
image = Tix.Image('photo', file=demo.dir + "/bitmaps/tix.gif")
|
||||
lbl = Tix.Label(win.window, image=image)
|
||||
lbl.pack(expand=1, fill=Tix.BOTH)
|
||||
|
||||
win.place(x=30, y=150, width=190, height=120)
|
||||
|
||||
rh = Tix.ResizeHandle(top, bg='black',
|
||||
relief=Tix.RAISED,
|
||||
handlesize=8, gridded=1, minwidth=50, minheight=30)
|
||||
btn = Tix.Button(bot, text='Reset', command=lambda w=rh, x=win: SWindow_reset(w,x))
|
||||
top.propagate(0)
|
||||
msg.pack(fill=Tix.X)
|
||||
btn.pack(anchor=Tix.CENTER)
|
||||
top.pack(expand=1, fill=Tix.BOTH)
|
||||
bot.pack(fill=Tix.BOTH)
|
||||
win.bind('<Map>', func=lambda arg=0, rh=rh, win=win:
|
||||
win.tk.call('tixDoWhenIdle', str(rh), 'attachwidget', str(win)))
|
||||
|
||||
def SWindow_reset(rh, win):
|
||||
win.place(x=30, y=150, width=190, height=120)
|
||||
win.update()
|
||||
rh.attach_widget(win)
|
||||
|
||||
def MkSText(w):
|
||||
top = Tix.Frame(w, width=330, height=330)
|
||||
bot = Tix.Frame(w)
|
||||
msg = Tix.Message(top, font='-*-helvetica-bold-r-normal-*-14-*-*-*-*-*-*-*',
|
||||
relief=Tix.FLAT, width=200, anchor=Tix.N,
|
||||
text='The TixScrolledWindow widget allows you to scroll any kind of Tk widget. It is more versatile than a scrolled canvas widget.')
|
||||
|
||||
win = Tix.ScrolledText(top, scrollbar='auto')
|
||||
# win.text['wrap'] = 'none'
|
||||
win.text.insert(Tix.END, 'This is a text widget embedded in a scrolled window. Although the original Tix demo does not have any text here, I decided to put in some so that you can see the effect of scrollbars etc.')
|
||||
win.place(x=30, y=150, width=190, height=100)
|
||||
|
||||
rh = Tix.ResizeHandle(top, bg='black',
|
||||
relief=Tix.RAISED,
|
||||
handlesize=8, gridded=1, minwidth=50, minheight=30)
|
||||
btn = Tix.Button(bot, text='Reset', command=lambda w=rh, x=win: SText_reset(w,x))
|
||||
top.propagate(0)
|
||||
msg.pack(fill=Tix.X)
|
||||
btn.pack(anchor=Tix.CENTER)
|
||||
top.pack(expand=1, fill=Tix.BOTH)
|
||||
bot.pack(fill=Tix.BOTH)
|
||||
win.bind('<Map>', func=lambda arg=0, rh=rh, win=win:
|
||||
win.tk.call('tixDoWhenIdle', str(rh), 'attachwidget', str(win)))
|
||||
|
||||
def SText_reset(rh, win):
|
||||
win.place(x=30, y=150, width=190, height=120)
|
||||
win.update()
|
||||
rh.attach_widget(win)
|
||||
|
||||
def MkManager(nb, name):
|
||||
w = nb.page(name)
|
||||
prefix = Tix.OptionName(w)
|
||||
if not prefix:
|
||||
prefix = ''
|
||||
w.option_add('*' + prefix + '*TixLabelFrame*label.padX', 4)
|
||||
|
||||
pane = Tix.LabelFrame(w, label='tixPanedWindow')
|
||||
note = Tix.LabelFrame(w, label='tixNoteBook')
|
||||
|
||||
MkPanedWindow(pane.frame)
|
||||
MkNoteBook(note.frame)
|
||||
|
||||
pane.form(top=0, left=0, right=note, bottom=-1)
|
||||
note.form(top=0, right=-1, bottom=-1)
|
||||
|
||||
def MkPanedWindow(w):
|
||||
msg = Tix.Message(w, font='-*-helvetica-bold-r-normal-*-14-*-*-*-*-*-*-*',
|
||||
relief=Tix.FLAT, width=240, anchor=Tix.N,
|
||||
text='The PanedWindow widget allows the user to interactively manipulate the sizes of several panes. The panes can be arranged either vertically or horizontally.')
|
||||
group = Tix.Label(w, text='Newsgroup: comp.lang.python')
|
||||
pane = Tix.PanedWindow(w, orientation='vertical')
|
||||
|
||||
p1 = pane.add('list', min=70, size=100)
|
||||
p2 = pane.add('text', min=70)
|
||||
list = Tix.ScrolledListBox(p1)
|
||||
text = Tix.ScrolledText(p2)
|
||||
|
||||
list.listbox.insert(Tix.END, " 12324 Re: TK is good for your health")
|
||||
list.listbox.insert(Tix.END, "+ 12325 Re: TK is good for your health")
|
||||
list.listbox.insert(Tix.END, "+ 12326 Re: Tix is even better for your health (Was: TK is good...)")
|
||||
list.listbox.insert(Tix.END, " 12327 Re: Tix is even better for your health (Was: TK is good...)")
|
||||
list.listbox.insert(Tix.END, "+ 12328 Re: Tix is even better for your health (Was: TK is good...)")
|
||||
list.listbox.insert(Tix.END, " 12329 Re: Tix is even better for your health (Was: TK is good...)")
|
||||
list.listbox.insert(Tix.END, "+ 12330 Re: Tix is even better for your health (Was: TK is good...)")
|
||||
|
||||
text.text['bg'] = list.listbox['bg']
|
||||
text.text['wrap'] = 'none'
|
||||
text.text.insert(Tix.END, """
|
||||
Mon, 19 Jun 1995 11:39:52 comp.lang.tcl Thread 34 of 220
|
||||
Lines 353 A new way to put text and bitmaps together iNo responses
|
||||
ioi@blue.seas.upenn.edu Ioi K. Lam at University of Pennsylvania
|
||||
|
||||
Hi,
|
||||
|
||||
I have implemented a new image type called "compound". It allows you
|
||||
to glue together a bunch of bitmaps, images and text strings together
|
||||
to form a bigger image. Then you can use this image with widgets that
|
||||
support the -image option. This way you can display very fancy stuffs
|
||||
in your GUI. For example, you can display a text string string
|
||||
together with a bitmap, at the same time, inside a TK button widget. A
|
||||
screenshot of compound images can be found at the bottom of this page:
|
||||
|
||||
http://www.cis.upenn.edu/~ioi/tix/screenshot.html
|
||||
|
||||
You can also you is in other places such as putting fancy bitmap+text
|
||||
in menus, tabs of tixNoteBook widgets, etc. This feature will be
|
||||
included in the next release of Tix (4.0b1). Count on it to make jazzy
|
||||
interfaces!""")
|
||||
list.pack(expand=1, fill=Tix.BOTH, padx=4, pady=6)
|
||||
text.pack(expand=1, fill=Tix.BOTH, padx=4, pady=6)
|
||||
|
||||
msg.pack(side=Tix.TOP, padx=3, pady=3, fill=Tix.BOTH)
|
||||
group.pack(side=Tix.TOP, padx=3, pady=3, fill=Tix.BOTH)
|
||||
pane.pack(side=Tix.TOP, padx=3, pady=3, fill=Tix.BOTH, expand=1)
|
||||
|
||||
def MkNoteBook(w):
|
||||
msg = Tix.Message(w, font='-*-helvetica-bold-r-normal-*-14-*-*-*-*-*-*-*',
|
||||
relief=Tix.FLAT, width=240, anchor=Tix.N,
|
||||
text='The NoteBook widget allows you to layout a complex interface into individual pages.')
|
||||
prefix = Tix.OptionName(w)
|
||||
if not prefix:
|
||||
prefix = ''
|
||||
w.option_add('*' + prefix + '*TixControl*entry.width', 10)
|
||||
w.option_add('*' + prefix + '*TixControl*label.width', 18)
|
||||
w.option_add('*' + prefix + '*TixControl*label.anchor', Tix.E)
|
||||
w.option_add('*' + prefix + '*TixNoteBook*tagPadX', 8)
|
||||
|
||||
nb = Tix.NoteBook(w, ipadx=6, ipady=6)
|
||||
nb.add('hard_disk', label="Hard Disk", underline=0)
|
||||
nb.add('network', label="Network", underline=0)
|
||||
|
||||
# Frame for the buttons that are present on all pages
|
||||
common = Tix.Frame(nb.hard_disk)
|
||||
common.pack(side=Tix.RIGHT, padx=2, pady=2, fill=Tix.Y)
|
||||
CreateCommonButtons(common)
|
||||
|
||||
# Widgets belonging only to this page
|
||||
a = Tix.Control(nb.hard_disk, value=12, label='Access Time: ')
|
||||
w = Tix.Control(nb.hard_disk, value=400, label='Write Throughput: ')
|
||||
r = Tix.Control(nb.hard_disk, value=400, label='Read Throughput: ')
|
||||
c = Tix.Control(nb.hard_disk, value=1021, label='Capacity: ')
|
||||
a.pack(side=Tix.TOP, padx=20, pady=2)
|
||||
w.pack(side=Tix.TOP, padx=20, pady=2)
|
||||
r.pack(side=Tix.TOP, padx=20, pady=2)
|
||||
c.pack(side=Tix.TOP, padx=20, pady=2)
|
||||
|
||||
common = Tix.Frame(nb.network)
|
||||
common.pack(side=Tix.RIGHT, padx=2, pady=2, fill=Tix.Y)
|
||||
CreateCommonButtons(common)
|
||||
|
||||
a = Tix.Control(nb.network, value=12, label='Access Time: ')
|
||||
w = Tix.Control(nb.network, value=400, label='Write Throughput: ')
|
||||
r = Tix.Control(nb.network, value=400, label='Read Throughput: ')
|
||||
c = Tix.Control(nb.network, value=1021, label='Capacity: ')
|
||||
u = Tix.Control(nb.network, value=10, label='Users: ')
|
||||
a.pack(side=Tix.TOP, padx=20, pady=2)
|
||||
w.pack(side=Tix.TOP, padx=20, pady=2)
|
||||
r.pack(side=Tix.TOP, padx=20, pady=2)
|
||||
c.pack(side=Tix.TOP, padx=20, pady=2)
|
||||
u.pack(side=Tix.TOP, padx=20, pady=2)
|
||||
|
||||
msg.pack(side=Tix.TOP, padx=3, pady=3, fill=Tix.BOTH)
|
||||
nb.pack(side=Tix.TOP, padx=5, pady=5, fill=Tix.BOTH, expand=1)
|
||||
|
||||
def CreateCommonButtons(f):
|
||||
ok = Tix.Button(f, text='OK', width = 6)
|
||||
cancel = Tix.Button(f, text='Cancel', width = 6)
|
||||
ok.pack(side=Tix.TOP, padx=2, pady=2)
|
||||
cancel.pack(side=Tix.TOP, padx=2, pady=2)
|
||||
|
||||
def MkDirList(nb, name):
|
||||
w = nb.page(name)
|
||||
prefix = Tix.OptionName(w)
|
||||
if not prefix:
|
||||
prefix = ''
|
||||
w.option_add('*' + prefix + '*TixLabelFrame*label.padX', 4)
|
||||
|
||||
dir = Tix.LabelFrame(w, label='tixDirList')
|
||||
fsbox = Tix.LabelFrame(w, label='tixExFileSelectBox')
|
||||
MkDirListWidget(dir.frame)
|
||||
MkExFileWidget(fsbox.frame)
|
||||
dir.form(top=0, left=0, right='%40', bottom=-1)
|
||||
fsbox.form(top=0, left='%40', right=-1, bottom=-1)
|
||||
|
||||
def MkDirListWidget(w):
|
||||
msg = Tix.Message(w, font='-*-helvetica-bold-r-normal-*-14-*-*-*-*-*-*-*',
|
||||
relief=Tix.FLAT, width=240, anchor=Tix.N,
|
||||
text='The TixDirList widget gives a graphical representation of the file system directory and makes it easy for the user to choose and access directories.')
|
||||
dirlist = Tix.DirList(w, options='hlist.padY 1 hlist.width 25 hlist.height 16')
|
||||
msg.pack(side=Tix.TOP, expand=1, fill=Tix.BOTH, padx=3, pady=3)
|
||||
dirlist.pack(side=Tix.TOP, padx=3, pady=3)
|
||||
|
||||
def MkExFileWidget(w):
|
||||
msg = Tix.Message(w, font='-*-helvetica-bold-r-normal-*-14-*-*-*-*-*-*-*',
|
||||
relief=Tix.FLAT, width=240, anchor=Tix.N,
|
||||
text='The TixExFileSelectBox widget is more user friendly than the Motif style FileSelectBox.')
|
||||
# There's a bug in the ComboBoxes - the scrolledlistbox is destroyed
|
||||
box = Tix.ExFileSelectBox(w, bd=2, relief=Tix.RAISED)
|
||||
msg.pack(side=Tix.TOP, expand=1, fill=Tix.BOTH, padx=3, pady=3)
|
||||
box.pack(side=Tix.TOP, padx=3, pady=3)
|
||||
|
||||
###
|
||||
### List of all the demos we want to show off
|
||||
comments = {'widget' : 'Widget Demos', 'image' : 'Image Demos'}
|
||||
samples = {'Balloon' : 'Balloon',
|
||||
'Button Box' : 'BtnBox',
|
||||
'Combo Box' : 'ComboBox',
|
||||
'Compound Image' : 'CmpImg',
|
||||
'Control' : 'Control',
|
||||
'Notebook' : 'NoteBook',
|
||||
'Option Menu' : 'OptMenu',
|
||||
'Popup Menu' : 'PopMenu',
|
||||
'ScrolledHList (1)' : 'SHList1',
|
||||
'ScrolledHList (2)' : 'SHList2',
|
||||
'Tree (dynamic)' : 'Tree'
|
||||
}
|
||||
|
||||
stypes = {}
|
||||
stypes['widget'] = ['Balloon', 'Button Box', 'Combo Box', 'Control',
|
||||
'Notebook', 'Option Menu', 'Popup Menu',
|
||||
'ScrolledHList (1)', 'ScrolledHList (2)', 'Tree (dynamic)']
|
||||
stypes['image'] = ['Compound Image']
|
||||
|
||||
def MkSample(nb, name):
|
||||
w = nb.page(name)
|
||||
prefix = Tix.OptionName(w)
|
||||
if not prefix:
|
||||
prefix = ''
|
||||
w.option_add('*' + prefix + '*TixLabelFrame*label.padX', 4)
|
||||
|
||||
lab = Tix.Label(w, text='Select a sample program:', anchor=Tix.W)
|
||||
lab1 = Tix.Label(w, text='Source:', anchor=Tix.W)
|
||||
|
||||
slb = Tix.ScrolledHList(w, options='listbox.exportSelection 0')
|
||||
slb.hlist['command'] = lambda args=0, w=w,slb=slb: Sample_Action(w, slb, 'run')
|
||||
slb.hlist['browsecmd'] = lambda args=0, w=w,slb=slb: Sample_Action(w, slb, 'browse')
|
||||
|
||||
stext = Tix.ScrolledText(w, name='stext')
|
||||
stext.text.bind('<1>', stext.text.focus())
|
||||
stext.text.bind('<Up>', lambda w=stext.text: w.yview(scroll='-1 unit'))
|
||||
stext.text.bind('<Down>', lambda w=stext.text: w.yview(scroll='1 unit'))
|
||||
stext.text.bind('<Left>', lambda w=stext.text: w.xview(scroll='-1 unit'))
|
||||
stext.text.bind('<Right>', lambda w=stext.text: w.xview(scroll='1 unit'))
|
||||
|
||||
run = Tix.Button(w, text='Run ...', name='run', command=lambda args=0, w=w,slb=slb: Sample_Action(w, slb, 'run'))
|
||||
view = Tix.Button(w, text='View Source ...', name='view', command=lambda args=0,w=w,slb=slb: Sample_Action(w, slb, 'view'))
|
||||
|
||||
lab.form(top=0, left=0, right='&'+str(slb))
|
||||
slb.form(left=0, top=lab, bottom=-4)
|
||||
lab1.form(left='&'+str(stext), top=0, right='&'+str(stext), bottom=stext)
|
||||
run.form(left=str(slb)+' 30', bottom=-4)
|
||||
view.form(left=run, bottom=-4)
|
||||
stext.form(bottom=str(run)+' -5', left='&'+str(run), right='-0', top='&'+str(slb))
|
||||
|
||||
stext.text['bg'] = slb.hlist['bg']
|
||||
stext.text['state'] = 'disabled'
|
||||
stext.text['wrap'] = 'none'
|
||||
#XXX stext.text['font'] = fixed_font
|
||||
|
||||
slb.hlist['separator'] = '.'
|
||||
slb.hlist['width'] = 25
|
||||
slb.hlist['drawbranch'] = 0
|
||||
slb.hlist['indent'] = 10
|
||||
slb.hlist['wideselect'] = 1
|
||||
|
||||
for type in ['widget', 'image']:
|
||||
if type != 'widget':
|
||||
x = Tix.Frame(slb.hlist, bd=2, height=2, width=150,
|
||||
relief=Tix.SUNKEN, bg=slb.hlist['bg'])
|
||||
slb.hlist.add_child(itemtype=Tix.WINDOW, window=x, state='disabled')
|
||||
x = slb.hlist.add_child(itemtype=Tix.TEXT, state='disabled',
|
||||
text=comments[type])
|
||||
for key in stypes[type]:
|
||||
slb.hlist.add_child(x, itemtype=Tix.TEXT, data=key,
|
||||
text=key)
|
||||
slb.hlist.selection_clear()
|
||||
|
||||
run['state'] = 'disabled'
|
||||
view['state'] = 'disabled'
|
||||
|
||||
def Sample_Action(w, slb, action):
|
||||
global demo
|
||||
|
||||
run = w._nametowidget(str(w) + '.run')
|
||||
view = w._nametowidget(str(w) + '.view')
|
||||
stext = w._nametowidget(str(w) + '.stext')
|
||||
|
||||
hlist = slb.hlist
|
||||
anchor = hlist.info_anchor()
|
||||
if not anchor:
|
||||
run['state'] = 'disabled'
|
||||
view['state'] = 'disabled'
|
||||
elif not hlist.info_parent(anchor):
|
||||
# a comment
|
||||
return
|
||||
|
||||
run['state'] = 'normal'
|
||||
view['state'] = 'normal'
|
||||
key = hlist.info_data(anchor)
|
||||
title = key
|
||||
prog = samples[key]
|
||||
|
||||
if action == 'run':
|
||||
exec('import ' + prog)
|
||||
w = Tix.Toplevel()
|
||||
w.title(title)
|
||||
rtn = eval(prog + '.RunSample')
|
||||
rtn(w)
|
||||
elif action == 'view':
|
||||
w = Tix.Toplevel()
|
||||
w.title('Source view: ' + title)
|
||||
LoadFile(w, demo.dir + '/samples/' + prog + '.py')
|
||||
elif action == 'browse':
|
||||
ReadFile(stext.text, demo.dir + '/samples/' + prog + '.py')
|
||||
|
||||
def LoadFile(w, fname):
|
||||
b = Tix.Button(w, text='Close', command=w.destroy)
|
||||
t = Tix.ScrolledText(w)
|
||||
# b.form(left=0, bottom=0, padx=4, pady=4)
|
||||
# t.form(left=0, bottom=b, right='-0', top=0)
|
||||
t.pack()
|
||||
b.pack()
|
||||
|
||||
t.text['highlightcolor'] = t['bg']
|
||||
t.text['bd'] = 2
|
||||
t.text['bg'] = t['bg']
|
||||
t.text['wrap'] = 'none'
|
||||
|
||||
ReadFile(t.text, fname)
|
||||
|
||||
def ReadFile(w, fname):
|
||||
old_state = w['state']
|
||||
w['state'] = 'normal'
|
||||
w.delete('0.0', Tix.END)
|
||||
|
||||
try:
|
||||
f = open(fname)
|
||||
lines = f.readlines()
|
||||
for s in lines:
|
||||
w.insert(Tix.END, s)
|
||||
f.close()
|
||||
finally:
|
||||
# w.see('1.0')
|
||||
w['state'] = old_state
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
@@ -1,9 +0,0 @@
|
||||
# -*-mode: python; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
|
||||
#
|
||||
# $Id: BUGS-2.1.txt,v 1.2 2001/12/09 05:01:28 idiscovery Exp $
|
||||
#
|
||||
|
||||
1) There seems to be a problem with ComboBox that shows up
|
||||
in the ExFileSelectBox demo. The popdown scrolled list widget
|
||||
is being created, then destroyed. This does not happen in Tcl Tix.
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
$Id: BUGS.txt,v 1.1 2001/12/09 23:29:43 idiscovery Exp $
|
||||
|
||||
1) There seems to be a problem with ComboBox that shows up
|
||||
in the ExFileSelectBox demo. The popdown scrolled list widget
|
||||
is being created, then destroyed. This does not happen in Tcl Tix.
|
||||
This is probably a sympton in Tix from _tkinter; if you find the cause
|
||||
of this, please post a patch on http://tix.sourceforge.net.
|
||||
|
||||
@@ -1,89 +0,0 @@
|
||||
$Id: INSTALL.txt,v 1.1 2001/12/09 23:29:43 idiscovery Exp $
|
||||
|
||||
Installing Tix.py
|
||||
----------------
|
||||
|
||||
0) To use Tix.py, you need Tcl/Tk (V8.3.3), Tix (V8.1.1) and Python (V2.1.1).
|
||||
Tix.py has been written and tested on a Intel Pentium running RH Linux 5.2
|
||||
and Mandrake Linux 7.0 and Windows with the above mentioned packages.
|
||||
|
||||
Older versions, e.g. Tix 4.1 and Tk 8.0, might also work.
|
||||
|
||||
There is nothing OS-specific in Tix.py itself so it should work on
|
||||
any machine with Tix and Python installed. You can get Tcl and Tk
|
||||
from http://dev.scriptics.com and Tix from http://tix.sourceforge.net.
|
||||
|
||||
1) Build and install Tcl/Tk 8.3. Build and install Tix 8.1.
|
||||
Ensure that Tix is properly installed by running tixwish and executing
|
||||
the demo programs. Under Unix, use the --enable-shared configure option
|
||||
for all three. We recommend tcl8.3.3 for this release of Tix.py.
|
||||
|
||||
2a) If you have a distribution like ActiveState with a tcl subdirectory
|
||||
of $PYTHONHOME, which contains the directories tcl8.3 and tk8.3,
|
||||
make a directory tix8.1 as well. Recursively copy the files from
|
||||
<tix>/library to $PYTHONHOME/lib/tix8.1, and copy the dynamic library
|
||||
(tix8183.dll or libtix8.1.8.3.so) to the same place as the tcl dynamic
|
||||
libraries ($PYTHONHOME/Dlls or lib/python-2.1/lib-dynload). In this
|
||||
case you are all installed, and you can skip to the end.
|
||||
|
||||
2b) Modify Modules/Setup.dist and setup.py to change the version of the
|
||||
tix library from tix4.1.8.0 to tix8.1.8.3
|
||||
These modified files can be used for Tkinter with or without Tix.
|
||||
|
||||
3) The default is to build dynamically, and use the Tcl 'package require'.
|
||||
To build statically, modify the Modules/Setup file to link in the Tix
|
||||
library according to the comments in the file. On Linux this looks like:
|
||||
|
||||
# *** Always uncomment this (leave the leading underscore in!):
|
||||
_tkinter _tkinter.c tkappinit.c -DWITH_APPINIT \
|
||||
# *** Uncomment and edit to reflect where your Tcl/Tk libraries are:
|
||||
-L/usr/local/lib \
|
||||
# *** Uncomment and edit to reflect where your Tcl/Tk headers are:
|
||||
-I/usr/local/include \
|
||||
# *** Uncomment and edit to reflect where your X11 header files are:
|
||||
-I/usr/X11R6/include \
|
||||
# *** Or uncomment this for Solaris:
|
||||
# -I/usr/openwin/include \
|
||||
# *** Uncomment and edit for BLT extension only:
|
||||
# -DWITH_BLT -I/usr/local/blt/blt8.0-unoff/include -lBLT8.0 \
|
||||
# *** Uncomment and edit for PIL (TkImaging) extension only:
|
||||
# (See http://www.pythonware.com/products/pil/ for more info)
|
||||
# -DWITH_PIL -I../Extensions/Imaging/libImaging tkImaging.c \
|
||||
# *** Uncomment and edit for TOGL extension only:
|
||||
# -DWITH_TOGL togl.c \
|
||||
# *** Uncomment and edit for Tix extension only:
|
||||
-DWITH_TIX -ltix8.1.8.3 \
|
||||
# *** Uncomment and edit to reflect your Tcl/Tk versions:
|
||||
-ltk8.3 -ltcl8.3 \
|
||||
# *** Uncomment and edit to reflect where your X11 libraries are:
|
||||
-L/usr/X11R6/lib \
|
||||
# *** Or uncomment this for Solaris:
|
||||
# -L/usr/openwin/lib \
|
||||
# *** Uncomment these for TOGL extension only:
|
||||
# -lGL -lGLU -lXext -lXmu \
|
||||
# *** Uncomment for AIX:
|
||||
# -lld \
|
||||
# *** Always uncomment this; X11 libraries to link with:
|
||||
-lX11
|
||||
|
||||
4) Rebuild Python and reinstall.
|
||||
|
||||
You should now have a working Tix implementation in Python. To see if all
|
||||
is as it should be, run the 'tixwidgets.py' script in the Demo/tix directory.
|
||||
Under X windows, do
|
||||
/usr/local/bin/python Demo/tix/tixwidgets.py
|
||||
|
||||
If this does not work, you may need to tell python where to find
|
||||
the Tcl, Tk and Tix library files. This is done by setting the
|
||||
TCL_LIBRARY, TK_LIBRARY and TIX_LIBRARY environment variables. Try this:
|
||||
|
||||
env TCL_LIBRARY=/usr/local/lib/tcl8.3 \
|
||||
TK_LIBRARY=/usr/local/lib/tk8.3 \
|
||||
TIX_LIBRARY=/usr/local/lib/tix8.1 \
|
||||
/usr/local/bin/python Demo/tix/tixwidgets.py
|
||||
|
||||
|
||||
If you find any bugs or have suggestions for improvement, please report them
|
||||
via http://tix.sourceforge.net
|
||||
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
About Tix.py
|
||||
-----------
|
||||
|
||||
Tix.py is based on an idea of Jean-Marc Lugrin (lugrin@ms.com) who wrote
|
||||
pytix (another Python-Tix marriage). Tix widgets are an attractive and
|
||||
useful extension to Tk. See http://tix.sourceforge.net
|
||||
for more details about Tix and how to get it.
|
||||
|
||||
Features:
|
||||
1) It is almost complete.
|
||||
2) Tix widgets are represented by classes in Python. Sub-widgets
|
||||
are members of the mega-widget class. For example, if a
|
||||
particular TixWidget (e.g. ScrolledText) has an embedded widget
|
||||
(Text in this case), it is possible to call the methods of the
|
||||
child directly.
|
||||
3) The members of the class are created automatically. In the case
|
||||
of widgets like ButtonBox, the members are added dynamically.
|
||||
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
/* XPM */
|
||||
static char * about_xpm[] = {
|
||||
"50 40 7 1",
|
||||
" s None c None",
|
||||
". c black",
|
||||
"X c white",
|
||||
"o c gray70",
|
||||
"O c navy",
|
||||
"+ c red",
|
||||
"@ c yellow",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ................................. ",
|
||||
" ..XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXoo. ",
|
||||
" .XooooooooooooooooooooooooooooooXo. ",
|
||||
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooXo. ",
|
||||
" ..oooooooooooooooooooooooooooooooXo. ",
|
||||
" ...............................XoXo. ",
|
||||
" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo. ",
|
||||
" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo. ",
|
||||
" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo. ",
|
||||
" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo. ",
|
||||
" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo.++++ ",
|
||||
" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo+++ ",
|
||||
" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.Xo+++++ ",
|
||||
" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.Xo++++++ ",
|
||||
" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.Xo+++ + ",
|
||||
" .OOOOO@@@@@OOOOOOOOOOOOOOOOOOO.Xo++. ",
|
||||
" .OOOOOOO@OOOOO@OOOOOOOOOOOOOOO.XoXo. ",
|
||||
" .OOOOOOO@OOOOOOOOOOOOOOOOOOOOO.XoXo. ",
|
||||
" .OOOOOOO@OOOO@@OOO@OOO@OOOOOOO.XoXo. ",
|
||||
" .OOOOOOO@OOOOO@OOOO@O@OOOOOOOO.XoXo. ",
|
||||
" .OOOOOOO@OOOOO@OOOOO@OOOOOOOOO.XoXo. ",
|
||||
" .OOOOOOO@OOOOO@OOOOO@OOOOOOOOO.XoXo. ",
|
||||
" .OOOOOOO@OOOOO@OOOO@O@OOOOOOOO.XoXo. ",
|
||||
" .OOOOOOO@OOOO@@@OO@OOO@OOOOOOO.XoXo. ",
|
||||
" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo. ",
|
||||
" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo. ",
|
||||
" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo. ",
|
||||
" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo. ",
|
||||
" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo. ",
|
||||
" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo. ",
|
||||
" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.Xo.. ",
|
||||
" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.Xo ",
|
||||
" OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.X. ",
|
||||
" ............................. ",
|
||||
" ",
|
||||
" ",
|
||||
" "};
|
||||
@@ -1,6 +0,0 @@
|
||||
#define bold_width 16
|
||||
#define bold_height 16
|
||||
static unsigned char bold_bits[] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0xfc, 0x07, 0xfc, 0x0f, 0x18, 0x1c, 0x18, 0x18,
|
||||
0x18, 0x18, 0x18, 0x1c, 0xf8, 0x0f, 0xf8, 0x0f, 0x18, 0x18, 0x18, 0x30,
|
||||
0x18, 0x30, 0x18, 0x38, 0xfc, 0x3f, 0xfc, 0x1f};
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user