Use a qt.conf to point plugins at qtplugins/ in the application path.

* We can point the platform plugins path at the application dir for
  qwindows.dll for example, but there's no equivalent for image format
  plugins which we need for qsvg.dll. So instead we shove them all under
  an explicit qtplugins path.
* Also now that we have this, copy qsvg.dll into the distribution.
This commit is contained in:
baldurk
2017-06-12 17:05:28 +01:00
parent 13e9096f94
commit 25f18defd4
4 changed files with 27 additions and 18 deletions
+1 -17
View File
@@ -137,21 +137,7 @@ int main(int argc, char *argv[])
filename = QString();
}
argc += 2;
char **argv_mod = new char *[argc];
for(int i = 0; i < argc - 2; i++)
argv_mod[i] = argv[i];
char arg[] = "-platformpluginpath";
QString path = QFileInfo(QString::fromUtf8(argv[0])).absolutePath();
QByteArray pathChars = path.toUtf8();
argv_mod[argc - 2] = arg;
argv_mod[argc - 1] = pathChars.data();
QApplication application(argc, argv_mod);
QApplication application(argc, argv);
{
PersistantConfig config;
@@ -247,7 +233,5 @@ int main(int argc, char *argv[])
Formatter::shutdown();
}
delete[] argv_mod;
return 0;
}
+2
View File
@@ -0,0 +1,2 @@
[Paths]
Plugins=qtplugins
+3
View File
@@ -68,4 +68,7 @@
<file>action.png</file>
<file>action_hover.png</file>
</qresource>
<qresource prefix="/qt/etc">
<file>qt.conf</file>
</qresource>
</RCC>
+21 -1
View File
@@ -1512,7 +1512,12 @@
<Visible>false</Visible>
</Content>
<Content Include="3rdparty\qt\$(Platform)\plugins\platforms\qwindows.dll">
<Link>qwindows.dll</Link>
<Link>qtplugins\platforms\qwindows.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Visible>false</Visible>
</Content>
<Content Include="3rdparty\qt\$(Platform)\plugins\imageformats\qsvg.dll">
<Link>qtplugins\imageformats\qsvg.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Visible>false</Visible>
</Content>
@@ -1541,6 +1546,21 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Visible>false</Visible>
</Content>
<Content Include="3rdparty\qt\$(Platform)\plugins\platforms\qwindowsd.dll" Condition="$(Configuration)==QTDebug">
<Link>qtplugins\platforms\qwindowsd.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Visible>false</Visible>
</Content>
<Content Include="3rdparty\qt\$(Platform)\plugins\imageformats\qsvgd.dll" Condition="$(Configuration)==QTDebug">
<Link>qtplugins\imageformats\qsvgd.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Visible>false</Visible>
</Content>
<Content Include="3rdparty\qt\$(Platform)\bin\Qt5Cored.dll" Condition="$(Configuration)==QTDebug">
<Link>Qt5Cored.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Visible>False</Visible>
</Content>
<Content Include="3rdparty\qt\$(Platform)\bin\Qt5Cored.dll" Condition="$(Configuration)==QTDebug">
<Link>Qt5Cored.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>