Uploaded image for project: 'Qt Installer Framework'
  1. Qt Installer Framework
  2. QTIFW-1478

TypeError cannot read property name

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • P1: Critical
    • None
    • 3.1.1
    • General
    • None
    • windows 10 qt 5

    Description

      
      
      I tried creating an installer following the tutorial. I then added a
      script called "installerscript.qs" as per the startmenu example in the
      Qt Installer Framework directory.
      
      The "installscript.qs" is as follows:
      
      .. code:: qs
      
          /****************************************************************************
          **
          **
          ** $QT_BEGIN_LICENSE:GPL-EXCEPT$
          ** 
          **
          **  open-editor to use.
          **  Copyright (C) 2018  os_sys-devlopment-group
          **
          **  This program is free software: you can redistribute it and/or modify
          **  it under the terms of the GNU 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 Public License for more details.
          **
          **  You should have received a copy of the GNU General Public License
          **  along with this program.  If not, see <https://www.gnu.org/licenses/>.
          ** view the full license at https://www.stranica.nl/open-editor/license.txt
          **
          ** $QT_END_LICENSE$
          **
          ****************************************************************************/
      
          function Component()
          {
              // default constructor
          }
      
          Component.prototype.createOperations = function()
          {
      
              component.createOperations();
      
      
              if (systemInfo.productType === "windows") {
                  component.addOperation("CreateShortcut", "@TargetDir@/customtexteditor.exe", "@StartMenuDir@/open-editor.lnk",
                      "workingDirectory=@TargetDir@","iconPath=%TargetDir%/Logo.ico");
                  component.addOperation("CreateDesktopShortcut", "@TargetDir@/customtexteditor.exe", "@DesktopDir@/open-editor.lnk", 
                      "workingDirectory=@TargetDir@", "iconPath=%TargetDir%/Logo.ico",);
              }
              
          }
      
      My package.xml is as below:
      
      ::
      
          <?xml version="1.0" encoding="UTF-8"?>
          <Package>
              <DisplayName>open-editor</DisplayName>
              <Description>open-editor</Description>
              <Version>1.0.2</Version>
              <ReleaseDate>2019-11-10</ReleaseDate>
              <Default>true</Default>
              <Name>open-editor</Name>
              <Licenses>
                  <License name="End User License Agreement" file="license.txt" />
              </Licenses>
              <ForcedInstallation>true</ForcedInstallation>
              <Script>installscript.qs</Script>
          </Package>
      
      When I execute the installer I get the error message:
      
      ::
      
          Exception while loading component script "D:\system\temp\remoterepo-Q2Q7ZU\open-editor\installscript.qs": TypeError: cannot read property 'name' of null on line number: 1
      
      This example worked when I tried it in the example directory. But gives
      me the above error when I modify it slightly to work with my own code.
      
      any ideas why it does not work?
      
      i use this command for binary creator:
      
      ::
      
          ..\..\bin\binarycreator.exe --online-only -c config\config.xml -p packages installer.exe
      
      you can follow the following link to view the whole project:
      https://ftp.stranica.nl/index/help/project you can find all the files of
      my project
      
          the zip file in that dictory has the whole package in it
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            installerteam Installer Team
            matthijs990 Matthijs Labots
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes