Qt installer framework reading text file for installation path -
i'm creating installer , need have functionality read text file , installation params. specifically, need read installation path text file. trying use filereader js, can't figure out how used inside controller.prototype.targetdirectorypagecallback function. maybe there easier approach that? working sample maybe?
the script context has few objects.
- console
- qfiledialog
- qstr
- systeminfo
- qinstaller
- buttons
- qmessagebox
- qdesktopservices
- installer
- gui
the "installer" object important 1 (see http://doc.qt.io/qtinstallerframework/scripting-installer.html#execute-method). of execute method can run application on system. here untested code suggestion:
if (installer.value("os") == "win") { var windir = installer.environmentvariable("windir"); if (windir == "") print("could not find windows installation directory."); var cmdlocation = windir + "\\system32\\cmd.exe"; var filecontent = installer.execute(cmdlocation, new array("/c", "type", <your_file>))[0]; yes not comfortable - maybe should create feature request or add kind of functionality installer framework.
Comments
Post a Comment