Jump to content

System Environment Variable for Ultra Engine


reepblue
 Share

Recommended Posts

Can the installer create a System Environment Variable for where Ultra Engine is installed? I think this will help make installing tools and sharing C++ projects easier if we can just reference something like %ULTRAENGINEPATH% in batch scripts or the PropertiesSheet.props file. 

This is now more important as there's the Steam install and the standalone version. 

Cyclone - Ultra Game System - Component PreprocessorTex2TGA - Darkness Awaits Template (Leadwerks)

If you like my work, consider supporting me on Patreon!

Link to comment
Share on other sites

I have considered this, but it either requires admin permissions or requires the user to manually add the key, so I am hesitant to start building anything on this.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Okay, I figured out how to add this into the installer with Inno setup:

[Setup]
ChangesEnvironment=yes

[Registry]
Root: HKLM; Subkey: "System\CurrentControlSet\Control\Session Manager\Environment"; ValueType: string; ValueName: "ULTRAENGINE"; ValueData: "{app}"

 

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

With the env variable set, you can replace propertysheet.props with this, and it does actually work:
 

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <ImportGroup Label="PropertySheets" />
  <PropertyGroup Label="UserMacros">
    <UltraEnginePath>$(ULTRAENGINE)</UltraEnginePath>
  </PropertyGroup>
  <PropertyGroup />
  <ItemDefinitionGroup />
  <ItemGroup>
    <BuildMacro Include="UltraEnginePath">
      <Value>$(UltraEnginePath)</Value>
      <EnvironmentVariable>true</EnvironmentVariable>
    </BuildMacro>
  </ItemGroup>
</Project>

 

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

If you open the vcxproj in a text editor and do a search and replace to replace "$(UltraEnginePath)" with "$(ULTRAENGINE)" then you can get rid of the propertysheet.props file and Visual Studio will be able to compile using the env variable that is set.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Okay, this is implemented now. The environment variable will be set when a C++ project is created, only if it does not already exist.

The C++ project template is updated to use the env var and the property sheets file is removed. This will not affect your existing projects.

  • Thanks 1

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...