Releases: JFLarvoire/SysToolsLib
Lots of new tools, and big improvements to old ones
- TclSetup.bat is a new script for configuring Windows to run *.tcl files as command-line scripts, and *.tk as windowed scripts.
It's a much improved version of the old setup code that was in thetclsh.bat -s
script, that should also be easier to use.
Runtclsetup
to test the current configuration;tclsetup -v
for detailed explanations;tclsetup -s
to configure Tcl as proposed. - lower.tcl, upper.tcl, camel.tcl are three trivial scripts for converting text to lower case, UPPER CASE, and Camel Case respectively.
They're useful to convert text case in Windows apps that don't have that built-in capability. Ex: In web pages input fields:
Select the text to convert; Copy it to the clipboard; Run12 lower
; Paste the updated clipboard back into the form. - history.bat displays the command history, like the history command in Linux.
Major changes:
- ShadowCopy.ps1 has new options -Mount, -Dismount, -Previous, and -Restore.
This makes it easy to browse the previous files versions, and restore one of them. See the built-in help for details. - 12.bat now temporarily switches to code page 65001, to avoid losing Unicode characters not in the current cmd shell code page.
- Ag.exe has been updated to master version 2.2.0, and now uses the new pthreads4w library version 3.0.0.
- update.exe has a new option -e to erase target files not in the source directory.
- hosts.bat is not dependent on elevate.exe anymore, when run as administrator. Plus several new options.
- regx.bat has a new md command to create a registry key.
- TimeX.bat option -t now displays the start and end times of eXecuted programs.
- tclsh.bat has an improved tclsh.exe search routine, and all the setup code has been removed (as a much better version is available in TclSetup.bat).
Plus lots of other small changes and fixes.
> 260-char paths support, I said really!
I thought I had it right in release 1.10 already...
Shame on me, there were still bugs with long path > 260 characters in some tools.
- Fixed long path > 260 bytes support in dirc.exe, dirsize.exe, truename.exe.
They now handle and display these paths correctly in any version of Windows.
Tested with many paths up to 450 bytes.
Note that other related tools like update.exe, zap.exe, md.exe, rd.exe worked right already indeed. :-) - Partially fixed it in redo.exe: Due to Windows limitations, it's still generally not
possible to change the current directory to paths > 260 bytes. But the updated redo.exe
can now generate commands with correct long paths, when using the {} argument replacement. - There's still a known problem with backnum.exe. It will be fixed in a future release.
Then one new program
- font.exe lists available fonts and some of their properties.
The -f option is useful to see the fixed-width fonts available in the console:
If available, I recommend using "Lucida Console" for all european and american users,
as it supports all latin, greek, cyrillic, and hebrew characters in any code page.
Finally the sml2.exe program introduced last time has several improvements and bugs fixes.
It's still not as reliable as sml.tcl though.
New tools, and original new features in a very old one
New tools, and original new features in a very old one
-
which.exe: Two significant new features, without equivalent in the original Unix command:
-
A new
-l
option for listing files like thels -l
command.
This is useful in combination with the-a
option to diagnose a common problem:
Why isn't it the new tool that I just built and installed that runs?Example in Windows:
C:\JFL\Temp>which -a -l which 2018-03-22 17:41:50 C:\JFL\Tools\WIN64\which.exe 2018-03-22 17:41:48 C:\JFL\Tools\WIN32\which.exe 2010-05-18 16:38:26 C:\JFL\Tools\WIN32\which.bat 2012-12-17 07:06:47 C:\JFL\Tools\ezWinPorts\Win32\bin\which.exe 1999-11-10 23:00:00 C:\JFL\Tools\UnxUtils\usr\local\wbin\which.exe 2008-08-10 16:23:23 C:\JFL\Tools\GnuWin32\bin\which.exe
Example in Linux: (Notice the capital W in Which, to avoid conflicts with the native which.)
larvoire@JFLZB:/JFL/Temp$ Which -a -l which 2016-01-26 19:17:55 /usr/bin/which -> /bin/which 2016-01-26 19:17:55 /bin/which
Notice that the timestamp is that of the final executable file, not that of the link.
This is on purpose, as we want to easily understand which executable is the newest. -
A new
-v
option for adding verbose comments about why some files were rejected. Implies the-l
option.
Again, this is useful to diagnose common issues, like PowerShell or Bash ignoring the program in the current directory, or Unix shells ignoring files that are not marked executable.Example in Windows:
PS C:\JFL\Temp> which -a -v ag # 2018-03-14 12:52:54 .\ag.exe # PowerShell does not search in "." 2018-03-16 11:55:29 C:\JFL\Tools\WIN64\ag.exe 2018-03-16 11:55:28 C:\JFL\Tools\WIN32\ag.exe
Example in Linux: (Notice the capital W in Which, to avoid conflicts with the native which.)
larvoire@JFLZB:/JFL/Temp$ Which -v README # 2018-03-26 12:16:24 /usr/local/bin/README # Not executable
-
-
2note.exe: A new tool to pipe the output of a command directly into a new instance of Notepad.
This is useful when running a command outputing a lot of data, possibly more than the console buffer can hold, and you want to review it before throwing it away.
Ex:my_huge_build_command | 2note
-
sml2.exe: A rewrite of the sml.tcl tool in C, based on the libxml2 library.
Advantages: Much faster than sml.tcl; Additional options for using libxml2 filtering and reformatting capabilities.
Drawbacks: Does not preserve non-significant spaces, so files converted twice may not be binary identical to the original file. (although they're logically identical). -
mountw.bat & umountw.bat: New tools for easily mounting and unmounting Windows Images (*.wim files).
Useful when managing a Windows Deployment Server, to customize boot and install images with your favorite tools. -
codepage.exe: Now displays the console font, and outputs a warning if the console font is a raster font that cannot display all characters in the current code page.
Under the hood, there were many improvements in the make system.
This new release was built with Visual Studio 8/2005 and Visual Studio 15/2017.
And it's the first time in 30 years that it entirely builds without any warning. :-)
Several new tools
New tools:
- ag.exe: The Silver Searcher port for Windows, with support for links, junctions, long pathnames, Unicode names and content.
Previously available separately in https://github.com/JFLarvoire/the_silver_searcher/releases.
Now included in SysToolsLib releases for convenience. - Get-Console.ps1: A tool for capturing the console screen as HTML or RTF or text, and copying it to the clipboard or a file.
The default is HTML output to the clipboard, optimized for pasting into Word and Outlook.
The nice thing is that it’s not an image that's captured, it’s editable text. So you can copy text from the screen capture. Or you can remove unwanted text, like passwords, etc. - CheckEOL.bat: Check the line ending type (Windows/Unix/Mac) for a set of files.
Useful to detect and correct wrong line endings in files downloaded from GitHub ;-) - vcvars.bat: Run vcvarsall.bat for the latest Visual C++ installed.
Avoid wasting time searching where Visual C++ is installed. - b64dec.tcl: The library included a useless b64dec.bat, instead of b64dec.tcl that did the real job.
- b64enc.tcl: A base64 encoder, symmetric to b64dec.tcl
Changes to existing tools:
- 1clip.exe: Added option -r to get RTF from the clipboard.
- 2clip.exe: Added options -h and -r to respectively send HTML and RTF to the clipboard.
- which.exe: Also search for shell internal commands. Added options -i and -I to enable (default) or disable that feature.
- PSService.ps1: Added the ability to run the service as a different user.
- Make system: Now output all files in bin\WIN32, bin\WIN64, etc.
And as usual many bug fixes and minor improvements.
Support for pathnames >= 260 characters, really!
This release fixes several serious bugs in the MsvcLibX library, that caused failures for paths > 260 characters in Windows. Also it contains WIN64 executables, along with the DOS+WIN32 ones as before.
(The long pathname support worked for file names that passed the 260 characters threshold, but not for directory names that did :-( )
Now tested extensively with deeply nested paths up to 400 characters, and with the new md.exe and rd.exe tools.
These new tools were created for testing the fixes for the above problems, but they'll be handy for all Windows and Linux users alike:
- md.exe: Creates a directory, all its parents, and doesn't complain if any exists.
The verbose mode displays the list of directories actually created, possibly none. - rd.exe: Removes a directory, without complaining if it is already absent.
The force mode removes all contents recursively. Dangerous!
The no-exec mode allows testing what would be deleted. Recommended before using the force mode!
The verbose mode displays the list of all files and directories actually removed, possibly none.
In Windows, rd.exe will be the only way to get rid of very deeply nested directories, as both cmd.exe internal's RD command, and Windows Explorer GUI, are broken and will refuse to do it.
In Linux, md and rd will be shorter to type than the standard mkdir and rmdir, and the verbose and no-exec modes have no equivalent.
New tools, plus The Silver Searcher
New tools
- PySetup.bat: A new tool for configuring *.py scripts to use one of the Python interpreters available.
- regsub.tcl: A new tool to change text using regular expressions.
- subcmd.bat: A new tool to start a sub cmd shell, changing the prompt to show the shell depth level and modes.
- wm.bat: A new tool to invoke WinMerge, even if it's not in the PATH.
There's also one new associated tool, called The Silver Searcher, alias ag,
available separately there:
ag.exe is a windows port of a very fast open-source search tool, using MsvcLibX.
=> It inherits MsvcLibX support for Unicode, pathnames up to 64KB, junctions, symlinks.
Main changes
- sector.exe: Added support for floppy disks.
- *.exe: Many tools -V option now display the MsvcLibX and SysLib libraries versions.
And as usual, there are many bugs fixed and small improvements. See /NEWS.md for details.
Full Unicode output support, and old libraries
- One major change to MsvcLibX.Lib
- All output to the console is now done as UTF-16. This ensures that all tools display Unicode characters correctly in any Windows code page (not new) even if they're not part of the current code page (that's new!).
- One more tool:
- codepage.exe gives you information about the current code page, or displays characters in other code pages. (Very instructive)
- New libraries from a distant past
- Bios.Lib: A library of routines for writing C programs running in the legacy BIOS:
Option ROMs, OS boot loaders, MS-DOS drivers and TSRs. - LoDos.Lib: A library of routines for the specific needs of MS-DOS drivers and TSRs.
- PModeLib: A library of routines for managing the x86 processor protected mode.
- Bios.Lib: A library of routines for writing C programs running in the legacy BIOS:
And as usual many small improvements and bug fixes.
Version 1.8.1 fixes a couple of bugs in 1.8:
- One that caused command-line arguments to be lost in some cases.
- The other that caused the debug output in the (unreleased) debug versions of the programs to be lost.
New tools and a simplified make system
In addition to the many small bug fixes and improvements, this release brings
New tools
- C/SRC/inicomp.c: A tool for comparing .ini or .reg files. Useful to detect changes in the Windows registry. (Windows, Linux)
- C/SRC/msgbox.c: A tool for displaying various types of Windows Message Boxes from batch files. (Windows)
- Tcl/nlines.tcl: A tool for counting non-commented source lines in C/Bash/Batch/PowerShell/Tcl. (Windows, Linux)
Main other changes
- Simplified make system, allowing to build all libraries and tools with a single configure and make commands, in both Windows and Linux.
- Added make inference rules to build WIN32 and WIN64 assembly language programs. (There were only 16-bits rules for DOS.)
- Batch/Library.bat: Can now be sourced from another batch script.
- Batch/regx.bat: Added commands rd and del to delete keys and values. Fixed bugs with key names and values containing batch-allergenic characters: ^!%
New SysLib library, and 4 tools using it
Major new features:
- A new C library called SysLib, that defines general purpose system management routines (Ex: SMBIOS management), and C/C++ programmer help (Ex: A 64-bits QWORD class for DOS; An oprintf routine that brings the convenience for formatted printf() to all C++ objects). See the README in C/SysLib for details.
- 4 new C programs that depend on SysLib:
- gpt.exe: Manage GUID partition tables.
- sector.exe: Read/Write physical hard disk sectors.
- smbios.exe: List and decode SMBIOS tables.
- uuid.exe: Manage UUIDs, including the PC motherboard UUID.
- Improved make files for both Windows and Linux, that allow to rebuild everything in a single make command.
Ultimate version with just the MsvcLibX C library
Same programs as in version 1.5.1.
Improved make system, with...
- Common scripts and make files moved to a new global C/include directory. This avoids duplicating them everywhere.
- Idem for the debugm.h include file, which was necessary for Linux builds, contrary to the rest of the MsvcLibX library.
- New recursive make files in the C directory, allowing to rebuild all libraries and tools in both Windows and Linux with a single make command.