View | Details | Raw Unified | Return to issue 127100
Collapse All | Expand All

(-)main/configure.in (+17 lines)
Lines 5545-5550 Link Here
5545
        NSIS_PATH=`cygpath -d "$NSIS_PATH"`
5545
        NSIS_PATH=`cygpath -d "$NSIS_PATH"`
5546
        NSIS_PATH=`cygpath -u "$NSIS_PATH"`
5546
        NSIS_PATH=`cygpath -u "$NSIS_PATH"`
5547
        AC_MSG_RESULT([found ($NSIS_PATH)])
5547
        AC_MSG_RESULT([found ($NSIS_PATH)])
5548
		AC_MSG_CHECKING([whether NSIS version is >= 3.*])
5549
		nsis_version_string=`"$NSIS_PATH/makensis.exe" /VERSION | $SED -e s/^v//i`
5550
        nsis_version_major=`echo $nsis_version_string | cut -d. -f1`
5551
		nsis_version_minor=`echo $nsis_version_string | cut -d. -f2`
5552
		if test "$nsis_version_major" -ge "3"; then
5553
			AC_MSG_RESULT([found NSIS $nsis_version_major.$nsis_version_minor >= 3.*])
5554
			AC_MSG_CHECKING([whether NSIS was compiled with Unicode support])
5555
			if echo `"$NSIS_PATH/makensis.exe" /HDRINFO` | $EGREP  "\bNSIS_UNICODE_MAKENSIS\b" 2>&1 >/dev/null; then
5556
				AC_MSG_RESULT([NSIS version compiled with Unicode support.])
5557
			else
5558
				NSIS_PATH=""
5559
				AC_MSG_WARN([NSIS version compiled without Unicode support, no self contained installer will be build.])
5560
			fi
5561
		else
5562
			NSIS_PATH=""
5563
			AC_MSG_WARN([NSIS version found is < 3.*, no self contained installer will be build.])
5564
		fi
5548
    fi
5565
    fi
5549
fi
5566
fi
5550
AC_SUBST(NSIS_PATH)
5567
AC_SUBST(NSIS_PATH)
(-)main/setup_native/source/win32/nsis/downloadtemplate.nsi (-53 / +41 lines)
Lines 3-8 Link Here
3
!define PRODUCT_PUBLISHER "PUBLISHERPLACEHOLDER"
3
!define PRODUCT_PUBLISHER "PUBLISHERPLACEHOLDER"
4
!define PRODUCT_WEB_SITE "WEBSITEPLACEHOLDER"
4
!define PRODUCT_WEB_SITE "WEBSITEPLACEHOLDER"
5
5
6
; Enable Unicode
7
Unicode true
8
6
; SetCompressor lzma
9
; SetCompressor lzma
7
SetCompressor zlib
10
SetCompressor zlib
8
11
Lines 212-271 Link Here
212
!insertmacro MUI_PAGE_DIRECTORY
215
!insertmacro MUI_PAGE_DIRECTORY
213
!insertmacro MUI_PAGE_INSTFILES
216
!insertmacro MUI_PAGE_INSTFILES
214
217
215
#231#!macro MUI_LANGUAGE_PACK LANGUAGE
218
!macro MUI_LANGUAGE_PACK LANGUAGE
216
#231#  !verbose push
219
  !verbose push
217
#231#  !verbose ${MUI_VERBOSE}
220
  !verbose ${MUI_VERBOSE}
218
#231#  !insertmacro MUI_INSERT
221
  !insertmacro MUI_INSERT
219
#231#  LoadLanguageFile "NSISPATHPLACEHOLDER\${LANGUAGE}_pack.nlf"
222
  LoadLanguageFile "NSISPATHPLACEHOLDER\${LANGUAGE}_pack.nlf"
220
#231#  ;Set default language file for MUI and backup user setting
223
  ;Set default language file for MUI and backup user setting
221
#231#  !ifdef LANGFILE_DEFAULT
224
  !ifdef LANGFILE_DEFAULT
