The problem of a .qs file when creating a shortcut
-
Hi all,
I think you all have experienced this step and for me it's the first time.
I'm going to create an installer for my Qt app using Qt Installer Framework.
The scenario is as follows:I have a Qt
Cal_app.exe
file and apackage_directory
folder on my Windows Desktop with the following contents:-
The
config
folder contains a config.xml file. -
The
packages
folder contains a subfolder namedcom.vendor.product
. And it, contains two other subfolders nameddata
andmeta
. -
The
data
subfolder contains a file nameddata.7z
. -
The
meta
subfolder contains three files: Alicense.txt
file, a package.xml file, and a installscript.qs file.
By a Command Line, I try to use the
binarycreator.exe
file to create the installer this way:C:\Qt\QtIFW2.0.3\bin\binarycreator.exe -c C:\Users\CS\Desktop\package_directory\config\config.xml -p C:\Users\CS\Desktop\package_directory\packages C:\Users\CS\Desktop\Cal_app.exe
The Command is run well and without any error and it creates an installer (program) named
Cal_app
on my Desktop.When I run that program to install it on my Windows machine, it will be installed and it also (like any usual program) creates a shortcut named
Cal
on the Desktop. Until now everything OK.But the problem!
The problem is that, that shortcut file (Cal
) is an unknown file and it shows an error message!My question is, what is the problem with the
installscript.qs
file that creates an "unknown" shortcut, and how to solve it, so that it creates a useful shortcut please? -
Couple of other questions. Does your software works from the directory where it is installed? Are able to create shortcut for your program manua and does it works ?
-
Hi all,
I think you all have experienced this step and for me it's the first time.
I'm going to create an installer for my Qt app using Qt Installer Framework.
The scenario is as follows:I have a Qt
Cal_app.exe
file and apackage_directory
folder on my Windows Desktop with the following contents:-
The
config
folder contains a config.xml file. -
The
packages
folder contains a subfolder namedcom.vendor.product
. And it, contains two other subfolders nameddata
andmeta
. -
The
data
subfolder contains a file nameddata.7z
. -
The
meta
subfolder contains three files: Alicense.txt
file, a package.xml file, and a installscript.qs file.
By a Command Line, I try to use the
binarycreator.exe
file to create the installer this way:C:\Qt\QtIFW2.0.3\bin\binarycreator.exe -c C:\Users\CS\Desktop\package_directory\config\config.xml -p C:\Users\CS\Desktop\package_directory\packages C:\Users\CS\Desktop\Cal_app.exe
The Command is run well and without any error and it creates an installer (program) named
Cal_app
on my Desktop.When I run that program to install it on my Windows machine, it will be installed and it also (like any usual program) creates a shortcut named
Cal
on the Desktop. Until now everything OK.But the problem!
The problem is that, that shortcut file (Cal
) is an unknown file and it shows an error message!My question is, what is the problem with the
installscript.qs
file that creates an "unknown" shortcut, and how to solve it, so that it creates a useful shortcut please?it sounds like the installer did exactly that, what you told him to do.
The problem seems to be in the data folder. Here you'll have to place all necessary files and dlls your program needst o run, including your executable.
If you pack your file to a *.7z file instead of placing them uncompressed into the folder. The installer does not know, that it has to unpack the files in the data folder, and you'll have to tell him, to do so.
I'm not sure if or how you can tell the QtInstallerframework that the files in data-folder need to be unpacked. I'm afraid, I'm not using the framework often enough myself.
-
Couple of other questions. Does your software works from the directory where it is installed? Are able to create shortcut for your program manua and does it works ?
Does your software works from the directory where it is installed?
It is installed in the
InstallationDirectory
directory in the path: C:\Users\CS. (as stated in theconfig.xml
file <TargetDir>@HomeDir@/InstallationDirectory</TargetDir>).But the
Cal.exe
file doesn't work there!Are able to create shortcut for your program manua and does it works ?
I think the problem is about the
data
subdirectory.it sounds like the installer did exactly that, what you told him to do.
The problem seems to be in the data folder. Here you'll have to place all necessary files and dlls your program needst o run, including your executable.
If you pack your file to a *.7z file instead of placing them uncompressed into the folder. The installer does not know, that it has to unpack the files in the data folder, and you'll have to tell him, to do so.
Yes, I, too, think that (as the error message in my previous post stated) the problem is of the
data
folder. -
I tried to fix the issue of the
data
folder this way:I firstly placed the
Cal.exe
with its required.dll
files into thedata
folder in its path:
C:\Users\CS\Desktop\package_directory\packages\com.vendor.product\data
I tested theCal.exe
and it worked fine.Then I ran the
windeployqt
on thatdata
folder. The Command created some extra files and folders there. Now once again I went for testing theCal.exe
to see if it works or not. It didn't!!! It didn't work! :(Gave this error message.
If it works after running
windeployqt
, I will make it a.7z
file and go for creating the installer. -
I tried to fix the issue of the
data
folder this way:I firstly placed the
Cal.exe
with its required.dll
files into thedata
folder in its path:
C:\Users\CS\Desktop\package_directory\packages\com.vendor.product\data
I tested theCal.exe
and it worked fine.Then I ran the
windeployqt
on thatdata
folder. The Command created some extra files and folders there. Now once again I went for testing theCal.exe
to see if it works or not. It didn't!!! It didn't work! :(Gave this error message.
If it works after running
windeployqt
, I will make it a.7z
file and go for creating the installer.if it works after running windeployqt, don't make a .7z out of it, just copy the files as they are to the data folder.
I know it says otherwise in the docu:
Data Directory The data directory contains the content that the installer extracts during the installation. You must package the data as a 7zip archive (.7z). You can use either the archivegen tool that is delivered with the Qt Installer Framework or some other tool that generates 7zip archives.
but I did not read that previously and the installer framework works 100% fine and correct for me. This entry might refer to an older version of the installer.
-
if it works after running windeployqt, don't make a .7z out of it, just copy the files as they are to the data folder.
I know it says otherwise in the docu:
Data Directory The data directory contains the content that the installer extracts during the installation. You must package the data as a 7zip archive (.7z). You can use either the archivegen tool that is delivered with the Qt Installer Framework or some other tool that generates 7zip archives.
but I did not read that previously and the installer framework works 100% fine and correct for me. This entry might refer to an older version of the installer.
-
-
@tomy
mmh
seems like windeployqt uses outdated dll's.
the dlls have the qt-versions code of 5.7.0.0 Did you compile for 5.7 or 5.8?I replaced the dll's with those from my qt5.8 folder and I could start your programm.