diff options
-rw-r--r-- | CHANGES | 12 | ||||
-rw-r--r-- | PACKAGE/lynx.iss | 3 | ||||
-rw-r--r-- | PACKAGE/lynx.nsi | 4 | ||||
-rw-r--r-- | lynx_help/keystrokes/edit_help.html | 10 | ||||
-rw-r--r-- | makefile.in | 4 | ||||
-rw-r--r-- | samples/lynx.bat | 4 | ||||
-rw-r--r-- | samples/oldlynx.bat | 14 | ||||
-rw-r--r-- | src/LYUtils.c | 48 |
8 files changed, 74 insertions, 25 deletions
diff --git a/CHANGES b/CHANGES index b0582818..45bc95f4 100644 --- a/CHANGES +++ b/CHANGES @@ -1,9 +1,17 @@ --- $LynxId: CHANGES,v 1.683 2013/10/15 08:32:47 tom Exp $ +-- $LynxId: CHANGES,v 1.687 2013/10/17 10:43:28 tom Exp $ =============================================================================== Changes since Lynx 2.8 release =============================================================================== -2013-10-15 (2.8.8dev.17) +2013-10-17 (2.8.8dev.17) +* improve DOSPATH-related logic in HomeEnv(), making this work properly with + Windows Vista and 7 (report by Manuel Nunez) -TD +* modify samples/*.bat to work when running in a directory whose pathname + contains spaces -TD +* reduce required privileges for installing in lynx.iss -TD +* improve sed expression appended to help_files.sed to fix a case for the + edit-helpfiles which left a ".gz.gz" suffix for compressed filename URLs, + overlooked since 2.8.1pre.3 -TD * modify logic in lkcstring_to_lkc() to allow named keys, e.g., from curses, to be used consistently in a KEYMAP directive -TD * add version-info to LYIcon.rc -TD diff --git a/PACKAGE/lynx.iss b/PACKAGE/lynx.iss index 096684d1..630f742e 100644 --- a/PACKAGE/lynx.iss +++ b/PACKAGE/lynx.iss @@ -1,4 +1,4 @@ -; $LynxId: lynx.iss,v 1.10 2013/09/30 00:34:08 tom Exp $ +; $LynxId: lynx.iss,v 1.11 2013/10/17 00:34:49 tom Exp $ ; vile:ts=2 sw=2 notabinsert ; ; This is the BASE script for different flavors of the installer for Lynx. @@ -103,6 +103,7 @@ OutputDir=..\PACKAGE\lynx-setup #emit 'OutputBaseFilename=' + SetupBaseName + LYNX_VERSION + '-setup' Compression=lzma SolidCompression=yes +PrivilegesRequired=none [Languages] Name: "english"; MessagesFile: "compiler:Default.isl" diff --git a/PACKAGE/lynx.nsi b/PACKAGE/lynx.nsi index 4aae5a34..bbacb3ec 100644 --- a/PACKAGE/lynx.nsi +++ b/PACKAGE/lynx.nsi @@ -1,4 +1,4 @@ -; $LynxId: lynx.nsi,v 1.8 2013/10/13 21:28:18 tom Exp $ +; $LynxId: lynx.nsi,v 1.9 2013/10/17 00:52:26 tom Exp $ ; Script originally generated with the Venis Install Wizard, but customized. ; The Inno Setup script is preferred; but this can be built via cross-compiling. @@ -23,6 +23,8 @@ InstallDir "$PROGRAMFILES\${INSTALL}" InstallDirRegKey HKLM "Software\${SUBKEY}" "$INSTDIR\bin" OutFile "NSIS-Output\${APPNAME}-${VERSION}-setup.exe" +RequestExecutionLevel highest + CRCCheck on SetCompressor /SOLID lzma diff --git a/lynx_help/keystrokes/edit_help.html b/lynx_help/keystrokes/edit_help.html index 7fa146d8..9a9773fb 100644 --- a/lynx_help/keystrokes/edit_help.html +++ b/lynx_help/keystrokes/edit_help.html @@ -1,4 +1,4 @@ -<!-- $LynxId: edit_help.html,v 1.14 2013/05/21 10:51:27 tom Exp $ --> +<!-- $LynxId: edit_help.html,v 1.15 2013/10/16 22:44:55 tom Exp $ --> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> <html> @@ -18,10 +18,10 @@ <p>Lynx invokes a built-in <em>Line Editor</em> for entering strings in response to prompts, in forms, and for email messages if an external editor has not been defined. Alternative key - bindings can be offered by configuring with --enable-alt-bindings - or by adding them in LYEditmap.c before compiling Lynx. If - available, they may be selected via the 'o'ptions menu, or by - editing lineedit_mode in the '.lynxrc' file.</p> + bindings are normally available (unless Lynx was configured with + <code>--disable-alt-bindings</code>). If available, they may be + selected via the 'o'ptions menu, or by editing lineedit_mode in + the '.lynxrc' file.</p> <p>Two such alternative key bindings, which may be available on your system, are the <a href="alt_edit_help.html">Alternative diff --git a/makefile.in b/makefile.in index 3324fd0c..f701baa2 100644 --- a/makefile.in +++ b/makefile.in @@ -1,4 +1,4 @@ -# $LynxId: makefile.in,v 1.131 2013/10/09 12:27:54 tom Exp $ +# $LynxId: makefile.in,v 1.132 2013/10/16 10:45:19 tom Exp $ ##makefile for lynx SHELL = @CONFIG_SHELL@ @@ -384,7 +384,7 @@ help_files.sed : makefile $(srcdir)/lynx_help/help_files.txt -e 's%\(.*\)=\(.*\.html\)$$%s=\2=\2$(COMPRESS_EXT)=g%' \ -e 's%\.html=%\\.html=%' \ help_files.tmp | $(FIX_SED) >> $@ - @ECHO_CC@if test -n "$(COMPRESS_EXT)"; then echo 's%\$(COMPRESS_EXT)\$(COMPRESS_EXT)%$(COMPRESS_EXT)%g' >> $@; fi + @ECHO_CC@if test -n "$(COMPRESS_EXT)"; then echo 's%\\(\$(COMPRESS_EXT)\\)*\$(COMPRESS_EXT)%$(COMPRESS_EXT)%g' >> $@; fi @-rm -f help_files.tmp install-help : $(CFG2HTML) help_files.sed $(HELPDIR) diff --git a/samples/lynx.bat b/samples/lynx.bat index 368145e5..6076cf8d 100644 --- a/samples/lynx.bat +++ b/samples/lynx.bat @@ -1,5 +1,5 @@ @echo off -@rem $LynxId: lynx.bat,v 1.2 2013/10/10 09:25:44 tom Exp $ +@rem $LynxId: lynx.bat,v 1.3 2013/10/17 09:02:20 tom Exp $ @rem Claudio Santambrogio setlocal set TERM=vt100 @@ -7,5 +7,5 @@ set HOME=%CD% set TEMP=%HOME%\tmp set LYNX_CFG=%HOME%\lynx-demo.cfg set LYNX_LSS=%HOME%\opaque.lss -%HOME%\lynx.exe %1 %2 %3 %4 %5 +"%HOME%\lynx.exe" %1 %2 %3 %4 %5 endlocal diff --git a/samples/oldlynx.bat b/samples/oldlynx.bat index 115c1eb2..955ae992 100644 --- a/samples/oldlynx.bat +++ b/samples/oldlynx.bat @@ -1,5 +1,5 @@ @ECHO OFF -@rem $LynxId: oldlynx.bat,v 1.1 2013/10/10 09:09:58 tom Exp $ +@rem $LynxId: oldlynx.bat,v 1.3 2013/10/17 09:38:40 tom Exp $ @rem demonstrate lynx without color-style -TD setlocal @@ -10,13 +10,13 @@ set TEMP=%HOME%\tmp set LYNX_CFG=%HOME%\oldlynx.cfg set LYNX_LSS= -if exist %LYNX_CFG% goto done +if exist "%LYNX_CFG%" goto done -echo "DEFAULT_COLORS:off" >>%LYNX_CFG% -echo "include:lynx-demo.cfg" >>%LYNX_CFG% -echo "COLOR_STYLE:" >>%LYNX_CFG% -echo "NESTED_TABLES:off" >>%LYNX_CFG% +echo "DEFAULT_COLORS:off" >>"%LYNX_CFG%" +echo "include:lynx-demo.cfg" >>"%LYNX_CFG%" +echo "COLOR_STYLE:" >>"%LYNX_CFG%" +echo "NESTED_TABLES:off" >>"%LYNX_CFG%" :done -%HOME%\lynx.exe -lss="" %1 %2 %3 %4 %5 %6 %7 %8 %9 +"%HOME%\lynx.exe" -lss="" %1 %2 %3 %4 %5 %6 %7 %8 %9 endlocal diff --git a/src/LYUtils.c b/src/LYUtils.c index 856cd41f..8256e44b 100644 --- a/src/LYUtils.c +++ b/src/LYUtils.c @@ -1,5 +1,5 @@ /* - * $LynxId: LYUtils.c,v 1.251 2013/10/13 20:23:07 tom Exp $ + * $LynxId: LYUtils.c,v 1.253 2013/10/18 00:39:19 tom Exp $ */ #include <HTUtils.h> #include <HTTCP.h> @@ -250,6 +250,35 @@ static int w32_get_reg_sz(HKEY hkey, const char *name, char *value, unsigned len } return result; } + +static char *w32_get_shell_folder(const char *name) +{ + static HKEY rootkey = HKEY_CURRENT_USER; + + char *result = 0; + HKEY hkey; + char buffer[LY_MAXPATH]; + + if (RegOpenKeyEx(rootkey, + W32_STRING("Software" + "\\Microsoft" + "\\Windows" + "\\CurrentVersion" + "\\Explorer" + "\\Shell Folders"), + 0, + KEY_READ, + &hkey) == ERROR_SUCCESS) { + if (w32_get_reg_sz(hkey, name, buffer, sizeof(buffer)) == ERROR_SUCCESS) { + + result = strdup(buffer); + (void) RegCloseKey(hkey); + } + + (void) RegCloseKey(hkey); + } + return non_empty(result) ? result : 0; +} #endif /* @@ -5119,6 +5148,7 @@ static char *CheckDir(char *path) || !S_ISDIR(stat_info.st_mode))) { path = NULL; } + CTRACE((tfp, "CheckDir(%s) %s\n", path, path ? "OK" : "ERR")); return path; } @@ -5135,10 +5165,18 @@ static char *HomeEnv(void) char *leaf; static char *temp = NULL; - /* Windows 2000 */ - if ((result = LYGetEnv("USERPROFILE")) != 0) { - HTSprintf0(&temp, "%s%sMy Documents", result, PATHSEP_STR); - result = CheckDir(temp); + result = w32_get_shell_folder("Personal"); + if (result == 0) { + /* Windows Vista/7 */ + if ((head = LYGetEnv("USERPROFILE")) != 0) { + HTSprintf0(&temp, "%s%sDocuments", head, PATHSEP_STR); + result = CheckDir(temp); + if (result == 0) { + /* Windows 2000 */ + HTSprintf0(&temp, "%s%sMy Documents", head, PATHSEP_STR); + result = CheckDir(temp); + } + } } /* NT4 */ if (result == 0) { |