main-begin-i686.nsi.in 2.74 KB
# default section
SubSection "@PACKAGE@" SecMain

	Section "Core" SecCore

		# define the output path for this file
		setOutPath $INSTDIR
		SetShellVarContext all

		createShortCut "$SMPROGRAMS\@PACKAGE@.lnk" "$INSTDIR\@PACKAGE@.exe"
		createShortCut "$DESKTOP\@PACKAGE@.lnk" "$INSTDIR\@PACKAGE@.exe"

		# Binary files
		file "/oname=$INSTDIR\@PACKAGE@.exe"					"..\.bin\Release\@PACKAGE@.exe"
		file "/oname=$INSTDIR\@PACKAGE@.ico"					"..\src\pw3270\@PACKAGE@.ico"
		file "/oname=$INSTDIR\lib3270.dll.@PACKAGE_VERSION@"	"..\.bin\Release\lib3270.dll.@PACKAGE_VERSION@"
		file "/oname=$INSTDIR\pw3270.dll.@PACKAGE_VERSION@"		"..\.bin\Release\pw3270.dll.@PACKAGE_VERSION@"

		# Configuration files
		file "/oname=$INSTDIR\@PACKAGE@-logo.png"				"..\src\pw3270\@PACKAGE@-logo.png"
		file "/oname=$INSTDIR\@PACKAGE@.png"					"..\src\pw3270\@PACKAGE@.png"
		file "/oname=$INSTDIR\colors.conf"						"..\colors.conf"

		# Documentation files
		file "/oname=$INSTDIR\ChangeLog"						"..\ChangeLog"
		file "/oname=$INSTDIR\AUTHORS"							"..\AUTHORS"
		file "/oname=$INSTDIR\LICENSE"							"..\LICENSE"

		# Misc folders
		CreateDirectory "$INSTDIR\certs"
		CreateDirectory "$INSTDIR\plugins"

		# UI definition files
		CreateDirectory "$INSTDIR\ui"

		file "/oname=$INSTDIR\ui\00default.xml" 				"..\ui\00default.xml"

		# Locale files
		CreateDirectory "$INSTDIR\@localedir@\pt_BR\LC_MESSAGES"
		file "/oname=$INSTDIR\@localedir@\pt_BR\LC_MESSAGES\@PACKAGE@.mo" "..\.bin\Release\@localedir@\pt_BR\LC_MESSAGES\@PACKAGE@.mo"

		# Save DataDir
		WriteRegStr HKLM "Software\@PACKAGE@" "datadir" "$INSTDIR"
		WriteRegStr HKLM "Software\@PACKAGE@" "appName" "$INSTDIR\@PACKAGE@.exe"

		# define uninstaller name
		writeUninstaller $INSTDIR\uninstall.exe

		WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@PACKAGE@" \
			         "DisplayName" "@PACKAGE@ - 3270 emulator for windows/gtk"
		WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@PACKAGE@" \
			         "DisplayIcon" "$INSTDIR\@PACKAGE@.ico"
		WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@PACKAGE@" \
			         "DisplayVersion" "@PACKAGE_VERSION@ (Rev: @PACKAGE_REVISION@)"

		WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@PACKAGE@" \
			         "UninstallString" "$INSTDIR\uninstall.exe"
		WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@PACKAGE@" \
			         "InstallLocation" "$INSTDIR"
		WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@PACKAGE@" \
			         "NoModify" "1"
		WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@PACKAGE@" \
			         "NoRepair" "1"

		# Save instalation dir
		WriteRegStr HKCU "Software\@PACKAGE@" "" $INSTDIR

	sectionEnd

	SubSection "Plugins" SecPLugin