Windows installer and medley script for running Medley in Docker on Windows (#1077)
* Update docker file build to use new deb linux installers; move Dockefile to .github/workflows since its really only useable from the buildDocker.yml workflow * Fix typo in dockerfile location * remove extraneous " in >>GITHUB_ENV statements * Fix handling of TARGETPLATFORM in Dockerfile * Trying with just one platform * Fix issues with missing man-db in docker build workflow; added man-db to depends in deb builds for linux * Sicthed docker from tightvnc to tigervnc to match oio. This getting the apt package name right. * Going back to single platform to debug this thing * Trying with just arm64 * Removing arm/v7 from docker images. Takes too long to build and just wastes our github actions minutes. This is assuming its a never used feature since docker is not big on raspberry pis and their ilk. * Fix typo in control-linux; update build_deb so that files in /usr/local installed by deb are owned by root; add ubuntu user and nano in docker file for dbebugging; when in draft only create for x86_64 platform * Fix typo in buildDocker.yml * Add sudo to docker image; in docker image ensure that all /usr/local/interlisp files are owned by root * Add securityTypes none to docker entrypoint * Updated docker base to Ubuntu 22.10 to get fixed xrdp; add xrdp to the docker image; updated user permission in docker image; * In Dockerfile make xrdp install noninteractive * Update medley.sh scripts to handle docker case * Fix a couple of typos * BuildDcoker: added pulling latest draft release (if any) when this is a draft docker build; removed checkout of medley code cause its not used * BuildDocker: added medley checkout backin - turns pout its needed by a bunch of actions even though I dont really think they use it * BuildDocker: moved download assets to use gh instaed of a marketplace action becauase that action could not handle draft releases. * Tweaking medley.sh and associated tweaks to work Windows via wsl medley and docker * adding first pass at powershell script for windows docker and wsl * Tuning how Xvnc, medley, and vncviewer handle the various ways of exiting - eg logout vs closing viewer window. * Tuning vncviewer launch to make sure that tty works as expected when medley.sh runs in background * Minor typo fixes and added extra check to use of /run/shm in medley_vnc.sh * Added SSH_KEY secret to buildReleaseIncDocker workflow * Gertting the add SSH_KEY secret into orkflows right this time, hopefully * Adding TERM env variable and setting USER to medley in docker image * Debugging medley.ps1 and adding a couple of arguments * Typo in Dockerfile medley * Synchronizing flag processing and usage for medley.ps1 and medley.sh; refactored medley_args.sh and medley_usage.sh code. * Adding first pass at windows installer * Adding first pass an inno setup script for Windows installation * Update buildLoadup workflow and downloads page for windows installer * Fix typo in buildLoadup * BuildLoadup make sure windows runner uses powershell * Another typo in buildLoadup * Another typo in buildLoadup; damn those double quotes * Updating handling of windows installer in buildLoadup, added vncviewer to medley.iss install * Unknown syntax error in buildLoadup * Another damn typo from double quotes * buildLoadup: fixed loadup job outputs * buidLoadup: fixed bug with COMBINED_RELEASE_TAG; fixed Upload script in windows job to be compatible with actions.script v6. * buidLoadup: upload win installer adapted to find draft releases as well as full releases * BuildLoadup: fixing up javascript in actions in windows job to use / instead of \ in pathname * BuildLoadup: changing win installer update to same action used for other release assets * Fix windows installer file name; in BuildLoadup move update downl;oad page to the Windows runner because uploading the window-installer changes the release download url, so updating the downloads page must be done after the windows installer upload.; General buildLoadup cleanup * Run md2html to update downloads page * Fix typo in build_deb.sh * Removing some leftover crud in medley_usage.sh * Fixing up windows installer a bit, mostly cosmetic * Adding support for WSL1; mostly forcing --vnc and changing how to find open ports and displays since WSL1 networking is different tha WSL2 * Update manual page for new Windows Medley script * First pass done for man page that incorporates new Windows medley script. Add Xvnc wait before calling run-medley in case of docker to prevent occasonal missing X windows server error. * Change buildLoadup to update man page to a draft if this is a draft run.
This commit is contained in:
@@ -11,6 +11,15 @@
|
||||
###############################################################################
|
||||
# set -x
|
||||
|
||||
# mess with file desscriptors so we get only one line on stdout
|
||||
# so we can communicate only what we want back to any githib runner
|
||||
# stash fd 1 in fd 3
|
||||
exec 3>&1
|
||||
# make fd 1 (stdout) be the same as stdout
|
||||
# so none of the std output from this file will be captured by
|
||||
# $() but it will still be written out to the tty (via stderr)
|
||||
exec 1>&2
|
||||
|
||||
tarball_dir=tmp/tarballs
|
||||
|
||||
# Make sure we are in the right directory
|
||||
@@ -60,6 +69,7 @@ fi
|
||||
pushd ${tarball_dir} >/dev/null 2>/dev/null
|
||||
medley_release=$(echo medley-*-loadups.tgz | sed "s/medley-\(.*\)-loadups.tgz/\1/")
|
||||
maiko_release=$(echo maiko-*-linux.x86_64.tgz | sed "s/maiko-\(.*\)-linux.x86_64.tgz/\1/")
|
||||
debs_filename_base="medley-full-${medley_release}_${maiko_release}"
|
||||
popd >/dev/null 2>/dev/null
|
||||
|
||||
|
||||
@@ -120,9 +130,13 @@ do
|
||||
cp -p tmp/vncviewer64-1.12.0.exe ${il_dir}/wsl/vncviewer64-1.12.0.exe
|
||||
fi
|
||||
#
|
||||
# Make sure all files are owned by root
|
||||
#
|
||||
sudo su <<< "chown --recursive root:root ${il_dir}"
|
||||
#
|
||||
# Create tar file for this arch
|
||||
#
|
||||
filename="medley-full-${medley_release}_${maiko_release}-${wslp}-${arch}"
|
||||
filename="${debs_filename_base}-${wslp}-${arch}"
|
||||
mkdir -p tars
|
||||
echo "Creating tar file tars/${filename}.tgz"
|
||||
tar -C ${il_dir} -czf tars/${filename}.tgz .
|
||||
@@ -137,3 +151,8 @@ do
|
||||
done
|
||||
done
|
||||
|
||||
# send just one line back to github $() construct
|
||||
# do this by restoring fd 1 to what it was orginally
|
||||
exec 1>&3
|
||||
echo "${debs_filename_base}"
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
Package: medley-interlisp
|
||||
Version: 1.0.0
|
||||
Version: 1.0.1
|
||||
Release: --RELEASE--
|
||||
Maintainer: info@interlisp.org
|
||||
Description: Medley Interlisp for Linux
|
||||
Homepage: https://github.com/interlisp/medley
|
||||
Architecture: --ARCH--
|
||||
Depends: xdg-utils
|
||||
Depends: man-db, xdg-utils
|
||||
|
||||
|
||||
@@ -2,37 +2,44 @@
|
||||
<li><h1>MEDLEY DOWNLOADS</h1>
|
||||
|
||||
<ul>
|
||||
<li><h2>Standard Installations (for Debian-based distros)</h2>
|
||||
<li><h2>LINUX (including Windows System for Linux)</h2>
|
||||
|
||||
<ul>
|
||||
<li><h3>Standard Linux</h3>
|
||||
|
||||
<p><a href="https://github.com/Interlisp/medley/releases/download/@@@GITHUB.SUBDIR@@@/@@@FULL.RELEASE.FILENAME@@@-linux-x86_64.deb">Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for x86_64 machines</a></p>
|
||||
|
||||
<p><a href="https://github.com/Interlisp/medley/releases/download/@@@GITHUB.SUBDIR@@@/@@@FULL.RELEASE.FILENAME@@@-linux-aarch64.deb">Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for ARM64 machines</a></p>
|
||||
|
||||
<p><a href="https://github.com/Interlisp/medley/releases/download/@@@GITHUB.SUBDIR@@@/@@@FULL.RELEASE.FILENAME@@@-linux-armv7l.deb">Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for ARMv7 machines</a></p></li>
|
||||
<li><h3>Windows System for Linux</h3>
|
||||
|
||||
<p><a href="https://github.com/Interlisp/medley/releases/download/@@@GITHUB.SUBDIR@@@/@@@FULL.RELEASE.FILENAME@@@-wsl-x86_64.deb">Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for x86.64 machines</a></p>
|
||||
|
||||
<p><a href="https://github.com/Interlisp/medley/releases/download/@@@GITHUB.SUBDIR@@@/@@@FULL.RELEASE.FILENAME@@@-wsl-aarch64.deb">Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for ARM64 machines</a></p></li>
|
||||
</ul></li>
|
||||
<li><h2>Local Installations (for any Linux distro)</h2>
|
||||
<li><h3>Standard Installations (for Debian-based distros)</h3>
|
||||
|
||||
<ul>
|
||||
<li><h3>Standard Linux</h3>
|
||||
<li><h4>Standard Linux</h4>
|
||||
|
||||
<p><a href="https://github.com/Interlisp/medley/releases/download/@@@GITHUB.SUBDIR@@@/@@@FULL.RELEASE.FILENAME@@@-linux-x86_64.tgz">Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for x86_64 machines</a></p>
|
||||
<p><a href="@@@DOWNLOAD_URL@@@/@@@DEBS.FILENAME.BASE@@@-linux-x86_64.deb">Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for x86_64 machines</a></p>
|
||||
|
||||
<p><a href="https://github.com/Interlisp/medley/releases/download/@@@GITHUB.SUBDIR@@@/@@@FULL.RELEASE.FILENAME@@@-linux-aarch64.tgz">Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for ARM64 machines</a></p>
|
||||
<p><a href="@@@DOWNLOAD_URL@@@/@@@DEBS.FILENAME.BASE@@@-linux-aarch64.deb">Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for ARM64 machines</a></p>
|
||||
|
||||
<p><a href="https://github.com/Interlisp/medley/releases/download/@@@GITHUB.SUBDIR@@@/@@@FULL.RELEASE.FILENAME@@@-linux-armv7l.tgz">Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for ARMv7 machines</a></p></li>
|
||||
<li><h3>Windows System for Linux</h3>
|
||||
<p><a href="@@@DOWNLOAD_URL@@@/@@@DEBS.FILENAME.BASE@@@-linux-armv7l.deb">Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for ARMv7 machines</a></p></li>
|
||||
<li><h4>Windows System for Linux</h4>
|
||||
|
||||
<p><a href="https://github.com/Interlisp/medley/releases/download/@@@GITHUB.SUBDIR@@@/@@@FULL.RELEASE.FILENAME@@@-wsl-x86_64.tgz">Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for x86_64 machines</a></p>
|
||||
<p><a href="@@@DOWNLOAD_URL@@@/@@@DEBS.FILENAME.BASE@@@-wsl-x86_64.deb">Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for x86.64 machines</a></p>
|
||||
|
||||
<p><a href="https://github.com/Interlisp/medley/releases/download/@@@GITHUB.SUBDIR@@@/@@@FULL.RELEASE.FILENAME@@@-wsl-aarch64.tgz">Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for ARM64 machines</a></p></li>
|
||||
<p><a href="@@@DOWNLOAD_URL@@@/@@@DEBS.FILENAME.BASE@@@-wsl-aarch64.deb">Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for ARM64 machines</a></p></li>
|
||||
</ul></li>
|
||||
<li><h3>Local Installations (for any Linux distro)</h3>
|
||||
|
||||
<ul>
|
||||
<li><h4>Standard Linux</h4>
|
||||
|
||||
<p><a href="@@@DOWNLOAD_URL@@@/@@@DEBS.FILENAME.BASE@@@-linux-x86_64.tgz">Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for x86_64 machines</a></p>
|
||||
|
||||
<p><a href="@@@DOWNLOAD_URL@@@/@@@DEBS.FILENAME.BASE@@@-linux-aarch64.tgz">Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for ARM64 machines</a></p>
|
||||
|
||||
<p><a href="@@@DOWNLOAD_URL@@@/@@@DEBS.FILENAME.BASE@@@-linux-armv7l.tgz">Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for ARMv7 machines</a></p></li>
|
||||
<li><h4>Windows System for Linux</h4>
|
||||
|
||||
<p><a href="@@@DOWNLOAD_URL@@@/@@@DEBS.FILENAME.BASE@@@-wsl-x86_64.tgz">Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for x86_64 machines</a></p>
|
||||
|
||||
<p><a href="@@@DOWNLOAD_URL@@@/@@@DEBS.FILENAME.BASE@@@-wsl-aarch64.tgz">Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for ARM64 machines</a></p></li>
|
||||
</ul></li>
|
||||
</ul></li>
|
||||
<li><h2>WINDOWS 10/11 (Medley runs in a Docker container)</h2>
|
||||
|
||||
<p><a href="@@@DOWNLOAD_URL@@@/@@@WINDOWS.INSTALLER.FILENAME@@@">Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for Windows x64 machines</a></p></li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
|
||||
@@ -1,38 +1,42 @@
|
||||
* # MEDLEY DOWNLOADS
|
||||
|
||||
* ## Standard Installations (for Debian-based distros)
|
||||
* ## LINUX (including Windows System for Linux)
|
||||
|
||||
* ### Standard Linux
|
||||
* ### Standard Installations (for Debian-based distros)
|
||||
|
||||
[Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for x86\_64 machines](https://github.com/Interlisp/medley/releases/download/@@@GITHUB.SUBDIR@@@/@@@FULL.RELEASE.FILENAME@@@-linux-x86\_64.deb)
|
||||
* #### Standard Linux
|
||||
|
||||
[Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for ARM64 machines](https://github.com/Interlisp/medley/releases/download/@@@GITHUB.SUBDIR@@@/@@@FULL.RELEASE.FILENAME@@@-linux-aarch64.deb)
|
||||
[Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for x86\_64 machines](@@@DOWNLOAD_URL@@@/@@@DEBS.FILENAME.BASE@@@-linux-x86\_64.deb)
|
||||
|
||||
[Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for ARMv7 machines](https://github.com/Interlisp/medley/releases/download/@@@GITHUB.SUBDIR@@@/@@@FULL.RELEASE.FILENAME@@@-linux-armv7l.deb)
|
||||
[Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for ARM64 machines](@@@DOWNLOAD_URL@@@/@@@DEBS.FILENAME.BASE@@@-linux-aarch64.deb)
|
||||
|
||||
* ### Windows System for Linux
|
||||
[Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for ARMv7 machines](@@@DOWNLOAD_URL@@@/@@@DEBS.FILENAME.BASE@@@-linux-armv7l.deb)
|
||||
|
||||
[Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for x86\.64 machines](https://github.com/Interlisp/medley/releases/download/@@@GITHUB.SUBDIR@@@/@@@FULL.RELEASE.FILENAME@@@-wsl-x86\_64.deb)
|
||||
* #### Windows System for Linux
|
||||
|
||||
[Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for ARM64 machines](https://github.com/Interlisp/medley/releases/download/@@@GITHUB.SUBDIR@@@/@@@FULL.RELEASE.FILENAME@@@-wsl-aarch64.deb)
|
||||
[Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for x86\.64 machines](@@@DOWNLOAD_URL@@@/@@@DEBS.FILENAME.BASE@@@-wsl-x86\_64.deb)
|
||||
|
||||
* ## Local Installations (for any Linux distro)
|
||||
[Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for ARM64 machines](@@@DOWNLOAD_URL@@@/@@@DEBS.FILENAME.BASE@@@-wsl-aarch64.deb)
|
||||
|
||||
* ### Standard Linux
|
||||
* ### Local Installations (for any Linux distro)
|
||||
|
||||
[Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for x86\_64 machines](https://github.com/Interlisp/medley/releases/download/@@@GITHUB.SUBDIR@@@/@@@FULL.RELEASE.FILENAME@@@-linux-x86\_64.tgz)
|
||||
* #### Standard Linux
|
||||
|
||||
[Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for ARM64 machines](https://github.com/Interlisp/medley/releases/download/@@@GITHUB.SUBDIR@@@/@@@FULL.RELEASE.FILENAME@@@-linux-aarch64.tgz)
|
||||
[Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for x86\_64 machines](@@@DOWNLOAD_URL@@@/@@@DEBS.FILENAME.BASE@@@-linux-x86\_64.tgz)
|
||||
|
||||
[Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for ARMv7 machines](https://github.com/Interlisp/medley/releases/download/@@@GITHUB.SUBDIR@@@/@@@FULL.RELEASE.FILENAME@@@-linux-armv7l.tgz)
|
||||
[Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for ARM64 machines](@@@DOWNLOAD_URL@@@/@@@DEBS.FILENAME.BASE@@@-linux-aarch64.tgz)
|
||||
|
||||
* ### Windows System for Linux
|
||||
|
||||
[Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for x86\_64 machines](https://github.com/Interlisp/medley/releases/download/@@@GITHUB.SUBDIR@@@/@@@FULL.RELEASE.FILENAME@@@-wsl-x86\_64.tgz)
|
||||
|
||||
[Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for ARM64 machines](https://github.com/Interlisp/medley/releases/download/@@@GITHUB.SUBDIR@@@/@@@FULL.RELEASE.FILENAME@@@-wsl-aarch64.tgz)
|
||||
[Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for ARMv7 machines](@@@DOWNLOAD_URL@@@/@@@DEBS.FILENAME.BASE@@@-linux-armv7l.tgz)
|
||||
|
||||
* #### Windows System for Linux
|
||||
|
||||
[Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for x86\_64 machines](@@@DOWNLOAD_URL@@@/@@@DEBS.FILENAME.BASE@@@-wsl-x86\_64.tgz)
|
||||
|
||||
[Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for ARM64 machines](@@@DOWNLOAD_URL@@@/@@@DEBS.FILENAME.BASE@@@-wsl-aarch64.tgz)
|
||||
|
||||
* ## WINDOWS 10/11 (Medley runs in a Docker container)
|
||||
|
||||
[Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for Windows x64 machines](@@@DOWNLOAD_URL@@@/@@@WINDOWS.INSTALLER.FILENAME@@@)
|
||||
|
||||
|
||||
|
||||
|
||||
3
installers/win/.gitignore
vendored
Normal file
3
installers/win/.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
medley-install_*.exe
|
||||
vncviewer*.exe
|
||||
|
||||
BIN
installers/win/Medley.ico
Normal file
BIN
installers/win/Medley.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 155 KiB |
165
installers/win/editpath/EditPath.iss
Normal file
165
installers/win/editpath/EditPath.iss
Normal file
@@ -0,0 +1,165 @@
|
||||
; Copyright (C) 2021-2023 by Bill Stewart (bstewart at iname.com)
|
||||
;
|
||||
; This program is free software; you can redistribute it and/or modify it under
|
||||
; the terms of the GNU Lesser General Public License as published by the Free
|
||||
; Software Foundation; either version 3 of the License, or (at your option) any
|
||||
; later version.
|
||||
;
|
||||
; This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
; FOR A PARTICULAR PURPOSE. See the GNU General Lesser Public License for more
|
||||
; details.
|
||||
;
|
||||
; You should have received a copy of the GNU Lesser General Public License
|
||||
; along with this program. If not, see https://www.gnu.org/licenses/.
|
||||
|
||||
; Sample Inno Setup (https://www.jrsoftware.org/isinfo.php) script
|
||||
; demonstrating use of PathMgr.dll.
|
||||
;
|
||||
; This script uses PathMgr.dll in the following ways:
|
||||
; * Copies PathMgr.dll to the target machine (required for uninstall)
|
||||
; * Defines a task in [Tasks] that should modify the Path
|
||||
; * Imports the AddDirToPath() DLL function at setup time
|
||||
; * Imports the RemoveDirFromPath() DLL function at uninstall time
|
||||
; * Stores task state as custom setting using RegisterPreviousData()
|
||||
; * Retrieves task state custom setting during setup and uninstall initialize
|
||||
; * At post install, adds app dir to Path if task selected
|
||||
; * At uninstall, removes dir from Path if custom setting present
|
||||
; * Unloads and deletes DLL and removes app dir at uninstall deinitialize
|
||||
|
||||
#if Ver < EncodeVer(6,0,0,0)
|
||||
#error This script requires Inno Setup 6 or later
|
||||
#endif
|
||||
|
||||
[Setup]
|
||||
AppId={{A17D2D05-C729-4F2A-9CC7-E04906C5A842}
|
||||
AppName=EditPath
|
||||
AppVersion=4.0.4.0
|
||||
UsePreviousAppDir=false
|
||||
DefaultDirName={autopf}\EditPath
|
||||
Uninstallable=true
|
||||
OutputDir=.
|
||||
OutputBaseFilename=EditPath_Setup
|
||||
ArchitecturesInstallIn64BitMode=x64
|
||||
PrivilegesRequired=none
|
||||
PrivilegesRequiredOverridesAllowed=dialog
|
||||
|
||||
[Files]
|
||||
; Install PathMgr.dll for use with both setup and uninstall; use
|
||||
; uninsneveruninstall flag because DeinitializeSetup() will delete after
|
||||
; unloading the DLL; install the 32-bit version of PathMgr.dll because both
|
||||
; setup and uninstall executables are 32-bit
|
||||
Source: "i386\PathMgr.dll"; DestDir: "{app}"; Flags: uninsneveruninstall
|
||||
|
||||
; Other files to install on target system
|
||||
Source: "i386\EditPath.exe"; DestDir: "{app}"; Check: not Is64BitInstallMode()
|
||||
Source: "x86_64\EditPath.exe"; DestDir: "{app}"; Check: Is64BitInstallMode()
|
||||
Source: "EditPath.md"; DestDir: "{app}"
|
||||
|
||||
[Tasks]
|
||||
Name: modifypath; Description: "&Add to Path"
|
||||
|
||||
[Code]
|
||||
const
|
||||
MODIFY_PATH_TASK_NAME = 'modifypath'; // Specify name of task
|
||||
|
||||
var
|
||||
PathIsModified: Boolean; // Cache task selection from previous installs
|
||||
ApplicationUninstalled: Boolean; // Has application been uninstalled?
|
||||
|
||||
// Import AddDirToPath() at setup time ('files:' prefix)
|
||||
function DLLAddDirToPath(DirName: string; PathType, AddType: DWORD): DWORD;
|
||||
external 'AddDirToPath@files:PathMgr.dll stdcall setuponly';
|
||||
|
||||
// Import RemoveDirFromPath() at uninstall time ('{app}\' prefix)
|
||||
function DLLRemoveDirFromPath(DirName: string; PathType: DWORD): DWORD;
|
||||
external 'RemoveDirFromPath@{app}\PathMgr.dll stdcall uninstallonly';
|
||||
|
||||
// Wrapper for AddDirToPath() DLL function
|
||||
function AddDirToPath(const DirName: string): DWORD;
|
||||
var
|
||||
PathType, AddType: DWORD;
|
||||
begin
|
||||
// PathType = 0 - use system Path
|
||||
// PathType = 1 - use user Path
|
||||
// AddType = 0 - add to end of Path
|
||||
// AddType = 1 - add to beginning of Path
|
||||
if IsAdminInstallMode() then
|
||||
PathType := 0
|
||||
else
|
||||
PathType := 1;
|
||||
AddType := 0;
|
||||
result := DLLAddDirToPath(DirName, PathType, AddType);
|
||||
end;
|
||||
|
||||
// Wrapper for RemoveDirFromPath() DLL function
|
||||
function RemoveDirFromPath(const DirName: string): DWORD;
|
||||
var
|
||||
PathType: DWORD;
|
||||
begin
|
||||
// PathType = 0 - use system Path
|
||||
// PathType = 1 - use user Path
|
||||
if IsAdminInstallMode() then
|
||||
PathType := 0
|
||||
else
|
||||
PathType := 1;
|
||||
result := DLLRemoveDirFromPath(DirName, PathType);
|
||||
end;
|
||||
|
||||
procedure RegisterPreviousData(PreviousDataKey: Integer);
|
||||
begin
|
||||
// Store previous or current task selection as custom user setting
|
||||
if PathIsModified or WizardIsTaskSelected(MODIFY_PATH_TASK_NAME) then
|
||||
SetPreviousData(PreviousDataKey, MODIFY_PATH_TASK_NAME, 'true');
|
||||
end;
|
||||
|
||||
function InitializeSetup(): Boolean;
|
||||
begin
|
||||
result := true;
|
||||
// Was task selected during a previous install?
|
||||
PathIsModified := GetPreviousData(MODIFY_PATH_TASK_NAME, '') = 'true';
|
||||
end;
|
||||
|
||||
function InitializeUninstall(): Boolean;
|
||||
begin
|
||||
result := true;
|
||||
// Was task selected during a previous install?
|
||||
PathIsModified := GetPreviousData(MODIFY_PATH_TASK_NAME, '') = 'true';
|
||||
ApplicationUninstalled := false;
|
||||
end;
|
||||
|
||||
procedure CurStepChanged(CurStep: TSetupStep);
|
||||
begin
|
||||
if CurStep = ssPostInstall then
|
||||
begin
|
||||
// Add app directory to Path at post-install step if task selected
|
||||
if PathIsModified or WizardIsTaskSelected(MODIFY_PATH_TASK_NAME) then
|
||||
AddDirToPath(ExpandConstant('{app}'));
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
|
||||
begin
|
||||
if CurUninstallStep = usUninstall then
|
||||
begin
|
||||
// Remove app directory from path during uninstall if task was selected;
|
||||
// use variable because we can't use WizardIsTaskSelected() at uninstall
|
||||
if PathIsModified then
|
||||
RemoveDirFromPath(ExpandConstant('{app}'));
|
||||
end
|
||||
else if CurUninstallStep = usPostUninstall then
|
||||
begin
|
||||
ApplicationUninstalled := true;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure DeinitializeUninstall();
|
||||
begin
|
||||
if ApplicationUninstalled then
|
||||
begin
|
||||
// Unload and delete PathMgr.dll and remove app dir when uninstalling
|
||||
UnloadDLL(ExpandConstant('{app}\PathMgr.dll'));
|
||||
DeleteFile(ExpandConstant('{app}\PathMgr.dll'));
|
||||
RemoveDir(ExpandConstant('{app}'));
|
||||
end;
|
||||
end;
|
||||
118
installers/win/editpath/EditPath.md
Normal file
118
installers/win/editpath/EditPath.md
Normal file
@@ -0,0 +1,118 @@
|
||||
# EditPath
|
||||
|
||||
EditPath is a Windows console (text-based, command-line) program for managing the system Path and user Path.
|
||||
|
||||
# Author
|
||||
|
||||
Bill Stewart - bstewart at iname dot com
|
||||
|
||||
# License
|
||||
|
||||
EditPath.exe is covered by the GNU Lesser Public License (LPGL). See the file `LICENSE` for details.
|
||||
|
||||
# Download
|
||||
|
||||
https://github.com/Bill-Stewart/PathMgr/releases/
|
||||
|
||||
# Background
|
||||
|
||||
The system Path is found in the following location in the Windows registry:
|
||||
|
||||
Root: `HKEY_LOCAL_MACHINE`
|
||||
Subkey: `SYSTEM\CurrentControlSet\Control\Session Manager\Environment`
|
||||
Value name: `Path`
|
||||
|
||||
The current user Path is found in the following location in the registry:
|
||||
|
||||
Root: `HKEY_CURRENT_USER`
|
||||
Subkey: `Environment`
|
||||
Value name: `Path`
|
||||
|
||||
In both cases, the `Path` value is (or should be) the registry type `REG_EXPAND_SZ`, which means that it is a string that can contain values surrounded by `%` characters that Windows will automatically expand to environment variable values. (For example, `%SystemRoot%` will be expanded to `C:\Windows` on most systems.)
|
||||
|
||||
The `Path` value contains a `;`-delimited list of directory names that the system should search for executables, library files, scripts, etc. Windows appends the content of the current user Path to the system Path and expands the environment variable references. The resulting string is set as the `Path` environment variable for processes.
|
||||
|
||||
EditPath provides a command-line interface for managing the `Path` value in the system location (in `HKEY_LOCAL_MACHINE`) and the current user location (in `HKEY_CURRENT_USER`).
|
||||
|
||||
# Usage
|
||||
|
||||
The following describes the command-line usage for the program. Parameters are case-sensitive.
|
||||
|
||||
**EditPath** [_options_] _type_ _action_
|
||||
|
||||
You must specify only one of the following _type_ parameters:
|
||||
|
||||
| _type_ | Abbreviation | Description
|
||||
| ------- | ------------ | -----------
|
||||
| **--system** | **-s** | Specifies the system Path
|
||||
| **--user** | **-u** | Specifies the user Path
|
||||
|
||||
You must specify only one of the following _action_ parameters:
|
||||
|
||||
| _action_ | Abbreviation | Description
|
||||
| -------- | ------------ | -----------
|
||||
| **--list** | **-l** | Lists directories in Path
|
||||
| **--test "**_dirname_**"** | **-t "**_dirname_**"** | Tests if directory exists in Path
|
||||
| **--add "**_dirname_**"** | **-a "**_dirname_**"** | Adds directory to Path
|
||||
| **--remove "**_dirname_**"** | **-r "**_dirname_**"** | Removes directory from Path
|
||||
|
||||
The following parameters are optional:
|
||||
|
||||
| _options_ | Abbreviation | Description
|
||||
| --------- | ------------ | -----------
|
||||
| **--quiet** | **-q** | Suppresses result messages
|
||||
| **--expand** | **-x** | Expands environment variables (**--list** only)
|
||||
| **--beginning** | **-b** | Adds to beginning of Path (**--add** only)
|
||||
|
||||
# Exit Codes
|
||||
|
||||
The following table lists typical exit codes when not using **--test** (**-t**).
|
||||
|
||||
| Exit Code | Description
|
||||
| --------- | -----------
|
||||
| 0 | No errors
|
||||
| 2 | The Path value is not present in the registry
|
||||
| 3 | The specified directory does not exist in the Path
|
||||
| 5 | Access is denied
|
||||
| 87 | Incorrect parameter(s)
|
||||
| 183 | The specified directory already exists in the Path
|
||||
|
||||
The following table lists typical exit codes when using **--test** (**-t**).
|
||||
|
||||
| Exit Code | Description
|
||||
| --------- | -----------
|
||||
| 1 | The specified directory exists in the unexpanded Path
|
||||
| 2 | The specified directory exists in the expanded Path
|
||||
| 3 | The specified directory does not exist in the Path
|
||||
|
||||
# Remarks
|
||||
|
||||
* Anything on the command line after **--test**, **--add**, or **--remove** is considered to be the argument for the parameter. To avoid ambiguity, specify the _action_ parameter last on the command line.
|
||||
|
||||
* Uexpanded vs. expanded refers to whether the environment variable references (i.e., names between `%` characters) are expanded after retrieving the Path value from the registry. For example, `%SystemRoot%` is unexpanded but `C:\Windows` is expanded.
|
||||
|
||||
* The **--add** (**-a**) parameter checks whether the specified directory exists in both the unexpanded and expanded copies of the Path before adding the directory. For example, if the environment variable `TESTAPP` is set to `C:\TestApp` and `%TESTAPP%` is in the Path, specifying `--add C:\TestApp` will return exit code 183 (i.e., the directory already exists in the Path) because `%TESTAPP%` expands to `C:\TestApp`.
|
||||
|
||||
* The **--remove** (**-r**) parameter does not expand environment variable references. For example, if the environment variable `TESTAPP` is set to `C:\TestApp` and `%TESTAPP%` is in the Path, specifying `--remove "C:\TestApp"` will return exit code 3 (i.e., the directory does not exist in the Path) because **--remove** does not expand `%TESTAPP%` to `C:\TestApp`. For the command to succeed, you would have to specify `--remove "%TESTAPP%"` instead.
|
||||
|
||||
* The program will exit with error code 87 if a parameter (or an argument to a parameter) is missing or not valid, if mutually exclusive parameters are specified, etc.
|
||||
|
||||
* The program will exit with error code 5 if the current user does not have permission to update the Path value in the registry (for example, if you try to update the system Path using a standard user account or an unelevated administrator account).
|
||||
|
||||
# Examples
|
||||
|
||||
1. `EditPath --expand --system --list`
|
||||
|
||||
This command outputs the directories in the system Path, with environment variables expanded. You can also write this command as `EditPath -x -s -l`.
|
||||
|
||||
2. `EditPath --user --add "%LOCALAPPDATA%\Programs\MyApp"`
|
||||
|
||||
Adds the specified directory name to the user Path.
|
||||
|
||||
3. `EditPath -s -r "C:\Program Files\MyApp\bin"`
|
||||
|
||||
Removes the specified directory from the system Path.
|
||||
|
||||
4. `EditPath -s --test "C:\Program Files (x86)\MyApp\bin"`
|
||||
|
||||
Returns an exit code of 3 if the specified directory is not in the system Path, 1 if the specified directory is in the unexpanded copy of the system Path, or 2 if the specified directory is in the expanded copy of the system Path.
|
||||
3
installers/win/editpath/README.TXT
Normal file
3
installers/win/editpath/README.TXT
Normal file
@@ -0,0 +1,3 @@
|
||||
Editpath installed here is extracted from Release 1.04 from https://github.com/Bill-Stewart/PathMgr.
|
||||
|
||||
|
||||
BIN
installers/win/editpath/i386/EditPath.exe
Normal file
BIN
installers/win/editpath/i386/EditPath.exe
Normal file
Binary file not shown.
BIN
installers/win/editpath/x86_64/EditPath.exe
Normal file
BIN
installers/win/editpath/x86_64/EditPath.exe
Normal file
Binary file not shown.
128
installers/win/makeflix.iss
Normal file
128
installers/win/makeflix.iss
Normal file
@@ -0,0 +1,128 @@
|
||||
; -- makeflix.iss --
|
||||
; fgh 2016-08-19
|
||||
|
||||
#define x86_or_x64 "x86"
|
||||
#define version "1.0.1"
|
||||
|
||||
#if x86_or_x64 == "x86"
|
||||
#define exe_dir "Win32"
|
||||
#else
|
||||
#define exe_dir "x64"
|
||||
#endif
|
||||
|
||||
[Setup]
|
||||
ArchitecturesAllowed={#x86_or_x64}
|
||||
AppName=Makeflix
|
||||
AppVersion={#version}
|
||||
AppPublisher=Lellan, Inc.
|
||||
AppPublisherURL=http://www.lellan.com/
|
||||
AppCopyright=Copyright (C) 2012-2017 Lellan, Inc.
|
||||
DefaultDirName={pf}\Lellan\Makeflix
|
||||
DefaultGroupName=Lellan
|
||||
UninstallDisplayIcon={app}\makeflix.exe
|
||||
Compression=lzma2
|
||||
SolidCompression=yes
|
||||
; "ArchitecturesInstallIn64BitMode=x64" requests that the install be
|
||||
; done in "64-bit mode" on x64, meaning it should use the native
|
||||
; 64-bit Program Files directory and the 64-bit view of the registry.
|
||||
ArchitecturesInstallIn64BitMode=x64
|
||||
; Source Dir is lellan/toolchain/makeflix/windows
|
||||
SourceDir="..\"
|
||||
OutputDir="deploy"
|
||||
OutputBaseFilename="makeflix_v{#version}_{#x86_or_x64}"
|
||||
SetupIconFile="..\images\Lellan_Logo_20130221.ico"
|
||||
LicenseFile="..\deploy\EULA.rtf"
|
||||
DisableWelcomePage=no
|
||||
|
||||
[Files]
|
||||
Source: "makeflix\{#exe_dir}\Release\makeflix.exe"; DestDir: "{app}"; DestName: "makeflix.exe"; Flags: ignoreversion
|
||||
Source: "deploy\DLLs\{#x86_or_x64}\Qt5Core.dll"; DestDir: "{app}"; Flags: ignoreversion
|
||||
Source: "deploy\DLLs\{#x86_or_x64}\Qt5Gui.dll"; DestDir: "{app}"; Flags: ignoreversion
|
||||
Source: "deploy\DLLs\{#x86_or_x64}\Qt5Widgets.dll"; DestDir: "{app}"; Flags: ignoreversion
|
||||
Source: "deploy\DLLs\{#x86_or_x64}\Qt5Network.dll"; DestDir: "{app}"; Flags: ignoreversion
|
||||
Source: "deploy\DLLs\{#x86_or_x64}\platforms\qwindows.dll"; DestDir: "{app}\platforms"; Flags: ignoreversion
|
||||
Source: "deploy\gstreamer\{#x86_or_x64}\*"; DestDir: "{app}\gstreamer"; Flags: recursesubdirs ignoreversion
|
||||
Source: "deploy\vc_redist\vc_redist.{#x86_or_x64}.exe"; DestDir: "{tmp}"; Flags: deleteafterinstall
|
||||
Source: "deploy\bonjour\Bonjour.{#x86_or_x64}.msi"; DestDir: "{tmp}" ; Flags: deleteafterinstall
|
||||
|
||||
Source: "..\deploy\Makeflix_Open_Source_Libraries.pdf"; DestDir: "{app}"
|
||||
|
||||
[Icons]
|
||||
Name: "{group}\Makeflix"; Filename: "{app}\makeflix.exe"
|
||||
Name: "{group}\Uninstall Makeflix"; Filename: "{uninstallexe}"
|
||||
|
||||
|
||||
[Run]
|
||||
#define VCmsg "Installing Microsoft Visual C++ Redistributable ..."
|
||||
Filename: "{tmp}\vc_redist{#x86_or_x64}.exe"; StatusMsg: "{#VCmsg}"; Check: not VCinstalled
|
||||
#define BonjourMsg "Installing Apple Bonjour support ..."
|
||||
Filename: "msiexec"; Parameters: "/i {tmp}\Bonjour.{#x86_or_x64}.msi"; StatusMsg: "{#BonjourMsg}"; Check: not BonjourInstalled
|
||||
|
||||
[Registry]
|
||||
Root: HKLM; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\makeflix.exe"; ValueType: string; ValueName: "(Default)"; ValueData: "{app}\makeflix.exe"; Flags: uninsdeletekey
|
||||
Root: HKLM; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\makeflix.exe"; ValueType: string; ValueName: "Path"; ValueData: "{app}\gstreamer\bin"; Flags: uninsdeletekey
|
||||
|
||||
[Code]
|
||||
function VCinstalled: Boolean;
|
||||
// By Michael Weiner <mailto:spam@cogit.net>
|
||||
// Function for Inno Setup Compiler
|
||||
// 13 November 2015
|
||||
// Modified by Frank G Halasz to handle WOW case
|
||||
// 23 August 2016
|
||||
// Returns True if Microsoft Visual C++ Redistributable is installed, otherwise False.
|
||||
// The programmer may set the year of redistributable to find; see below.
|
||||
var
|
||||
names: TArrayOfString;
|
||||
i: Integer;
|
||||
dName, key, year, platfm: String;
|
||||
begin
|
||||
// Year of redistributable to find; leave null to find installation for any year.
|
||||
year := '2015';
|
||||
Result := False;
|
||||
if Is64BitInstallMode then
|
||||
begin
|
||||
platfm := 'x64';
|
||||
key := 'Software\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall';
|
||||
end
|
||||
else if not IsWin64 then
|
||||
begin
|
||||
platfm := 'x86';
|
||||
key := 'Software\Microsoft\Windows\CurrentVersion\Uninstall';
|
||||
end
|
||||
else
|
||||
begin
|
||||
platfm := 'x86';
|
||||
key := 'Software\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall';
|
||||
end;
|
||||
// Get an array of all of the uninstall subkey names.
|
||||
if RegGetSubkeyNames(HKEY_LOCAL_MACHINE, key, names) then
|
||||
// Uninstall subkey names were found.
|
||||
begin
|
||||
i := 0
|
||||
while ((i < GetArrayLength(names)) and (Result = False)) do
|
||||
// The loop will end as soon as one instance of a Visual C++ redistributable is found.
|
||||
begin
|
||||
// For each uninstall subkey, look for a DisplayName value.
|
||||
// If not found, then the subkey name will be used instead.
|
||||
if not RegQueryStringValue(HKEY_LOCAL_MACHINE, key + '\' + names[i], 'DisplayName', dName) then
|
||||
dName := names[i];
|
||||
// See if the value contains both of the strings below.
|
||||
Result := (Pos(Trim('Visual C++ ' + year),dName) * Pos('Redistributable',dName) * Pos(platfm, dName) <> 0)
|
||||
i := i + 1;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
function BonjourInstalled: Boolean;
|
||||
// Returns True if Apple Bonjour is installed, otherwise False.
|
||||
// Ignores date/version of Bonjour.
|
||||
begin
|
||||
Result := False;
|
||||
// If this key exists, then
|
||||
// bonjour services must already be installed
|
||||
if RegKeyExists(HKEY_LOCAL_MACHINE, 'SYSTEM\CurrentControlSet\Services\Bonjour Service') then
|
||||
// Uninstall subkey names were found.
|
||||
begin
|
||||
Result := True;
|
||||
end;
|
||||
end;
|
||||
65
installers/win/medley.iss
Normal file
65
installers/win/medley.iss
Normal file
@@ -0,0 +1,65 @@
|
||||
;###############################################################################
|
||||
;#
|
||||
;# medley.iss - Inno Setup compiler script for creating a Windows
|
||||
;# installer for the medley.ps1 powrshell script for
|
||||
;# running Medley within a docker container on Windows
|
||||
;#
|
||||
;# 2023-02-12 Frank Halasz
|
||||
;#
|
||||
;# Copyright 2023 Interlisp.org
|
||||
;#
|
||||
;###############################################################################
|
||||
|
||||
#define x86_or_x64 "x64"
|
||||
#if GetEnv('COMBINED_RELEASE_TAG') != ""
|
||||
#define VERSION=GetEnv('COMBINED_RELEASE_TAG')
|
||||
#else
|
||||
#define VERSION="local"
|
||||
#endif
|
||||
|
||||
[Setup]
|
||||
PrivilegesRequired=lowest
|
||||
ArchitecturesAllowed={#x86_or_x64}
|
||||
AppName=Medley
|
||||
AppVersion={#version}
|
||||
AppPublisher=Interlisp.org
|
||||
AppPublisherURL=https://interlisp.org/
|
||||
AppCopyright=Copyright (C) 2023 Interlisp.org
|
||||
DefaultDirName={localappdata}\Medley\Scripts
|
||||
DefaultGroupName=Medley
|
||||
Compression=lzma2
|
||||
SolidCompression=yes
|
||||
; "ArchitecturesInstallIn64BitMode=x64" requests that the install be
|
||||
; done in "64-bit mode" on x64, meaning it should use the native
|
||||
; 64-bit Program Files directory and the 64-bit view of the registry.
|
||||
ArchitecturesInstallIn64BitMode=x64
|
||||
OutputDir="."
|
||||
OutputBaseFilename="medley-install_{#version}_{#x86_or_x64}"
|
||||
SetupIconFile="Medley.ico"
|
||||
DisableWelcomePage=no
|
||||
MissingRunOnceIdsWarning=no
|
||||
DisableProgramGroupPage=yes
|
||||
WizardImageFile=medley_logo.bmp
|
||||
WizardSmallImageFile=medley_logo_small.bmp
|
||||
WizardImageStretch=no
|
||||
UninstallDisplayIcon="{app}\Medley.ico"
|
||||
|
||||
|
||||
|
||||
[Files]
|
||||
Source: "..\..\scripts\medley\medley.ps1"; DestDir: "{app}"; DestName: "medley.ps1"; Flags: ignoreversion
|
||||
Source: "..\..\scripts\medley\medley.cmd"; DestDir: "{app}"; DestName: "medley.cmd"; Flags: ignoreversion
|
||||
Source: "editpath\x86_64\EditPath.exe"; DestDir: "{app}"; DestName: "EditPath.exe"; Flags: ignoreversion
|
||||
Source: "Medley.ico"; DestDir: "{app}"; DestName: "Medley.ico"; Flags: ignoreversion
|
||||
Source: "vncviewer64-1.12.0.exe"; DestDir: "{app}"; DestName: "vncviewer64-1.12.0.exe"; Flags: ignoreversion
|
||||
[Icons]
|
||||
Name: "{group}\Medley\Uninstall_Medley"; Filename: "{uninstallexe}"
|
||||
Name: "{group}\Medley\Medley"; Filename: "powershell"; Parameters: "-NoExit -File {app}\medley.ps1 --help"; IconFilename: "{app}\Medley.ico"
|
||||
|
||||
|
||||
[Run]
|
||||
Filename: "{app}\EditPath.exe"; Parameters: "--user --add {app}"; Flags: runhidden
|
||||
|
||||
[UninstallRun]
|
||||
Filename: "{app}\EditPath.exe"; Parameters: "--user --remove {app}"; Flags: runhidden
|
||||
|
||||
BIN
installers/win/medley_logo.bmp
Normal file
BIN
installers/win/medley_logo.bmp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 53 KiB |
BIN
installers/win/medley_logo.png
Normal file
BIN
installers/win/medley_logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 10 KiB |
BIN
installers/win/medley_logo_small.bmp
Normal file
BIN
installers/win/medley_logo_small.bmp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 13 KiB |
Reference in New Issue
Block a user