mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-24 11:45:53 +01:00
Now using macros for the translations sections
This commit is contained in:
parent
1e6a49673e
commit
187a909b4f
@ -2,6 +2,7 @@
|
|||||||
!include "x64.nsh"
|
!include "x64.nsh"
|
||||||
!include "WinVer.nsh"
|
!include "WinVer.nsh"
|
||||||
|
|
||||||
|
|
||||||
; Macros
|
; Macros
|
||||||
!macro FILE_ASSOCIATION_ADD EXT DESC ICON
|
!macro FILE_ASSOCIATION_ADD EXT DESC ICON
|
||||||
WriteRegStr HKCR ".${EXT}" "" "GPXSee.${EXT}"
|
WriteRegStr HKCR ".${EXT}" "" "GPXSee.${EXT}"
|
||||||
@ -15,6 +16,17 @@
|
|||||||
DeleteRegKey HKCR ".${EXT}"
|
DeleteRegKey HKCR ".${EXT}"
|
||||||
!macroend
|
!macroend
|
||||||
|
|
||||||
|
!macro LOCALIZATION LANG CODE
|
||||||
|
Section "${LANG}"
|
||||||
|
CreateDirectory "$INSTDIR\translations"
|
||||||
|
File /oname=translations\gpxsee_${CODE}.qm translations\gpxsee_${CODE}.qm
|
||||||
|
!if /FileExists translations\qt_${CODE}.qm
|
||||||
|
File /oname=translations\qt_${CODE}.qm translations\qt_${CODE}.qm
|
||||||
|
!endif
|
||||||
|
SectionEnd
|
||||||
|
!macroend
|
||||||
|
|
||||||
|
|
||||||
; The name of the installer
|
; The name of the installer
|
||||||
Name "GPXSee"
|
Name "GPXSee"
|
||||||
; Program version
|
; Program version
|
||||||
@ -188,40 +200,13 @@ Section "ANGLE" SEC_ANGLE
|
|||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
SectionGroup "Localization" SEC_LOCALIZATION
|
SectionGroup "Localization" SEC_LOCALIZATION
|
||||||
Section "Czech"
|
!insertmacro LOCALIZATION "Czech" "cs"
|
||||||
CreateDirectory "$INSTDIR\translations"
|
!insertmacro LOCALIZATION "Finnish" "fi"
|
||||||
File /oname=translations\gpxsee_cs.qm translations\gpxsee_cs.qm
|
!insertmacro LOCALIZATION "French" "fr"
|
||||||
File /oname=translations\qt_cs.qm translations\qt_cs.qm
|
!insertmacro LOCALIZATION "German" "de"
|
||||||
SectionEnd
|
!insertmacro LOCALIZATION "Polish" "pl"
|
||||||
Section "Finnish"
|
!insertmacro LOCALIZATION "Russian" "ru"
|
||||||
CreateDirectory "$INSTDIR\translations"
|
!insertmacro LOCALIZATION "Swedish" "sv"
|
||||||
File /oname=translations\gpxsee_fi.qm translations\gpxsee_fi.qm
|
|
||||||
File /oname=translations\qt_fi.qm translations\qt_fi.qm
|
|
||||||
SectionEnd
|
|
||||||
Section "French"
|
|
||||||
CreateDirectory "$INSTDIR\translations"
|
|
||||||
File /oname=translations\gpxsee_fr.qm translations\gpxsee_fr.qm
|
|
||||||
File /oname=translations\qt_fr.qm translations\qt_fr.qm
|
|
||||||
SectionEnd
|
|
||||||
Section "German"
|
|
||||||
CreateDirectory "$INSTDIR\translations"
|
|
||||||
File /oname=translations\gpxsee_de.qm translations\gpxsee_de.qm
|
|
||||||
File /oname=translations\qt_de.qm translations\qt_de.qm
|
|
||||||
SectionEnd
|
|
||||||
Section "Polish"
|
|
||||||
CreateDirectory "$INSTDIR\translations"
|
|
||||||
File /oname=translations\gpxsee_pl.qm translations\gpxsee_pl.qm
|
|
||||||
File /oname=translations\qt_pl.qm translations\qt_pl.qm
|
|
||||||
SectionEnd
|
|
||||||
Section "Russian"
|
|
||||||
CreateDirectory "$INSTDIR\translations"
|
|
||||||
File /oname=translations\gpxsee_ru.qm translations\gpxsee_ru.qm
|
|
||||||
File /oname=translations\qt_ru.qm translations\qt_ru.qm
|
|
||||||
SectionEnd
|
|
||||||
Section "Swedish"
|
|
||||||
CreateDirectory "$INSTDIR\translations"
|
|
||||||
File /oname=translations\gpxsee_sv.qm translations\gpxsee_sv.qm
|
|
||||||
SectionEnd
|
|
||||||
SectionGroupEnd
|
SectionGroupEnd
|
||||||
|
|
||||||
;--------------------------------
|
;--------------------------------
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
!include "x64.nsh"
|
!include "x64.nsh"
|
||||||
!include "WinVer.nsh"
|
!include "WinVer.nsh"
|
||||||
|
|
||||||
|
|
||||||
; Macros
|
; Macros
|
||||||
!macro FILE_ASSOCIATION_ADD EXT DESC ICON
|
!macro FILE_ASSOCIATION_ADD EXT DESC ICON
|
||||||
WriteRegStr HKCR ".${EXT}" "" "GPXSee.${EXT}"
|
WriteRegStr HKCR ".${EXT}" "" "GPXSee.${EXT}"
|
||||||
@ -15,6 +16,17 @@
|
|||||||
DeleteRegKey HKCR ".${EXT}"
|
DeleteRegKey HKCR ".${EXT}"
|
||||||
!macroend
|
!macroend
|
||||||
|
|
||||||
|
!macro LOCALIZATION LANG CODE
|
||||||
|
Section "${LANG}"
|
||||||
|
CreateDirectory "$INSTDIR\translations"
|
||||||
|
File /oname=translations\gpxsee_${CODE}.qm translations\gpxsee_${CODE}.qm
|
||||||
|
!if /FileExists translations\qt_${CODE}.qm
|
||||||
|
File /oname=translations\qt_${CODE}.qm translations\qt_${CODE}.qm
|
||||||
|
!endif
|
||||||
|
SectionEnd
|
||||||
|
!macroend
|
||||||
|
|
||||||
|
|
||||||
; The name of the installer
|
; The name of the installer
|
||||||
Name "GPXSee"
|
Name "GPXSee"
|
||||||
; Program version
|
; Program version
|
||||||
@ -190,40 +202,13 @@ Section "ANGLE" SEC_ANGLE
|
|||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
SectionGroup "Localization" SEC_LOCALIZATION
|
SectionGroup "Localization" SEC_LOCALIZATION
|
||||||
Section "Czech"
|
!insertmacro LOCALIZATION "Czech" "cs"
|
||||||
CreateDirectory "$INSTDIR\translations"
|
!insertmacro LOCALIZATION "Finnish" "fi"
|
||||||
File /oname=translations\gpxsee_cs.qm translations\gpxsee_cs.qm
|
!insertmacro LOCALIZATION "French" "fr"
|
||||||
File /oname=translations\qt_cs.qm translations\qt_cs.qm
|
!insertmacro LOCALIZATION "German" "de"
|
||||||
SectionEnd
|
!insertmacro LOCALIZATION "Polish" "pl"
|
||||||
Section "Finnish"
|
!insertmacro LOCALIZATION "Russian" "ru"
|
||||||
CreateDirectory "$INSTDIR\translations"
|
!insertmacro LOCALIZATION "Swedish" "sv"
|
||||||
File /oname=translations\gpxsee_fi.qm translations\gpxsee_fi.qm
|
|
||||||
File /oname=translations\qt_fi.qm translations\qt_fi.qm
|
|
||||||
SectionEnd
|
|
||||||
Section "French"
|
|
||||||
CreateDirectory "$INSTDIR\translations"
|
|
||||||
File /oname=translations\gpxsee_fr.qm translations\gpxsee_fr.qm
|
|
||||||
File /oname=translations\qt_fr.qm translations\qt_fr.qm
|
|
||||||
SectionEnd
|
|
||||||
Section "German"
|
|
||||||
CreateDirectory "$INSTDIR\translations"
|
|
||||||
File /oname=translations\gpxsee_de.qm translations\gpxsee_de.qm
|
|
||||||
File /oname=translations\qt_de.qm translations\qt_de.qm
|
|
||||||
SectionEnd
|
|
||||||
Section "Polish"
|
|
||||||
CreateDirectory "$INSTDIR\translations"
|
|
||||||
File /oname=translations\gpxsee_pl.qm translations\gpxsee_pl.qm
|
|
||||||
File /oname=translations\qt_pl.qm translations\qt_pl.qm
|
|
||||||
SectionEnd
|
|
||||||
Section "Russian"
|
|
||||||
CreateDirectory "$INSTDIR\translations"
|
|
||||||
File /oname=translations\gpxsee_ru.qm translations\gpxsee_ru.qm
|
|
||||||
File /oname=translations\qt_ru.qm translations\qt_ru.qm
|
|
||||||
SectionEnd
|
|
||||||
Section "Swedish"
|
|
||||||
CreateDirectory "$INSTDIR\translations"
|
|
||||||
File /oname=translations\gpxsee_sv.qm translations\gpxsee_sv.qm
|
|
||||||
SectionEnd
|
|
||||||
SectionGroupEnd
|
SectionGroupEnd
|
||||||
|
|
||||||
;--------------------------------
|
;--------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user