From 680455a21bf6b8dbdeda1169254e3965bf5863b1 Mon Sep 17 00:00:00 2001 From: sledgehammer999 Date: Sun, 2 Oct 2022 01:00:55 +0300 Subject: [PATCH] NSIS: Drop hardcoded qt's translation filenames --- dist/windows/README.txt | 3 +-- dist/windows/installer.nsi | 21 ++++++++------------- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/dist/windows/README.txt b/dist/windows/README.txt index d2d18a0e0..7fb26a4b8 100644 --- a/dist/windows/README.txt +++ b/dist/windows/README.txt @@ -42,8 +42,7 @@ translations You will need the files that conform to this globbing expression 'qt_??.qm qt_??_??.qm qtbase_??.qm qtbase_??_??.qm'. Some of those files will be stubs. Filter any file that is smaller than 10KB in size. Alternatively you can use the 'gather_qt_translations.py' script found in the same folder as this file. - Run it with '--help' to see its usage. - **YOU MUST** edit the list of .qm files in the 'installer.nsi' to match whatever files are in the 'translations' subfolder.) + Run it with '--help' to see its usage.) qt_zh_TW.qm installer.nsi license.txt diff --git a/dist/windows/installer.nsi b/dist/windows/installer.nsi index 846253eef..d7a8cfd3c 100644 --- a/dist/windows/installer.nsi +++ b/dist/windows/installer.nsi @@ -24,22 +24,17 @@ Section $(inst_qbt_req) ;"qBittorrent (required)" ; Set output path to the installation directory. SetOutPath $INSTDIR - - ;Create 'translations' directory - CreateDirectory $INSTDIR\translations - - ; Put file there + ; Put files there File "qbittorrent.exe" File "qbittorrent.pdb" File "qt.conf" - File /r "qtbase_*.qm" ; omit translations folder path to preserve folder structure - File /oname=translations\qt_fa.qm "translations\qt_fa.qm" - File /oname=translations\qt_gl.qm "translations\qt_gl.qm" - File /oname=translations\qt_lt.qm "translations\qt_lt.qm" - File /oname=translations\qt_pt.qm "translations\qt_pt.qm" - File /oname=translations\qt_sl.qm "translations\qt_sl.qm" - File /oname=translations\qt_sv.qm "translations\qt_sv.qm" - File /oname=translations\qt_zh_CN.qm "translations\qt_zh_CN.qm" + + ;Create 'translations' directory + CreateDirectory $INSTDIR\translations + ; Set output path to the installation\translations directory. + SetOutPath "$INSTDIR\translations" + ; Put files there + File /r "translations\qt*.qm" ; Write the installation path into the registry WriteRegStr HKLM "Software\qBittorrent" "InstallLocation" "$INSTDIR"