222
#231#    !define MUI_LANGFILE_DEFAULT_TEMP "${LANGFILE_DEFAULT}"
225
    !define MUI_LANGFILE_DEFAULT_TEMP "${LANGFILE_DEFAULT}"
223
#231#    !undef LANGFILE_DEFAULT
226
    !undef LANGFILE_DEFAULT
224
#231#  !endif
227
  !endif
225
#231#  !define LANGFILE_DEFAULT "${NSISDIR}\Contrib\Language files\English.nsh"
228
  !define LANGFILE_DEFAULT "${NSISDIR}\Contrib\Language files\English.nsh"
226
#231#  ;Include language file
229
  ;Include language file
227
#231#  !insertmacro LANGFILE_INCLUDE "NSISPATHPLACEHOLDER\${LANGUAGE}_pack.nsh"
230
  !insertmacro LANGFILE_INCLUDE "NSISPATHPLACEHOLDER\${LANGUAGE}_pack.nsh"
228
#231#  ;Restore user setting for default language file
231
  ;Restore user setting for default language file
229
#231#  !undef LANGFILE_DEFAULT
232
  !undef LANGFILE_DEFAULT
230
#231#  !ifdef MUI_LANGFILE_DEFAULT_TEMP
233
  !ifdef MUI_LANGFILE_DEFAULT_TEMP
231
#231#    !define LANGFILE_DEFAULT "${MUI_LANGFILE_DEFAULT}"
234
    !define LANGFILE_DEFAULT "${MUI_LANGFILE_DEFAULT}"
232
#231#  !endif
235
  !endif
233
#231#  ;Add language to list of languages for selection dialog  
236
  ;Add language to list of languages for selection dialog  
234
#231#  !ifndef MUI_LANGDLL_LANGUAGES
237
  !ifndef MUI_LANGDLL_LANGUAGES
235
#231#   !define MUI_LANGDLL_LANGUAGES "'${LANGFILE_${LANGUAGE}_NAME}' '${LANG_${LANGUAGE}}' "
238
   !define MUI_LANGDLL_LANGUAGES "'${LANGFILE_${LANGUAGE}_NAME}' '${LANG_${LANGUAGE}}' "
236
#231#    !define MUI_LANGDLL_LANGUAGES_CP "'${LANGFILE_${LANGUAGE}_NAME}' '${LANG_${LANGUAGE}}' '${LANG_${LANGUAGE}_CP}' "
239
    !define MUI_LANGDLL_LANGUAGES_CP "'${LANGFILE_${LANGUAGE}_NAME}' '${LANG_${LANGUAGE}}' '${LANG_${LANGUAGE}_CP}' "
237
#231#  !else
240
  !else
238
#231#    !ifdef MUI_LANGDLL_LANGUAGES_TEMP
241
    !ifdef MUI_LANGDLL_LANGUAGES_TEMP
239
#231#      !undef MUI_LANGDLL_LANGUAGES_TEMP
242
      !undef MUI_LANGDLL_LANGUAGES_TEMP
240
#231#    !endif
243
    !endif
241
#231#    !define MUI_LANGDLL_LANGUAGES_TEMP "${MUI_LANGDLL_LANGUAGES}"
244
    !define MUI_LANGDLL_LANGUAGES_TEMP "${MUI_LANGDLL_LANGUAGES}"
242
#231#    !undef MUI_LANGDLL_LANGUAGES
245
    !undef MUI_LANGDLL_LANGUAGES
243
#231#	!ifdef MUI_LANGDLL_LANGUAGES_CP_TEMP
246
	!ifdef MUI_LANGDLL_LANGUAGES_CP_TEMP
244
#231#      !undef MUI_LANGDLL_LANGUAGES_CP_TEMP
247
      !undef MUI_LANGDLL_LANGUAGES_CP_TEMP
245
#231#    !endif
248
    !endif
246
#231#    !define MUI_LANGDLL_LANGUAGES_CP_TEMP "${MUI_LANGDLL_LANGUAGES_CP}"
249
    !define MUI_LANGDLL_LANGUAGES_CP_TEMP "${MUI_LANGDLL_LANGUAGES_CP}"
