Hi Ivan,

On 24.01.2013 14:33, ???? ?????????? wrote:
Thank you for reviewing patches. I have 2 more questions. Is it possible to remove the dir i want to install app to? I found RemoveTargetDir variable, but setting it from config.xml makes no effect. Also i can't find code that remove the dir:)

What do you mean with target dir? I guess the question goes into the direction of an already existing directory?

And second questoin - i want to install my app into the "C:/Program Files" folder, however, in 64bit system that folder is named Program Files (x86) for 32bit app. Is it possible somehow to use system variables (qgetenv?) in an xml script, so i could write something like <TargetDir>@Program Files@/myinstall</TargetDir> ? I see code that searches in registry, but not in system variables...

If not already there, add to your root component should an installscript.qs. Inside there, specify a constructor like this:

// constructor
function Component()
{
    var programFiles = installer.environmentVariable("ProgramFiles");
    if (programFiles != "")
        installer.setValue("TargetDir", programFiles + "/foo");
}

I've tried this here and it sets the "TargetDir" variable to either "C:\Program Files" or "C:\Program Files (x86)". Please note that by default spaces are not allowed inside the target path, you can overwrite the behavior by setting <AllowSpaceInPath>true</AllowSpaceInPath> in your config.xml. See also: http://doc-snapshot.qt-project.org/qtifw-1.2/ifw-globalconfig.html#summary-of-configuration-settings

-- Karsten

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

Reply via email to