${SegmentFile}

${SegmentPre}
	;Windows %BITS% env. var: 32/64
	StrCpy $0 BITS
	StrCpy $1 $BITS
	${DebugMsg} "Setting environment variable $0 to $1"
	System::Call Kernel32::SetEnvironmentVariable(tr0,tr1)
	
	;Windows %PLATFORM% env. var: x86/x64
	${If} $Bits = 32
		StrCpy $0 PLATFORM
		StrCpy $1 x86
		${DebugMsg} "Setting environment variable $0 to $1"
		System::Call Kernel32::SetEnvironmentVariable(tr0,tr1)
	${Else}
		StrCpy $0 PLATFORM
		StrCpy $1 x64
		${DebugMsg} "Setting environment variable $0 to $1"
		System::Call Kernel32::SetEnvironmentVariable(tr0,tr1)
	${EndIf}
!macroend