247
#231#    !undef MUI_LANGDLL_LANGUAGES_CP
250
    !undef MUI_LANGDLL_LANGUAGES_CP
248
#231#    !define MUI_LANGDLL_LANGUAGES "'${LANGFILE_${LANGUAGE}_NAME}' '${LANG_${LANGUAGE}}' ${MUI_LANGDLL_LANGUAGES_TEMP}"
251
    !define MUI_LANGDLL_LANGUAGES "'${LANGFILE_${LANGUAGE}_NAME}' '${LANG_${LANGUAGE}}' ${MUI_LANGDLL_LANGUAGES_TEMP}"
249
#231#    !define MUI_LANGDLL_LANGUAGES_CP "'${LANGFILE_${LANGUAGE}_NAME}' '${LANG_${LANGUAGE}}' '${LANG_${LANGUAGE}_CP}' ${MUI_LANGDLL_LANGUAGES_CP_TEMP}"
252
    !define MUI_LANGDLL_LANGUAGES_CP "'${LANGFILE_${LANGUAGE}_NAME}' '${LANG_${LANGUAGE}}' '${LANG_${LANGUAGE}_CP}' ${MUI_LANGDLL_LANGUAGES_CP_TEMP}"
250
#231#  !endif
253
  !endif
251
#231#  !verbose pop
254
  !verbose pop
