Hi,
I did some work on the .nsi for the win32 installer. I included a german translation. It should be very simple to add more languages. All the strings (5 per language) are in the .nsi file.
Attached the new .nsi file and a diff against the current cvs.
HTH,
Adib.
cvs diff -u inkscape.nsi (in directory D:\projekte\inkscape) Index: inkscape.nsi =================================================================== RCS file: /cvsroot/inkscape/inkscape/inkscape.nsi,v retrieving revision 1.10 diff -u -r1.10 inkscape.nsi --- inkscape.nsi 12 Feb 2005 17:44:35 -0000 1.10 +++ inkscape.nsi 12 Mar 2005 23:32:39 -0000 @@ -41,14 +41,28 @@
; Language files !insertmacro MUI_LANGUAGE "English" +!insertmacro MUI_LANGUAGE "German"
; MUI end ------
+; English strings +LangString lng_Caption ${LANG_ENGLISH} "${PRODUCT_NAME} -- Open Source Scalable Vector Graphics Editor" +LangString lng_Editor ${LANG_ENGLISH} "Do you want $(^Name) to be the default SVG editor?" +LangString lng_Reader ${LANG_ENGLISH} "Do you want $(^Name) to be the default SVG reader?" +LangString lng_Removed ${LANG_ENGLISH} "$(^Name) was successfully removed from your computer." +LangString lng_Uninstall ${LANG_ENGLISH} "Are you sure you want to completely remove $(^Name) and all of its components?" + +; German strings +LangString lng_Caption ${LANG_GERMAN} "${PRODUCT_NAME} -- Open Source SVG-Vektorillustrator" +LangString lng_Editor ${LANG_GERMAN} "Wollen Sie $(^Name) zu Ihrem standardm��igem Bearbeitungsprogramm f�r SVG machen?" +LangString lng_Reader ${LANG_GERMAN} "Wollen Sie $(^Name) zu Ihrem standardm��igem Anzeigeprogramm f�r SVG machen?" +LangString lng_Removed ${LANG_GERMAN} "$(^Name) wurde erfolgreich von Ihrem Computer entfernt." +LangString lng_Uninstall ${LANG_GERMAN} "M�chten Sie $(^Name) und alle seine Komponenten von Ihrem Rechner entfernen?"
Name "${PRODUCT_NAME} ${PRODUCT_VERSION}" -Caption "${PRODUCT_NAME} -- Open Source Scalable Vector Graphics Editor" +Caption $(lng_Caption) OutFile "Inkscape-${PRODUCT_VERSION}-1.win32.exe" InstallDir "$PROGRAMFILES\Inkscape" InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" "" @@ -72,14 +86,14 @@ Section -Post WriteUninstaller "$INSTDIR\uninst.exe"
- MessageBox MB_YESNO|MB_ICONQUESTION "Do you want Inkscape to be the default SVG editor?" IDNO NoEditor + MessageBox MB_YESNO|MB_ICONQUESTION $(lng_Editor) IDNO NoEditor WriteRegStr HKCR ".svg" "" "svgfile" WriteRegStr HKCR ".svgz" "" "svgfile" WriteRegStr HKCR "svgfile" "" "Scalable Vector Graphics file" WriteRegStr HKCR "svgfile\shell\edit\command" "" '$INSTDIR\Inkscape.exe "%1"' NoEditor:
- MessageBox MB_YESNO|MB_ICONQUESTION "Do you want Inkscape to be the default SVG reader?" IDNO NoReader + MessageBox MB_YESNO|MB_ICONQUESTION $(lng_Reader) IDNO NoReader WriteRegStr HKCR ".svg" "" "svgfile" WriteRegStr HKCR ".svgz" "" "svgfile" WriteRegStr HKCR "svgfile" "" "Scalable Vector Graphics file" @@ -87,14 +101,13 @@ NoReader: SectionEnd
- Function un.onUninstSuccess HideWindow - MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer." + MessageBox MB_ICONINFORMATION|MB_OK $(lng_Removed) FunctionEnd
Function un.onInit - MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" IDYES +2 + MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 $(lng_Uninstall) IDYES +2 Abort FunctionEnd
; ####################################### ; Inkscape NSIS installer project file ; Used as of 0.40 ; #######################################
; ####################################### ; DEFINES ; ####################################### !define PRODUCT_NAME "Inkscape" !define PRODUCT_VERSION "0.41+cvs" !define PRODUCT_PUBLISHER "Inkscape Organization" !define PRODUCT_WEB_SITE "http://www.inkscape.org" !define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\inkscape.exe" !define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall${PRODUCT_NAME}" !define PRODUCT_UNINST_ROOT_KEY "HKLM"
; ####################################### ; MUI SETTINGS ; ####################################### ; MUI 1.67 compatible ------ !include "MUI.nsh" !define MUI_ABORTWARNING !define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico" !define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"
; Welcome page !insertmacro MUI_PAGE_WELCOME ; License page !define MUI_LICENSEPAGE_RADIOBUTTONS !insertmacro MUI_PAGE_LICENSE "Copying" ; Directory page !insertmacro MUI_PAGE_DIRECTORY ; Instfiles page !insertmacro MUI_PAGE_INSTFILES ; Finish page !define MUI_FINISHPAGE_RUN "$INSTDIR\inkscape.exe" !insertmacro MUI_PAGE_FINISH
; Uninstaller pages !insertmacro MUI_UNPAGE_INSTFILES
; Language files !insertmacro MUI_LANGUAGE "English" !insertmacro MUI_LANGUAGE "German"
; MUI end ------
; English strings LangString lng_Caption ${LANG_ENGLISH} "${PRODUCT_NAME} -- Open Source Scalable Vector Graphics Editor" LangString lng_Editor ${LANG_ENGLISH} "Do you want $(^Name) to be the default SVG editor?" LangString lng_Reader ${LANG_ENGLISH} "Do you want $(^Name) to be the default SVG reader?" LangString lng_Removed ${LANG_ENGLISH} "$(^Name) was successfully removed from your computer." LangString lng_Uninstall ${LANG_ENGLISH} "Are you sure you want to completely remove $(^Name) and all of its components?"
; German strings LangString lng_Caption ${LANG_GERMAN} "${PRODUCT_NAME} -- Open Source SVG-Vektorillustrator" LangString lng_Editor ${LANG_GERMAN} "Wollen Sie $(^Name) zu Ihrem standardm��igem Bearbeitungsprogramm f�r SVG machen?" LangString lng_Reader ${LANG_GERMAN} "Wollen Sie $(^Name) zu Ihrem standardm��igem Anzeigeprogramm f�r SVG machen?" LangString lng_Removed ${LANG_GERMAN} "$(^Name) wurde erfolgreich von Ihrem Computer entfernt." LangString lng_Uninstall ${LANG_GERMAN} "M�chten Sie $(^Name) und alle seine Komponenten von Ihrem Rechner entfernen?"
Name "${PRODUCT_NAME} ${PRODUCT_VERSION}" Caption $(lng_Caption) OutFile "Inkscape-${PRODUCT_VERSION}-1.win32.exe" InstallDir "$PROGRAMFILES\Inkscape" InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" "" ShowInstDetails show ShowUnInstDetails show
Section "MainSection" SEC01 SetOutPath "$INSTDIR" SetOverwrite ifnewer File /a /r "inkscape*.*"
CreateDirectory "$SMPROGRAMS\Inkscape" CreateShortCut "$SMPROGRAMS\Inkscape\Inkscape.lnk" "$INSTDIR\inkscape.exe" CreateShortCut "$DESKTOP\Inkscape.lnk" "$INSTDIR\inkscape.exe" SectionEnd
Section -AdditionalIcons CreateShortCut "$SMPROGRAMS\Inkscape\Uninstall Inkscape.lnk" "$INSTDIR\uninst.exe" SectionEnd
Section -Post WriteUninstaller "$INSTDIR\uninst.exe"
MessageBox MB_YESNO|MB_ICONQUESTION $(lng_Editor) IDNO NoEditor WriteRegStr HKCR ".svg" "" "svgfile" WriteRegStr HKCR ".svgz" "" "svgfile" WriteRegStr HKCR "svgfile" "" "Scalable Vector Graphics file" WriteRegStr HKCR "svgfile\shell\edit\command" "" '$INSTDIR\Inkscape.exe "%1"' NoEditor:
MessageBox MB_YESNO|MB_ICONQUESTION $(lng_Reader) IDNO NoReader WriteRegStr HKCR ".svg" "" "svgfile" WriteRegStr HKCR ".svgz" "" "svgfile" WriteRegStr HKCR "svgfile" "" "Scalable Vector Graphics file" WriteRegStr HKCR "svgfile\shell\open\command" "" '$INSTDIR\Inkscape.exe "%1"' NoReader: SectionEnd
Function un.onUninstSuccess HideWindow MessageBox MB_ICONINFORMATION|MB_OK $(lng_Removed) FunctionEnd
Function un.onInit MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 $(lng_Uninstall) IDYES +2 Abort FunctionEnd
Section Uninstall Delete "$DESKTOP\Inkscape.lnk"
Delete "$SMPROGRAMS\Inkscape\Uninstall Inkscape.lnk" Delete "$SMPROGRAMS\Inkscape\Inkscape.lnk" RMDir "$SMPROGRAMS\Inkscape"
RMDir /r "$INSTDIR"
SetAutoClose true SectionEnd