Run Exe file as an Embedded Resource
-
Hi
Only if u save it to a real file first.
There is no way to execute it as a resource. -
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.@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.
@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.