- An environment variable is a pair of strings that are stored in a function's version-specific configuration. The Lambda runtime makes environment variables available to your code and sets additional environment variables that contain information about the function and invocation request.
- To set environment for all processes launched by a specific user, thus making environment variables available to Mac OS X GUI applications, those variables must be defined in your /.MacOSX/environment.plist (Apple Technical Q&A QA1067).
- May 01, 2013 In mac, to set environment variables, we have to type the following command: echo '.MacOSX/environment.plist and hit return This will create a file called program list.
- And click Environment Variables. On the Mac OS X you can only set environment variables using Maya.env. Standard paths When Maya loads environment variable settings into its memory, it adds some standard paths to certain environment variables to ensure that some things Maya requires to run are always available. This affects the following.
- Set the JAVAHOME environment variable to the location of your JDK installation; Set the ANDROIDHOME environment variable to the location of your Android SDK installation; It is also recommended that you add the Android SDK's tools, tools/bin, and platform-tools directories to your PATH; OS X and Linux.
- Os.environ behaves like a python dictionary, so all the common dictionary operations can be performed. In addition to the get and set operations mentioned in the other answers, we can also simply check if a key exists. The keys and values should be stored as strings. For python 3, dictionaries use the in keyword instead of haskey import os 'HOME' in os.environ # Check an.
This variable defines your personal Maya application directory. This directory contains your projects and other important items:
Normally, environment variables go in.bashprofile, since they only need to be set once, on login.All descendent processes will inherit the values from their parent. In OS X, bash is not used as part of the initial login process, and the Terminal.app (or other terminal emulators) process exists outside any pre-existing bash sessions, so each new window (by default) treats itself as a new.
- the prefs directory
- the projects directory
- mayaRenderLog.txt
- mayaLog
- mayaJournal
- the scripts directory
- (Maya.env, if you choose to create it, can also reside in this directory)
You can only set MAYA_APP_DIR from the operating system; you cannot use Maya.env. If you do not set it, the default values are: ~username/maya (Linux) or drive:Documents and SettingsusernameMy Documentsmaya (Windows).
For Mac OS X, you cannot set environment variables from the operating system.
This variable enables the cmdFileOutput command during startup so the content in the script editor automatically outputs to a designated file. If no file name is specified, then errors are sent to the standard error output, for example the Terminal window. This feature is useful for tracking down error messages when Maya crashes upon startup.
This variable has become obsolete since Maya 3.0. See XBMLANGPATH as this variable should be used instead.
Defines the search paths for Maya module files. A module file describes the install location of a plugin which has been distributed as a module. Maya will append subdirectories of this install location to the following path variables: MAYA_PLUG_IN_PATH, MAYA_PRESET_PATH, MAYA_SCRIPT_PATH, PYTHONPATH and XBMLANGPATH. See the individual descriptions of these variables below and Distributing Maya Plug-ins for more information.
The following tables list the default paths, which will always follow any path that you specify.
Default for Windows |
---|
<user’s directory>/My Documents/maya/2011/modules<user’s directory>/My Documents/maya/modules C:/Program Files/Common Files/Autodesk Shared/Modules/maya/2011 C:/Program Files/Common Files/Autodesk Shared/Modules/maya <maya_directory>/modules/ |
Default for Mac OS X, Linux |
---|
$MAYA_APP_DIR/maya/2011/modules $MAYA_APP_DIR/maya/modules /usr/autodesk/modules/maya/2011 /usr/autodesk/modules/maya |
This variable is used to override the directory where movie files are found. The default is $MAYA_LOCATION/movies.
The path for the Maya installation directory. If it is not set, it defaults to /usr/autodesk/mayaVersionNumber (Linux) or C:Program FilesAutodesk MayaVersionNumber (Windows).
On Mac OS X, Maya is installed as /Applications/Maya 2011/Maya.app. Since Mac OS X architecture makes it difficult to access the contents of the Maya application package, we strongly discourage the use of MAYA_LOCATION on Mac OS X. Instead, use the following alternate locations:
- /Users/Shared/Autodesk/maya/2011
- /Users/Shared/Autodesk/maya
- under your Home folder, in Library/Preferences/Autodesk/maya/2011
- under your Home folder, in Library/Preferences/Autodesk/maya.
Search path for plug-ins. When a plug-in is specified by relative path name, the directories in this path are searched for the given plug-in name. This path also determines which directories are listed in the Plug-in Manager. In addition, for each module file found by Maya on startup, the the plug-ins subdirectory of the module's root directory will be added to MAYA_PLUG_IN_PATH. See the description of the MAYA_MODULE_PATH variable above and Distributing Multi-File Modules for more information.
Default for Windows |
---|
<user’s directory>/My Documents/maya/2011/plug-ins <user’s directory>/My Documents/maya/plug-ins <maya_directory>/bin/plug-ins |
Default for Mac OS X |
---|
In your Home folder, under Library/Preferences/Autodesk/maya/2011 In your Home folder, under Library/Preferences/Autodesk/maya /Users/Shared/Autodesk/maya/2011 /Users/Shared/Autodesk/maya Inside the Maya package in /Applications/Maya 2011/Maya.app |
Default for Linux |
---|
$MAYA_APP_DIR/maya/2011/plug-ins $MAYA_APP_DIR/maya/plug-ins /usr/autodesk/userconfig/maya/2011/plug-ins /usr/autodesk/userconfig/maya/plug-ins $MAYA_LOCATION/bin/plug-ins |
Defines the location for Maya presets. Each entry in the path points to the directory above the attrPresets directory. In addition, for each module file found by Maya on startup, the the 'presets' subdirectory of the module's root directory will be added to MAYA_PRESET_PATH. See the description of the MAYA_MODULE_PATH variable above and Distributing Multi-File Modules for more information.
Defines the default location of your project. You can change the location with the commands in the File > Project.submenu. This variable simply defines the default.
Specifies the directories that Maya searches to access the shelves. You can store shelves in a location accessible by different groups who then set the MAYA_SHELF_PATH variable for their workstation.
You can specify more than one directory using MAYA_SHELF_PATH, separated by colons; for example, Production/shelf:Shot/shelf:MyDir/shelf specifies three different shelf directories. At startup, Maya searches each directory in the order specified to instantiate shelves. After searching the directories specified in MAYA_SHELF_PATH, Maya continues to add shelves from the default shelf directory. Once a shelf exists, a shelf with the same name in the subsequent searched directories is ignored.
When a new shelf is created, it is always saved in the default shelf directory. To share it, move it to the desired directory (that is, one of the ones specified by MAYA_SHELF_PATH).
To restrict access to a shelf directory, disable the write permission of that directory. A warning appears when a user attempts to write into a restricted shelf directory (while exiting or saving all shelves).
Colon-separated search path for MEL scripts. If an unresolved MEL procedure is called, then this path will be searched for a script that implements it. Also, if a MEL file is sourced without giving the full path, then this path will be searched.
In addition, for each module file found by Maya on startup, the the scripts subdirectory of the module's root directory will be added to MAYA_SCRIPT_PATH. See the description of the MAYA_MODULE_PATH variable above and Distributing Multi-File Modules for more information.
The following table lists the default paths, which will always follow any path that you specify.
Location for your Python module files when you import them in a program. Set this variable to the list of directory names for your module directories. Separate this list by colons for UNIX and semicolons for Windows.
In addition, for each module file found by Maya on startup, the the scripts subdirectory of the module's root directory will be added to PYTHONPATH. See the description of the MAYA_MODULE_PATH variable above and Distributing Multi-File Modules for more information.
Use of this variable is not mandatory. Because Python always searches the home directory of the program’s top level file, you only need to set this environment variable if one of your modules needs to import another module that resides in a different directory.
Default for Windows |
---|
<user’s directory>/My Documents/maya/projects/default/mel <user’s directory>/My Documents/maya/2011/scripts <user’s directory>/My Documents/maya/scripts <user’s directory>/My Documents/maya/2011/presets <user’s directory>/My Documents/maya/2011/prefs/shelves <user’s directory>/My Documents/maya/2011/prefs/markingMenus <maya_directory>/scripts/startup <maya_directory>/scripts/others <maya_directory>/scripts/AETemplates <maya_directory>/scripts/paintEffects <maya_directory>/scripts/fluidEffects <maya_directory>/scripts/hair <maya_directory>/scripts/cloth <maya_directory>/scripts/fur |
Default for Linux |
---|
$MAYA_APP_DIR/maya/2011/scripts $MAYA_APP_DIR/maya/scripts /usr/autodesk/userconfig/maya/2011/scripts /usr/autodesk/userconfig/maya/scripts $MAYA_APP_DIR/maya/2011/prefs/shelves $MAYA_LOCATION/scripts/startup $MAYA_LOCATION/scripts/others $MAYA_LOCATION/scripts/AETemplates $MAYA_LOCATION/scripts/paintEffects $MAYA_LOCATION/scripts/cloth $MAYA_LOCATION/scripts/fur |
Default for Mac OS X |
---|
In your Home folder, under Library/Preferences/Autodesk/maya/2011 In your Home folder, under Library/Preferences/Autodesk/maya /Users/Shared/Autodesk/maya/2011 /Users/Shared/Autodesk/maya Inside the Maya package in /Applications/Autodesk/Maya 2011/Maya.app |
This variable specifies the directory location Maya uses for various temporary files, such as:
- temporary render cache files during a render
- crash files if Maya crashes
On Linux, set TMPDIR only. On Windows, set both TEMP and TMPDIR. If not set, the temporary directory is /tmp (Linux), or C:/temp (Windows), or under your Home folder in Documents/temp.
This variable specifies the location of icon files, such as icons used for Shelf buttons. On Linux, the syntax is slightly different then other paths. For example:
Windows Os Environment Variable
XBMLANGPATH = './icons/%B:$HOME/dev/icons/%B'
In this example, %B is acts as a placeholder that will be replaced by Maya with the bitmap filename.
In addition, for each module file found by Maya on startup, the icons subdirectory of the module's root directory ('icons/%B on Linus) will be added to XBMLANGPATH. See the description of the MAYA_MODULE_PATH variable above and Distributing Multi-File Modules for more information.
The following table lists the default paths, which will always follow any path that you specify.
Default for Windows |
---|
%MAYA_APP_DIR%maya2011prefsicons %MAYA_LOCATION%icons %MAYA_LOCATION%icons paintEffects %MAYA_LOCATION%icons cloth %MAYA_LOCATION%icons fur |
Default for Mac OS X |
---|
In your Home folder, in Library/Preferences/Autodesk/maya/2011/prefs/icons In your Home folder, in Library/Preferences/Autodesk/maya/prefs/icons /Users/Shared/Autodesk/maya/2011/icons /Users/Shared/Autodesk/maya/icons Inside the Maya package in /Applications/Autodesk/Maya 2011/Maya.app |
Default for Linux |
---|
$MAYA_APP_DIR/maya/2011/prefs/icons/%B $MAYA_APP_DIR/maya/prefs/icons/%B /usr/autodesk/userconfig/maya/2011/icons/%B /usr/autodesk/userconfig/maya/icons/%B $MAYA_LOCATION/icons/%B $MAYA_LOCATION/icons/paintEffects/%B $MAYA_LOCATION/icons/cloth/%B $MAYA_LOCATION/icons/fur/%B |
This variable can be used to specify the location of the maya.rayrc file.
-->
Environment variables help manage your build script tasks. You can call pre-defined variables or create your own.
Os X Set Environment Variable For App For Pc
Pre-Defined variables
General variables | Description |
---|---|
APPCENTER_BUILD_ID | The unique identifier for the current build |
APPCENTER_BRANCH | Name of the branch that is being built from |
APPCENTER_SOURCE_DIRECTORY | Location of the source code on the build machine |
APPCENTER_OUTPUT_DIRECTORY | Location where the build results are stored in |
APPCENTER_TRIGGER | What triggered the build, was it manual or continuous by push |
iOS specific | |
APPCENTER_XCODE_PROJECT | Selected Xcode project |
APPCENTER_XCODE_SCHEME | Selected Xcode scheme |
Android specific | |
APPCENTER_ANDROID_VARIANT | Selected Android variant |
APPCENTER_ANDROID_MODULE | Selected Android module |
UWP specific | |
APPCENTER_UWP_SOLUTION | Selected solution |
APPCENTER_UWP_CONFIGURATION | Selected configuration |
Xamarin specific | |
APPCENTER_XAMARIN_PROJECT | Selected project |
APPCENTER_XAMARIN_CONFIGURATION | Selected configuration |
React Native specific | |
APPCENTER_REACTNATIVE_PACKAGE | Selected package |

