Skip to content

Commit

Permalink
updated .md files
Browse files Browse the repository at this point in the history
  • Loading branch information
michelou committed Jul 30, 2023
1 parent 1738cd5 commit 74bbf70
Show file tree
Hide file tree
Showing 12 changed files with 76 additions and 57 deletions.
12 changes: 6 additions & 6 deletions MSI.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,14 +119,14 @@ Now we look at the contents of our <a href="./scala2-examples/README.md">Scala 2
</pre>
</dd>
<dd>
As next example we look at the contents of the sbt Windows installer named <a href="https://github.com/sbt/sbt/releases/tag/v1.7.1"><code>sbt-1.7.1.msi</code></a> :
As next example we look at the contents of the sbt Windows installer named <a href="https://github.com/sbt/sbt/releases/tag/v1.9.3"><code>sbt-1.9.3.msi</code></a> :
</dd>
<dd>
<pre style="font-size:80%;">
<b>&gt; <a href="https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/msiexec">msiexec</a> /a <a href="https://github.com/sbt/sbt/releases/tag/v1.5.8">sbt-1.7.1.msi</a> ^<br/> /qn TARGETDIR=c:\Temp\unpacked</b>
<b>&gt; <a href="https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/msiexec">msiexec</a> /a <a href="https://github.com/sbt/sbt/releases/tag/v1.9.3">sbt-1.9.3.msi</a> ^<br/> /qn TARGETDIR=c:\Temp\unpacked</b>
&nbsp;
<b>&gt; <a href="https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/tree">tree</a> /f c:\Temp\unpacked | <a href="https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/findstr">findstr</a> /v /b [a-z]</b>
│ sbt-1.7.1.msi
│ sbt-1.9.3.msi
└───<b>PFiles</b>
└───<b>sbt</b>
│ LICENSE
Expand All @@ -142,7 +142,7 @@ As next example we look at the contents of the sbt Windows installer named <a hr
</pre>
</dd></dl>

