Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Qt Installer Framework: component scripting problem
Forum Updated to NodeBB v4.3 + New Features

Qt Installer Framework: component scripting problem

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
1 Posts 1 Posters 365 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    IMZed
    wrote on last edited by IMZed
    #1

    Hi everyone, I would like to install Python and additional libraries for Python with the provided installer.
    To make this I have to know the path of Python without to check the "Add Python to PATH" option in the Python installer. The problem is that the getEnvironmentVariable() and the getPythonSp() are run before the addOperation(), and I can not retrieve with the Python site-packages path to move libraries into it.

    Component.prototype.createOperations = function()
    {
        component.createOperations();
        var python, path;
    
        if (systemInfo.kernelType === 'winnt') {
            component.addOperation('Execute', '@TargetDir@/python-3.6.5-amd64.exe');
            component.addOperation('Execute', 'py', ['-c', 'import os, sys; os.system("setx PYTHONTEMP " + ";".join(sys.path))']);
    
            python = getEnvironmentVariable('PYTHONTEMP');
            path = getPythonSp(python);
    
            [...]  // additional operations
    
            component.addOperation('Execute', 'cmd', ['/c', 'REG DELETE HKCU\\Environment /f /v PYTHONTEMP']);
        }
    }
    

    I would be grateful, if anyone could help to solve my problem.

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved