mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-20 13:23:34 -07:00
Merge pull request #18456 from sledgehammer999/win_shorcut_cwd
Fix PDB loading for valid stacktraces
This commit is contained in:
commit
c6a1b977b3
2 changed files with 13 additions and 0 deletions
2
dist/windows/installer.nsi
vendored
2
dist/windows/installer.nsi
vendored
|
@ -35,6 +35,8 @@ Section $(inst_qbt_req) ;"qBittorrent (required)"
|
|||
SetOutPath "$INSTDIR\translations"
|
||||
; Put files there
|
||||
File /r "translations\qt*.qm"
|
||||
; Restore output path because it affects `CreateShortCut`. It affects the "Start in" field.
|
||||
SetOutPath $INSTDIR
|
||||
|
||||
; Write the installation path into the registry
|
||||
WriteRegStr HKLM "Software\qBittorrent" "InstallLocation" "$INSTDIR"
|
||||
|
|
|
@ -118,6 +118,17 @@ int main(int argc, char *argv[])
|
|||
// Create Application
|
||||
auto app = std::make_unique<Application>(argc, argv);
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
// QCoreApplication::applicationDirPath() needs an Application object instantiated first
|
||||
// Let's hope that there won't be a crash before this line
|
||||
const char *envName = "_NT_SYMBOL_PATH";
|
||||
const QString envValue = qEnvironmentVariable(envName);
|
||||
if (envValue.isEmpty())
|
||||
qputenv(envName, Application::applicationDirPath().toLocal8Bit());
|
||||
else
|
||||
qputenv(envName, u"%1;%2"_qs.arg(envValue, Application::applicationDirPath()).toLocal8Bit());
|
||||
#endif
|
||||
|
||||
const QBtCommandLineParameters params = app->commandLineArgs();
|
||||
if (!params.unknownParameter.isEmpty())
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue