Monday, 5 December 2016

Building TRNG plugins with VS 2013 Community

Paolone’s instructions for building plugins for his Tomb Raider Next Generation (TRNG) engine are based on Visual Studio 2010. [link]

I am using Visual Studio 2013 Community Edition and will report my experience in this post.

The VS2010 plugin project was opened and upgraded by VS2013 without any problem.

Building the Debug version however reported one error.

error LNK1117: syntax error in option 'VERSION:1.0.0'

The version option for the linker must be a decimal number of the form major.minor [link].

To fix this error go to Project>Properties and select Configuration Properties>Linker>General and delete the value in the Version property or change it to 1.0.

PlugInPropertyPages

Click OK or apply to save the change.

PlugIn_trngPropertyPages2

Testing the plugin involves copying the .dll file to your trle folder.

You can have Visual Studio do this automatically by setting a Post Build Event in the property pages.

Go to Configuration Properties>Build Events>Post-Build Event and in the Command Line property type a command to copy the .dll to the trle folder.



https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKg7m-Fxbx2UQKnoO9Y9tXHHRCmSmigFceRvqftsKIS-7RSYwkRpLKszVW2P_IINyqQDcQB-R_EU7MXIdFszUXpiaHEF4es7P9t6eA1goHK1VAXeoFmaW0x7KGfbxCP-Sz6OhRX0ZGgyA/s1600-h/PostBuildEvent3.jpg


If your trle folder is not in a location controlled by User Account Control (UAC) you can use a command such as below.

copy "$(TargetPath)" "C:\Users\<username>\Documents\trle"

Remember to click Apply or OK to save the changes to a property.

An error will be reported if Visual Studio is unable to copy the dll whenever you build the project so don’t confuse this error with a build error.

For UAC locations I use.

powershell.exe "Start-Process  powershell.exe  -verb runAs -windowstyle Hidden –ArgumentList 'cp ''$(TargetPath)'' ''$(ProgramFiles)\Core Design\trle'''" 


1 comment:

  1. In other words, we are now able to "inject" custom code in our levels ?

    ReplyDelete