From d01353927592c1b0a629ce152f1dbc888c6bf164 Mon Sep 17 00:00:00 2001 From: Luca Di Leo Date: Wed, 29 Mar 2023 19:05:21 +0200 Subject: [PATCH] Merged Python38 folder with venv\Scripts --- innosetup.iss | 66 +-------------------------------------------------- 1 file changed, 1 insertion(+), 65 deletions(-) diff --git a/innosetup.iss b/innosetup.iss index a409439d..e1d2f377 100644 --- a/innosetup.iss +++ b/innosetup.iss @@ -47,7 +47,7 @@ Source: "stages\*"; DestDir: "{app}\stages"; Excludes: "__pycache__"; Flags: ign Source: "SuperBuild\install\bin\*"; DestDir: "{app}\SuperBuild\install\bin"; Excludes: "__pycache__"; Flags: ignoreversion recursesubdirs createallsubdirs Source: "SuperBuild\install\lib\python3.8\*"; DestDir: "{app}\SuperBuild\install\lib\python3.8"; Excludes: "__pycache__"; Flags: ignoreversion recursesubdirs createallsubdirs Source: "venv\*"; DestDir: "{app}\venv"; Excludes: "__pycache__,pyvenv.cfg"; Flags: ignoreversion recursesubdirs createallsubdirs -Source: "python38\*"; DestDir: "{app}\python38"; Excludes: "__pycache__"; Flags: ignoreversion recursesubdirs createallsubdirs +Source: "python38\*"; DestDir: "{app}\venv\Scripts"; Excludes: "__pycache__"; Flags: ignoreversion recursesubdirs createallsubdirs Source: "console.bat"; DestDir: "{app}"; Flags: ignoreversion Source: "VERSION"; DestDir: "{app}"; Flags: ignoreversion Source: "LICENSE"; DestDir: "{app}"; Flags: ignoreversion @@ -71,70 +71,6 @@ Filename: "{app}\console.bat"; Description: {cm:LaunchProgram,ODM Console}; Flag [Code] -function GetShortPath(const LongPath: string): string; -var - ResultCode: Integer; - TmpFileName: string; - ExecStdout: AnsiString; - Parameters: string; -begin - - // Create LongPath folder - if not ForceDirectories(LongPath) then begin - Result := LongPath; - Exit; - end; - - TmpFileName := ExpandConstant('{tmp}') + '\short_result.txt'; - Parameters := '-Command "(New-Object -ComObject Scripting.FileSystemObject).GetFolder(''' + LongPath + ''').ShortPath | Out-File -FilePath ''' + TmpFileName + ''' -Encoding ASCII"'; - - // Execute the PowerShell command and save the output to the TmpFileName - if Exec('powershell.exe', Parameters, '', 0, ewWaitUntilTerminated, ResultCode) then - begin - // Read the output from the TmpFileName - if LoadStringFromFile(TmpFileName, ExecStdout) then begin - Result := Trim(ExecStdout); - end - else begin - Result := LongPath; - end; - - DeleteFile(TmpFileName); - // Delete the folder - if not RemoveDir(LongPath) then begin - Result := LongPath; - Exit; - end; - - end - else - begin - Result := LongPath; - end; -end; - - -function NextButtonClick(CurPageID: Integer): Boolean; -var - Dir: string; -begin - if CurPageID = wpSelectDir then - begin - // Get the selected directory - Dir := WizardForm.DirEdit.Text; - - // Check if the path contains spaces - if Pos(' ', Dir) > 0 then - begin - // Get the short path name - Dir := GetShortPath(Dir); - // Set the selected directory to the short path name - WizardForm.DirEdit.Text := Dir; - end; - end; - Result := True; -end; - function VC2019RedistNeedsInstall: Boolean; var Version: String;