File: /~heha/hs/

A small (4KB) command-line tool that provides a symbolic link to another .EXE file.
Useful for Windows platform implementations of Unix-like projects.
Especially WinAVR, winarm, and mspgcc.
It reduces the disk space footprint of such packages dramatically!

1. Rename symlink.exe to the executable file you will otherwise need to copy
2. Create or open a text file (ANSI encoding) named "symlink.ini"
3. Create a section [exe], if not already available
4. Create a line of form <source file name> = <destination file name>

The <destination file name> can have a relative or absolute path.
It does not need to end with .exe
One asterisk (*) will be replaced by the <source file name>.

Multiple redirections can be made with asterisk as <source file name>.

Example for symlink.ini content:





The "symlink.ini" file cannot contain characters outside current ANSI character set.
However, the absolute (full) path is allowed to contain non-ANSI characters
for the Unicode version of symlink.exe. (This applies to NT based systems.)

The "=" is not allowed in link names.

The "symlink.ini" file must reside in the same directory
as the renamed symlink.exe file(s).

Automatic ANSI/UNICODE switching is currently not implemented.

Symlink.exe is a console program.
It will open a useless console if used for GUI programs.

This program creates a sub-process and awaits its termination.

heha, 101121

Nonsense on modern systems as these all support true symbolic or hard links.
	symlink.exe is for FAT drives.
On Windows and NTFS, “mklink” does the job, with some weird command-line options.
On Linux, “ln linktarget newfilename” does the job:
	As a rule, the “ln” syntax is similar to “cp”.

Unluckily, well-known zip archives are not suited to store (and restore)
linked files. Therefore, binary distributions should either not use
duplicated files at all, use a suitable archive format and extractor,
or create links (or copies on FAT) at install or first-invocation time.

heha, 230106
Detected encoding: UTF-80