summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xContrib/Language files/French.nlf2
-rwxr-xr-xContrib/Language files/NorwegianNynorsk.nlf191
-rwxr-xr-xContrib/Language files/SConscript1
-rwxr-xr-xContrib/Modern UI/Language files/French.nsh2
-rwxr-xr-xContrib/Modern UI/Language files/NorwegianNynorsk.nsh94
-rwxr-xr-xContrib/Modern UI/SConscript1
-rwxr-xr-xContrib/NSISdl/asyncdns.cpp34
-rwxr-xr-xContrib/NSISdl/asyncdns.h5
-rwxr-xr-xContrib/System/Source/System.c33
-rwxr-xr-xContrib/System/System.html2
-rwxr-xr-xDocs/src/credits.but2
-rwxr-xr-xDocs/src/file.but2
-rwxr-xr-xDocs/src/history.but36
-rwxr-xr-xDocs/src/int.but2
-rwxr-xr-xDocs/src/usefulfunc.but51
-rwxr-xr-xExamples/Modern UI/MultiLanguage.nsi2
-rwxr-xr-xExamples/makensis.nsi19
-rwxr-xr-xMenu/images/header.gifbin12251 -> 12251 bytes
-rwxr-xr-xScripts/release.py1
-rwxr-xr-xSource/Platform.h2
-rwxr-xr-xSource/build.cpp18
-rwxr-xr-xSource/script.cpp6
-rwxr-xr-xSource/util.cpp27
-rwxr-xr-xSource/util.h2
24 files changed, 454 insertions, 81 deletions
diff --git a/Contrib/Language files/French.nlf b/Contrib/Language files/French.nlf
index 9ea73f7..6d6f634 100755
--- a/Contrib/Language files/French.nlf
+++ b/Contrib/Language files/French.nlf
@@ -98,7 +98,7 @@ Sélectionnez le type de désinstallation :
# ^UnComponentsSubText2_NoInstTypes
Sélectionnez les composants à désinstaller :
# ^UnComponentsSubText2
-Ou, sélectionnez les composants optionnels que vous voulez déinstaller :
+Ou, sélectionnez les composants optionnels que vous voulez désinstaller :
# ^DirText
Ceci installera $(^NameDA) dans le dossier suivant. Pour installer dans un autre dossier, cliquez sur Parcourir et choisissez un autre dossier. $_CLICK
# ^DirSubText
diff --git a/Contrib/Language files/NorwegianNynorsk.nlf b/Contrib/Language files/NorwegianNynorsk.nlf
new file mode 100755
index 0000000..a9c550b
--- /dev/null
+++ b/Contrib/Language files/NorwegianNynorsk.nlf
@@ -0,0 +1,191 @@
+# Header, don't edit
+NLF v6
+# Language ID
+2068
+# Font and size - dash (-) means default
+-
+-
+# Codepage - dash (-) means ANSI code page
+-
+# RTL - anything else than RTL means LTR
+-
+# Translation by Vebjørn Sture, vsture gmail com
+# ^Branding
+Nullsoft Install System %s
+# ^SetupCaption
+$(^Name) installasjon
+# ^UninstallCaption
+$(^Name) avinstallasjon
+# ^LicenseSubCaption
+: Lisensavtale
+# ^ComponentsSubCaption
+: Installasjonsval
+# ^DirSubCaption
+: Installasjonsmappe
+# ^InstallingSubCaption
+: Installerer
+# ^CompletedSubCaption
+: Ferdig
+# ^UnComponentsSubCaption
+: Avinstallasjonsval
+# ^UnDirSubCaption
+: Avinstallasjonsmappe
+# ^ConfirmSubCaption
+: Stadfest
+# ^UninstallingSubCaption
+: Avinstallerer
+# ^UnCompletedSubCaption
+: Ferdig
+# ^BackBtn
+< &Attende
+# ^NextBtn
+&Neste >
+# ^AgreeBtn
+&Godta
+# ^AcceptBtn
+Eg &godtek vilkåra i lisensavtalen
+# ^DontAcceptBtn
+Eg godtek &ikkje vilkåra i lisensavtalen
+# ^InstallBtn
+&Installer
+# ^UninstallBtn
+&Avinstaller
+# ^CancelBtn
+Avbryt
+# ^CloseBtn
+&Lat att
+# ^BrowseBtn
+Bla &gjennom ...
+# ^ShowDetailsBtn
+Syn &detaljar
+# ^ClickNext
+Trykk Neste for å halda fram.
+# ^ClickInstall
+Trykk Installer for å starta installasjonen.
+# ^ClickUninstall
+Trykk Avinstaller for å starta avinstallasjonen.
+# ^Name
+Namn
+# ^Completed
+Ferdig
+# ^LicenseText
+Ver grei og les gjennom lisensavtalen før du installerer $(^NameDA). Dersom du godtek vilkåra i avtalen, trykk på Godta.
+# ^LicenseTextCB
+Ver grei og les gjennom lisensavtalen før du installerer $(^NameDA). Dersom du godtek vilkåra i avtalen, merk av under. $_CLICK
+# ^LicenseTextRB
+Ver grei og les gjennom lisensavtalen før du installerer $(^NameDA). Dersom du godtek vilkåra i avtalen, vel det fyrste alternativet. $_CLICK
+# ^UnLicenseText
+Ver grei og les gjennom lisensavtalen før du avinstallerer $(^NameDA). Dersom du godtek vilkåra i avtalen, trykk på Godta.
+# ^UnLicenseTextCB
+Ver grei og les gjennom lisensavtalen før du avinstallerer $(^NameDA). Dersom du godtek vilkåra i avtalen, merk av under. $_CLICK
+# ^UnLicenseTextRB
+Ver grei og les gjennom lisensavtalen før du avinstallerer $(^NameDA). Dersom du godtek vilkåra i avtalen, vel det fyrste alternativet. $_CLICK
+# ^Custom
+Eigendefinert
+# ^ComponentsText
+Merk komponentane du vil installera og fjern merkinga for dei du ikkje vil installera. $_CLICK
+# ^ComponentsSubText1
+Vel kva måte du vil installera på:
+# ^ComponentsSubText2_NoInstTypes
+Merk komponentar du vil installera:
+# ^ComponentsSubText2
+Eller merk dei valfrie komponentane du ynskjer å installera:
+# ^UnComponentsText
+Merk komponentane du vil avinstallera og fjern merkinga for dei du vil ta vare på. $_CLICK
+# ^UnComponentsSubText1
+Vel kva måte du vil avinstallera på:
+# ^UnComponentsSubText2_NoInstTypes
+Merk komponentar du vil avinstallera:
+# ^UnComponentsSubText2
+Eller merk dei valfrie komponentane du ynskjer å avinstallera:
+# ^DirText
+$(^NameDA) vil verta installert i fylgjande mappe. For å velja ei anna mappe, trykk Bla gjennom. $_CLICK
+# ^DirSubText
+Målmappe
+# ^DirBrowseText
+Vel mappe du vil installera $(^NameDA) i:
+# ^UnDirText
+$(^NameDA) i fylgjande mappe vil verta avinstallert. For å velja ei anna mappe, trykk Bla gjennom. $_CLICK
+# ^UnDirSubText
+""
+# ^UnDirBrowseText
+Vel mappe du vil avinstallera $(^NameDA) frå:
+# ^SpaceAvailable
+"Ledig plass: "
+# ^SpaceRequired
+"Naudsynt plass: "
+# ^UninstallingText
+Denne vegvisaren vil avinstallera $(^NameDA) frå din datamaskin. $_CLICK
+# ^UninstallingSubText
+Avinstallerer frå:
+# ^FileError
+Feil under opning av fil for skriving: \r\n\t\"$0\"\r\nTrykk Avbryt for å avbryta installasjonen,\r\nPrøv igjen for å prøva igjen, eller\r\nIgnorer for å hoppa over denne fila
+# ^FileError_NoIgnore
+Feil under opning av fil for skriving: \r\n\t\"$0\"\r\nTrykk Prøv igjen for å prøva igjen, or\r\neller Avbryt for å avbryta installasjonen
+# ^CantWrite
+"Kan ikkje skriva: "
+# ^CopyFailed
+Kopiering mislukka
+# ^CopyTo
+"Kopier til "
+# ^Registering
+"Registrerer: "
+# ^Unregistering
+""Avregistrerer: "
+# ^SymbolNotFound
+"Kunne ikkje finna symbol: "
+# ^CouldNotLoad
+"Kunne ikkje lasta: "
+# ^CreateFolder
+"Lag mappe: "
+# ^CreateShortcut
+"Lag snarveg: "
+# ^CreatedUninstaller
+"Avinstallasjon laga: "
+# ^Delete
+"Slett fil: "
+# ^DeleteOnReboot
+"Slett ved omstart: "
+# ^ErrorCreatingShortcut
+"Feil under oppretting av snarveg: "
+# ^ErrorCreating
+"Feil under oppretting av: "
+# ^ErrorDecompressing
+Feil under utpakking av data! Installasjonsprogrammet kan vera skadd.
+# ^ErrorRegistering
+Feil under registrering av DLL
+# ^ExecShell
+"ExecShell: "
+# ^Exec
+"Køyra: "
+# ^Extract
+"Pakk ut: "
+# ^ErrorWriting
+"Pakk ut: Feil under skriving til fil "
+# ^InvalidOpcode
+Installasjonsprogrammet er skadd: ukjend kode
+# ^NoOLE
+"Ingen OLE for: "
+# ^OutputFolder
+"Ut-mappe: "
+# ^RemoveFolder
+"Fjern mappe: "
+# ^RenameOnReboot
+"Gje nytt namn ved omstart: "
+# ^Rename
+"Gje nytt namn: "
+# ^Skipped
+"Hoppa over: "
+# ^CopyDetails
+Kopier detaljar til utklyppstavla
+# ^LogInstall
+Loggfør installasjonsprosessen
+# ^Byte
+B
+# ^Kilo
+K
+# ^Mega
+M
+# ^Giga
+G
+
diff --git a/Contrib/Language files/SConscript b/Contrib/Language files/SConscript
index 2e676a8..55b9b56 100755
--- a/Contrib/Language files/SConscript
+++ b/Contrib/Language files/SConscript
@@ -34,6 +34,7 @@ languages = Split("""
Malay.nlf
Mongolian.nlf
Norwegian.nlf
+ NorwegianNynorsk.nlf
Polish.nlf
Portuguese.nlf
PortugueseBR.nlf
diff --git a/Contrib/Modern UI/Language files/French.nsh b/Contrib/Modern UI/Language files/French.nsh
index 83d16f2..a3a6f89 100755
--- a/Contrib/Modern UI/Language files/French.nsh
+++ b/Contrib/Modern UI/Language files/French.nsh
@@ -85,7 +85,7 @@
!define MUI_UNTEXT_ABORT_TITLE "Désinstallation interrompue"
!define MUI_UNTEXT_ABORT_SUBTITLE "La désinstallation n'a pas été terminée."
- !define MUI_UNTEXT_FINISH_INFO_TITLE "Fin de la déinstallation de $(^NameDA)"
+ !define MUI_UNTEXT_FINISH_INFO_TITLE "Fin de la désinstallation de $(^NameDA)"
!define MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA) a été supprimé de votre ordinateur.\r\n\r\nCliquez sur Fermer pour quitter le programme d'installation."
!define MUI_UNTEXT_FINISH_INFO_REBOOT "Votre ordinateur doit être redémarré pour terminer l'installation de $(^NameDA). Souhaitez-vous redémarrer maintenant ?"
diff --git a/Contrib/Modern UI/Language files/NorwegianNynorsk.nsh b/Contrib/Modern UI/Language files/NorwegianNynorsk.nsh
new file mode 100755
index 0000000..8741f10
--- /dev/null
+++ b/Contrib/Modern UI/Language files/NorwegianNynorsk.nsh
@@ -0,0 +1,94 @@
+;NSIS Modern User Interface - Language File
+;Compatible with Modern UI 1.68
+
+;Language: Norwegian nynorsk (2068)
+;By Vebjoern Sture and Håvard Mork (www.firefox.no)
+
+;--------------------------------
+
+!insertmacro MUI_LANGUAGEFILE_BEGIN "NorwegianNynorsk"
+
+ !define MUI_LANGNAME "Norwegian nynorsk" ;Use only ASCII characters (if this is not possible, use the English name)
+
+ !define MUI_TEXT_WELCOME_INFO_TITLE "Velkommen til $(^NameDA) innstallasjonsvegvisar"
+ !define MUI_TEXT_WELCOME_INFO_TEXT "Denne vegvisaren vil leie deg gjennom installeringa av $(^NameDA).\n\nDet er tilrådd at du avsluttar alle andre program før du held fram. Dette vil la installeringsprogrammet oppdatera systemfiler utan at du må starta datamaskinen på nytt.\n\n$_CLICK"
+
+ !define MUI_TEXT_LICENSE_TITLE "Lisensavtale"
+ !define MUI_TEXT_LICENSE_SUBTITLE "Les gjennom lisensavtalen før du startar installeringa av $(^NameDA)."
+ !define MUI_INNERTEXT_LICENSE_TOP "Trykk Page Down-knappen for å sjå resten av lisensavtala."
+ !define MUI_INNERTEXT_LICENSE_BOTTOM "Trykk på «Godta» dersom du godtar betingelsane i avtala. Du må godta avtala for å installere $(^NameDA)."
+ !define MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Trykk på avkryssingsboksen nedanfor nedanfor dersom du godtar betingelsane i avtala. Du må godta avtala for å installere $(^NameDA). $_CLICK"
+ !define MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Vel det første alternativet nedanfor dersom du godtek vilkåra i avtala. Du må godta avtala for å installera $(^NameDA). $_CLICK"
+
+ !define MUI_TEXT_COMPONENTS_TITLE "Vel komponentar"
+ !define MUI_TEXT_COMPONENTS_SUBTITLE "Vel kva delar av $(^NameDA) du ynskjer å installera."
+ !define MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Beskriving"
+ !ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
+ !define MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Beveg musa over komponentene for å sjå beskrivinga."
+ !else
+ !define MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Vel eit komponent for å se beskrivinga."
+ !endif
+
+ !define MUI_TEXT_DIRECTORY_TITLE "Vel installasjonsmappe"
+ !define MUI_TEXT_DIRECTORY_SUBTITLE "Vel kva mappe du vil installera $(^NameDA) i."
+
+ !define MUI_TEXT_INSTALLING_TITLE "Installerer"
+ !define MUI_TEXT_INSTALLING_SUBTITLE "Vent mens $(^NameDA) blir installert."
+
+ !define MUI_TEXT_FINISH_TITLE "Installeringa er fullført"
+ !define MUI_TEXT_FINISH_SUBTITLE "Installeringa vart fullført."
+
+ !define MUI_TEXT_ABORT_TITLE "Installeringa vart avbroten"
+ !define MUI_TEXT_ABORT_SUBTITLE "Installeringa vart ikkje fullført."
+
+ !define MUI_BUTTONTEXT_FINISH "&Fullfør"
+ !define MUI_TEXT_FINISH_INFO_TITLE "Installering fullført"
+ !define MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA) er installert og klar til bruk.\n\nTrykk på «Fullfør» for å avslutte installeringa."
+ !define MUI_TEXT_FINISH_INFO_REBOOT "Du må starta datamaskinen på nytt for å fullføra installeringa av $(^NameDA). Vil du starta på nytt no?"
+ !define MUI_TEXT_FINISH_REBOOTNOW "Start på nytt no"
+ !define MUI_TEXT_FINISH_REBOOTLATER "Eg vil starta på nytt seinare"
+ !define MUI_TEXT_FINISH_RUN "&Køyr $(^NameDA)"
+ !define MUI_TEXT_FINISH_SHOWREADME "&Syn lesmeg"
+
+ !define MUI_TEXT_STARTMENU_TITLE "Vel mappe på startmenyen"
+ !define MUI_TEXT_STARTMENU_SUBTITLE "Vel kva mappe snarvegane til $(^NameDA) skal liggja i."
+ !define MUI_INNERTEXT_STARTMENU_TOP "Vel mappa du vil oppretta snarvegane til programmet i. Du kan òg skriva inn eit nytt namn for å laga ei ny mappe."
+ !define MUI_INNERTEXT_STARTMENU_CHECKBOX "Ikkje opprett snarvegar"
+
+ !define MUI_TEXT_ABORTWARNING "Er du viss på at du vil avslutta installeringa av $(^Name)?"
+
+
+ !define MUI_UNTEXT_WELCOME_INFO_TITLE "Velkommen til avinstallering av $(^NameDA)"
+ !define MUI_UNTEXT_WELCOME_INFO_TEXT "Denne vegvisaren vil leie deg gjennom avinstalleringen av $(^NameDA).\n\nFør du fortsetter må du forsikre deg om at $(^NameDA) ikkje er opent.\n\n$_CLICK"
+
+ !define MUI_UNTEXT_CONFIRM_TITLE "Avinstaller $(^NameDA)"
+ !define MUI_UNTEXT_CONFIRM_SUBTITLE "Slett $(^NameDA) frå datamaskinen."
+
+ !define MUI_UNTEXT_LICENSE_TITLE "Lisensavtale"
+ !define MUI_UNTEXT_LICENSE_SUBTITLE "Les gjennom lisensavtalen før du startar avinstalleringa av $(^NameDA)."
+ !define MUI_UNINNERTEXT_LICENSE_BOTTOM "Trykk på «Godta» dersom du godtar betingelsane i avtala. Du må godta avtala for å avinstallera $(^NameDA)."
+ !define MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Trykk på avkryssingsboksen nedanfor nedanfor dersom du godtar betingelsane i avtala. Du må godta avtala for å avinstallera $(^NameDA). $_CLICK"
+ !define MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Vel det første alternativet nedanfor dersom du godtar betingelsane i avtala. Du må godta avtala for å avinstallera $(^NameDA). $_CLICK"
+
+ !define MUI_UNTEXT_COMPONENTS_TITLE "Vel funksjonar"
+ !define MUI_UNTEXT_COMPONENTS_SUBTITLE "Vel kva for funksjonar du vil avinstallera i $(^NameDA)."
+
+ !define MUI_UNTEXT_DIRECTORY_TITLE "Vel avinstalleringplassering"
+ !define MUI_UNTEXT_DIRECTORY_SUBTITLE "Vel mappa du vil avinstallere $(^NameDA) frå."
+
+ !define MUI_UNTEXT_UNINSTALLING_TITLE "Avinstallerer"
+ !define MUI_UNTEXT_UNINSTALLING_SUBTITLE "Vent medan $(^NameDA) vert avinstallert."
+
+ !define MUI_UNTEXT_FINISH_TITLE "Avinstallering ferdig"
+ !define MUI_UNTEXT_FINISH_SUBTITLE "Avinstallering ble utført uten feil."
+
+ !define MUI_UNTEXT_ABORT_TITLE "Avinstallering broten"
+ !define MUI_UNTEXT_ABORT_SUBTITLE "Avinstallering ble ikkje utført riktig."
+
+ !define MUI_UNTEXT_FINISH_INFO_TITLE "Fullfører avinstalleringa av $(^NameDA)"
+ !define MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA) er no avinstallert frå datamaskina di.\n\nTrykk på «Fullfør» for å avslutta denne vegvisaren."
+ !define MUI_UNTEXT_FINISH_INFO_REBOOT "Datamaskinen må starta på nytt for å fullføra avinstalleringa av $(^NameDA). Vil du starta datamaskina på nytt no?"
+
+ !define MUI_UNTEXT_ABORTWARNING "Er du viss på at du vil avbryta avinstalleringa av $(^Name)?"
+
+!insertmacro MUI_LANGUAGEFILE_END \ No newline at end of file
diff --git a/Contrib/Modern UI/SConscript b/Contrib/Modern UI/SConscript
index 6e5d869..39db8b6 100755
--- a/Contrib/Modern UI/SConscript
+++ b/Contrib/Modern UI/SConscript
@@ -56,6 +56,7 @@ languages = Split("""
Malay.nsh
Mongolian.nsh
Norwegian.nsh
+ NorwegianNynorsk.nsh
Polish.nsh
Portuguese.nsh
PortugueseBR.nsh
diff --git a/Contrib/NSISdl/asyncdns.cpp b/Contrib/NSISdl/asyncdns.cpp
index e521bfa..360a372 100755
--- a/Contrib/NSISdl/asyncdns.cpp
+++ b/Contrib/NSISdl/asyncdns.cpp
@@ -11,9 +11,8 @@
#include "util.h"
#include "asyncdns.h"
-JNL_AsyncDNS::JNL_AsyncDNS(int max_cache_entries)
+JNL_AsyncDNS::JNL_AsyncDNS()
{
- m_thread_kill=1;
m_thread=0;
m_addr=0;
m_hostname[0]=0;
@@ -21,13 +20,7 @@ JNL_AsyncDNS::JNL_AsyncDNS(int max_cache_entries)
JNL_AsyncDNS::~JNL_AsyncDNS()
{
- m_thread_kill=1;
-
- if (m_thread)
- {
- WaitForSingleObject(m_thread,INFINITE);
- CloseHandle(m_thread);
- }
+ wait_for_thread_death();
}
unsigned long WINAPI JNL_AsyncDNS::_threadfunc(LPVOID _d)
@@ -41,7 +34,6 @@ unsigned long WINAPI JNL_AsyncDNS::_threadfunc(LPVOID _d)
}
else
_this->m_addr=INADDR_NONE;
- _this->m_thread_kill=1;
return 0;
}
@@ -56,21 +48,35 @@ int JNL_AsyncDNS::resolve(char *hostname, unsigned long *addr)
}
if (lstrcmpi(m_hostname,hostname)) m_addr=0;
- else if (m_addr == INADDR_NONE) return -1;
+ else if (m_addr == INADDR_NONE)
+ {
+ wait_for_thread_death();
+ return -1;
+ }
else if (m_addr)
{
*addr=m_addr;
+ wait_for_thread_death();
return 0;
}
lstrcpy(m_hostname,hostname);
- if (m_thread_kill)
+ if (!m_thread)
{
DWORD id;
- if (m_thread) return -1;
- m_thread_kill=0;
m_thread=CreateThread(NULL,0,_threadfunc,(LPVOID)this,0,&id);
if (!m_thread) return -1;
}
return 1;
}
+
+void JNL_AsyncDNS::wait_for_thread_death()
+{
+ if (m_thread)
+ {
+ WaitForSingleObject(m_thread,INFINITE);
+ CloseHandle(m_thread);
+ }
+
+ m_thread=0;
+}
diff --git a/Contrib/NSISdl/asyncdns.h b/Contrib/NSISdl/asyncdns.h
index f9c0332..ba750a3 100755
--- a/Contrib/NSISdl/asyncdns.h
+++ b/Contrib/NSISdl/asyncdns.h
@@ -20,16 +20,17 @@
class JNL_AsyncDNS
{
public:
- JNL_AsyncDNS(int max_cache_entries=64);
+ JNL_AsyncDNS();
~JNL_AsyncDNS();
int resolve(char *hostname, unsigned long *addr); // return 0 on success, 1 on wait, -1 on unresolvable
private:
+ void wait_for_thread_death();
+
char m_hostname[256];
unsigned long m_addr;
- volatile int m_thread_kill;
HANDLE m_thread;
static unsigned long WINAPI _threadfunc(LPVOID _d);
diff --git a/Contrib/System/Source/System.c b/Contrib/System/Source/System.c
index 0af41c2..838961b 100755
--- a/Contrib/System/Source/System.c
+++ b/Contrib/System/Source/System.c
@@ -305,6 +305,7 @@ SystemProc *PrepareProc(BOOL NeedForCall)
ChangesDone = 0,
ParamIndex = 0,
temp = 0, temp2, temp3, temp4;
+ BOOL param_defined = FALSE;
SystemProc *proc = NULL;
char *ibuf, *ib, *sbuf, *cbuf, *cb;
@@ -327,7 +328,8 @@ SystemProc *PrepareProc(BOOL NeedForCall)
SectionType = PST_PARAMS;
// fake-real parameter: for COM interfaces first param is Interface Pointer
ParamIndex = ((ProcType == PT_VTABLEPROC)?(2):(1));
- temp3 = temp = 0;
+ temp3 = temp = 0;
+ param_defined = FALSE;
break;
case ')': SectionType = PST_RETURN; temp3 = temp = 0; break;
case '?': SectionType = PST_OPTIONS; temp = 1; break;
@@ -397,7 +399,11 @@ SystemProc *PrepareProc(BOOL NeedForCall)
}
break;
case PST_PARAMS:
- proc->ParamCount = ParamIndex;
+ if (param_defined)
+ proc->ParamCount = ParamIndex;
+ else
+ // not simply zero because of vtable calls
+ proc->ParamCount = ParamIndex - 1;
case PST_RETURN:
case PST_OPTIONS:
break;
@@ -457,10 +463,19 @@ SystemProc *PrepareProc(BOOL NeedForCall)
case '_': // No param cutting specifier
if (proc->ParamCount > ParamIndex) ParamIndex = proc->ParamCount;
temp3 = temp = 0; // Clear parameter options
+ if (proc->ParamCount != ((ProcType == PT_VTABLEPROC) ? 1 : 0))
+ {
+ // only define params if the last count wasn't zero
+ // this prevents errornous param count for:
+ // 'user32::CloseClipboard()(_)'
+ // for vtable calls, param count should not be one
+ param_defined = TRUE;
+ }
break;
case ',': // Next param
temp3 = temp = 0; // Clear parameter options
ParamIndex++;
+ param_defined = TRUE;
break;
case '&':
temp = 1; break; // Special parameter option
@@ -538,6 +553,7 @@ SystemProc *PrepareProc(BOOL NeedForCall)
// Param type changed?
if (temp2 != -1)
{
+ param_defined = TRUE;
proc->Params[ParamIndex].Type = temp2;
proc->Params[ParamIndex].Size = // If pointer, then 1, else by type
(temp == -1)?(1):((ParamSizeByType[temp2]>0)?(ParamSizeByType[temp2]):(1));
@@ -552,6 +568,7 @@ SystemProc *PrepareProc(BOOL NeedForCall)
// Param source/dest changed?
if (temp4 != 0)
{
+ param_defined = TRUE;
if (temp3 == 0)
{
// it may contain previous inline input
@@ -943,6 +960,18 @@ SystemProc __declspec(naked) *CallProc(SystemProc *proc)
SYSTEM_EVENT("\n\t\t\tNear call ")
SYSTEM_LOG_POST;
+ // workaround for bug #1535007
+ // http://sf.net/tracker/index.php?func=detail&aid=1535007&group_id=22049&atid=373085
+ //
+ // If a function returns short and doesn't clear eax in the process,
+ // it will only set 2 bytes of eax, and the other 2 bytes remain
+ // "random". In this case, they'll be part of the proc pointer.
+ //
+ // To avoid this, eax is cleared before the function is called. This
+ // makes sure the value eax will contain is only what the function
+ // actually sets.
+ _asm xor eax, eax
+
_asm
{
// Call
diff --git a/Contrib/System/System.html b/Contrib/System/System.html
index 4c1bd29..c2abd96 100755
--- a/Contrib/System/System.html
+++ b/Contrib/System/System.html
@@ -165,7 +165,7 @@ DetailPrint $4
<blockquote>
<p>Call and get both share a common syntax. As the names suggest, Call calls and Get gets. What does it call or get? It depends on <i>PROC</i>'s value.</p>
-<p><i>PARAMS</i> is a list of parameters and what do to with them. You can pass data in the parameters and you can also get data from them. The parameters list is separated by commas. Each parameter is combined of three values: <i>type</i>, <i>source</i> and <i>destination</i>. <i>Type</i> can be an integer, a string, etc. <i>Source</i>, which is the source of the parameter value, can be a NSIS register ($0, $1, $INSTDIR), the NSIS stack, a concrete value (5, "test", etc.) or nothing (null). <i>Destination</i>, which is the destination of the parameter value after the call returns, can can be a NSIS register, the NSIS stack or nothing which means no output is required. Either one of <i>source</i> or <i>destination</i> can also be a dot (`.') if it is not needed.</p>
+<p><i>PARAMS</i> is a list of parameters and what do to with them. You can pass data in the parameters and you can also get data from them. The parameters list is separated by commas. Each parameter is combined of three values: <i>type</i>, <i>source</i> and <i>destination</i>. <i>Type</i> can be an integer, a string, etc. <i>Source</i>, which is the source of the parameter value, can be a NSIS register ($0, $1, $INSTDIR), the NSIS stack, a concrete value (5, "test", etc.) or nothing (null). <i>Destination</i>, which is the destination of the parameter value after the call returns, can be a NSIS register, the NSIS stack or nothing which means no output is required. Either one of <i>source</i> or <i>destination</i> can also be a dot (`.') if it is not needed.</p>
<p><i>RETURN</i> is like a single parameter definition, but <i>source</i> is only used when creating callback functions. Normally <i>source</i> is a dot.</p>
diff --git a/Docs/src/credits.but b/Docs/src/credits.but
index fe016bc..4ad7f10 100755
--- a/Docs/src/credits.but
+++ b/Docs/src/credits.but
@@ -174,6 +174,8 @@ Mongolian - \e{Bayarsaikhan Enkhtaivan}
Norwegian - \e{Jonas Christoffer Lindstrom, Jan Ivar Beddari}
+Norwegian Nynorsk - \e{Vebj\u00F8rn Sture}
+
Polish - \e{Piotr Murawski, Rafa³ Lampe, cube, SYSTEMsoft Group}
Portuguese - \e{DragonSoull, Dre', Ramon}
diff --git a/Docs/src/file.but b/Docs/src/file.but
index 835f4ff..349bcea 100755
--- a/Docs/src/file.but
+++ b/Docs/src/file.but
@@ -50,7 +50,7 @@ Reads a byte from a file opened with FileOpen. The byte is stored in the output
\c handle offset [mode] [user_var(new position)]
-Seeks a file opened with FileOpen. If mode is omitted or specified as SET, the file is positioned to "offset". If mode is specified as CUR, then the file pointer is moved by offset. If mode is specified as END, the file pointer is set to a position relative to EOF. If the final parameter "new position" is specified, the new file position will be stored to that variable.
+Seeks a file opened with FileOpen. If mode is omitted or specified as SET, the file is positioned to "offset", relative to the beginning of the file. If mode is specified as CUR, then the file is positioned to "offset", relative to the current file position. If mode is specified as END, then the file is positioned to "offset", relative to the end of the file. If the final parameter "new position" is specified, the new file position will be stored to that variable.
\c ClearErrors
\c FileOpen $0 $INSTDIR\file.dat r
diff --git a/Docs/src/history.but b/Docs/src/history.but
index e209b4f..36e8148 100755
--- a/Docs/src/history.but
+++ b/Docs/src/history.but
@@ -1,5 +1,41 @@
\A{history} Changelog and Release Notes
+\H{v2.19} 2.19
+
+Released on August 6th, 2006
+
+\S1{v2.19-cl} Changelog
+
+\S2{} Minor Changes
+
+\b Fixed \R{system}{!system} and \R{packhdr}{!packhdr} failure with quoted long file names (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1509909}{bug #1509909})
+
+\b Fixed build problems on 64bit platforms (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1504772}{bug #1504772})
+
+\b Fixed negative total size for data larger than 2GB in script compilation summary (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1468852}{bug #1468852})
+
+\b Minor documentation updates and fixes
+
+\b Replaced \R{detect.netframework}{IsDotNETInstalled} with a simpler and better version
+
+\S2{} New/Changed Commands
+
+\b Made \R{if}{!if} compare strings case insensitively, like \R{strcmp}{StrCmp} and \R{ifdef}{!ifdef}
+
+\S2{} Plug-ins
+
+\b \L{../Docs/NSISdl/ReadMe.txt}{NSISdl}: fixed random DNS errors (\W{http://forums.winamp.com/showthread.php?s=&threadid=247723}{reported in the forums})
+
+\b \L{../Docs/System/System.html}{System}: fixed a bug that caused stack corruption and stopped the installer from deleting System.dll when a function with no arguments was called (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1535005}{bug #1535005})
+
+\b \L{../Docs/System/System.html}{System}: fixed wrong return values for functions that return \c{short} or \c{char} (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1535007}{bug #1535007})
+
+\S2{} Translations
+
+\b Added Norwegian Nynorsk translation (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373087&aid=1503208}{patch #1503208})
+
+\b Fixed typos in the French translation (\W{http://sourceforge.net/tracker/index.php?func=detail&group_id=22049&atid=373085&aid=1531874}{bug #1531874})
+
\H{v2.18} 2.18
Released on July 1st, 2006
diff --git a/Docs/src/int.but b/Docs/src/int.but
index c8071fc..2c63655 100755
--- a/Docs/src/int.but
+++ b/Docs/src/int.but
@@ -13,7 +13,7 @@ Formats the number in "numberstring" using the format "format", and sets the out
\c user_var(output) value1 OP [value2]
-Combines value1 and (depending on OP) value2 into the user variable $x. OP is defined as one of the following:
+Combines value1 and (depending on OP) value2 into the specified user variable (\c{user_var}). OP is defined as one of the following:
\b \e{+} ADDs value1 and value2
diff --git a/Docs/src/usefulfunc.but b/Docs/src/usefulfunc.but
index 617e986..aedf763 100755
--- a/Docs/src/usefulfunc.but
+++ b/Docs/src/usefulfunc.but
@@ -303,6 +303,9 @@
\c ; IsDotNETInstalled
\c ;
+\c ; Based on GetDotNETVersion
+\c ; http://nsis.sourceforge.net/Get_.NET_Version
+\c ;
\c ; Usage:
\c ; Call IsDotNETInstalled
\c ; Pop $0
@@ -311,52 +314,14 @@
\c Function IsDotNETInstalled
\c Push $0
\c Push $1
-\c Push $2
-\c Push $3
-\c Push $4
-\c
-\c ReadRegStr $4 HKEY_LOCAL_MACHINE \
-\c "Software\Microsoft\.NETFramework" "InstallRoot"
-\c # remove trailing back slash
-\c Push $4
-\c Exch $EXEDIR
-\c Exch $EXEDIR
-\c Pop $4
-\c # if the root directory doesn't exist .NET is not installed
-\c IfFileExists $4 0 noDotNET
-\c
-\c StrCpy $0 0
-\c
-\c EnumStart:
-\c
-\c EnumRegKey $2 HKEY_LOCAL_MACHINE \
-\c "Software\Microsoft\.NETFramework\Policy" $0
-\c IntOp $0 $0 + 1
-\c StrCmp $2 "" noDotNET
\c
-\c StrCpy $1 0
-\c
-\c EnumPolicy:
-\c
-\c EnumRegValue $3 HKEY_LOCAL_MACHINE \
-\c "Software\Microsoft\.NETFramework\Policy\$2" $1
-\c IntOp $1 $1 + 1
-\c StrCmp $3 "" EnumStart
-\c IfFileExists "$4\$2.$3" foundDotNET EnumPolicy
-\c
-\c noDotNET:
+\c StrCpy $0 1
+\c System::Call "mscoree::GetCORVersion(w, i ${NSIS_MAX_STRLEN}, *i) i .r1"
+\c StrCmp $1 0 +2
\c StrCpy $0 0
-\c Goto done
-\c
-\c foundDotNET:
-\c StrCpy $0 1
\c
-\c done:
-\c Pop $4
-\c Pop $3
-\c Pop $2
-\c Pop $1
-\c Exch $0
+\c Pop $1
+\c Exch $0
\c FunctionEnd
\H{isflashinstalled} Is Macromedia Flash Player installed?
diff --git a/Examples/Modern UI/MultiLanguage.nsi b/Examples/Modern UI/MultiLanguage.nsi
index c8b536e..dcc3ba1 100755
--- a/Examples/Modern UI/MultiLanguage.nsi
+++ b/Examples/Modern UI/MultiLanguage.nsi
@@ -60,6 +60,7 @@
!insertmacro MUI_LANGUAGE "Danish"
!insertmacro MUI_LANGUAGE "Swedish"
!insertmacro MUI_LANGUAGE "Norwegian"
+ !insertmacro MUI_LANGUAGE "NorwegianNynorsk"
!insertmacro MUI_LANGUAGE "Finnish"
!insertmacro MUI_LANGUAGE "Greek"
!insertmacro MUI_LANGUAGE "Russian"
@@ -114,6 +115,7 @@
LicenseLangString MUILicense ${LANG_DANISH} "${NSISDIR}\Docs\Modern UI\License.txt"
LicenseLangString MUILicense ${LANG_SWEDISH} "${NSISDIR}\Docs\Modern UI\License.txt"
LicenseLangString MUILicense ${LANG_NORWEGIAN} "${NSISDIR}\Docs\Modern UI\License.txt"
+ LicenseLangString MUILicense ${LANG_NORWEGIANNYNORSK} "${NSISDIR}\Docs\Modern UI\License.txt"
LicenseLangString MUILicense ${LANG_FINNISH} "${NSISDIR}\Docs\Modern UI\License.txt"
LicenseLangString MUILicense ${LANG_GREEK} "${NSISDIR}\Docs\Modern UI\License.txt"
LicenseLangString MUILicense ${LANG_RUSSIAN} "${NSISDIR}\Docs\Modern UI\License.txt"
diff --git a/Examples/makensis.nsi b/Examples/makensis.nsi
index 590133c..a29351f 100755
--- a/Examples/makensis.nsi
+++ b/Examples/makensis.nsi
@@ -28,6 +28,7 @@ InstallDirRegKey HKLM Software\NSIS ""
!include "MUI.nsh"
!include "Sections.nsh"
+!include "LogicLib.nsh"
;--------------------------------
;Definitions
@@ -69,6 +70,10 @@ Page custom PageReinstall PageLeaveReinstall
!define MUI_FINISHPAGE_RUN "$INSTDIR\NSIS.exe"
!define MUI_FINISHPAGE_NOREBOOTSUPPORT
+!define MUI_FINISHPAGE_SHOWREADME
+!define MUI_FINISHPAGE_SHOWREADME_TEXT "Show release notes"
+!define MUI_FINISHPAGE_SHOWREADME_FUNCTION ShowReleaseNotes
+
!insertmacro MUI_PAGE_FINISH
!insertmacro MUI_UNPAGE_CONFIRM
@@ -946,6 +951,20 @@ Function AddReadmeToStartMenu
FunctionEnd
!endif
+Function ShowReleaseNotes
+ ${If} ${FileExists} $WINDIR\hh.exe
+ StrCpy $0 $WINDIR\hh.exe
+ Exec '"$0" mk:@MSITStore:$INSTDIR\NSIS.chm::/SectionF.1.html'
+ ${Else}
+ SearchPath $0 hh.exe
+ ${If} ${FileExists} $0
+ Exec '"$0" mk:@MSITStore:$INSTDIR\NSIS.chm::/SectionF.1.html'
+ ${Else}
+ ExecShell "open" "http://nsis.sourceforge.net/Docs/AppendixF.html#F.1"
+ ${EndIf}
+ ${EndIf}
+FunctionEnd
+
;--------------------------------
;Uninstaller Section
diff --git a/Menu/images/header.gif b/Menu/images/header.gif
index 6a69256..c769a9d 100755
--- a/Menu/images/header.gif
+++ b/Menu/images/header.gif
Binary files differ
diff --git a/Scripts/release.py b/Scripts/release.py
index f0870f2..91781a4 100755
--- a/Scripts/release.py
+++ b/Scripts/release.py
@@ -318,7 +318,6 @@ def update_wiki_page(page, data, summary):
if urllib.urlopen(UPDATE_URL, post).read() != 'success':
log('*** failed updating `%s` wiki page' % page)
print ' *** failed updating `%s` wiki page' % page
- exit()
update_wiki_page('Template:NSISVersion', VERSION, 'new version')
update_wiki_page('Template:NSISReleaseDate', time.strftime('%B %d, %Y'), 'new version')
diff --git a/Source/Platform.h b/Source/Platform.h
index 9a04344..e77d9f7 100755
--- a/Source/Platform.h
+++ b/Source/Platform.h
@@ -16,7 +16,7 @@
// basic types
typedef unsigned char BYTE, *PBYTE, *LPBYTE;
typedef unsigned short WORD, *LPWORD;
-typedef unsigned long DWORD, *LPDWORD;
+typedef unsigned int DWORD, *LPDWORD;
typedef short SHORT;
typedef unsigned short USHORT;
typedef unsigned int UINT;
diff --git a/Source/build.cpp b/Source/build.cpp
index 7713a5e..56eeeba 100755
--- a/Source/build.cpp
+++ b/Source/build.cpp
@@ -464,7 +464,8 @@ int CEXEBuild::preprocess_string(char *out, const char *in, WORD codepage/*=CP_A
// So the line below must be commented !??
//m_UserVarNames.inc_reference(idxUserVar);
*out++ = (unsigned int) NS_VAR_CODE; // Named user variable;
- *(WORD*)out = FIX_ENDIAN_INT16(CODE_SHORT(idxUserVar));
+ WORD w = FIX_ENDIAN_INT16(CODE_SHORT(idxUserVar));
+ memcpy(out, &w, sizeof(WORD));
out += sizeof(WORD);
p += pUserVarName-p;
bProceced = true;
@@ -508,7 +509,8 @@ int CEXEBuild::preprocess_string(char *out, const char *in, WORD codepage/*=CP_A
if (idx < 0)
{
*out++ = (unsigned int)NS_LANG_CODE; // Next word is lang-string Identifier
- *(WORD*)out = FIX_ENDIAN_INT16(CODE_SHORT(-idx-1));
+ WORD w = FIX_ENDIAN_INT16(CODE_SHORT(-idx-1));
+ memcpy(out, &w, sizeof(WORD));
out += sizeof(WORD);
p += strlen(cp) + 2;
bProceced = true;
@@ -2191,7 +2193,7 @@ int CEXEBuild::pack_exe_header()
}
fwrite(m_exehead,1,m_exehead_size,tmpfile);
fclose(tmpfile);
- if (system(build_packcmd) == -1)
+ if (sane_system(build_packcmd) == -1)
{
remove(build_packname);
ERROR_MSG("Error: calling packer on \"%s\"\n",build_packname);
@@ -2470,7 +2472,7 @@ int CEXEBuild::write_output(void)
INFO_MSG("\nUsing %s%s compression.\n\n", compressor->GetName(), build_compress_whole?" (compress whole)":"");
#endif
- int total_usize=m_exehead_original_size;
+ unsigned int total_usize=m_exehead_original_size;
INFO_MSG("EXE header size: %10d / %d bytes\n",m_exehead_size,m_exehead_original_size);
@@ -2619,12 +2621,8 @@ int CEXEBuild::write_output(void)
}
INFO_MSG("\n");
{
-#ifdef _WIN32
- int pc=MulDiv(ftell(fp),1000,total_usize);
-#else
- int pc=(int)(((long long)ftell(fp)*1000)/(total_usize));
-#endif
- INFO_MSG("Total size: %10d / %d bytes (%d.%d%%)\n",
+ UINT pc=(UINT)(((UINT64)ftell(fp)*1000)/(total_usize));
+ INFO_MSG("Total size: %10u / %u bytes (%u.%u%%)\n",
ftell(fp),total_usize,pc/10,pc%10);
}
fclose(fp);
diff --git a/Source/script.cpp b/Source/script.cpp
index b570c59..d0315e3 100755
--- a/Source/script.cpp
+++ b/Source/script.cpp
@@ -424,9 +424,9 @@ parse_again:
switch(mod) {
case 0:
case 1:
- istrue = strcmp(line.gettoken_str(1),line.gettoken_str(3)) == 0; break;
+ istrue = stricmp(line.gettoken_str(1),line.gettoken_str(3)) == 0; break;
case 2:
- istrue = strcmp(line.gettoken_str(1),line.gettoken_str(3)) != 0; break;
+ istrue = stricmp(line.gettoken_str(1),line.gettoken_str(3)) != 0; break;
case 3:
istrue = line.gettoken_float(1) <= line.gettoken_float(3); break;
case 4:
@@ -2790,7 +2790,7 @@ int CEXEBuild::doCommand(int which_token, LineParser &line)
if (!success && comp != 4) PRINTHELP()
SCRIPT_MSG("!system: \"%s\"\n",exec);
#ifdef _WIN32
- int ret=system(exec);
+ int ret=sane_system(exec);
#else
char *execfixed = my_convert(exec);
int ret=system(execfixed);
diff --git a/Source/util.cpp b/Source/util.cpp
index 629c183..cc90655 100755
--- a/Source/util.cpp
+++ b/Source/util.cpp
@@ -692,3 +692,30 @@ string lowercase(const string &str) {
transform(str.begin(), str.end(), result.begin(), tolower);
return result;
}
+
+int sane_system(const char *command) {
+#ifdef _WIN32
+
+ // workaround for bug #1509909
+ // http://sf.net/tracker/?func=detail&atid=373085&aid=1509909&group_id=22049
+ //
+ // cmd.exe /C has some weird handling for quotes. it strips
+ // the surrounding quotes, if they exist. if there are quotes
+ // around the program path and its arguments, it will strip
+ // the outer quotes. this may result in something like:
+ // `program files\nsis\makensis.exe" "args`
+ // which obviously fails...
+ //
+ // to avoid the stripping, a harmless string is prefixed
+ // to the command line.
+
+ string command_s = "IF 1==1 ";
+ command_s += command;
+ return system(command_s.c_str());
+
+#else
+
+ return system(command);
+
+#endif
+}
diff --git a/Source/util.h b/Source/util.h
index 8aaed3b..6da9b46 100755
--- a/Source/util.h
+++ b/Source/util.h
@@ -45,6 +45,8 @@ std::string lowercase(const std::string&);
std::string get_string_prefix(const std::string& str, const std::string& separator);
std::string get_string_suffix(const std::string& str, const std::string& separator);
+int sane_system(const char *command);
+
#ifndef _WIN32
char *CharPrev(const char *s, const char *p);
char *CharNext(const char *s);