BenitoJedai / nativeclient-sdk

Automatically exported from code.google.com/p/nativeclient-sdk
0 stars 1 forks source link

NativeClient sdk needs to set a environment variable under Windows #127

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
There should be an environment variable automatically set by the installer.

How else can a third-party middleware library, with its own build system, 
automatically find the NativeClient SDK location under Windows?

Pretty much every major SDK under Windows uses environment variables, for 
example DX_SDK, CUDA_PATH, AMDAPPSDKROOT etc.

http://code.google.com/p/nativeclient-sdk/issues/detail?id=60

I noticed the issue 60 was closed as WontFix but it seems that the one who 
closed the issue doesn't provide a proper way to automatically find the 
location of the NativeClient SDK.

Original issue reported on code.google.com by erwin.coumans on 7 Sep 2011 at 12:23

GoogleCodeExporter commented 8 years ago
It seems you are using NSIS installer. 
http://code.google.com/p/nativeclient-sdk/source/browse/trunk/src/build_tools/ma
ke_sdk_installer.nsi

If so, here is a solution:

Add attached file next to the installer .nsis file, and add the following lines 
to make_sdk_installer.nsi:

!define ALL_USERS ; this is optional, otherwise it is local to the user
!include WriteRegistryString.nsh

Section "Add environment variable"
    Push "NACL_SDK_PATH"
    Push "$INSTDIR"
  Call WriteEnvStr
SectionEnd

Original comment by erwin.coumans on 7 Sep 2011 at 6:24

Attachments:

GoogleCodeExporter commented 8 years ago

You could also add an un-install option, and de-register the environment 
variable.

Section "Uninstall"
    ClearErrors
    MessageBox MB_YESNO "Uninstall Native Client SDK?" IDNO end

    RMDir /r "$INSTDIR"

    Push "NACL_SDK_PATH"           # name
    Call un.DeleteEnvStr

    end:
SectionEnd

Here is our Dynamica Maya plugin installer, for your reference:
http://code.google.com/p/dynamica/source/browse/trunk/Extras/MayaPlugin/bullet_6
4bit.nsi

Original comment by erwin.coumans on 7 Sep 2011 at 6:28

GoogleCodeExporter commented 8 years ago
While this is an excellent suggestion (and thanks for the patches!) we're going 
to hold off on this.  We are working on full integration with Visual Studio and 
a different installer method.  The SCons builds and NSIS isntaller are there to 
get developers going on Windows until there is a more complete solution.

Original comment by dsprin...@chromium.org on 8 Sep 2011 at 2:46

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago

Can you please explain how our custom build systems (premake/cmake) will be 
able to automatically locate the Native Client SDK under Windows, in your 
future solution?

Original comment by erwin.coumans on 8 Sep 2011 at 5:34