Variables declared in Build Configuration
Custom environment variables allow you to define sensitive information that is required for your build without checking them into your repository. You can create your environment variables in the build configuration and use them in your build. For example, to access an API key, a webhook token, or other secrets.
Note
'Platform' is reserved from use as an environment variable.
Encrypting variables
Values of variables are encrypted by clicking on the lock icon, which obfuscates them in the build configuration & logs. Encrypted values aren't editable once they're saved, but they can be deleted & re-created.
Non-encrypted values can be encrypted at any time.
Access the variables
Pre-set environment variables can be consumed during the build process. Depending on the toolset you're using, the syntax is different.
Note
The correct way to consume environment variables depends on the toolchain used.
Build scripts
In the build scripts, you can access the variables with the following syntax depending on whether you're using Bash or Powershell.
Bash
Powershell
NuGet.config for Xamarin or UWP
If you're building a Xamarin or UWP app, you might want to connect to a private NuGet feed, which requires authentication. In the NuGet.config
file, you can consume the variables you've defined. For more details about the usage of credentials in your NuGet.config
file, read the reference documentation.
Set Environment Variable Vista
build.gradle for Android
Osx Set Environment Variable
For Android apps, you can access your variables in the build.gradle config. For more details, please read the Gradle Tips and Recipes documentation.
댓글