diff --git a/build-recipes/win_environment.iss b/build-recipes/win_environment.iss deleted file mode 100644 index 542fefc..0000000 --- a/build-recipes/win_environment.iss +++ /dev/null @@ -1,45 +0,0 @@ -[Code] - -const EnvironmentKey = 'SYSTEM\CurrentControlSet\Control\Session Manager\Environment'; - -procedure EnvAddPath(Path: string); -var - Paths: string; -begin - { Retrieve current path (use empty string if entry not exists) } - if not RegQueryStringValue(HKEY_LOCAL_MACHINE, EnvironmentKey, 'Path', Paths) - then Paths := ''; - - { Skip if string already found in path } - if Pos(';' + Uppercase(Path) + ';', ';' + Uppercase(Paths) + ';') > 0 then exit; - - { App string to the end of the path variable } - Paths := Paths + ';'+ Path +';' - - { Overwrite (or create if missing) path environment variable } - if RegWriteStringValue(HKEY_LOCAL_MACHINE, EnvironmentKey, 'Path', Paths) - then Log(Format('The [%s] added to PATH: [%s]', [Path, Paths])) - else Log(Format('Error while adding the [%s] to PATH: [%s]', [Path, Paths])); -end; - -procedure EnvRemovePath(Path: string); -var - Paths: string; - P: Integer; -begin - { Skip if registry entry not exists } - if not RegQueryStringValue(HKEY_LOCAL_MACHINE, EnvironmentKey, 'Path', Paths) then - exit; - - { Skip if string not found in path } - P := Pos(';' + Uppercase(Path) + ';', ';' + Uppercase(Paths) + ';'); - if P = 0 then exit; - - { Update path variable } - Delete(Paths, P - 1, Length(Path) + 1); - - { Overwrite path environment variable } - if RegWriteStringValue(HKEY_LOCAL_MACHINE, EnvironmentKey, 'Path', Paths) - then Log(Format('The [%s] removed from PATH: [%s]', [Path, Paths])) - else Log(Format('Error while removing the [%s] from PATH: [%s]', [Path, Paths])); -end; diff --git a/build-recipes/win_mpl-data-cast.iss_dummy b/build-recipes/win_mpl-data-cast.iss_dummy index aff369f..1a94af8 100644 --- a/build-recipes/win_mpl-data-cast.iss_dummy +++ b/build-recipes/win_mpl-data-cast.iss_dummy @@ -10,7 +10,6 @@ #define MyAppPlatform "win32" #define MyAppExeName "MPLDataCast.exe" #define MyAppDir = SourcePath + "dist\MPLDataCast\" -#include "win_environment.iss" [Setup] ChangesEnvironment=true @@ -45,8 +44,6 @@ Name: "german"; MessagesFile: "compiler:Languages\German.isl" [Tasks] Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked -Name: envPath; Description: "Add to PATH variable (required for mpldc.exe CLI)" - [Files] Source: "{#MyAppDir}{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion Source: "{#MyAppDir}*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs @@ -117,16 +114,4 @@ begin UnInstallOldVersion(); end; end; - if (CurStep = ssPostInstall) and IsTaskSelected('envPath') then - begin - EnvAddPath(ExpandConstant('{app}') +'\bin'); - end; -end; - -procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep); -begin - if CurUninstallStep = usPostUninstall then - begin - EnvRemovePath(ExpandConstant('{app}') +'\bin'); - end; end; diff --git a/docs/sec_intro.rst b/docs/sec_intro.rst index 5bca0df..7c2432c 100644 --- a/docs/sec_intro.rst +++ b/docs/sec_intro.rst @@ -7,7 +7,9 @@ Installation For Windows and macOS users, there are installers available at the `release page `_. The Windows installer also includes the :ref:`command line interface (CLI) ` -``mpldc.exe``. +``mpldc.exe``. You might want to add the installation directory to your Windows +PATH variable for conveniently using the CLI (see e.g. +`this guide `_). If you have Python installed, you can install MPL-Data-Cast with::