- NSIS Discussion
- Huge changes in latest CVS version
Archive: Huge changes in latest CVS version
kichik
4th September 2003 21:31 UTC
Huge changes in latest CVS version
As can be seen in this news item and the tiny change in the changelog, the latest CVS version of NSIS 2.0b4 contains tons of changes.
Here are the biggest changes:
General
- New PageEx command lets you add any type of page, anywhere. It also allows to easily create more than one directory/license page.
- More default strings in the language file. This means there is no more need to defined DirText for Page directory, LicenseText for Page license, etc.
- No more /LANG - Everything should be done using LangStrings from now on. This also means you can easily use one LicenseData for all languages, one BrandingText, etc.
- LangStrings are no longer restricted to the installer/uninstaller. Every LangString can be used everywhere.
- Access to NSIS's inner LangStrings - every string from the language files is assigned to a LangString
- Full RTL support
- Extraction progress
Modern UI- Change position of settings (put page settings before inserting a page), see Readme for details.
- The license file is a parameter of the MUI_PAGE_LICENSE macro.
- MUI_FUNCTIONS_* macros have been renamed to MUI_FUNCTION_*
- Cetain texts that could be customized with Modern UI language files defines before are page settings now
- No more MUI_BRANDINGTEXT, use BrandingText instead
For a complete list see:
http://nsis.sourceforge.net/site/ind...D=17&tt_news=3If everything turns out right, the latest CVS version is b4 final.
Enjoy.
mikem4600
5th September 2003 11:16 UTC
I think I noticed a bug in the latest NSIS version, when displaying the translated "Space available" and "Space required" labels...
In the first instance you can see the proper translation, from an older installer. In the second you can see the bug with the latest version: Some of the inside characters of the words are missing! I thought that was because I added quotes, like the English language file, but it didn't change when I removed them. I replaced the translation with the original, English, text in the Greek language file and it worked fine. While experimenting, I came across this thing: If I insert the Greek character ý twice (one of the non-displayed characters in the "required" word), as in ýý, then the word "Section" appears (3rd instance) along with some of the missing characters in the Components page, and part of the ^DirText appears in the Dir Selection page (4th instance)! Also, the kind of character doesn't appear to matter: I inserted the chatacter ì (one of the non-displayed chars) at the beggining of the word "Required" and it displayed properly (5th instance).
This happens when I use Modern UI. You can see the same stuff with the classic UI at the right column. The situation there is a little different... Sometimes (without recompiling the installer!) there is garbage instead of the missing characters when I insert the ý character twice (3rd instace), and in the rest of the cases the inside chars are just omitted. Also, when I inserted the chatacter ì at the beggining, it did not display, as in Modern UI (last instance) although I think it has to do with the fact that it randomly displays garbage or nothing.
Although I never had to define a code page or anything to get the translated installer display properly (in both W9x and 2000/XP) do you think this may solve the problem? Can you provide an example of how the code page must be inserted in the language file (and what kind of codepage: DOS codepage? Windows codepage? ISO codepage? ...)
Finally, I wasn't able to find an example that displays the new features of NSIS, so that I could properly test the translation. I just used the older examples.
Thanks in advance!
kichik
5th September 2003 11:34 UTC
Fixed in latest CVS version, thanks. I have also manually generated a snapshot so you don't have to wait for sluggish CVS.
It happened because I've missed a few zeros. When weird characters/strings start appear in other strings it's processed/unprocessed mismatch 99% of time. Had it been codepage problems you'd have seen just garbage, but with the exact number of characters that should have been there.
mgillespie
6th September 2003 11:48 UTC
I assume this is the feature set for 2.0B4? so does this mean that after a some bug fixing on the new features, we will be ready for 2.0B4???
Joost Verburg
6th September 2003 12:31 UTC
This is a list of the new features which have been added, not a list of all new features for beta 4 (we have added a lot more during the last 6 months). See the changelog for details.
You can download a development snapshot to test the new features.
Beta 4 should be released soon. We have to wait for translators updating the language files.
kichik
6th September 2003 20:52 UTC
It's all in the fine print... ;)
If everything turns out right, the latest CVS version is b4 final.
kichik
7th September 2003 17:37 UTC
Fixed a problem with SetOverwrite. New snapshot created.
Zarik
8th September 2003 10:57 UTC
Probably there is an error in macro MUI_PAGE_DIRECTORY.
Here is an error from compiler:
------------------------------------------
!define: "MUI_DIRECTORYPAGE_VARIABLE"="$3"
!insertmacro: MUI_PAGE_DIRECTORY
!undef: "MUI_DIRECTORYPAGE_VARAIBLE" not defined!
Error in macro MUI_PAGE_DIRECTORY on macroline 24
------------------------------------------
Notice that mistype MUI_DIRECTORYPAGE_VARAIBLE instead of MUI_DIRECTORYPAGE_VARIABLE.
kichik
8th September 2003 11:02 UTC
Thanks, fixed.
ACEMCP
10th September 2003 18:27 UTC
!insertmacro: MUI_SECTION_FINISHHEADER
!insertmacro: macro named "MUI_SECTION_FINISHHEADER" not found!
Error in script
---
another
There is a problem when enable these languages:
LANG_FRENCH
LANG_JAPANESE
LANG_KOREAN
LANG_DANISH
LANG_PORTUGUESEBR
LANG_POLISH
LANG_UKRAINIAN
LANG_CZECH
LANG_SLOVAK
LANG_CROATIAN
LANG_BULGARIAN
LANG_HUNGARIAN
LANG_THAI
LANG_ROMANIAN
LANG_MACEDONIAN
LANG_TURKISH
ACEMCP
10th September 2003 18:33 UTC
Of course I used a lastest snapshot and try to rewrite the code to run installer perfectly on lastest CVS...
Joost Verburg
10th September 2003 18:46 UTC
MUI_SECTION_FINISHHEADER has been removed a long time ago. You don't have to add it anymore.
These language files have to be updated for NSIS NLF v6 / Modern UI 1.66.
ACEMCP
10th September 2003 22:21 UTC
OK!
I used b3 for today then I downloaded lastest snapshot. I tried to rewrite the code but the complier closed with exception if i compile without bz2.
I have got lot of warning but I dot know whats wrong:
Processing pages... Done!
Removing unused resources... Done!
Generating language tables... setting 2052 to ËÎÌå
setting 1028 to ·s²Ó©úÅé
setting 1041 to ‚l‚r ‚oƒSƒVƒbƒN
setting 1042 to ±¼¸²
warning: unknown variable "{MUI_PRODUCT}" detected, ignoring (LangString MUI_TEXT_ABORTWARNING:1055)
warning: LangString "MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO" is not set in language table of language 1055
.... more of the same
warning: LangString "MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO" is not set in language table of language 1033
Done!
Finding icons offsets for uninstaller...
Error finding icon resources: installer, uninstaller icon size mismatch - see the Icon instruction's documentation for more information -- failing!
Error - aborting creation process
here is the code snippet:
!define MUI_ICON "${NSISDIR}\Contrib\Icons\modern-install.ico"
!define MUI_UNICON "${NSISDIR}\Contrib\Icons\modern-uninstall.ico"
!define MUI_FILE "modern.exe"
!define MUI_UI "${NSISDIR}\Contrib\UIs\${MUI_FILE}"
!define MUI_ABORTWARNING
!define MUI_PAGE_WELCOME
!define MUI_PAGE_LICENSE
!define MUI_COMPONENTSPAGE_SMALLDESC
!define MUI_PAGE_COMPONENTS
!define MUI_PAGE_DIRECTORY
!define MUI_PAGE_STARTMENU
!define MUI_PAGE_INSTFILES
!define MUI_PAGE_FINISH
!define MUI_UNPAGE_CONFIRM
!define MUI_UNPAGE_LICENSE
!define MUI_UNPAGE_COMPONENTS
!define MUI_UNPAGE_DIRECTORY
!define MUI_UNPAGE_INSTFILES
ACEMCP
11th September 2003 09:39 UTC
I tried modern ui's example, but MultiLanguage, witch I used as template doesn't work:
!insertmacro: MUI_LANGUAGE
!undef: "MUI_UNTEXT_CONFIRM_TITLE" not defined!
Error in macro MUI_LANGUAGEFILE_LANGSTRING on macroline 3
Error in macro MUI_LANGUAGEFILE_END on macroline 103
!include: error in script: "C:\Program Files\nsis\Contrib\Modern UI\Language files\French.nsh" on line 80
Error in macro MUI_LANGUAGE on macroline 5
Error in script "C:\Program Files\nsis\Examples\Modern UI\MultiLanguage.nsi" on line 47 -- aborting creation process
Please, help me!
Many thanks,
ACEMCP
kichik
11th September 2003 09:44 UTC
As Joost said:
These language files have to be updated for NSIS NLF v6 / Modern UI 1.66.
The language files are out of date, the format has changed. The translators haven't updated them all yet, you'll have to wait.
I will need some more information about:
I tried to rewrite the code but the complier closed with exception if i compile without bz2.
ACEMCP
11th September 2003 10:43 UTC
Hehe, I cannot reproduce this problem... Because I modified the code, then I cannot recompile at all... The exception created by the compiler, not the NSIS GUI (MakeNSISW)... But I cannot see any error message or whatever...
But now I have got a problem:
Processing pages... Done!
Removing unused resources... Done!
Generating language tables... warning: LangString "MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO" is not set in language table of language 1033
warning: LangString "MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO" is not set in language table of language 1033
warning: LangString "MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO" is not set in language table of language 1033
Done!
Finding icons offsets for uninstaller...
Error finding icon resources: installer, uninstaller icon size mismatch - see the Icon instruction's documentation for more information -- failing!
Error - aborting creation process
I now using 030911 snapshot, and disabled all language except the english... If I define MUI_ICON and MUI_UNICON like
!define MUI_ICON "${NSISDIR}\Contrib\Icons\modern-install.ico"
it say already definied, but if not:
Error finding icon resources: installer, uninstaller icon size mismatch - see the Icon instruction's documentation for more information -- failing!
Error - aborting creation process
how can I resolve this problem?
Thanks,
ACEMCP
pengyou
11th September 2003 12:11 UTC
The icon files for the installer and uninstaller must have the same structure.
For example, if one icon file contains a 32x32 16-colour image and a 16x16 16-colour image then the other file cannot just contain a 32x32 16-colour image, it must also have a 16x16 16-colour image.
ACEMCP
11th September 2003 12:21 UTC
If I add line:
!define MUI_ICON "${NSISDIR}\Contrib\Icons\modern-install.ico"
!define MUI_UNICON "${NSISDIR}\Contrib\Icons\modern-install.ico"
it says:
!define: "MUI_ICON" already defined!
Error in script "D:\KAMI\ISOOSI\ACE Mega CoDecS Pack\ACE Mega CoDecS Pack.nsi" on line 87 -- aborting creation process
I tried to use same icon, but nothing happen...
It worked in b3 same way to me...
Joost Verburg
11th September 2003 15:01 UTC
Did you put the defines before the MUI_LANGUAGE macros?
Please try to reproduce the bzip2 crash, we would really appreciate that.
ACEMCP
11th September 2003 19:46 UTC
I did it in this way:
!include "Include\Installer.nsi"
!include "MUI.nsh"
!define VERSIONMAIN "6" ;Define your own software version here
!define VERSIONMAJOR "00"
!define VERSIONMINOR "0205"
!define VERSION ${VERSIONMAIN}.${VERSIONMAJOR}.${VERSIONMINOR}
!define PRODUCT "ACE Mega CoDecS Pack"
name "${PRODUCT} ${VERSION}" ;Define your own software name here
SetCompress force
SetCompressor bzip2
SetDatablockOptimize on
CRCCheck on
SetDateSave on
SilentInstall normal
BGGradient 111133 000080 FFFFFF
InstallColors FF8080 000030
XPStyle on
ShowInstDetails "nevershow"
ShowUninstDetails "nevershow"
!verbose 4
BrandingText $(BrandingBanner)
LicenseData $(LicenseFile)
;--------------------------------
;Configuration
;General
OutFile "ACEMCP${VERSIONMAIN}${VERSIONMAJOR}.EXE"
;Folder selection page
InstallDir "$PROGRAMFILES\${PRODUCT}"
;Remember install folder
InstallDirRegKey HKCU "Software\${PRODUCT}" ""
;Remember the installer language
!define MUI_LANGDLL_REGISTRY_ROOT "HKCU"
!define MUI_LANGDLL_REGISTRY_KEY "Software\${PRODUCT}"
!define MUI_LANGDLL_REGISTRY_VALUENAME "Installer Language"
;--------------------------------
;Modern UI Configuration
!define MUI_HEADERBITMAP "${NSISDIR}\Contrib\Icons\modern-header 2.bmp"
!define MUI_ICON "${NSISDIR}\Contrib\Icons\modern-install.ico"
!define MUI_UNICON "${NSISDIR}\Contrib\Icons\modern-install.ico"
; !define MUI_UNICON "${NSISDIR}\Contrib\Icons\modern-uninstall.ico"
!define MUI_FILE "modern.exe"
; !define MUI_UI "${NSISDIR}\Contrib\UIs\${MUI_FILE}"
!define MUI_ABORTWARNING
; !define MUI_SPECIALINI "Create\StartFinish.ini"; "${NSISDIR}\Contrib\Modern UI\Kami.ini"
!define MUI_PAGE_WELCOME
; !define MUI_PAGE_LICENSE
!define MUI_COMPONENTSPAGE_SMALLDESC
!define MUI_PAGE_COMPONENTS
!define MUI_PAGE_DIRECTORY
!define MUI_PAGE_STARTMENU
!define MUI_PAGE_INSTFILES
!define MUI_PAGE_FINISH
!define MUI_UNPAGE_CONFIRM
!define MUI_UNPAGE_LICENSE
!define MUI_UNPAGE_COMPONENTS
!define MUI_UNPAGE_DIRECTORY
!define MUI_UNPAGE_INSTFILES
!include "Language.nsh"
;--------------------------------
;Reserve Files
;Things that need to be extracted on first (keep these lines before any File command!)
;Only useful for BZIP2 compression
!insertmacro MUI_RESERVEFILE_WELCOMEFINISHPAGE ;Welcome- or Finish page
!insertmacro MUI_RESERVEFILE_LANGDLL ;LangDLL (language selection dialog)
!insertmacro MUI_RESERVEFILE_STARTMENU ;Start Menu Folder page
Language.nsh contains the macros:
!insertmacro MUI_LANGUAGE "English"
LangString BrandingBanner ${LANG_ENGLISH} "Installer"
LicenseLangString LicenseFile ${LANG_ENGLISH} "${NSISDIR}\Contrib\Modern UI\License.txt"
!include "Language\TITLE.eng"
!include "Language\DESC.eng"
TITLE and DESC contains the Sections names like:
LangString DESC_QuickRemove ${LANG_ENGLISH} "Quick Remove"
LangString TITLE_QuickRemove ${LANG_ENGLISH} "Quick Remove"
ACEMCP
11th September 2003 19:59 UTC
Hello!
I changed from
!define MUI_UNICON "${NSISDIR}\Contrib\Icons\modern-install.ico"
!define MUI_UNICON "${NSISDIR}\Contrib\Icons\modern-uninstall.ico"
to
Icon "${NSISDIR}\Contrib\Icons\modern-install.ico"
UninstallIcon "${NSISDIR}\Contrib\Icons\modern-uninstall.ico"
and now works perfectly! Please update the Modern UI's reference!
ACEMCP
Joost Verburg
11th September 2003 20:41 UTC
What you are doing is wrong (it will set icons twice etc.).
Add
!define MUI_ICON "${NSISDIR}\Contrib\Icons\modern-install.ico"
!define MUI_UNICON "${NSISDIR}\Contrib\Icons\modern-install.ico"
before the MUI_LANGUAGE macros.
In you last example, the defines are wrong (two times MUI_UNICON).
ACEMCP
11th September 2003 22:34 UTC
Ok I mispelled, when I copyed :o((((
If
!define MUI_ICON "${NSISDIR}\Contrib\Icons\modern-install.ico"
!define MUI_UNICON "${NSISDIR}\Contrib\Icons\modern-install.ico"
then error...
My code:
!include "Include\Installer.nsi"
!include "MUI.nsh"
!define VERSIONMAIN "6" ;Define your own software version here
!define VERSIONMAJOR "00"
!define VERSIONMINOR "0205"
!define VERSION ${VERSIONMAIN}.${VERSIONMAJOR}.${VERSIONMINOR}
!define PRODUCT "My sw"
name "${PRODUCT} ${VERSION}" ;Define your own software name here
SetCompress force
SetCompressor bzip2
SetDatablockOptimize on
CRCCheck on
SetDateSave on
SilentInstall normal
BGGradient 111133 000080 FFFFFF
InstallColors FF8080 000030
XPStyle on
ShowInstDetails "nevershow"
ShowUninstDetails "nevershow"
!verbose 4
BrandingText $(BrandingBanner)
LicenseData $(LicenseFile)
;--------------------------------
;Configuration
;General
OutFile "MYSW${VERSIONMAIN}${VERSIONMAJOR}.EXE"
;Folder selection page
InstallDir "$PROGRAMFILES\${PRODUCT}"
;Remember install folder
InstallDirRegKey HKCU "Software\${PRODUCT}" ""
;Remember the installer language
!define MUI_LANGDLL_REGISTRY_ROOT "HKCU"
!define MUI_LANGDLL_REGISTRY_KEY "Software\${PRODUCT}"
!define MUI_LANGDLL_REGISTRY_VALUENAME "Installer Language"
;--------------------------------
;Modern UI Configuration
!define MUI_ICON "${NSISDIR}\Contrib\Icons\modern-install.ico"
!define MUI_UNICON "${NSISDIR}\Contrib\Icons\modern-install.ico"
!define MUI_HEADERBITMAP "${NSISDIR}\Contrib\Icons\modern-header 2.bmp"
!define MUI_FILE "modern.exe"
!define MUI_UI "${NSISDIR}\Contrib\UIs\${MUI_FILE}"
!define MUI_ABORTWARNING
!define MUI_PAGE_WELCOME
!define MUI_PAGE_LICENSE
!define MUI_COMPONENTSPAGE_SMALLDESC
!define MUI_PAGE_COMPONENTS
!define MUI_PAGE_DIRECTORY
!define MUI_PAGE_STARTMENU
!define MUI_PAGE_INSTFILES
!define MUI_PAGE_FINISH
!define MUI_UNPAGE_CONFIRM
!define MUI_UNPAGE_LICENSE
!define MUI_UNPAGE_COMPONENTS
!define MUI_UNPAGE_DIRECTORY
!define MUI_UNPAGE_INSTFILES
!include "Language.nsh" ; License, Brandingtext, MUI_Language Macros
kichik
11th September 2003 22:44 UTC
Remove !define MUI_PAGE_*, they have been replaced with macros a long time ago.
MUI_ICON and MUI_UNICON works fine for me. There is probably something in Installer.nsi... How about you attach the entire script in one zip (including installer.nsi and language.nsh) instead of copying and pasting the same parts again and again (it makes it much harder to read... Please see the forum rules announcements for more information)?
ACEMCP
12th September 2003 11:15 UTC
Thanks!
Hey! Where my eyes :o) I replaced define MUI_PAGE_* to !insermacro then all of my script (include MUI_ICON and MUI_UNICON )is work perfectly... Many Thanks!
I started with b3 and I don't know anything about b4 and cvs, so now, I updated, and I see that I cannot compile my scripts... "long time ago" to you is now for me :o) Sorry, I am not so up-to-date, or there was a big changes between b3 and b4...
Sorry again,
and
Many Thanks!
ACEMCP
Joost Verburg
12th September 2003 15:00 UTC
There have been quite some changes in the latest version. I recommend you to check the new Modern UI Readme.