Forráskód Böngészése

Merge branch 'master' into is-6

Martijn Laan 7 éve
szülő
commit
958216ba06

+ 0 - 4
Files/Languages/Setup/Default.iss → Files/Languages/Setup/Default.isl

@@ -1,9 +1,5 @@
 ; *** Inno Setup version 5.7.0+ English installer messages ***
 ; *** Inno Setup version 5.7.0+ English installer messages ***
 ;
 ;
-; IMPORTANT: Before translating this text, make sure to prefix all messages
-; with your language's internal name followed by a period. See Italian.iss
-; for an example.
-;
 ; Note: When translating this text, do not add periods (.) to the end of
 ; Note: When translating this text, do not add periods (.) to the end of
 ; messages that didn't have them already, because on those messages Inno
 ; messages that didn't have them already, because on those messages Inno
 ; Setup adds the periods automatically (appending a period would result in
 ; Setup adds the periods automatically (appending a period would result in

+ 21 - 0
Files/Languages/Setup/Italian.isl

@@ -0,0 +1,21 @@
+; *** Inno Setup version 5.7.0+ Italian installer messages ***
+;
+; Note: When translating this text, do not add periods (.) to the end of
+; messages that didn't have them already, because on those messages Inno
+; Setup adds the periods automatically (appending a period would result in
+; two periods being displayed).
+;
+; Italian.isl - Last Update: 03.07.2018  by bovirus ([email protected])
+;
+; Translator name:   bovirus
+; Translator e-mail: [email protected]
+
+[Messages]
+HelpTextNote=/PORTABLE=1%nAbilita modo portatile.
+
+[CustomMessages]
+ISPPTitle=Inno Setup Preprocessor
+ISPPSubtitle=Vuoi installare Inno Setup Preprocessor?
+ISPPText=Inno Setup Preprocessor (ISPP) è un addon ufficiale per Inno Setup. ISPP ti permette di compilare condizionalmente parti degli script, di usare variabili tempo negli script e di usare le funzioni integrate che per esempio possono leggere dal Registro o da file INI durante la compilazione.%n%nISPP contiene inoltre una speciale versione del compilatroe a linea di comando ISCC che può leggere i valori delle variabili come parametri della linea di comando e usarli durante la compilazione.
+ISPPText2=Seleziona se vuoi installare ISPP, quindi fai clic su 'Avanti'.
+ISPPCheck=&Installa Inno Setup Preprocessor

+ 0 - 25
Files/Languages/Setup/Italian.iss

@@ -1,25 +0,0 @@
-; *** Inno Setup version 5.7.0+ Italian installer messages ***
-;
-; IMPORTANT: Before translating this text, make sure to prefix all messages
-; with your language's internal name followed by a period. See Italian.iss
-; for an example.
-;
-; Note: When translating this text, do not add periods (.) to the end of
-; messages that didn't have them already, because on those messages Inno
-; Setup adds the periods automatically (appending a period would result in
-; two periods being displayed).
-;
-; Italian.isl - Last Update: 03.07.2018  by bovirus ([email protected])
-;
-; Translator name:   bovirus
-; Translator e-mail: [email protected]
-
-[Messages]
-italian.HelpTextNote=/PORTABLE=1%nAbilita modo portatile.
-
-[CustomMessages]
-italian.ISPPTitle=Inno Setup Preprocessor
-italian.ISPPSubtitle=Vuoi installare Inno Setup Preprocessor?
-italian.ISPPText=Inno Setup Preprocessor (ISPP) è un addon ufficiale per Inno Setup. ISPP ti permette di compilare condizionalmente parti degli script, di usare variabili tempo negli script e di usare le funzioni integrate che per esempio possono leggere dal Registro o da file INI durante la compilazione.%n%nISPP contiene inoltre una speciale versione del compilatroe a linea di comando ISCC che può leggere i valori delle variabili come parametri della linea di comando e usarli durante la compilazione.
-italian.ISPPText2=Seleziona se vuoi installare ISPP, quindi fai clic su 'Avanti'.
-italian.ISPPCheck=&Installa Inno Setup Preprocessor

+ 12 - 19
setup.iss

@@ -44,28 +44,23 @@ SignedUninstaller=yes
   #if MatchingExtension(FileName, FindBaseExtension) ; Some systems also return .islu files when asked for *.isl
   #if MatchingExtension(FileName, FindBaseExtension) ; Some systems also return .islu files when asked for *.isl
     #define Name LowerCase(RemoveFileExt(FileName))
     #define Name LowerCase(RemoveFileExt(FileName))
     #define MessagesFile FindPathName + FileName
     #define MessagesFile FindPathName + FileName
-    #pragma message "Generating [Languages] entry with name " + Name + ": " + MessagesFile
-    Name: {#Name}; MessagesFile: {#MessagesFile}
-  #endif
-#endsub
-
-#sub ProcessFoundCustomMessagesFile
-  #define FileName FindGetFileName(FindHandle)
-  #if MatchingExtension(FileName, FindBaseExtension) ; See above
-    #define CustomMessagesFile FindPathName + FileName
-    #pragma message "Including CustomMessages file: " + CustomMessagesFile
-    #include CustomMessagesFile
+    #define CustomMessagesFile FindPathName + 'Setup\' + Name + '.' + FindBaseExtension
+    #pragma message "Generating [Languages] entry with name " + Name + ": " + MessagesFile + ', ' + CustomMessagesFile
+    #if FileExists(CustomMessagesFile)
+      Name: {#Name}; MessagesFile: "{#MessagesFile},{#CustomMessagesFile}"
+    #else
+      Name: {#Name}; MessagesFile: "{#MessagesFile}"
+    #endif
   #endif
   #endif
 #endsub
 #endsub
 
 
 #define FindPathName
 #define FindPathName
 #define FindBaseExtension
 #define FindBaseExtension
-#define FindType
 #define FindHandle
 #define FindHandle
 #define FindResult
 #define FindResult
 
 
 #sub DoFindFilesLoop
 #sub DoFindFilesLoop
-  #for {FindHandle = FindResult = FindFirst(FindPathName + "*." + FindBaseExtension, 0); FindResult; FindResult = FindNext(FindHandle)} FindType == 0 ? ProcessFoundLanguagesFile : ProcessFoundCustomMessagesFile
+  #for {FindHandle = FindResult = FindFirst(FindPathName + "*." + FindBaseExtension, 0); FindResult; FindResult = FindNext(FindHandle)} ProcessFoundLanguagesFile
   #if FindHandle
   #if FindHandle
     #expr FindClose(FindHandle)
     #expr FindClose(FindHandle)
   #endif
   #endif
@@ -79,16 +74,14 @@ SignedUninstaller=yes
   #endif
   #endif
 #endsub
 #endsub
 
 
-#define FindFiles(str PathName, str BaseExtension, int Type) \
-  FindPathName = PathName, FindBaseExtension = BaseExtension, FindType = Type, \
+#define FindFiles(str PathName, str BaseExtension) \
+  FindPathName = PathName, FindBaseExtension = BaseExtension, \
   DoFindFiles
   DoFindFiles
 
 
 [Languages]
 [Languages]
-Name: english; MessagesFile: "files\Default.isl"
+Name: english; MessagesFile: "files\Default.isl,files\Languages\Setup\Default.isl"
 ; Generate [Languages] entries for all official translations
 ; Generate [Languages] entries for all official translations
-#expr FindFiles("files\Languages\", "isl", 0)
-; Include translations of messages used by this script (includes the default messages)
-#expr FindFiles("files\Languages\Setup\", "iss", 1)
+#expr FindFiles("files\Languages\", "isl")
 
 
 [Messages]
 [Messages]
 ; Two "Setup" on the same line looks weird, so put a line break in between
 ; Two "Setup" on the same line looks weird, so put a line break in between