From 6d3386cf1ecf8a77b18f673257865fe8992aa749 Mon Sep 17 00:00:00 2001 From: lloyd Date: Fri, 20 Nov 2009 16:05:03 +0000 Subject: Add readme.txt, license.txt, and log.txt to the InnoSetup install --- src/build-data/innosetup.in | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/build-data/innosetup.in b/src/build-data/innosetup.in index ffe780979..2f4968cda 100644 --- a/src/build-data/innosetup.in +++ b/src/build-data/innosetup.in @@ -23,3 +23,7 @@ Source: "..\botan.dll.manifest"; DestDir: "{app}" Source: "..\botan.exp"; DestDir: "{app}" Source: "..\botan.lib"; DestDir: "{app}" Source: "include\botan\*"; DestDir: "{app}\include\botan" + +Source "..\readme.txt"; DestDir: "{app}\doc" +Source "..\doc\license.txt"; DestDir: "{app}\doc" +Source "..\doc\log.txt"; DestDir: "{app}\doc" -- cgit v1.2.3 From f31a7b20519016474a996554f418bdfd16dd5460 Mon Sep 17 00:00:00 2001 From: lloyd Date: Fri, 20 Nov 2009 16:05:23 +0000 Subject: Remove long #### blocks for readability --- src/build-data/makefile/unix.in | 32 ++++++++------------------------ src/build-data/makefile/unix_shr.in | 32 ++++++++------------------------ 2 files changed, 16 insertions(+), 48 deletions(-) (limited to 'src') diff --git a/src/build-data/makefile/unix.in b/src/build-data/makefile/unix.in index 8e0e35b87..22ff919cc 100644 --- a/src/build-data/makefile/unix.in +++ b/src/build-data/makefile/unix.in @@ -1,6 +1,4 @@ -################################################## -# Compiler Options # -################################################## +# Compiler Options CXX = %{cc} LIB_OPT = %{lib_opt} CHECK_OPT = %{check_opt} @@ -9,14 +7,10 @@ LANG_FLAGS = %{lang_flags} WARN_FLAGS = %{warn_flags} LINK_TO = %{link_to} -################################################## -# Version Numbers # -################################################## +# Version Numbers VERSION = %{version} -################################################## -# Installation Settings # -################################################## +# Installation Settings DESTDIR = %{prefix} BINDIR = $(DESTDIR)/bin @@ -28,9 +22,7 @@ PKGCONF_DIR = $(LIBDIR)/pkgconfig CONFIG_SCRIPT = %{botan_config} PKGCONFIG = %{botan_pkgconfig} -################################################## -# Aliases for Common Programs # -################################################## +# Aliases for Common Programs AR = %{ar_command} CD = @cd ECHO = @echo @@ -43,9 +35,7 @@ RANLIB = %{ranlib_command} RM = @rm -f RM_R = @rm -rf -################################################## -# File Lists # -################################################## +# File Lists CHECK = %{check_prefix}check DOCS = %{doc_files} @@ -66,16 +56,12 @@ STATIC_LIB = $(LIBNAME).a all: $(LIBRARIES) -################################################## -# Build Commands # -################################################## +# Build Commands %{lib_build_cmds} %{check_build_cmds} -################################################## -# Link Commands # -################################################## +# Link Commands $(CHECK): $(LIBRARIES) $(CHECKOBJS) $(CXX) $(CHECKOBJS) -L. libbotan.a $(LINK_TO) -o $(CHECK) @@ -84,9 +70,7 @@ $(STATIC_LIB): $(LIBOBJS) $(AR) $(STATIC_LIB) $(LIBOBJS) $(RANLIB) $(STATIC_LIB) -################################################## -# Fake Targets # -################################################## +# Fake Targets .PHONY = doxygen clean distclean install static static: $(STATIC_LIB) diff --git a/src/build-data/makefile/unix_shr.in b/src/build-data/makefile/unix_shr.in index cfc8e3223..499b7eb92 100644 --- a/src/build-data/makefile/unix_shr.in +++ b/src/build-data/makefile/unix_shr.in @@ -1,6 +1,4 @@ -################################################## -# Compiler Options # -################################################## +# Compiler Options CXX = %{cc} LIB_OPT = %{lib_opt} CHECK_OPT = %{check_opt} @@ -11,15 +9,11 @@ SO_OBJ_FLAGS = %{shared_flags} SO_LINK_CMD = %{so_link} LINK_TO = %{link_to} -################################################## -# Version Numbers # -################################################## +# Version Numbers VERSION = %{version} SO_VERSION = %{so_version} -################################################## -# Installation Settings # -################################################## +# Installation Settings DESTDIR = %{prefix} BINDIR = $(DESTDIR)/bin @@ -31,9 +25,7 @@ PKGCONF_DIR = $(LIBDIR)/pkgconfig CONFIG_SCRIPT = %{botan_config} PKGCONFIG = %{botan_pkgconfig} -################################################## -# Aliases for Common Programs # -################################################## +# Aliases for Common Programs AR = %{ar_command} CD = @cd ECHO = @echo @@ -46,9 +38,7 @@ RANLIB = %{ranlib_command} RM = @rm -f RM_R = @rm -rf -################################################## -# File Lists # -################################################## +# File Lists CHECK = %{check_prefix}check DOCS = %{doc_files} @@ -74,16 +64,12 @@ SYMLINK = libbotan.%{so_suffix} all: $(LIBRARIES) -################################################## -# Build Commands # -################################################## +# Build Commands %{lib_build_cmds} %{check_build_cmds} -################################################## -# Link Commands # -################################################## +# Link Commands $(CHECK): $(LIBRARIES) $(CHECKOBJS) $(CXX) $(LDFLAGS) $(CHECKOBJS) -o $(CHECK) -L. -lbotan-%{so_version} $(LINK_TO) @@ -96,9 +82,7 @@ $(SHARED_LIB): $(LIBOBJS) $(SO_LINK_CMD) $(LDFLAGS) $(LIBOBJS) -o $(SHARED_LIB) $(LINK_TO) $(LN) $(SHARED_LIB) $(SYMLINK) -################################################## -# Fake Targets # -################################################## +# Fake Targets .PHONY = doxygen clean distclean install static shared static: $(STATIC_LIB) -- cgit v1.2.3 From 8f966fab28227c7fb33136efc4ce7170f36c1523 Mon Sep 17 00:00:00 2001 From: lloyd Date: Fri, 20 Nov 2009 16:11:55 +0000 Subject: Various fixes for Visual C++ per bug 63 - --enable-debug sets debug options, --disable-shared disables DLL options, and don't define _CONSOLE in the library build. --- configure.py | 24 +++++++++++++++++------- src/build-data/cc/msvc.txt | 18 +++++++++--------- src/build-data/makefile/nmake.in | 15 ++++++++------- 3 files changed, 34 insertions(+), 23 deletions(-) (limited to 'src') diff --git a/configure.py b/configure.py index d1f06ce5c..cd03bdf8b 100755 --- a/configure.py +++ b/configure.py @@ -564,10 +564,15 @@ class CompilerInfo(object): """ Return the machine specific ABI flags """ - def mach_abi_link_flags(self, osname, arch, submodel): + def mach_abi_link_flags(self, osname, arch, submodel, debug_p): + + def all(): + if debug_p: + return 'all-debug' + return 'all' abi_link = set() - for what in ['all', osname, arch, submodel]: + for what in [all(), osname, arch, submodel]: if self.mach_abi_linking.get(what) != None: abi_link.add(self.mach_abi_linking.get(what)) @@ -792,6 +797,11 @@ def create_template_vars(build_config, options, modules, cc, arch, osinfo): return os.path.join(options.with_build_dir, path) return path + def only_if_shared(option): + if options.build_shared_lib: + return option + return '' + return { 'version_major': build_config.version_major, 'version_minor': build_config.version_minor, @@ -822,17 +832,17 @@ def create_template_vars(build_config, options, modules, cc, arch, osinfo): 'mp_bits': choose_mp_bits(), - 'cc': cc.binary_name + cc.mach_abi_link_flags(options.os, - options.arch, - options.cpu), + 'cc': cc.binary_name + cc.mach_abi_link_flags( + options.os, options.arch, options.cpu, options.debug_build), 'lib_opt': cc.library_opt_flags(options.debug_build), 'mach_opt': cc.mach_opts(options.arch, options.cpu), 'check_opt': cc.check_opt_flags, 'lang_flags': cc.lang_flags + options.extra_flags, 'warn_flags': cc.warning_flags, - 'shared_flags': cc.shared_flags, - 'dll_import_flags': cc.dll_import_flags, + + 'shared_flags': only_if_shared(cc.shared_flags), + 'dll_import_flags': only_if_shared(cc.dll_import_flags), 'so_link': cc.so_link_command_for(osinfo.basename), diff --git a/src/build-data/cc/msvc.txt b/src/build-data/cc/msvc.txt index 278aaadf4..892e80c4b 100644 --- a/src/build-data/cc/msvc.txt +++ b/src/build-data/cc/msvc.txt @@ -1,6 +1,6 @@ macro_name MSVC -binary_name cl.exe +binary_name cl compile_option "/nologo /c " output_to_option "/Fo" @@ -8,17 +8,16 @@ add_include_dir_option "/I" add_lib_dir_option -L add_lib_option "" -lib_opt_flags "/O2" -shared_flags "/DBOTAN_DLL=__declspec(dllexport)" -check_opt_flags "/O2" -debug_flags "/Zi" -no_debug_flags "" -lang_flags "/EHsc /GR /D_CONSOLE" +no_debug_flags "/O2" +debug_flags "/Od /Zi /DDEBUG" +check_opt_flags "/O2 /D_CONSOLE" +lang_flags "/EHsc /GR" warning_flags "" +shared_flags "/DBOTAN_DLL=__declspec(dllexport)" dll_import_flags "__declspec(dllimport)" -ar_command "lib" +ar_command lib makefile_style nmake @@ -27,5 +26,6 @@ default -> "$(CXX) /LD" -all -> "/MD" +all -> "/MD" +all-debug -> "/MDd" diff --git a/src/build-data/makefile/nmake.in b/src/build-data/makefile/nmake.in index 2604a3459..7b7d2285b 100644 --- a/src/build-data/makefile/nmake.in +++ b/src/build-data/makefile/nmake.in @@ -6,7 +6,7 @@ MACH_OPT = %{mach_opt} LANG_FLAGS = %{lang_flags} WARN_FLAGS = %{warn_flags} SO_OBJ_FLAGS = %{shared_flags} -SO_LINK_CMD = %{so_link} +LIB_LINK_CMD = %{so_link} LINK_TO = %{link_to} ### Version Numbers @@ -45,11 +45,12 @@ CHECKOBJS = %{check_objs} LIB_FLAGS = $(LIB_OPT) $(MACH_OPT) $(LANG_FLAGS) $(WARN_FLAGS) $(SO_OBJ_FLAGS) CHECK_FLAGS = $(CHECK_OPT) $(LANG_FLAGS) $(WARN_FLAGS) -LIBRARIES = $(DLL) - LIBNAME = botan -DLL = $(LIBNAME).%{so_suffix} -STATIC_LIB = $(LIBNAME).%{static_suffix} + +LIBRARIES = $(LIB) + +# This will either be a static lib or the DLL linking lib +LIB = $(LIBNAME).%{static_suffix} all: $(LIBRARIES) @@ -62,8 +63,8 @@ all: $(LIBRARIES) $(CHECK): $(LIBRARIES) $(CHECKOBJS) $(CXX) /Fe$@ $(CHECKOBJS) $(STATIC_LIB) $(LINK_TO) -$(DLL): $(LIBOBJS) - $(SO_LINK_CMD) /Febotan $(LIBOBJS) $(LINK_TO) +$(LIB): $(LIBOBJS) + $(LIB_LINK_CMD) /Febotan $(LIBOBJS) $(LINK_TO) ### Fake Targets clean: -- cgit v1.2.3 From 70b855c84855aa33ab8411d24b9dd0b78ecbffcb Mon Sep 17 00:00:00 2001 From: lloyd Date: Mon, 23 Nov 2009 15:38:52 +0000 Subject: Remove extern decl of no longer used/included SHA-1 SSE2 function --- src/hash/sha1_sse2/sha1_sse2.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'src') diff --git a/src/hash/sha1_sse2/sha1_sse2.h b/src/hash/sha1_sse2/sha1_sse2.h index 0f8eebee9..1c4b4cca7 100644 --- a/src/hash/sha1_sse2/sha1_sse2.h +++ b/src/hash/sha1_sse2/sha1_sse2.h @@ -24,8 +24,6 @@ class BOTAN_DLL SHA_160_SSE2 : public SHA_160 void compress_n(const byte[], u32bit blocks); }; -extern "C" void botan_sha1_sse2_compress(u32bit[5], const u32bit*); - } #endif -- cgit v1.2.3 From 09a811f05119434dc77677d467b966438e99f218 Mon Sep 17 00:00:00 2001 From: lloyd Date: Mon, 23 Nov 2009 16:17:03 +0000 Subject: Fix the Nmake file - turns out the LIB is a really bad name for a variable in nmake, causes strange linker errors without any obvious cause. --- src/build-data/makefile/nmake.in | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/build-data/makefile/nmake.in b/src/build-data/makefile/nmake.in index 7b7d2285b..79b80745c 100644 --- a/src/build-data/makefile/nmake.in +++ b/src/build-data/makefile/nmake.in @@ -47,10 +47,10 @@ CHECK_FLAGS = $(CHECK_OPT) $(LANG_FLAGS) $(WARN_FLAGS) LIBNAME = botan -LIBRARIES = $(LIB) +LIBRARIES = $(BOTAN_LIB) -# This will either be a static lib or the DLL linking lib -LIB = $(LIBNAME).%{static_suffix} +# This will be either a static lib or the DLL import lib +BOTAN_LIB = $(LIBNAME).%{static_suffix} all: $(LIBRARIES) @@ -61,10 +61,10 @@ all: $(LIBRARIES) ### Link Commands $(CHECK): $(LIBRARIES) $(CHECKOBJS) - $(CXX) /Fe$@ $(CHECKOBJS) $(STATIC_LIB) $(LINK_TO) + $(CXX) /Fe$@ $(CHECKOBJS) $(BOTAN_LIB) $(LINK_TO) -$(LIB): $(LIBOBJS) - $(LIB_LINK_CMD) /Febotan $(LIBOBJS) $(LINK_TO) +$(BOTAN_LIB): $(LIBOBJS) + $(LIB_LINK_CMD) /Fe$(LIBNAME) $(LIBOBJS) $(LINK_TO) ### Fake Targets clean: -- cgit v1.2.3 From 18f859f63763eb3ab9b52da2e5d6b256f7075945 Mon Sep 17 00:00:00 2001 From: lloyd Date: Mon, 23 Nov 2009 16:55:17 +0000 Subject: Add User and Developer install targets to Win32 installer --- src/build-data/innosetup.in | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/build-data/innosetup.in b/src/build-data/innosetup.in index 2f4968cda..fbcf95fb0 100644 --- a/src/build-data/innosetup.in +++ b/src/build-data/innosetup.in @@ -17,13 +17,26 @@ SolidCompression=yes OutputDir=. OutputBaseFilename=botan-%{version} +[Types] +Name: "user"; Description: "User" +Name: "devel"; Description: "Developer" + +[Components] +name: "dll"; Description: "Runtime DLLs"; Types: user devel; Flags: fixed +name: "implib"; Description: "Import Library"; Types: devel +name: "includes"; Description: "Include Files"; Types: devel +name: "docs"; Descrption: "Developer Documentation"; Types: devel + [Files] -Source: "..\botan.dll"; DestDir: "{app}" -Source: "..\botan.dll.manifest"; DestDir: "{app}" -Source: "..\botan.exp"; DestDir: "{app}" -Source: "..\botan.lib"; DestDir: "{app}" -Source: "include\botan\*"; DestDir: "{app}\include\botan" - -Source "..\readme.txt"; DestDir: "{app}\doc" -Source "..\doc\license.txt"; DestDir: "{app}\doc" -Source "..\doc\log.txt"; DestDir: "{app}\doc" +# License file is always included +Source: "..\botan.dll"; DestDir: "{app}"; Components: dll +Source: "..\botan.dll.manifest"; DestDir: "{app}"; Components: dll +Source "..\doc\license.txt"; DestDir: "{app}"; Components: dll + +Source: "..\botan.exp"; DestDir: "{app}"; Components: implib +Source: "..\botan.lib"; DestDir: "{app}"; Components: implib + +Source: "include\botan\*"; DestDir: "{app}\include\botan"; Components: includes + +Source "..\readme.txt"; DestDir: "{app}\doc"; Components: docs +Source "..\doc\log.txt"; DestDir: "{app}\doc"; Components: docs -- cgit v1.2.3 From 2dd1b6bcf060ebdfadd9f040a72a2a13cb55e7cd Mon Sep 17 00:00:00 2001 From: lloyd Date: Mon, 23 Nov 2009 16:57:03 +0000 Subject: Fix minor errors in InnoSetup script --- src/build-data/innosetup.in | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/build-data/innosetup.in b/src/build-data/innosetup.in index fbcf95fb0..81482d53d 100644 --- a/src/build-data/innosetup.in +++ b/src/build-data/innosetup.in @@ -25,18 +25,18 @@ Name: "devel"; Description: "Developer" name: "dll"; Description: "Runtime DLLs"; Types: user devel; Flags: fixed name: "implib"; Description: "Import Library"; Types: devel name: "includes"; Description: "Include Files"; Types: devel -name: "docs"; Descrption: "Developer Documentation"; Types: devel +name: "docs"; Description: "Developer Documentation"; Types: devel [Files] -# License file is always included +; License file is always included Source: "..\botan.dll"; DestDir: "{app}"; Components: dll Source: "..\botan.dll.manifest"; DestDir: "{app}"; Components: dll -Source "..\doc\license.txt"; DestDir: "{app}"; Components: dll +Source: "..\doc\license.txt"; DestDir: "{app}"; Components: dll Source: "..\botan.exp"; DestDir: "{app}"; Components: implib Source: "..\botan.lib"; DestDir: "{app}"; Components: implib Source: "include\botan\*"; DestDir: "{app}\include\botan"; Components: includes -Source "..\readme.txt"; DestDir: "{app}\doc"; Components: docs -Source "..\doc\log.txt"; DestDir: "{app}\doc"; Components: docs +Source: "..\readme.txt"; DestDir: "{app}\doc"; Components: docs +Source: "..\doc\log.txt"; DestDir: "{app}\doc"; Components: docs -- cgit v1.2.3 From 97e63a94db0e2252d2fcf8b221910a69396ebc13 Mon Sep 17 00:00:00 2001 From: lloyd Date: Mon, 23 Nov 2009 17:31:47 +0000 Subject: Use a little Pascal script (hey, my first Pascal program!) in InnoSetup to conver the line endings of text files (.txt, .h) to Win32's CRLF. --- src/build-data/innosetup.in | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/build-data/innosetup.in b/src/build-data/innosetup.in index 81482d53d..fa3a5e656 100644 --- a/src/build-data/innosetup.in +++ b/src/build-data/innosetup.in @@ -31,12 +31,28 @@ name: "docs"; Description: "Developer Documentation"; Types: devel ; License file is always included Source: "..\botan.dll"; DestDir: "{app}"; Components: dll Source: "..\botan.dll.manifest"; DestDir: "{app}"; Components: dll -Source: "..\doc\license.txt"; DestDir: "{app}"; Components: dll +Source: "..\doc\license.txt"; DestDir: "{app}"; Components: dll; AfterInstall: ConvertLineEndings Source: "..\botan.exp"; DestDir: "{app}"; Components: implib Source: "..\botan.lib"; DestDir: "{app}"; Components: implib -Source: "include\botan\*"; DestDir: "{app}\include\botan"; Components: includes - -Source: "..\readme.txt"; DestDir: "{app}\doc"; Components: docs -Source: "..\doc\log.txt"; DestDir: "{app}\doc"; Components: docs +Source: "include\botan\*"; DestDir: "{app}\include\botan"; Components: includes; AfterInstall: ConvertLineEndings + +Source: "..\readme.txt"; DestDir: "{app}\doc"; Components: docs; AfterInstall: ConvertLineEndings +Source: "..\doc\log.txt"; DestDir: "{app}\doc"; Components: docs; AfterInstall: ConvertLineEndings + +[Code] +procedure ConvertLineEndings(); + var + FileContents : String; + CR : String; + LF : String; + CRLF : String; +begin + LF := #10; + CR := #13; + CRLF := CR + LF; + LoadStringFromFile(ExpandConstant(CurrentFileName), FileContents); + StringChangeEx(FileContents, LF, CRLF, False); + SaveStringToFile(ExpandConstant(CurrentFileName), FileContents, False); +end; -- cgit v1.2.3 From 9a5f77d29bb28761d1053b47fb91dafc4b7bda6f Mon Sep 17 00:00:00 2001 From: lloyd Date: Mon, 23 Nov 2009 17:41:12 +0000 Subject: Don't do line ending conversion on build.h since that was (presumably/usually) written out by the local Python using Win32 line endings. --- src/build-data/innosetup.in | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/build-data/innosetup.in b/src/build-data/innosetup.in index fa3a5e656..368d74824 100644 --- a/src/build-data/innosetup.in +++ b/src/build-data/innosetup.in @@ -49,10 +49,13 @@ procedure ConvertLineEndings(); LF : String; CRLF : String; begin - LF := #10; - CR := #13; - CRLF := CR + LF; - LoadStringFromFile(ExpandConstant(CurrentFileName), FileContents); - StringChangeEx(FileContents, LF, CRLF, False); - SaveStringToFile(ExpandConstant(CurrentFileName), FileContents, False); + if ExtractFileName(CurrentFileName) <> 'build.h' then + begin + LF := #10; + CR := #13; + CRLF := CR + LF; + LoadStringFromFile(ExpandConstant(CurrentFileName), FileContents); + StringChangeEx(FileContents, LF, CRLF, False); + SaveStringToFile(ExpandConstant(CurrentFileName), FileContents, False); + end; end; -- cgit v1.2.3 From 9b40d299b878216cf5670aeb880abf2578902c68 Mon Sep 17 00:00:00 2001 From: lloyd Date: Tue, 24 Nov 2009 00:23:18 +0000 Subject: Clean up the implementation of the line ending converter. Add a custom install target to users can select specific things to enable or disable. Add api.pdf and tutorial.pdf, if they are available in the tree (otherwise skip) Add the set of examples as part of the documentation package. Require at least Windows 98 or 2000 since some code in the entropy gathering routines requires functions (CryptGenRandom and Toolhelp32) which are only available on these systems or later. Set the VersionInfoVersion (viewable via the Properties menu on the setup .exe) --- src/build-data/innosetup.in | 38 ++++++++++++++++++++++++++------------ 1 file changed, 26 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/build-data/innosetup.in b/src/build-data/innosetup.in index 368d74824..c1f8708e1 100644 --- a/src/build-data/innosetup.in +++ b/src/build-data/innosetup.in @@ -5,10 +5,15 @@ AppName=Botan AppVerName=Botan %{version} AppPublisher=Jack Lloyd -AppCopyright=Copyright (C) 1999-2009 Jack Lloyd and others AppPublisherURL=http://botan.randombit.net/ AppVersion=%{version} +VersionInfoCopyright=Copyright (C) 1999-2009 Jack Lloyd and others +VersionInfoVersion=%{version}.0 + +; Require at least Windows 98 or 2000 +MinVersion=4.1,5.0 + DefaultDirName={pf}\botan DefaultGroupName=botan @@ -20,18 +25,19 @@ OutputBaseFilename=botan-%{version} [Types] Name: "user"; Description: "User" Name: "devel"; Description: "Developer" +Name: "custom"; Description: "Custom"; Flags: iscustom [Components] -name: "dll"; Description: "Runtime DLLs"; Types: user devel; Flags: fixed +name: "dll"; Description: "Runtime DLLs"; Types: user devel custom; Flags: fixed name: "implib"; Description: "Import Library"; Types: devel name: "includes"; Description: "Include Files"; Types: devel name: "docs"; Description: "Developer Documentation"; Types: devel [Files] -; License file is always included +; DLL and license file is always included +Source: "..\doc\license.txt"; DestDir: "{app}"; Components: dll; AfterInstall: ConvertLineEndings Source: "..\botan.dll"; DestDir: "{app}"; Components: dll Source: "..\botan.dll.manifest"; DestDir: "{app}"; Components: dll -Source: "..\doc\license.txt"; DestDir: "{app}"; Components: dll; AfterInstall: ConvertLineEndings Source: "..\botan.exp"; DestDir: "{app}"; Components: implib Source: "..\botan.lib"; DestDir: "{app}"; Components: implib @@ -41,21 +47,29 @@ Source: "include\botan\*"; DestDir: "{app}\include\botan"; Components: includes; Source: "..\readme.txt"; DestDir: "{app}\doc"; Components: docs; AfterInstall: ConvertLineEndings Source: "..\doc\log.txt"; DestDir: "{app}\doc"; Components: docs; AfterInstall: ConvertLineEndings +Source: "..\doc\api.pdf"; DestDir: "{app}\doc"; Components: docs; Flags: skipifsourcedoesntexist +Source: "..\doc\tutorial.pdf"; DestDir: "{app}\doc"; Components: docs; Flags: skipifsourcedoesntexist + +Source "..\doc\examples"; DestDir: "{app}\doc\examples"; Components: docs + + [Code] +const + LF = #10; + CR = #13; + CRLF = CR + LF; + procedure ConvertLineEndings(); var + FilePath : String; FileContents : String; - CR : String; - LF : String; - CRLF : String; begin + FilePath := ExpandConstant(CurrentFileName) + if ExtractFileName(CurrentFileName) <> 'build.h' then begin - LF := #10; - CR := #13; - CRLF := CR + LF; - LoadStringFromFile(ExpandConstant(CurrentFileName), FileContents); + LoadStringFromFile(FilePath, FileContents); StringChangeEx(FileContents, LF, CRLF, False); - SaveStringToFile(ExpandConstant(CurrentFileName), FileContents, False); + SaveStringToFile(FilePath, FileContents, False); end; end; -- cgit v1.2.3 From 798230f8e6893e0a8e4eed3cd3215cb5fef13154 Mon Sep 17 00:00:00 2001 From: lloyd Date: Tue, 24 Nov 2009 00:32:41 +0000 Subject: Convert line endings on examples. Sort files in an attempt to help out the compression algorithm. --- src/build-data/innosetup.in | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/build-data/innosetup.in b/src/build-data/innosetup.in index c1f8708e1..228ab4e97 100644 --- a/src/build-data/innosetup.in +++ b/src/build-data/innosetup.in @@ -39,19 +39,18 @@ Source: "..\doc\license.txt"; DestDir: "{app}"; Components: dll; AfterInstall: C Source: "..\botan.dll"; DestDir: "{app}"; Components: dll Source: "..\botan.dll.manifest"; DestDir: "{app}"; Components: dll -Source: "..\botan.exp"; DestDir: "{app}"; Components: implib -Source: "..\botan.lib"; DestDir: "{app}"; Components: implib - Source: "include\botan\*"; DestDir: "{app}\include\botan"; Components: includes; AfterInstall: ConvertLineEndings Source: "..\readme.txt"; DestDir: "{app}\doc"; Components: docs; AfterInstall: ConvertLineEndings Source: "..\doc\log.txt"; DestDir: "{app}\doc"; Components: docs; AfterInstall: ConvertLineEndings -Source: "..\doc\api.pdf"; DestDir: "{app}\doc"; Components: docs; Flags: skipifsourcedoesntexist -Source: "..\doc\tutorial.pdf"; DestDir: "{app}\doc"; Components: docs; Flags: skipifsourcedoesntexist +Source: "..\doc\examples\*.cpp"; DestDir: "{app}\doc\examples"; Components: docs; AfterInstall: ConvertLineEndings -Source "..\doc\examples"; DestDir: "{app}\doc\examples"; Components: docs +Source: "..\botan.exp"; DestDir: "{app}"; Components: implib +Source: "..\botan.lib"; DestDir: "{app}"; Components: implib +Source: "..\doc\api.pdf"; DestDir: "{app}\doc"; Components: docs; Flags: skipifsourcedoesntexist +Source: "..\doc\tutorial.pdf"; DestDir: "{app}\doc"; Components: docs; Flags: skipifsourcedoesntexist [Code] const -- cgit v1.2.3 From 404462c4dda58af79a7cf53da790a86bdae4633e Mon Sep 17 00:00:00 2001 From: lloyd Date: Tue, 24 Nov 2009 00:39:06 +0000 Subject: Make sure the SIMD_32 implementation we're using actually works on the system before returning a new instance. --- src/engine/simd_engine/simd_engine.cpp | 4 ++++ src/utils/simd_32/simd_altivec.h | 2 +- src/utils/simd_32/simd_scalar.h | 2 +- src/utils/simd_32/simd_sse.h | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/engine/simd_engine/simd_engine.cpp b/src/engine/simd_engine/simd_engine.cpp index 7e15f9ec1..fdb1644d0 100644 --- a/src/engine/simd_engine/simd_engine.cpp +++ b/src/engine/simd_engine/simd_engine.cpp @@ -6,6 +6,7 @@ */ #include +#include #include #if defined(BOTAN_HAS_SERPENT_SIMD) @@ -26,6 +27,9 @@ BlockCipher* SIMD_Engine::find_block_cipher(const SCAN_Name& request, Algorithm_Factory&) const { + if(!SIMD_32::enabled()) + return 0; + #if defined(BOTAN_HAS_SERPENT_SIMD) if(request.algo_name() == "Serpent") return new Serpent_SIMD; diff --git a/src/utils/simd_32/simd_altivec.h b/src/utils/simd_32/simd_altivec.h index 3e784a8c4..e1704e76c 100644 --- a/src/utils/simd_32/simd_altivec.h +++ b/src/utils/simd_32/simd_altivec.h @@ -20,7 +20,7 @@ namespace Botan { class SIMD_Altivec { public: - bool enabled() const { return CPUID::has_altivec(); } + static bool enabled() { return CPUID::has_altivec(); } SIMD_Altivec(const u32bit B[4]) { diff --git a/src/utils/simd_32/simd_scalar.h b/src/utils/simd_32/simd_scalar.h index 398503d33..148b76c35 100644 --- a/src/utils/simd_32/simd_scalar.h +++ b/src/utils/simd_32/simd_scalar.h @@ -16,7 +16,7 @@ namespace Botan { class SIMD_Scalar { public: - bool enabled() const { return true; } + static bool enabled() { return true; } SIMD_Scalar(const u32bit B[4]) { diff --git a/src/utils/simd_32/simd_sse.h b/src/utils/simd_32/simd_sse.h index 81d8afe75..9f03b3733 100644 --- a/src/utils/simd_32/simd_sse.h +++ b/src/utils/simd_32/simd_sse.h @@ -17,7 +17,7 @@ namespace Botan { class SIMD_SSE2 { public: - bool enabled() const { return CPUID::has_sse2(); } + static bool enabled() { return CPUID::has_sse2(); } SIMD_SSE2(const u32bit B[4]) { -- cgit v1.2.3