Hey first: see 
https://github.com/qtproject/installer-framework/blob/master/examples/startmenu/packages/org.qtproject.ifw.example/meta/installscript.qs

If you compare yours and the small example you can see that we create the 
operation inside the createOperations method/hook. The reason is that the ui 
where the user can change the startmenu link location is called after the 
javascript component constructor.
The createOperations method/hook is called just before the real installation 
starts.

So your problem is fixed if you use that from the example. 

Further explanation ... your use and the bug 
https://bugreports.qt-project.org/browse/QTIFW-346 created your found 
unexpected behaviour.
The default value of the startmenu is set after the constructor of the 
component in fact in the ui and this needs to be changed.


Cheers Tim
________________________________________
Von: interest-bounces+tim.jenssen=digia....@qt-project.org 
[interest-bounces+tim.jenssen=digia....@qt-project.org]" im Auftrag von 
"baneyue [bane...@gmail.com]
Gesendet: Montag, 26. August 2013 10:35
An: interest@qt-project.org
Betreff: [Interest] Qt Installer Framework: cannot create start menu    
shortcut on Win7

I followed the Qt Installer Framework Manual, every just worked expect
create start menu shortcut on win7.

The _config.xml_ contains:
        ...
        <StartMenuDir>my_verdor/my_app</StartMenuDir>
        ...

and the _installscript.qs_:
        function Component() {
                var programFiles =
                installer.environmentVariable("ProgramFiles");
                if(programFiles!="")
                        install.setValue("TargetDir", programFiles +
                        "/my_vendor/my_app);

                if(install.value("os")==="win") {
                        component.addOperation("CreateShortCut",
                        "@TargetDir@/my_app.exe",
                        installer.value("StartMenuDir")+"/my_app.lnk");
                }
        }

According to the manual, this should create a group in the start menu
that contain shortcut to my_app, but every time i run the installer
program, it just create a folder called "my_vendor/my_app" contain
shortcut *in where the installer was located*.

Someone would help?
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to