Merge pull request #1627 from HeDo88TH/master

Fix strange python launcher error when folder has spaces
pull/1631/head
Piero Toffanin 2023-04-01 19:56:57 -04:00 zatwierdzone przez GitHub
commit 91201d5842
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
5 zmienionych plików z 34 dodań i 11 usunięć

Wyświetl plik

@ -58,17 +58,30 @@ jobs:
with:
python-version: '3.8.1'
architecture: 'x64'
- uses: Jimver/cuda-toolkit@v0.2.4
id: cuda-toolkit
with:
cuda: '11.4.0'
- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v1.13
with:
cmake-version: '3.24.x'
- name: Setup Visual C++
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64
- name: Install venv
run: |
python -m pip install virtualenv
- name: Build sources
run: |
python configure.py build
python configure.py build
- name: Free up space
run: |
rmdir SuperBuild\download /s /q
rmdir SuperBuild\build /s /q
shell: cmd
- name: Create setup
run: |
python configure.py dist
- name: Upload Setup File
uses: actions/upload-artifact@v2
with:
name: Setup
path: dist\*.exe

7
.gitignore vendored
Wyświetl plik

@ -28,3 +28,10 @@ settings.yaml
__pycache__
*.snap
storage/
vcpkg/
venv/
python38/
dist/
innosetup/

Wyświetl plik

@ -193,7 +193,7 @@ def dist():
z.extractall("innosetup")
# Run
cs_flags = ""
cs_flags = '/DSKIP_SIGN=1'
if args.code_sign_cert_path:
cs_flags = '"/Ssigntool=%s sign /f %s /fd SHA1 /t http://timestamp.sectigo.com $f"' % (signtool_path, args.code_sign_cert_path)
run("innosetup\\iscc /Qp " + cs_flags + " \"innosetup.iss\"")

Wyświetl plik

@ -30,7 +30,9 @@ Compression=lzma
SolidCompression=yes
ArchitecturesAllowed=x64
ArchitecturesInstallIn64BitMode=x64
#ifndef SKIP_SIGN
SignTool=signtool
#endif
PrivilegesRequired=lowest
PrivilegesRequiredOverridesAllowed=commandline
UsePreviousAppDir=no
@ -47,7 +49,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
@ -70,18 +72,19 @@ Filename: "{tmp}\vc_redist.x64.exe"; StatusMsg: "Installing Visual C++ Redistrib
Filename: "{app}\console.bat"; Description: {cm:LaunchProgram,ODM Console}; Flags: nowait postinstall skipifsilent
[Code]
function VC2019RedistNeedsInstall: Boolean;
var
var
Version: String;
begin
if RegQueryStringValue(HKEY_LOCAL_MACHINE,
'SOFTWARE\Microsoft\VisualStudio\14.0\VC\Runtimes\x64', 'Version', Version) then
begin
// Is the installed version at least 14.14 ?
// Is the installed version at least 14.14 ?
Log('VC Redist Version check : found ' + Version);
Result := (CompareStr(Version, 'v14.14.26429.03')<0);
end
else
else
begin
// Not even an old version installed
Result := True;

Wyświetl plik

@ -24,7 +24,7 @@ set PYTHONPATH=%VIRTUAL_ENV%
set PYENVCFG=%VIRTUAL_ENV%\pyvenv.cfg
rem Hot-patching pyvenv.cfg
echo home = %ODMBASE%\python38> "%PYENVCFG%"
echo home = %ODMBASE%venv\Scripts> "%PYENVCFG%"
echo include-system-site-packages = false>> "%PYENVCFG%"
rem Hot-patching cv2 extension configs