After creating your project, you need to deploy the runtime on your machine by running a checkout command. You can check out more than one runtime to your machine or the same runtime to different locations on your system.
This guide covers:
Many of these methods deal with your activestate.yaml file. Click here for more information about this file and why it is important.
To check out your project and download a project folder containing your project’s activestate.yaml file to your current working directory, enter
state checkout <orgname>/<projectname>
For example state checkout exampleorg/Project1.
activestate.yaml file is entirely owned by the user and acts as a shortcut to your project. The file includes project details such as its location online, language and package information, and security features.state projects to see where the local checkout (containing your activestate.yaml file) and the cached executable checkout locations for each project checked out from the Platform.To download the activestate.yaml file directly, enter:
state checkout <orgname>/<projectname> .
For example state checkout Exampleorg/Project1 C:/Perl.
activestate.yaml file for automation, as it saves having to go into the newly created project folder to access it.To checkout a project to another location on your system and not your current working directory, enter:
state checkout <orgname>/<projectname> <location>
For example state checkout Exampleorg/Project1 C:/Perl.
activestate.yaml file at the specified location.To download all files associated with your project (.dll, .bat, .exe, etc.) to a specific location on your system, enter:
state checkout <orgname>/<projectname> --runtime-path <folder location>
For example state checkout Exampleorg/Project1 --runtime-path C:/Perl. Using this command will bring the entire installation into the directory specified. This method is useful if you prefer having your project installation in a known location on your machine (e.g. c:/Perl). Or if you need to know the location of specific files or folders related to your project.
You can checkout a specific branch of a larger project using the following command:
state checkout --branch <branchname> <org/project> <path>
For example state checkout --branch Childbranch1 Exampleorg/Project1 C:\Perl.
Using this command brings the entire installation into the directory specified. This method is useful if you prefer having your project installation in a known location on your machine (e.g., C:/Perl) or if you need to know the location of specific files or folders related to your project.
To find all projects checked out locally, enter the following command:
state projects
This will produce a list of all currently checked out projects and their locations on your system.
After checking out two or more projects using the state checkout command, you can launch separate instances of your projects by using the state shell and state use commands. This allows you to work on multiple projects simultaneously without conflicts.
Open two separate terminal windows and navigate to the directories containing your checked out ActiveState projects (“project1” and “project2” in this example). Projects can be from the same organization or different organizations.
In one terminal window enter:
state shell myOrg/project1
and in the other window enter:
state shell MyOrg/project2
The State Tool will generate two separate virtual shells for your projects, ensuring that each instance will not interfere with the other or with existing system tools and settings. This is useful if you want to switch between projects without setting a global environment for your machine.
Once your working session has ended (by typing exit into the command prompt or closing the application), you will need to repeat the state shell command to open a shell for your project for any future work.
Setting your default project with the state use command does not prevent you from working on two or more projects at the same time.
To find which project is currently set as the system default, enter:
state use show
The project shown in the command output will be the default for your entire system (with the exception of those operating inside a virtual shell).
To launch another project (“project2”) while still having your default project (“project1”) set, enter:
state shell <orgname>/project2
This will open a new shell to work on project2 without disrupting your current default project runtime.