I'm currently developing an agent "Agent.app" which must scan your usb port and if it detect an usb device, the app start an application called "Filebrowser.app".
I want the Agent.app located inside the Filebrowser.app to avoid multiple apps.
My first app FileBrowser is develop in Qt/c++ under QT creator. I have also develop the Agent.app under Qt Creator but it's just a C++ class no relation with Qt.
I think I would need the agent.pri declared inside the FileBrowser.pri to make sure that the FileBrowser.app will include it.
What I have done in the agent is :
int main()
{
PulsUsbDetection *MyUSBDevice = new PulsUsbDetection;
if(MyUSBDevice->isPulsConnected() == true) {
char *filepath = "/Applications/puls_connect.app";
string command = "open " + filepath;
system(command.c_str());
}
return 0;
}
That's the worst thing I can do mainly if the app is not in Application.app.
I do have 2 questions:
- How to allow the agent.app to start the FileBrowser.app when the agent is inside the FileBrowser.app ?
- How to make sure that the agent.app will be included in the FileBrowser.app ?
Thanks a lot