Run Exe file as an Embedded Resource
-
wrote on 13 Dec 2016, 15:01 last edited by
Hi it's possible with qt run exe file like embedded resource?
-
Hi
Only if u save it to a real file first.
There is no way to execute it as a resource. -
wrote on 13 Dec 2016, 15:35 last edited by RIVOPICO
I'm saying like:
i have one application with qt and i include my other .exe file like resource and run both files. ¿Is possible? -
I'm saying like:
i have one application with qt and i include my other .exe file like resource and run both files. ¿Is possible?@RIVOPICO
only if you save the "other .exe file" to a real file on the filesystem and call QProcess to start it.
Else no. -
@RIVOPICO
only if you save the "other .exe file" to a real file on the filesystem and call QProcess to start it.
Else no.wrote on 13 Dec 2016, 15:59 last edited by RIVOPICO@mrjj yeah i copy my files in my filesystem. And then run with qprocess but i don know how i can put these executable like resource in my main program and then use in my filesystem like executable. I can put the example i'm trying? or can take me some idea how to embedd exe like resource. thanks.
-
@mrjj yeah i copy my files in my filesystem. And then run with qprocess but i don know how i can put these executable like resource in my main program and then use in my filesystem like executable. I can put the example i'm trying? or can take me some idea how to embedd exe like resource. thanks.
@RIVOPICO
To include
http://www.bogotobogo.com/Qt/Qt5_Resource_Files.phpTo use ( pseudo code)
void ReadExe(QString Filename) { QFile mFile(Filename); if(!mFile.open(QFile::ReadOnly)) { qDebug() << "could not open file for read"; return; } QDataStream in(&mFile); QByteArray mExe = in.readAll(); mFile.close(); // save to file // run with QProcess }
Note is other exe is Qt program also u might get other issues finding the DLLS when running via QProcess.
-
@RIVOPICO
To include
http://www.bogotobogo.com/Qt/Qt5_Resource_Files.phpTo use ( pseudo code)
void ReadExe(QString Filename) { QFile mFile(Filename); if(!mFile.open(QFile::ReadOnly)) { qDebug() << "could not open file for read"; return; } QDataStream in(&mFile); QByteArray mExe = in.readAll(); mFile.close(); // save to file // run with QProcess }
Note is other exe is Qt program also u might get other issues finding the DLLS when running via QProcess.
wrote on 13 Dec 2016, 17:09 last edited by RIVOPICO@mrjj sorry for all! one last doubt. how i saw in the links, i can read one resource with the path and one function to read.
But i have one question:
i could include this resource at the content of my file.
And for example i can change the icon of one file adding one icon like resource using code.
Sorry i had doubts about this. -
@mrjj sorry for all! one last doubt. how i saw in the links, i can read one resource with the path and one function to read.
But i have one question:
i could include this resource at the content of my file.
And for example i can change the icon of one file adding one icon like resource using code.
Sorry i had doubts about this.@RIVOPICO
Hi im not sure
if ok or you asked something else :)
Im not sure what you means with the icons. -
wrote on 13 Dec 2016, 22:23 last edited by
Thanks sir you are very friendly! thanks again
7/9