about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorThomas E. Dickey <dickey@invisible-island.net>2018-03-17 15:40:36 +0000
committerThomas E. Dickey <dickey@invisible-island.net>2018-03-17 15:40:36 +0000
commite86c1c8ddabde50e52019b5a00026e5e3a73b5e3 (patch)
treec4e638c5794c2cd41a8cf1850739809fb3427061
parentd9693d8087ccf1edac2cb408699d43162fecabb5 (diff)
downloadlynx-snapshots-e86c1c8ddabde50e52019b5a00026e5e3a73b5e3.tar.gz
snapshot of project "lynx", label v2-8-9dev_16u
-rw-r--r--CHANGES12
-rw-r--r--PACKAGE/lynx-curses.iss3
-rw-r--r--PACKAGE/lynx-newssl.iss5
-rw-r--r--PACKAGE/lynx-oldssl.iss5
-rw-r--r--PACKAGE/lynx-slang.iss3
-rw-r--r--PACKAGE/lynx.iss209
-rw-r--r--samples/lynx.bat4
-rw-r--r--src/chrtrans/makefile.msc137
8 files changed, 217 insertions, 161 deletions
diff --git a/CHANGES b/CHANGES
index c5af9922..4b364b96 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,11 +1,17 @@
--- $LynxId: CHANGES,v 1.948 2018/03/13 09:14:59 tom Exp $
+-- $LynxId: CHANGES,v 1.953 2018/03/17 11:42:59 tom Exp $
 ===============================================================================
 Changes since Lynx 2.8 release
 ===============================================================================
 
-2018-03-13 (2.8.9dev.17)
+2018-03-17 (2.8.9dev.17)
+* modify windows installer to select directory containing SSL DLLs and copy
+  them into lynx's application directory -TD
+* add oldlynx.bat sample script to windows installer -TD
+* use default lynx.lss color scheme with samples/lynx.bat -TD
 * modify windows installers to use static libraries for pdcurses and slang,
-  because the dll for the latter is much larger than the rest of lynx -TD
+  because the dll for the latter is much larger than the rest of lynx.
+  Even with this change, lynx.exe is 50% larger when using slang than with
+  pdcurses -TD
 * rename test-package for ".rpm" to "lynx-dev" for consistency with ".deb" -TD
 * improve samples/lynx.bat by using location of script rather than current
   directory ("Smuggler" loto1992@inbox.ru).
diff --git a/PACKAGE/lynx-curses.iss b/PACKAGE/lynx-curses.iss
index dbc950d6..7710893f 100644
--- a/PACKAGE/lynx-curses.iss
+++ b/PACKAGE/lynx-curses.iss
@@ -1,10 +1,11 @@
-; $LynxId: lynx-curses.iss,v 1.5 2008/12/29 13:21:17 tom Exp $

+; $LynxId: lynx-curses.iss,v 1.6 2018/03/14 08:34:56 tom Exp $

 ;

 ; This is an installer for the "color-style" flavor of Lynx.

 ;

 ; The script assumes environment variables have been set, e.g., to point to

 ; data which is used by the installer (see "lynx.lss" for details).

 

+#define NoScreenDll

 #define SetupBaseName "lynx-cs"

 #define SourceExeName "lynx-cs.exe"

 

diff --git a/PACKAGE/lynx-newssl.iss b/PACKAGE/lynx-newssl.iss
index 965a542b..ffb97ec7 100644
--- a/PACKAGE/lynx-newssl.iss
+++ b/PACKAGE/lynx-newssl.iss
@@ -1,10 +1,13 @@
-; $LynxId: lynx-newssl.iss,v 1.1 2017/04/27 00:19:42 tom Exp $

+; $LynxId: lynx-newssl.iss,v 1.5 2018/03/17 12:02:00 tom Exp $

 ;

 ; This is an installer for Lynx built with "new" OpenSSL (1.1.x).

 ;

 ; The script assumes environment variables have been set, e.g., to point to

 ; data which is used by the installer (see "lynx.lss" for details).

 

+#define NoScreenDll

+#define SslGlob1      "'libssl-*.dll'"

