You are here

Checking for SSE2 support in the PortableApps.com Launcher

3 posts / 0 new
Last post
John T. Haller
John T. Haller's picture
Offline
Last seen: 2 hours 15 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Checking for SSE2 support in the PortableApps.com Launcher

More apps are requiring SSE2 support (Chrome, Opera, Firefox, etc) and yet some are still supporting an older OS like XP or Vista that may be more likely to be running on older chips (Firefox). Even though the chips are over a decade old, some are still in use. For apps where the app itself supports an older OS but does not support an older chip, here is code you can add to your custom.nsh file for a PortableApps.com Launcher for the app to alert to that effect:

${SegmentFile}

!define PF_XMMI64_INSTRUCTIONS_AVAILABLE 10

${SegmentInit}
	;Ensure processor supports SSE2
	System::Call kernel32::IsProcessorFeaturePresent(i${PF_XMMI64_INSTRUCTIONS_AVAILABLE})i.r0
	${If} $0 == 0
		;SSE2 unavailable
		MessageBox MB_ICONEXCLAMATION|MB_OK "This computer has an older CPU that lacks SSE2 instruction set support. This application can not run on this computer."
		Abort
	${EndIf}
!macroend

You can adapt this to custom launchers as needed as well. I made work on adding this support into the next PAL.

Note: Non-SSE2 chips can run XP, Vista, and 7 without issue, though I've not encountered one running Windows 7. Windows 8 and higher require SSE2 support in the CPU so we wouldn't need to make this check on modern Windows. I'll likely add that as part of the checks later.

Gord Caswell
Gord Caswell's picture
Offline
Last seen: 1 month 3 weeks ago
DeveloperModerator
Joined: 2008-07-24 18:46
Add to PAL directly

I've forked the hg repo from our SourceForge project to my growing Github repo list, and can add this as-is more-or-less directly to PAL there, unless you have some code pre-written you'd like added instead.

John T. Haller
John T. Haller's picture
Offline
Last seen: 2 hours 15 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Setting

It will need a setting in PAL to determine whether it's a check we should do or not. And we should skip the check even if configured for it if running on Windows 8 or later.

Sometimes, the impossible can become possible, if you're awesome!

Log in or register to post comments