-
Notifications
You must be signed in to change notification settings - Fork 52
Building
There are two methods for building and deploying the app. Manually from within unity, or using the powershell scripts.
From within the unity editor, Selecting Build Custom under the Build menu item will bring up a window allowing you to specify some build options. The following options are available:
- Resolution - full is 1080 pixels high.
- Full Screen - should we run as full screen or in a window - the resolution setting affects the window size.
- Control Type - sets the default input method
- Display Type - If Projector is selected, the X resolution will be lowered to allow for blending.
- Number of screens - configures the display width
- Show Debug Info - show/hide some debug info
- Enable Configurator - allows vehicle configuration settings to be edited at runtime
- Fullscreen Mode - Debug runs as fullscreen window, Production runs in exclusive mode. Default will use whatever is specified in the Unity Player settings.
From within the unity editor, Selecting Build Console under the Build menu item will build the IC app.
There are some powershell scripts included in the project root to build, deploy and run both apps at once.
Environment settings need to be specified in a file named BuildConfig.ps1 in the project root. There is an included BuildConfig_example.ps1 in the project which you can use as a template. BuildConfig needs to contain the following variables:
- $unity - this should be the path to the unity editor exe, which is used to build the sim apps.
- $username - the username to authenticate with the IC machine when deploying builds
- $password - the password for the $username account on the IC machine.
- $ComputerName - the host name of the IC machine.
- $ICPath - remote path to a network share on the IC machine where the console should be deployed
- $MainPath - local path on the main machine to where the main app should be deployed
- $ICLaunchService - where the IC Launch service is running - required if you want to start/stop the console remotely (See IC Launcher section below)
NOTE: The project must have been opened in unity before and the import completed. It must also be the default (last opened) project for the build to work.
There are four powershell scripts in the project root which can be used.
- BuildAndDeploy - builds both the main app and IC and copies the binaries to the specified deploy locations
- Run - starts both the main app and the IC
- Kill - kills both the main app and the IC
- BuildDeployAndRun - performs BuildAndDeploy followed by Run.
There is a small launcher application that can be used to start/stop the IC app remotely. The source for this is in the Tools/Launcher directory.
To use, build the Launcher app from the included VS solution, configure, and run on the IC. There is one configuration setting which must be set: the EXEPath setting in App.config needs to point to the local path of where the IC application is deployed.
When running, the IC launcher service will place an icon in the system tray, which has a menu item to quit.
NOTE: because the launcher uses HttpListener, it needs to either run as admin, or have a urlacl exception added for the user it is running as. You can add a urlacel exception with the command
netsh http add urlacl url="http://+:8086/" user="username"
where username is the name of the user it is running as.