252
#231#!macroend
255
!macroend
253
256
254
#204#!macro MUI_LANGUAGE_PACK LANGUAGE
255
#204#  !verbose push
256
#204#  !verbose ${MUI_VERBOSE}
257
#204#  !include "NSISPATHPLACEHOLDER\${LANGUAGE}_pack.nsh"
258
#204#  !verbose pop
259
#204#!macroend
260
261
#204#!macro MUI_LANGUAGEFILE_PACK_BEGIN LANGUAGE
262
#204#  !ifndef MUI_INSERT
263
#204#    !define MUI_INSERT
264
#204#    !insertmacro MUI_INSERT
265
#204#  !endif
266
#204#  LoadLanguageFile "NSISPATHPLACEHOLDER\${LANGUAGE}_pack.nlf"
267
#204#!macroend
268
269
; Language files
257
; Language files
270
ALLLANGUAGESPLACEHOLDER
258
ALLLANGUAGESPLACEHOLDER
271
259
(-)main/solenv/bin/modules/installer/download.pm (-132 / +8 lines)
Lines 902-946 Link Here
902
}
902
}
903
903
904
##################################################################
904
##################################################################
905
# Windows: Setting nsis version is necessary because of small
906
# changes in nsis from version 2.0.4 to 2.3.1 
907
##################################################################
908
909
sub set_nsis_version
910
{
911
	my ($nshfile) = @_;
912
913
	my $searchstring = "\$\{LangFileString\}"; # occurs only in nsis 2.3.1 or similar
914
	
915
	for ( my $i = 0; $i <= $#{$nshfile}; $i++ )
916
	{
917
		if ( ${$nshfile}[$i] =~ /\Q$searchstring\E/ )
918
		{
919
			# this is nsis 2.3.1 or similar
920
			$installer::globals::nsis231 = 1;
921
			$installer::globals::unicodensis = 0;
922
			last;	
923
		}
924
	}
925
	
926
	# checking unicode version
927
	$searchstring = convert_to_unicode($searchstring);
928
929
	for ( my $i = 0; $i <= $#{$nshfile}; $i++ )
930
	{
931
		if ( ${$nshfile}[$i] =~ /\Q$searchstring\E/ )
932
		{
933
			# this is nsis 2.3.1 or similar
934
			$installer::globals::nsis231 = 1;
935
			$installer::globals::unicodensis = 1;
936
			last;	
937
		}
938
	}
939
	
940
	if ( ! $installer::globals::nsis231 ) { $installer::globals::nsis204 = 1; }
941
}
942
943
##################################################################
944
# Windows: Including the product name into nsi template 
905
# Windows: Including the product name into nsi template 
945
##################################################################
906
##################################################################
946
907
Lines 1115-1123 Link Here
1115
	if (length($locallangs) > $installer::globals::max_lang_length) { $locallangs = "multi lingual"; }
1076
	if (length($locallangs) > $installer::globals::max_lang_length) { $locallangs = "multi lingual"; }
1116
1077
1117
	if ( ! $installer::globals::languagepack ) { $productpath = $productpath . " (" . $locallangs . ")"; } 		
1078
	if ( ! $installer::globals::languagepack ) { $productpath = $productpath . " (" . $locallangs . ")"; } 		
1118
	
1079
1119
	# if (( $installer::globals::languagepack ) && ( $installer::globals::unicodensis )) { $productpath = convert_textstring_to_utf16($productpath, $localnsisdir, "stringhelper.txt"); }
1120
	
1121
	replace_one_variable($templatefile, "PRODUCTPATHPLACEHOLDER", $productpath);
1080
	replace_one_variable($templatefile, "PRODUCTPATHPLACEHOLDER", $productpath);
1122
}
1081
}
1123
1082
Lines 1418-1429 Link Here
1418
sub replace_identifier_in_nshfile
1377
sub replace_identifier_in_nshfile
1419
{
1378
{
1420
	my ( $nshfile, $identifier, $newstring, $nshfilename, $onelanguage ) = @_;
1379
	my ( $nshfile, $identifier, $newstring, $nshfilename, $onelanguage ) = @_;
1421
	
1422
	if ( $installer::globals::nsis231 )
1423
	{
1424
		$newstring =~ s/\\r/\$\\r/g;	# \r -> $\r  in modern nsis versions
1425
		$newstring =~ s/\\n/\$\\n/g;	# \n -> $\n  in modern nsis versions
1426
	}
1427
1380
1428
	for ( my $i = 0; $i <= $#{$nshfile}; $i++ )
1381
	for ( my $i = 0; $i <= $#{$nshfile}; $i++ )
1429
	{
1382
	{
Lines 1616-1632 Link Here
1616
		installer::systemactions::copy_one_file($sourcepath, $nshfilename);		
1569
		installer::systemactions::copy_one_file($sourcepath, $nshfilename);		
1617
1570
1618
		# Changing the macro name in nsh file: MUI_LANGUAGEFILE_BEGIN -> MUI_LANGUAGEFILE_PACK_BEGIN
1571
		# Changing the macro name in nsh file: MUI_LANGUAGEFILE_BEGIN -> MUI_LANGUAGEFILE_PACK_BEGIN
1619
		my $nshfile = installer::files::read_file($nshfilename);
1572
        convert_utf16_to_utf8($nshfilename);
1620
		set_nsis_version($nshfile);
1573
        convert_utf16_to_utf8($nlffilename);
1621
		
1574
        my $nshfile = installer::files::read_file($nshfilename);
1622
		if ( $installer::globals::unicodensis )
1623
		{
1624
            $installer::logger::Lang->printf("This is Unicode NSIS!\n");
1625
			convert_utf16_to_utf8($nshfilename);
1626
			convert_utf16_to_utf8($nlffilename);
1627
			$nshfile = installer::files::read_file($nshfilename);	# read nsh file again
1628
		}
1629
1630
		replace_one_variable($nshfile, "MUI_LANGUAGEFILE_BEGIN", "MUI_LANGUAGEFILE_PACK_BEGIN");
1575
		replace_one_variable($nshfile, "MUI_LANGUAGEFILE_BEGIN", "MUI_LANGUAGEFILE_PACK_BEGIN");
1631
1576
1632
		# find the ulf file for translation
1577
		# find the ulf file for translation
Lines 1639-1649 Link Here
1639
		installer::files::save_file($nshfilename, $nshfile);
1584
		installer::files::save_file($nshfilename, $nshfile);
1640
		installer::files::save_file($nlffilename, $nlffile);
1585
		installer::files::save_file($nlffilename, $nlffile);
1641
1586
1642
		if ( $installer::globals::unicodensis )
1587
        convert_utf8_to_utf16($nshfilename);
1643
		{
1588
        convert_utf8_to_utf16($nlffilename);
1644
			convert_utf8_to_utf16($nshfilename);
1645
			convert_utf8_to_utf16($nlffilename);
1646
		}
1647
	}
1589
	}
1648
1590
1649
}
1591
}
Lines 1673-1710 Link Here
1673
}
1615
}
1674
1616
1675
##################################################################
1617
##################################################################
1676
# Windows: Only allow specific code for nsis 2.0.4 or nsis 2.3.1 
1677
##################################################################
1678
1679
sub put_version_specific_code_into_template
1680
{
1681
	my ($templatefile) = @_;
1682
	
1683
	my $subst204 = "";
1684
	my $subst231 = "";
1685
	
1686
	if ( $installer::globals::nsis204 )
1687
	{
1688
		$subst231 = ";";
1689
	}
1690
	else
1691
	{
1692
		$subst204 = ";";		
1693
	}
1694
1695
	replace_one_variable($templatefile, "\#204\#", $subst204);
1696
	replace_one_variable($templatefile, "\#231\#", $subst231);	
1697
}
1698
1699
##################################################################
1700
# Windows: Finding the path to the nsis SDK 
1618
# Windows: Finding the path to the nsis SDK 
1701
##################################################################
1619
##################################################################
1702
1620
1703
sub get_path_to_nsis_sdk
1621
sub get_path_to_nsis_sdk
1704
{
1622
{
1705
	my $vol;
1706
	my $dir;
1707
	my $file;
1708
	my $nsispath = "";
1623
	my $nsispath = "";
1709
1624
1710
	if ( $ENV{'NSIS_PATH'} )
1625
	if ( $ENV{'NSIS_PATH'} )
Lines 1711-1755 Link Here
1711
    {
1626
    {
1712
		$nsispath = $ENV{'NSIS_PATH'};
1627
		$nsispath = $ENV{'NSIS_PATH'};
1713
	}
1628
	}
1714
    elsif ( $ENV{'SOLARROOT'} )
1715
    {
1716
		$nsispath = $ENV{'SOLARROOT'} . $installer::globals::separator . "NSIS";
1717
	}
1718
    else
1719
    {
1720
		# do we have nsis already in path ?
1721
		my @paths = split(/:/, $ENV{'PATH'});
1722
		foreach my $path (@paths)
1723
        {
1724
            $path =~ s/[\/\\]+$//; # remove trailing slashes;
1725
			$nsispath = $path . "/nsis";
1726
1727
			if ( -x $nsispath )
1728
            {
1729
				$nsispath = $path;
1730
				last;
1731
			}
1732
			else
1733
            {
1734
				$nsispath = "";
1735
			}
1736
		}
1737
	}
1738
	if ( $ENV{'NSISSDK_SOURCE'} )
1739
    {
1740
	    installer::logger::print_warning( "NSISSDK_SOURCE is deprecated. use NSIS_PATH instead.\n" );
1741
        $nsispath = $ENV{'NSISSDK_SOURCE'};	# overriding the NSIS SDK with NSISSDK_SOURCE
1742
    }
1743
1744
#	if( ($^O =~ /cygwin/i) and $nsispath =~ /\\/ ) {
1745
#		# We need a POSIX path for W32-4nt-cygwin-perl
1746
#		$nsispath =~ s/\\/\\\\/g;
1747
#		chomp( $nsispath = qx{cygpath -u "$nsispath"} );
1748
#	}
1749
1750
	if ( $nsispath eq "" )
1629
	if ( $nsispath eq "" )
1751
	{
1630
	{
1752
        $installer::logger::Info->print("... no Environment variable \"SOLARROOT\", \"NSIS_PATH\" or \"NSISSDK_SOURCE\" found and NSIS not found in path!\n");
1631
        $installer::logger::Info->print("... no Environment variable \"NSIS_PATH\"!\n");
1753
	}
1632
	}
1754
    elsif ( ! -d $nsispath )
1633
    elsif ( ! -d $nsispath )
1755
	{
1634
	{
Lines 1840-1848 Link Here
1840
sub get_translation_file
1719
sub get_translation_file
1841
{
1720
{
1842
	my ($allvariableshashref) = @_;
1721
	my ($allvariableshashref) = @_;
1843
	my $translationfilename = $installer::globals::idtlanguagepath . $installer::globals::separator . $installer::globals::nsisfilename;
1722
	my $translationfilename = $installer::globals::idtlanguagepath . $installer::globals::separator . $installer::globals::nsisfilename . ".uulf";
1844
	if ( $installer::globals::unicodensis ) { $translationfilename = $translationfilename . ".uulf"; }
1845
	else { $translationfilename = $translationfilename . ".mlf"; }
1846
	if ( ! -f $translationfilename ) { installer::exiter::exit_program("ERROR: Could not find language file $translationfilename!", "get_translation_file"); }
1723
	if ( ! -f $translationfilename ) { installer::exiter::exit_program("ERROR: Could not find language file $translationfilename!", "get_translation_file"); }
1847
	my $translationfile = installer::files::read_file($translationfilename);
1724
	my $translationfile = installer::files::read_file($translationfilename);
1848
	replace_variables($translationfile, $allvariableshashref);
1725
	replace_variables($translationfile, $allvariableshashref);
Lines 2078-2084 Link Here
2078
		put_language_list_into_template($templatefile, $languagesarrayref);
1955
		put_language_list_into_template($templatefile, $languagesarrayref);
2079
		put_nsis_path_into_template($templatefile, $localnsisdir);
1956
		put_nsis_path_into_template($templatefile, $localnsisdir);
2080
		put_output_path_into_template($templatefile, $downloaddir);
1957
		put_output_path_into_template($templatefile, $downloaddir);
2081
		put_version_specific_code_into_template($templatefile);
2082
	
1958
	
2083
		my $nsifilename = save_script_file($localnsisdir, $templatefilename, $templatefile);
1959
		my $nsifilename = save_script_file($localnsisdir, $templatefilename, $templatefile);
2084
1960
(-)main/solenv/bin/modules/installer/globals.pm (-3 lines)
Lines 447-455 Link Here
447
	$msiassemblyfiles = "";
447
	$msiassemblyfiles = "";
448
	$nsisfilename = "Nsis";
448
	$nsisfilename = "Nsis";
449
	$macinstallfilename = "macinstall.ulf";
449
	$macinstallfilename = "macinstall.ulf";
450
	$nsis204 = 0;
451
	$nsis231 = 0;
452
	$unicodensis = 0;
453
	$linuxlinkrpms = "";
450
	$linuxlinkrpms = "";
454
	$extensioninstalldir = "gid_Dir_Share_Extension_Install";
451
	$extensioninstalldir = "gid_Dir_Share_Extension_Install";
455
	@languagenames = ();
452
	@languagenames = ();
(-)main/solenv/bin/modules/installer/simplepackage.pm (-3 lines)
Lines 173-181 Link Here
173
sub get_mac_translation_file
173
sub get_mac_translation_file
174
{
174
{
175
	my $translationfilename = $installer::globals::maclangpackfilename;
175
	my $translationfilename = $installer::globals::maclangpackfilename;
176
	# my $translationfilename = $installer::globals::idtlanguagepath . $installer::globals::separator . $installer::globals::maclangpackfilename;
177
	# if ( $installer::globals::unicodensis ) { $translationfilename = $translationfilename . ".uulf"; }
178
	# else { $translationfilename = $translationfilename . ".mlf"; }
179
	if ( ! -f $translationfilename ) { installer::exiter::exit_program("ERROR: Could not find language file $translationfilename!", "get_mac_translation_file"); }
176
	if ( ! -f $translationfilename ) { installer::exiter::exit_program("ERROR: Could not find language file $translationfilename!", "get_mac_translation_file"); }
180
	my $translationfile = installer::files::read_file($translationfilename);
177
	my $translationfile = installer::files::read_file($translationfilename);
181
178

Return to issue 127100