+#define SslGlob2      "'libcrypto-*.dll'"

 #define SetupBaseName "lynx-newssl"

 #define SourceExeName "lynx-newssl.exe"

 

diff --git a/PACKAGE/lynx-oldssl.iss b/PACKAGE/lynx-oldssl.iss
index 6c18ef8e..7bbe0900 100644
--- a/PACKAGE/lynx-oldssl.iss
+++ b/PACKAGE/lynx-oldssl.iss
@@ -1,10 +1,13 @@
-; $LynxId: lynx-oldssl.iss,v 1.1 2017/04/27 00:20:10 tom Exp $

+; $LynxId: lynx-oldssl.iss,v 1.4 2018/03/16 20:30:46 tom Exp $

 ;

 ; This is an installer for Lynx built with "old" OpenSSL (before 1.1.x).

 ;

 ; The script assumes environment variables have been set, e.g., to point to

 ; data which is used by the installer (see "lynx.lss" for details).

 

+#define NoScreenDll

+#define SslGlob1      "'ssleay32.dll'"

+#define SslGlob2      "'libeay32.dll'"

 #define SetupBaseName "lynx-oldssl"

 #define SourceExeName "lynx-oldssl.exe"

 

diff --git a/PACKAGE/lynx-slang.iss b/PACKAGE/lynx-slang.iss
index 46c5fd6e..e5a8185d 100644
--- a/PACKAGE/lynx-slang.iss
+++ b/PACKAGE/lynx-slang.iss
@@ -1,10 +1,11 @@
-; $LynxId: lynx-slang.iss,v 1.2 2013/12/17 23:04:59 tom Exp $

+; $LynxId: lynx-slang.iss,v 1.3 2018/03/14 08:34:56 tom Exp $

 ;

 ; This is an installer for the "color-style" flavor of Lynx.

 ;

 ; The script assumes environment variables have been set, e.g., to point to

 ; data which is used by the installer (see "lynx.lss" for details).

 

+#define NoScreenDll

 #define SetupBaseName "lynx-sl"

 #define SourceExeName "lynx-slang.exe"

 #define ScreenDllName "wslang32.dll"

diff --git a/PACKAGE/lynx.iss b/PACKAGE/lynx.iss
index 3120000f..ccba7fde 100644
--- a/PACKAGE/lynx.iss
+++ b/PACKAGE/lynx.iss
@@ -1,4 +1,4 @@
-; $LynxId: lynx.iss,v 1.19 2018/03/13 09:11:29 tom Exp $

+; $LynxId: lynx.iss,v 1.27 2018/03/17 15:40:36 tom Exp $

 ; vile:ts=2 sw=2 notabinsert

 ;

 ; This is the BASE script for different flavors of the installer for Lynx.

@@ -104,6 +104,7 @@ OutputDir=..\PACKAGE\lynx-setup
 Compression=lzma

 SolidCompression=yes

 PrivilegesRequired=none

+SetupLogging=no

 

 [Languages]

 Name: "english"; MessagesFile: "compiler:Default.isl"

@@ -145,16 +146,16 @@ Name: "{app}\tmp"
 #emit 'Source: "' + HelpSrcDir + '\keystrokes\*.*"; DestDir: "{app}\help\keystrokes"; Flags: '

 

 ; some of these data files are from an earlier installer by Claudio Santambrogio

-Source: "..\samples\lynx.ico"; DestDir: "{app}\icon"

-Source: "..\samples\lynx.bat"; DestDir: "{app}"

-Source: "..\samples\jumps.htm"; DestDir: "{app}"

-Source: "..\samples\home.htm"; DestDir: "{app}"

-Source: "..\samples\lynx_bookmarks.htm"; DestDir: "{app}"

+Source: "..\lynx.cfg"; DestDir: "{app}" ; AfterInstall: myCustomCfg; Flags: ignoreversion

+Source: "..\lynx.man"; DestDir: "{app}"

 Source: "..\samples\*.lss"; DestDir: "{app}"

-Source: "..\samples\lynx.bat"; DestDir: "{app}"

+Source: "..\samples\home.htm"; DestDir: "{app}"

+Source: "..\samples\jumps.htm"; DestDir: "{app}"

 Source: "..\samples\lynx-demo.cfg"; DestDir: "{app}"

