${SegmentFile}
Var CustomFirstRunDone

${SegmentInit}
    ${If} $Bits = 64
        ${SetEnvironmentVariablesPath} FullAppDir "$EXEDIR\App\Supermium"
	${Else}
        ${SetEnvironmentVariablesPath} FullAppDir "$EXEDIR\App\Supermium32"
	${EndIf}
!macroend

${SegmentPrePrimary}
	ReadINIStr $0 "$EXEDIR\Data\settings\SupermiumPortable.ini" "FirstRun" "Done"
	${If} $0 != true
		ClearErrors
		MessageBox MB_ICONINFORMATION|MB_OK "Passwords Not Saved Between PCs: Supermium stores passwords in such a way that they are encrypted in a way tied to current PC. While the passwords are not kept or left behind on the PC itself, they won't be retrievable when you move to a new PC. Signing in to your Google account will let them be saved and restored.$\r$\n$\r$\nCertificates Not Portable: Certificates are managed by Windows and are not portable between PCs. Do not install personal certificates on PCs other than your own.$\r$\n$\r$\nSome Settings/Extensions Locked Per PC: Signing into Google will let the settings and extensions be saved and restored."
		StrCpy $CustomFirstRunDone true
	${EndIf}
!macroend

${SegmentPost}
	${If} $CustomFirstRunDone == true
		WriteINIStr "$EXEDIR\Data\settings\SupermiumPortable.ini" "FirstRun" "Done" "true"
	${EndIf}
!macroend