This applies to the legacy SLP Runtime only. For guidance on using the newer SpAgent runtime please see Getting Started With Licensing.
This Quick Start Guide for new users will get you up and running with the Software Potential code protection solution in 5 easy steps.
- Step 1: Setup Your Development Environment
- Step 2: Configure Code Protector
- Step 3: Select Methods to be protected
- Step 4: Enable Code Protection in your project
- Step 5: Build Your Application
Step 1: Setup Your Development Environment
Setting up your Development Environment is straight forward; however it is best done by a software developer.
1. Create your Permutation
To get started, you need to generate a unique permutation for your product. A permutation file contains a unique one-way transformation which, when loaded into the Code Protector, transforms the CIL of your assembly so that the protected assembly cannot be reversed engineered.
- Logon to the portal https://srv.softwarepotential.com.
- Select Accounts → Manage Permutations → Create Permutation.
- Enter a name for your permutation and click OK.
- Eventually (click refresh) the status field will change from Creation Pending to Done.
2. Download Code Protector and Permutation
Before they can be installed on your development/build machine, the permutation and the code protector tool need to be saved locally to your machine, where they are easy to find later.
- Select Develop → Manage Permutations and select your permutation by clicking on the record in the table.
- Download the Code Protector .msi file and Permutation file using the links in the respective Downloads column and save them locally.
You must ensure you download both the Code Protector and Permutation file as their versions must match for the next step.
3. Install Code Protector and Permutation
Locate Code Protector on your development machine and double click the .msi to install. Once installed:
- Launch Code Protector.
- Select Permutations tab and the click the Install Permutation button.
- Locate the previously saved Permutation file and click OK.
Now that your Development Environment is set up the next step is to configure Code Protector to protect your application.
Step 2: Configure Code Protector
To enable automation of the code protection step within your build environment, you first need to store the Code Protector settings in a SLMCfg configuration file that will be used by Code Protector when protecting your code.
- Launch Code Protector and login using your Software Potential account credentials.
- Select Project tab and in the right hand Settings panel set the following values:
- Permutation: previously installed permutation.
- Target SLP Runtime Variant: Set this to the Standard variant.
- Select Add Modules to add one or more application assemblies to be protected. The selected assemblies will appear in the tree view.
- Select File → Save As and save the Code Protector configuration as <ProjectName>.SLMCfg file alongside your project file in your project directory
(where ProjectName is the name of the project containing code to be protected and/or licensed).
Step 3. Select Methods to be protected
You need to select the methods in your assemblies to be protected. In your application source code, mark each method to be protected with the protection attribute [Protect].
To use the ProtectionAttributes in a source file you will need to add “using Slps.ProtectionAttributes;” to the start of the file. See Declaratively Mark Methods for further details on how to declaratively select methods for protection and/or licensing.
Step 4. Configure Protection in Build Process
1. Enable Code Protetction
In Visual Studio open your project’s Properties, select Build and add the conditional compilation (i.e., #define) symbol SLPS_PROTECT for the active build configuration. When this is set, the assemblies created by the build process will be both protected automatically using the settings in the SLMCfg file created earlier.
For SLPS_PROTECT to be detected correctly all symbols must be delimited by semi-colons - the Visual Studio project system also accepts spaces and commas.
2. Reference Permutation Runtime Files
Add references to the Permutation Runtime Files by editing your Visual Studio project (csproj/vbproj) file to add the following entries.
<PropertyGroup>
<SlpsRuntimeVariant>Standard</SlpsRuntimeVariant>
<SlpsRuntimePermutationId>{Permutation ID}</SlpsRuntimePermutationId>
</PropertyGroup>
<Import Project="$(MSBuildProgramFiles32)\InishTech SLP Code Protector\Slps.Runtime.References.targets" />
where {Permutation ID} is the filename of the permutation installed in Code Protector earlier.
Your project is now set up to trigger code protection automatically during the build process using the settings in the SLMCfg file.
Step 5: Build the application
Now build your application as usual. On successful protection the assemblies in the relevant project output directory (e.g. bin/Release, bin/Debug as appropriate) are now protected.
Your application assemblies are now protected and, once packaged, your application is ready for distribution to your customers.
Comments
0 comments
Please sign in to leave a comment.