9#include <QtNetwork/QHostInfo>
12#include <QOpenGLFunctions>
20int main(
int argc,
char *argv[]){
21 QApplication qt(argc,argv);
22 QString localHostName=QHostInfo::localHostName();
23 qputenv(
"ARCANE_HYODA", QByteArray());
24 qputenv(
"ARCANE_HYODA_HOST",localHostName.toLocal8Bit());
25 QHostInfo info=QHostInfo::fromName(localHostName);
26 if (!info.addresses().isEmpty()){
27 QString adrs=QString(
"%1").arg(info.addresses().first().toIPv4Address());
29 qputenv(
"ARCANE_HYODA_ADRS", adrs.toLocal8Bit());
30 }
else qFatal(
"Empty list of IP addresses associated with hostName()");
32 qputenv(
"ARCANE_HYODA_PORT", QString(
"%1").arg(3889).toLocal8Bit());