> **:mag_right:** We observe that the two *experimental* thin clients `sbtn-x86_64-apple-darwin` (MacOS executable) and `sbtn-x86_64-pc-linux` (Linux executable) are present in Zip file [`sbt-1.8.2.zip`](https://github.com/sbt/sbt/releases/tag/v1.8.2) but not in MSi file [`sbt-1.8.2.msi`](https://github.com/sbt/sbt/releases/tag/v1.8.2); that's fine !
> **:mag_right:** We observe that the two *experimental* thin clients `sbtn-x86_64-apple-darwin` (MacOS executable) and `sbtn-x86_64-pc-linux` (Linux executable) are present in Zip file [`sbt-1.9.3.zip`](https://github.com/sbt/sbt/releases/tag/v1.9.3) but not in MSi file [`sbt-1.9.3.msi`](https://github.com/sbt/sbt/releases/tag/v1.9.3); that's fine !
<dl><dd>
Finally we extract the contents of the Java 11 Windows installer named <a href="https://adoptium.net/archive.html?variant=openjdk11&jvmVariant=hotspot"><code>OpenJDK11U-jdk_x64_windows_hotspot_11.0.16_8.msi</code></a> :
Expand Down Expand Up @@ -186,7 +186,7 @@ Software distributions can be installed in several ways, not necessarily using M
<td></td>
</tr>
<tr>
<td><a href="https://github.com/bazelbuild/bazel/releases">Bazel 6.0</a></td>
<td><a href="https://github.com/bazelbuild/bazel/releases">Bazel 6.3</a></td>
<td style="text-align:center;"><b>x</b></td>
<td style="text-align:center;"><b>x</b></td>
<td></td>
Expand Down Expand Up @@ -258,7 +258,7 @@ Software distributions can be installed in several ways, not necessarily using M

***

*[mics](https://lampwww.epfl.ch/~michelou/)/April 2023* [**&#9650;**](#top)
*[mics](https://lampwww.epfl.ch/~michelou/)/August 2023* [**&#9650;**](#top)
<span id="bottom">&nbsp;</span>

<!-- link refs -->
Expand Down
2 changes: 1 addition & 1 deletion QUICKREF.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ BuildNumber Caption Version OSArchitecture

***

*[mics](https://lampwww.epfl.ch/~michelou/)/April 2023* [**&#9650;**](#top)
*[mics](https://lampwww.epfl.ch/~michelou/)/August 2023* [**&#9650;**](#top)
<span id="bottom">&nbsp;</span>

<!-- link refs -->
Expand Down
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# <span id="top">Playing with WiX on Windows</span>
# <span id="top">Playing with WiX Toolset on Windows</span>

<table style="font-family:Helvetica,Arial;line-height:1.6;">
<tr>
Expand All @@ -9,13 +9,13 @@
</tr>
</table>

[Ada][ada_examples], [Akka][akka_examples], [C++][cpp_examples], [Dart][dart_examples], [Deno][deno_examples], [Flix][flix_examples], [Golang][golang_examples], [GraalVM][graalvm_examples], [Haskell][haskell_examples], [Kafka][kafka_examples], [Kotlin][kotlin_examples], [LLVM][llvm_examples], [Rust][rust_examples], [Scala 3][scala3_examples], [Spark][spark_examples], [Spring][spring_examples] and [TruffleSqueak][trufflesqueak_examples] are other trending topics we are continuously monitoring.
[Ada][ada_examples], [Akka][akka_examples], [C++][cpp_examples], [Dart][dart_examples], [Deno][deno_examples], [Docker][docker_examples], [Flix][flix_examples], [Golang][golang_examples], [GraalVM][graalvm_examples], [Haskell][haskell_examples], [Kafka][kafka_examples], [Kotlin][kotlin_examples], [LLVM][llvm_examples], [Rust][rust_examples], [Scala 3][scala3_examples], [Spark][spark_examples], [Spring][spring_examples] and [TruffleSqueak][trufflesqueak_examples] are other trending topics we are continuously monitoring.

## <span id="proj_deps">Project dependencies</span>

This project depends on two external software for the **Microsoft Windows** platform:

- [Git 2.40][git_downloads] ([*release notes*][git_relnotes])
- [Git 2.41][git_downloads] ([*release notes*][git_relnotes])
- [WiX Toolset 3.11][wix3_downloads] ([*release notes*][wix3_relnotes])

Optionally one may also install the following software:
Expand All @@ -28,10 +28,10 @@ Optionally one may also install the following software:
> **&#9755;** ***Installation policy***<br/>
> When possible we install software from a [Zip archive][zip_archive] rather than via a Windows installer. In our case we defined **`C:\opt\`** as the installation directory for optional software tools (*similar to* the [`/opt/`][linux_opt] directory on Unix).
For instance our development environment looks as follows (*April 2023*) <sup id="anchor_05">[5](#footnote_05)</sup>:
For instance our development environment looks as follows (*August 2023*) <sup id="anchor_05">[5](#footnote_05)</sup>:

<pre style="font-size:80%;">
C:\opt\Git-2.40.0\ <i>(314 MB)</i>
C:\opt\Git-2.41.0\ <i>(314 MB)</i>
C:\opt\ImageMagick-7.1.0-Q16\ <i>(300 MB)</i>
C:\opt\WiX-3.11.2\ <i>( 99 MB)</i>
C:\Program Files (x86)\instedit.com\InstEd\ <i>( 7 MB)</i>
Expand Down Expand Up @@ -89,12 +89,12 @@ Command [**`setenv.bat`**](setenv.bat) is executed once to setup our development
Tool versions:
candle 3.11.2.4516, light 3.11.2.4516,
msiinfo 5.0, uuidgen v1.01
magick 7.1.0-7, git 2.40.0.windows.1, diff 3.9
magick 7.1.0-7, git 2.41.0.windows.1, diff 3.9
&nbsp;
<b>&gt; <a href="https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/where" rel="external">where</a> msiinfo git</b>
C:\Program Files (x86)\Windows Kits\10\bin\10.0.22000.0\x86\MsiInfo.exe
C:\opt\Git-2.40.0\bin\git.exe
C:\opt\Git-2.40.0\mingw64\bin\git.exe
C:\opt\Git-2.41.0\bin\git.exe
C:\opt\Git-2.41.0\mingw64\bin\git.exe
</pre>

## <span id="footnotes">Footnotes</span> [**&#x25B4;**](#top)
Expand Down Expand Up @@ -138,7 +138,7 @@ In our case we downloaded the following installation files (see <a href="#proj_d
<dd>
<pre style="font-size:80%;">
<a href="https://imagemagick.org/script/download.php#windows">ImageMagick-7.1.0-portable-Q16-x64.zip</a> <i>(111 MB)</i>
<a href="https://git-scm.com/download/win">PortableGit-2.40.0-64-bit.7z.exe</a> <i>( 44 MB)</i>
<a href="https://git-scm.com/download/win">PortableGit-2.41.0-64-bit.7z.exe</a> <i>( 44 MB)</i>
vs_2019_community.exe <i>(1.7 GB)</i>
<a href="https://developer.microsoft.com/en-us/windows/downloads/windows-sdk/">winsdksetup.exe</a> <i>( 1 MB)</i>
<a href="https://github.com/wixtoolset/wix3/releases">wix311-binaries.zip</a> <i>( 33 MB)</i>
Expand Down Expand Up @@ -171,7 +171,7 @@ Concretely, <code>setenv.bat</code> in our GitHub projects which depend on Visua

***

*[mics](https://lampwww.epfl.ch/~michelou/)/April 2023* [**&#9650;**](#top)
*[mics](https://lampwww.epfl.ch/~michelou/)/August 2023* [**&#9650;**](#top)
<span id="bottom">&nbsp;</span>

<!-- link refs -->
Expand All @@ -188,7 +188,7 @@ Concretely, <code>setenv.bat</code> in our GitHub projects which depend on Visua
[git_downloads]: https://git-scm.com/download/win
[git_scm]: https://git-scm.com/
[github_markdown]: https://github.github.com/gfm/
[git_relnotes]: https://raw.githubusercontent.com/git/git/master/Documentation/RelNotes/2.40.0.txt
[git_relnotes]: https://raw.githubusercontent.com/git/git/master/Documentation/RelNotes/2.41.0.txt
[golang_examples]: https://github.com/michelou/golang-examples
[graalvm_examples]: https://github.com/michelou/graalvm-examples
[gui]: https://en.wikipedia.org/wiki/Graphical_user_interface
Expand Down
2 changes: 1 addition & 1 deletion RESOURCES.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ version = "12"

***

*[mics](https://lampwww.epfl.ch/~michelou/)/April 2023* [**&#9650;**](#top)
*[mics](https://lampwww.epfl.ch/~michelou/)/August 2023* [**&#9650;**](#top)
<span id="bottom">&nbsp;</span>

<!-- link refs -->
Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ Figures **1.1** to **1.2** below show that a digital signature was indeed added

***

*[mics](https://lampwww.epfl.ch/~michelou/)/April 2023* [**&#9650;**](#top)
*[mics](https://lampwww.epfl.ch/~michelou/)/August 2023* [**&#9650;**](#top)
<span id="bottom">&nbsp;</span>

<!-- link refs -->
Expand Down
4 changes: 2 additions & 2 deletions SETUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ dark.exe
insignia.exe
<a href="https://wixtoolset.org/documentation/manual/v3/overview/light.html">light.exe</a> <i>(linker)</i>
lit.exe
lux.exe
<a href="https://wixtoolset.org/docs/v3/overview/lux/">lux.exe</a>
melt.exe
nit.exe
pyro.exe
Expand Down Expand Up @@ -49,7 +49,7 @@ C:\opt\Wix-3.11.2

***

*[mics](https://lampwww.epfl.ch/~michelou/)/April 2023* [**&#9650;**](#top)
*[mics](https://lampwww.epfl.ch/~michelou/)/August 2023* [**&#9650;**](#top)
<span id="bottom">&nbsp;</span>

<!-- link refs -->
Expand Down
2 changes: 1 addition & 1 deletion examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ Since the original application (resp. its source files) is not available we must

***

*[mics](https://lampwww.epfl.ch/~michelou/)/April 2023* [**&#9650;**](#top)
*[mics](https://lampwww.epfl.ch/~michelou/)/August 2023* [**&#9650;**](#top)
<span id="bottom">&nbsp;</span>

<!-- link refs -->
Expand Down
2 changes: 1 addition & 1 deletion firegiant-examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ A <a href="http://guid.one/guid" rel="external">GUID</a> is a 128-bit integer (1

***

*[mics](https://lampwww.epfl.ch/~michelou/)/April 2023* [**&#9650;**](#top)
*[mics](https://lampwww.epfl.ch/~michelou/)/August 2023* [**&#9650;**](#top)
<span id="bottom">&nbsp;</span>

<!-- link refs -->
Expand Down
2 changes: 1 addition & 1 deletion myexamples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ A <a href="http://guid.one/guid" rel="external">GUID</a> is a 128-bit integer (1

***

*[mics](https://lampwww.epfl.ch/~michelou/)/February 2023* [**&#9650;**](#top)
*[mics](https://lampwww.epfl.ch/~michelou/)/August 2023* [**&#9650;**](#top)
<span id="bottom">&nbsp;</span>

<!-- link refs -->
Expand Down
6 changes: 3 additions & 3 deletions scala2-examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ C:\Program Files\Scala 2\bin\scala.bat
<b>&gt; <a href="https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/set_1">set</a> JAVA_HOME=c:\opt\<a href="https://bell-sw.com/pages/downloads/#/java-8-lts">jdk-bellsoft-1.8.0u312</a></b>
&nbsp;
<b>&gt; scala -version</b>
Scala code runner version 2.13.8 -- Copyright 2002-2021, LAMP/EPFL and Lightbend, Inc.
Scala code runner version 2.13.11 -- Copyright 2002-2023, LAMP/EPFL and Lightbend, Inc.
</pre>
</dd></dl>

Expand All @@ -487,7 +487,7 @@ Unfortunately each Windows installer suggests a <i>different</i> default install
</tr>
<tr>
<td style="padding:6px;"><a href="https://github.com/corretto/corretto-11/releases">Amazon Corretto 11</a></td>
<td style="padding:6px;"><code>Amazon Corretto\jdk11.0.16_8\</code></td>
<td style="padding:6px;"><code>Amazon Corretto\jdk11.0.20_8\</code></td>
</tr>
<tr>
<td style="padding:6px;"><a href="https://github.com/corretto/corretto-17/releases">Amazon Corretto 17</a></td>
Expand Down Expand Up @@ -575,7 +575,7 @@ Usage: build { &lt;option&gt; | &lt;subcommand&gt; }

***

*[mics](https://lampwww.epfl.ch/~michelou/)/March 2023* [**&#9650;**](#top)
*[mics](https://lampwww.epfl.ch/~michelou/)/August 2023* [**&#9650;**](#top)
<span id="bottom">&nbsp;</span>

<!-- link refs -->
Expand Down
2 changes: 1 addition & 1 deletion scala3-examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ Usage: build { &lt;option&gt; | &lt;subcommand&gt; }

***

*[mics](https://lampwww.epfl.ch/~michelou/)/March 2023* [**&#9650;**](#top)
*[mics](https://lampwww.epfl.ch/~michelou/)/August 2023* [**&#9650;**](#top)
<span id="bottom">&nbsp;</span>

<!-- link refs -->
Expand Down
75 changes: 47 additions & 28 deletions setenv.bat
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ goto end
@rem output parameters: _BASENAME, _DEBUG_LABEL, _ERROR_LABEL, _WARNING_LABEL
:env
set _BASENAME=%~n0
set _DRIVE_NAME=W
set "_ROOT_DIR=%~dp0"

call :env_colors
Expand Down Expand Up @@ -110,7 +109,7 @@ set _STRONG_BG_BLUE=
goto :eof

@rem input parameter: %*
@rem output parameter: _HELP, _VERBOSE
@rem output parameters: _HELP, _VERBOSE
:args
set _HELP=0
set _VERBOSE=0
Expand Down Expand Up @@ -141,55 +140,75 @@ if "%__ARG:~0,1%"=="-" (
shift
goto args_loop
:args_done
call :subst %_DRIVE_NAME% "%_ROOT_DIR%"
call :drive_name "%_ROOT_DIR%"
if not %_EXITCODE%==0 goto :eof
if %_DEBUG%==1 (
echo %_DEBUG_LABEL% Options : _HELP=%_HELP% _VERBOSE=%_VERBOSE% 1>&2
echo %_DEBUG_LABEL% Variables: _DRIVE_NAME=%_DRIVE_NAME% 1>&2
)
goto :eof

@rem input parameter(s): %1: drive letter, %2: path to be substituted
:subst
set __DRIVE_NAME=%~1
set "__GIVEN_PATH=%~2"
@rem input parameter: %1: path to be substituted
@rem output parameter: _DRIVE_NAME
:drive_name
set "__GIVEN_PATH=%~1"

if not "%__DRIVE_NAME:~-1%"==":" set __DRIVE_NAME=%__DRIVE_NAME%:
if /i "%__DRIVE_NAME%"=="%__GIVEN_PATH:~0,2%" goto :eof

if "%__GIVEN_PATH:~-1%"=="\" set "__GIVEN_PATH=%__GIVEN_PATH:~0,-1%"
if not exist "%__GIVEN_PATH%" (
echo %_ERROR_LABEL% Provided path does not exist ^(%__GIVEN_PATH%^) 1>&2
@rem https://serverfault.com/questions/62578/how-to-get-a-list-of-drive-letters-on-a-system-through-a-windows-shell-bat-cmd
set __DRIVE_NAMES=F:G:H:I:J:K:L:M:N:O:P:Q:R:S:T:U:V:W:X:Y:Z:
for /f %%i in ('wmic logicaldisk get deviceid ^| findstr :') do (
set "__DRIVE_NAMES=!__DRIVE_NAMES:%%i=!"
)
if %_DEBUG%==1 echo %_DEBUG_LABEL% __DRIVE_NAMES=%__DRIVE_NAMES% ^(WMIC^) 1>&2
if not defined __DRIVE_NAMES (
echo %_ERROR_LABEL% No more free drive name 1>&2
set _EXITCODE=1
goto :eof
)
for /f "tokens=1,2,*" %%f in ('subst ^| findstr /b "%__DRIVE_NAME%" 2^>NUL') do (
for /f "tokens=1,2,*" %%f in ('subst') do (
set "__SUBST_DRIVE=%%f"
set "__SUBST_DRIVE=!__SUBST_DRIVE:~0,2!"
set "__SUBST_PATH=%%h"
if "!__SUBST_PATH!"=="!__GIVEN_PATH!" (
set __MESSAGE=
for /f %%i in ('subst ^| findstr /b "%__DRIVE_NAME%\"') do "set __MESSAGE=%%i"
if defined __MESSAGE (
if %_DEBUG%==1 ( echo %_DEBUG_LABEL% !__MESSAGE! 1>&2
) else if %_VERBOSE%==1 ( echo !__MESSAGE! 1>&2
)
if "!__SUBST_DRiVE!"=="!__GIVEN_PATH:~0,2!" (
set _DRIVE_NAME=!__SUBST_DRIVE:~0,2!
if %_DEBUG%==1 ( echo %_DEBUG_LABEL% Select drive !_DRIVE_NAME! for which a substitution already exists 1>&2
) else if %_VERBOSE%==1 ( echo Select drive !_DRIVE_NAME! for which a substitution already exists 1>&2
)
goto :eof
) else if "!__SUBST_PATH!"=="!__GIVEN_PATH!" (
set "_DRIVE_NAME=!__SUBST_DRIVE!"
if %_DEBUG%==1 ( echo %_DEBUG_LABEL% Select drive !_DRIVE_NAME! for which a substitution already exists 1>&2
) else if %_VERBOSE%==1 ( echo Select drive !_DRIVE_NAME! for which a substitution already exists 1>&2
)
goto :eof
)
)
if %_DEBUG%==1 ( echo %_DEBUG_LABEL% subst "%__DRIVE_NAME%" "%__GIVEN_PATH%" 1>&2
) else if %_VERBOSE%==1 ( echo Assign path %__GIVEN_PATH% to drive %__DRIVE_NAME% 1>&2
for /f "tokens=1,2,*" %%i in ('subst') do (
set __USED=%%i
call :drive_names "!__USED:~0,2!"
)
if %_DEBUG%==1 echo %_DEBUG_LABEL% __DRIVE_NAMES=%__DRIVE_NAMES% ^(SUBST^) 1>&2

set "_DRIVE_NAME=!__DRIVE_NAMES:~0,2!"
if /i "%_DRIVE_NAME%"=="%__GIVEN_PATH:~0,2%" goto :eof

if %_DEBUG%==1 ( echo %_DEBUG_LABEL% subst "%_DRIVE_NAME%" "%__GIVEN_PATH%" 1>&2
) else if %_VERBOSE%==1 ( echo Assign path "%__GIVEN_PATH%" to drive %_DRIVE_NAME% 1>&2
)
subst "%__DRIVE_NAME%" "%__GIVEN_PATH%"
subst "%_DRIVE_NAME%" "%__GIVEN_PATH%"
if not %ERRORLEVEL%==0 (
for /f "delims=" %%f in ('subst ^| findstr /b "%__DRIVE_NAME%"') do (
set "__ALREADY_ASSIGNED_PATH=%%f"
)
echo %_ERROR_LABEL% Failed to assign drive %__DRIVE_NAME% to path ^(!__ALREADY_ASSIGNED_PATH:%USERPROFILE%=%%USERPROFILE%%!^) 1>&2 1>&2
echo %_ERROR_LABEL% Failed to assign drive %_DRIVE_NAME% to path 1>&2
set _EXITCODE=1
goto :eof
)
goto :eof

@rem input parameter: %1=Used drive name
@rem output parameter: __DRIVE_NAMES
:drive_names
set "__USED_NAME=%~1"
set "__DRIVE_NAMES=!__DRIVE_NAMES:%__USED_NAME%=!"
goto :eof

:help
if %_VERBOSE%==1 (
set __BEG_P=%_STRONG_FG_CYAN%
Expand Down

0 comments on commit 74bbf70

Please sign in to comment.