Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
op2_sdk:projectsettings [2016/02/27 01:12] – created vagabond | op2_sdk:projectsettings [2016/11/03 17:40] (current) – Moved Debuging Scenario information to a separate wiki page. vagabond | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Development Environment Project Settings ====== | ====== Development Environment Project Settings ====== | ||
- | The Outpost 2 API within the repository uses the Microsoft | + | This page lists common development environment customizations when creating |
- | The following screenshots are taken from Microsoft Visual Studio 2015 however they should be very similar to other versions of Visual Studio. | + | Within the Outpost Universe repository, the Outpost 2 API uses the IDE Microsoft Visual Studio. These instructions are for Visual Studio, but the general principles should apply to other IDEs such as Code:: |
+ | ===== Changing the file target name ===== | ||
+ | Visual Studio defaults to naming an executable or DLL produced from a project as the project' | ||
+ | |||
+ | - Open your Project in Visual Studio. | ||
+ | - In the solution explorer, right click on your project -> Properties. | ||
+ | - Set Configuration to All Configurations. | ||
+ | - Set Platform to All Platforms. | ||
+ | - Click Configuration Properties -> General -> Target Name. Update the name as you see fit. //(The Target Name should not include the file extension).// | ||
+ | |||
+ | {{ op2_sdk: | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Copying Scenario DLL using a Post Build Event ===== | ||
+ | |||
+ | To simplify testing a scenario DLL, consider setting a post build event to copy required files directly into the Outpost 2 root install directory. Post build events are executed every time the project is re-compiled. | ||
+ | |||
+ | Visual Studio uses macros in pre and post build events to simplify commands. For example '' | ||
+ | |||
+ | A vanilla copy of the current Outpost 2 release is kept in the repository at '' | ||
+ | |||
+ | **Example Post Build copy commands: | ||
+ | |||
+ | * copy /Y " | ||
+ | * copy /Y " | ||
+ | * copy /Y " | ||
+ | |||
+ | **Setting Post Build Event Instructions** | ||
+ | |||
+ | - In the Solution Explorer, right click on the project you wish to include a post build event and click on properties. | ||
+ | - Set Configuration to All Configurations. | ||
+ | - Set Platform to All Platforms. | ||
+ | - Click Configuration Properties -> Build Events -> Post-Build Event. | ||
+ | - Set the Command Line to perform a copy event. | ||
+ | - Repeat for each file you want copied to the new directory. | ||
+ | |||
+ | **Note:** //Before committing a new project to the repository, turn the post build events into remarks by prefixing them with the rem keyword. This prevents the post build events from executing unless the user downloading your source code explicitly wants them.// | ||
+ | |||
+ | **Note:** //In the copy command, the ''/ | ||
+ | |||
+ | **Note:** //Paths passed as arguments into the copy command cannot contain spaces unless the path is enclosed in parenthesis. For example// ''" | ||
+ | |||
+ | {{ op2_sdk: | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Referencing the Outpost 2 executable ===== | ||
+ | |||
+ | Executable files can be referenced from within Visual Studio. This allows running Outpost 2 from within Visual Studio when testing a mission DLL. | ||
+ | |||
+ | An alternative option to referencing Outpost2.exe within the solution is to set Outpost2.exe as the startup executable for the scenario DLL. To do this, set Outpost 2 as the external executable under the DLL project' | ||
+ | |||
+ | To add the Outpost 2 executable as an existing project to a Visual Studio Solution. | ||
+ | |||
+ | - File -> Add -> Existing Project -> Select Outpost2.exe (from wherever it is installed on your machine). | ||
+ | - You should now see Outpost 2 as a second project in your solution explorer. | ||
+ | - Set Outpost 2 as the StartUp Project by right clicking on it in the solution explorer. | ||
+ | - Build your project and press Start Debugging (or hit F5). Outpost 2 should load normally. | ||
+ | |||
+ | {{ op2_sdk: | ||
+ | |||
+ | {{ op2_sdk: | ||
---- | ---- | ||
- | - //Go Back to [[op2_sdk: | + | - //Go Back to [[op2_sdk: |
- //Go Back to [[outpost_2: | - //Go Back to [[outpost_2: | ||
- | - //Go Back to [[http:// | + | - //Go Back to [[http:// |