-Source: "..\lynx.man"; DestDir: "{app}"

-Source: "..\lynx.cfg"; DestDir: "{app}" ; AfterInstall: myCustomCfg; Flags: ignoreversion

+Source: "..\samples\lynx.bat"; DestDir: "{app}"

+Source: "..\samples\lynx.ico"; DestDir: "{app}\icon"

+Source: "..\samples\lynx_bookmarks.htm"; DestDir: "{app}"

+Source: "..\samples\oldlynx.bat"; DestDir: "{app}"

 ; NOTE: Don't use "Flags: ignoreversion" on any shared system files

 

 [Icons]

@@ -174,6 +175,7 @@ Type: dirifempty; Name: {app}
 [Code]

 #emit 'const MY_APP_NAME = ''{app}\' + myAppProg + '.exe'';'

 

+

 function isGuru(): Boolean;

 begin

     Result := isAdminLoggedOn();

@@ -334,7 +336,7 @@ begin
   Log('** set LYNX_CFG=' + CfgFile);

 

   SaveStringToFile(CfgFile, 'HELPFILE:' + AppDir + '/help/Lynx_help_main.html.gz' + #10, True);

-  SaveStringToFile(CfgFile, 'COLOR_STYLE:' + AppDir + '/opaque.lss' + #10, True);

+  SaveStringToFile(CfgFile, 'COLOR_STYLE:' + AppDir + '/lynx.lss' + #10, True);

 

   SaveStringToFile(CfgFile, 'CHMOD_PATH:' + #10, True);

   SaveStringToFile(CfgFile, 'COPY_PATH:' + #10, True);

@@ -385,20 +387,197 @@ begin
         end

     end

 end;

-      

+

+#ifdef SslGlob1

+#emit "const SslGlob1 = " + SslGlob1 + ";"

+#emit "const SslGlob2 = " + SslGlob2 + ";"

+var

+    SslDirPage     : TInputFileWizardPage;

+    SslLibraryPath : String;

+

+function DirContains(const PathList: string; const PathItem: string): Boolean;

+var

+    myList : string;

+    myItem : string;

+    myPart : string;

+    offset : integer;

+begin

+    Result := False;

+    myList := Uppercase(PathList);

+    myItem := Uppercase(RemoveBackslashUnlessRoot(PathItem));

+    offset := Pos(myItem, myList);

+    if offset <> 0 then

+        begin

+        myPart := Copy( myList, offset + Length(myItem), Length(myList) );

+        if ( Length(myPart) = 0 ) or ( Pos(';', myPart) = 1 ) or ( Pos('\;', myPart) = 1 ) then

+            begin

+            Result := True;

+            end;

+        end;

+end;

+

+function PathCat(const head, tail: string): string;

+begin

+    Result := RemoveBackslashUnlessRoot(head) + '\' + tail;

+end;

+

+procedure CopyFromTo(const source, target, name: string);

+var

+    FailExists : Boolean;

+    Status:      Boolean;

+begin

+    Log('Copy from: ' + PathCat(source, name));

+    Log('Copy   to: ' + PathCat(target, name));

+    FailExists := False;

+    Status := FileCopy(PathCat(source, name), PathCat(target, name), FailExists);

+    if not Status then

+        begin

+        MsgBox('Failed to copy ' + name, mbError, MB_OK);

+        Abort();

+        end;

+end;

+

+procedure ReallyDelete(const fullPath: string);

+begin

+    if DeleteFile( fullPath ) then

+        Log( '...successful' )

+    else

+        begin

+        MsgBox('Failed to delete ' + fullPath, mbError, MB_OK);

+        end;

+end;

+

+procedure DeleteAppFile(const name: string);

+var

+    AppDir   : string;

+    fullPath : string;

+    findRec  : TFindRec;

+begin

+    AppDir := ExpandConstant('{app}');

+    fullPath := PathCat( AppDir, name );

+    Log( 'Deleting ' + fullPath );

+    if Pos('*', fullPath) <> 0 then

+        begin

+        if FindFirst(fullPath, findRec) then

+            begin

+            ReallyDelete( PathCat( AppDir, findRec.name ) );

+            while FindNext( findRec ) do

+                ReallyDelete( PathCat( AppDir, findRec.name ) );

+            end

+        end

+    else

+        begin

+        ReallyDelete( fullPath );

+        end;

+end;

+

+function checkSslDir(): Boolean;

+begin

+    Result := True;

+    SslLibraryPath := Trim( SslDirPage.Values[0] );

+    if ( Length( SslLibraryPath ) = 0 ) or ( not FileExists( SslLibraryPath ) ) then

+        begin

+        MsgBox('No SSL library found', mbError, MB_OK)

+        Result := False;

+        end;

+end;

+

+procedure copySslDlls();

+var

+    SslDirectory   : String;

+    SslFilename    : String;

+    TargetDir      : String;

+begin

+    Log('Copying SSL DLLs');

+    SslDirectory := ExtractFilePath(SslLibraryPath);

+

+    // If the directory is not already in the PATH, copy the DLLs to

+    // the application directory.

+    if DirContains( GetEnv('PATH'), SslDirectory) then

+        Log( 'PATH contains SSL directory' )

+    else

+        begin

+        TargetDir := ExpandConstant('{app}');

+        CreateDir(TargetDir);

+        if DirExists(TargetDir) then

+            begin

+            SslFilename := Lowercase( ExtractFileName( SslLibraryPath ) );

+            CopyFromTo( SslDirectory, TargetDir, SslFilename );

+            Log( 'comparing: ' + SslFilename + ' to ' + SslGlob1 );

+            if CompareText( SslFilename, SslGlob1 ) = 0 then

+                // old-ssl is literal, new is a glob...

+                CopyFromTo( SslDirectory, TargetDir, SslGlob2 )

+            else

+                // new-ssl matches "libssl-x-x-z", s/libssl/libcrypto/

+                SslFilename := 'libcrypto' + Copy(SslFilename, 7, Length(SslFilename));

+                CopyFromTo( SslDirectory, TargetDir, SslFilename );

+            CopyFromTo( SslDirectory, TargetDir, 'msvcr120.dll' );

+            end

+        else

+            begin

+            MsgBox( 'Cannot create application directory', mbError, MB_OK )

+            Abort();

+            end

+        end;

+    Log('done - Copying SSL DLLs');

+end;

+

+procedure RegisterPreviousData(PreviousDataKey: Integer);

+begin

+    SetPreviousData( PreviousDataKey, 'SSL PATH', SslLibraryPath );

+end;

+

+function NextButtonClick(CurPageId: integer): Boolean;

+begin

+    Result := True;

+    if CurPageId = SslDirPage.Id then

+        begin

+        Result := checkSslDir();

+        end;

+end;

+

+procedure CurStepChanged(CurStep: TSetupStep);

+begin

+    if CurStep = ssInstall then

+    begin

+        CopySslDlls();

+    end;

+end;

+

+procedure InitializeWizard();

+var

+    myGlob: string;

+begin

+    // Create a page to locate the SSL library

+    SslDirPage := CreateInputFilePage(wpSelectDir,

+        'Select SSL Library Location',

+        'Where is the SSL library located?',

+        'Select it from the directory, then click Next.');

+

+    myGlob := 'SSL dll|' + SslGlob1;

+    Log( 'search for SSL libraries ' + myGlob );

+    SslDirPage.Add( 'Locate SSL library:', myGlob, '*.dll' );

+    SslDirPage.Values[0] := GetPreviousData( 'SSL PATH', '' );

+end;

+#endif

+

 // On uninstall, we do not know which registry setting was selected during install, so we remove all.

 procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);

 begin

   case CurUninstallStep of

     usUninstall:

       begin

-        // MsgBox('CurUninstallStepChanged:' #13#13 'Uninstall is about to start.', mbInformation, MB_OK)

+      Log('CurUninstallStepChanged:' + 'Uninstall is about to start.')

         // ...insert code to perform pre-uninstall tasks here...

+#ifdef SslGlob1

+      DeleteAppFile( SslGlob1 );

+      DeleteAppFile( SslGlob2 );

+      DeleteAppFile( 'msvcr120.dll' );

+#endif

       end;

     usPostUninstall:

       begin

         removeAnyVariable('LYNX_CFG');

-

       {

         If we don't find the settings in the current user, try the local machine.

         The setup program cannot pass the all-users flag to the uninstaller, so we

@@ -410,8 +589,8 @@ begin
         Log('Checking local-machine registry key');

         CleanupMyKey(HKEY_LOCAL_MACHINE);

         end;

-    

-        // MsgBox('CurUninstallStepChanged:' #13#13 'Uninstall just finished.', mbInformation, MB_OK);

+

+        Log('CurUninstallStepChanged:' + 'Uninstall just finished.');

       end;

   end;

 end;

diff --git a/samples/lynx.bat b/samples/lynx.bat
index eaa484ab..0b77ba4f 100644
--- a/samples/lynx.bat
+++ b/samples/lynx.bat
@@ -1,5 +1,5 @@
 @echo off

-@rem $LynxId: lynx.bat,v 1.4 2018/03/12 09:08:19 tom Exp $

+@rem $LynxId: lynx.bat,v 1.5 2018/03/14 08:42:53 tom Exp $

 @rem Claudio Santambrogio

 @rem improved by loto1992@inbox.ru

 setlocal

@@ -9,7 +9,7 @@ set HOME=%~dp0
 set TEMP=%HOME%tmp

 

 set LYNX_CFG=%HOME%lynx-demo.cfg

-set LYNX_LSS=%HOME%opaque.lss

+set LYNX_LSS=%HOME%lynx.lss

 

 "%HOME%lynx.exe" %1 %2 %3 %4 %5

 endlocal

diff --git a/src/chrtrans/makefile.msc b/src/chrtrans/makefile.msc
deleted file mode 100644
index 48d074ab..00000000
--- a/src/chrtrans/makefile.msc
+++ /dev/null
@@ -1,137 +0,0 @@
-#
-# Makefile for Microsoft Visual C++ 4.2 or later
-#
-
-CC       = cl
-LD       = link
-
-INCLUDES = /I "." /I ".." /I "..\.." /I "..\..\WWW\Library\Implementation" /I "..\..\lib"
-DEFS = /D "WIN32_LEAN_AND_MEAN" /D "NDEBUG" /D "__WIN32__" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_WIN32" /D "NO_FILEIO_H" /D "NO_UNISTD_H" /D "_WINDOWS" /D "DOSPATH"
-CFLAGS   = /nologo /MT /W3 /EHsc /O2 /c
-
-MACHINE  = i386
-LDFLAGS  = /nologo /subsystem:console /incremental:no /machine:$(MACHINE)
-LIBS     = user32.lib wsock32.lib
-
-COMPILE = $(CC) $(CFLAGS) $(INCLUDES) $(DEFS)
-LINK    = $(LD) $(LDFLAGS) /out:$@
-
-
-.SUFFIXES: .tbl
-#
-# This file contains the font map for the default (hardware) font
-#
-
-FONTMAP_INC = iso01_un.h
-
-TABLES= \
- cp1250_uni.h \
- cp1251_uni.h \
- cp1252_uni.h \
- cp1253_uni.h \
- cp1255_uni.h \
- cp1256_uni.h \
- cp1257_uni.h \
- cp437_uni.h \
- cp737_uni.h \
- cp775_uni.h \
- cp850_uni.h \
- cp852_uni.h \
- cp857_uni.h \
- cp862_uni.h \
- cp864_uni.h \
- cp866_uni.h \
- cp866u_uni.h \
- cp869_uni.h \
- def7_uni.h \
- dmcs_uni.h \
- hp_uni.h \
- iso01_uni.h \
- iso02_uni.h \
- iso03_uni.h \
- iso04_uni.h \
- iso05_uni.h \
- iso06_uni.h \
- iso07_uni.h \
- iso08_uni.h \
- iso09_uni.h \
- iso10_uni.h \
- iso13_uni.h \
- iso14_uni.h \
- iso15_uni.h \
- koi8r_uni.h \
- koi8u_uni.h \
- mac_uni.h \
- mnem2_suni.h \
- mnem_suni.h \
- next_uni.h \
- pt154_uni.h \
- rfc_suni.h \
- utf8_uni.h \
- viscii_uni.h
-
-default: $(TABLES)
-
-fontmap: $(FONTMAP_INC)
-
-makeuctb.exe : makeuctb.obj
-	$(LINK) makeuctb.obj $(LIBS)
-
-makeuctb.obj :  makeuctb.c
-	$(COMPILE) makeuctb.c
-
-.tbl.h:
-	makeuctb $*.tbl
-
-cp1250_uni.h:		cp1250_uni.tbl		makeuctb.exe
-cp1251_uni.h:		cp1251_uni.tbl		makeuctb.exe
-cp1252_uni.h:		cp1252_uni.tbl		makeuctb.exe
-cp1253_uni.h:		cp1253_uni.tbl		makeuctb.exe
-cp1255_uni.h:		cp1255_uni.tbl		makeuctb.exe
-cp1256_uni.h:		cp1256_uni.tbl		makeuctb.exe
-cp1257_uni.h:		cp1257_uni.tbl		makeuctb.exe
-cp437_uni.h:		cp437_uni.tbl		makeuctb.exe
-cp737_uni.h:		cp737_uni.tbl		makeuctb.exe
-cp775_uni.h:		cp775_uni.tbl		makeuctb.exe
-cp850_uni.h:		cp850_uni.tbl		makeuctb.exe
-cp852_uni.h:		cp852_uni.tbl		makeuctb.exe
-cp857_uni.h:		cp857_uni.tbl		makeuctb.exe
-cp862_uni.h:		cp862_uni.tbl		makeuctb.exe
-cp864_uni.h:		cp864_uni.tbl		makeuctb.exe
-cp866_uni.h:		cp866_uni.tbl		makeuctb.exe
-cp866u_uni.h:		cp866u_uni.tbl		makeuctb.exe
-cp869_uni.h:		cp869_uni.tbl		makeuctb.exe
-def7_uni.h:		def7_uni.tbl		makeuctb.exe
-dmcs_uni.h:		dmcs_uni.tbl		makeuctb.exe
-hp_uni.h:               hp_uni.tbl              makeuctb.exe
-iso01_uni.h:		iso01_uni.tbl		makeuctb.exe
-iso02_uni.h:		iso02_uni.tbl		makeuctb.exe
-iso03_uni.h:		iso03_uni.tbl		makeuctb.exe
-iso04_uni.h:		iso04_uni.tbl		makeuctb.exe
-iso05_uni.h:		iso05_uni.tbl		makeuctb.exe
-iso06_uni.h:		iso06_uni.tbl		makeuctb.exe
-iso07_uni.h:		iso07_uni.tbl		makeuctb.exe
-iso08_uni.h:		iso08_uni.tbl		makeuctb.exe
-iso09_uni.h:		iso09_uni.tbl		makeuctb.exe
-iso10_uni.h:		iso10_uni.tbl		makeuctb.exe
-iso13_uni.h:		iso13_uni.tbl		makeuctb.exe
-iso14_uni.h:		iso14_uni.tbl		makeuctb.exe
-iso15_uni.h:		iso15_uni.tbl		makeuctb.exe
-koi8r_uni.h:		koi8r_uni.tbl		makeuctb.exe
-koi8u_uni.h:		koi8u_uni.tbl		makeuctb.exe
-mac_uni.h:		mac_uni.tbl		makeuctb.exe
-mnem2_suni.h:		mnem2_suni.tbl		makeuctb.exe
-mnem_suni.h:		mnem_suni.tbl		makeuctb.exe
-next_uni.h:		next_uni.tbl		makeuctb.exe
-pt154_uni.h:		pt154_uni.tbl		makeuctb.exe
-rfc_suni.h:		rfc_suni.tbl		makeuctb.exe
-utf8_uni.h:		utf8_uni.tbl		makeuctb.exe
-viscii_uni.h:		viscii_uni.tbl		makeuctb.exe
-
-clean :
-	- erase *.obj
-	- erase *.exe
-	- for %%i in ( $(TABLES) ) do erase %%i
-
-distclean : clean
-	- erase *.bak