Customized Resources

Sometimes you need to include files in your solution, these typically include client logos or template files that must be present after a solution is fully generated. Previously, they would be included using the GenCopy, but now, the way to do it is using the Customized Resources.

The old GenCopy files can now be a resource of one of two types: "Others" or "Code". This last one is a new resource type, added to represent code files (like C# or JavaScript), it allows users to edit the files directly inside the definitions.

The other resource types (icons, images, etc…) can now also be customized, either by client or by feature. But their options are more limited, users won’t be able to define the path where the resource should be generated.

1. Defining resources

Just like the old GenCopy, the customized resources also allow users to mark them as generic. If a resource is marked as generic, it will be copied to all clients in the project, otherwise it will only be copied to clients that have a customization.

1.1. Generic resources

If a resource is generic, users won't need to add any customizations, as it will be generated for all clients. Otherwise, it will only be generated for the clients that are affected by a customization.

There are four ways to define generic resources:

  • If neither a solution nor a platform is defined, the resource is copied to the root folder of all solutions on all clients.
  • If a solution but not a platform is defined, the resource will be copied to the root folder of the respective solution on all clients using it.
  • If a platform is defined but not a solution, the resource will be copied to the root folder of the respective platform on all clients using a solution where it is present.
  • If a solution and platform are defined, the resource will be copied to the root folder of the respective platform on all clients using the chosen solution.
Marking resource as generic

Figure 1: Marking resource as generic.

1.2. Solution/Platform specific

Resources can also be defined for specific solutions or platforms, this means they'll only be generated for those chosen solutions/platforms. If a platform is selected, it's output directory should be consired as the root path when setting the sub-path of the resource.

The solution is the type of generation desired. Within the same solution, there may be several platforms, or sub-solutions.

For example, when you choose to generate the Vue.js + ASP.Net solution, you'll be generating several sub-solutions/platforms:

  • Vue.js Client, the Vue.js application itself, with which the end user will interact.
  • ASP.Net MVC API, the part of the server that handles communication with the application in Vue.js.
  • CS Server, the part of the server that handles communication with the database.
  • CSharp UI Test, a solution where end-to-end tests can be written and executed.
Setting the solution and platform

Figure 2: Setting the solution and platform.

2. Customizing resources

After defining their resources, users can customize them for each of their clients.

The customization can be of two types:

  • By client: The resources will be generated for the selected client.
  • By feature: Depending on the value of field "Inhibit", the resources will, or will not, be generated for all the clients with the selected feature.

If there are any customizations by feature and by client, that affect the same client, the customization by client will be used, since it's more specific.

3. Migrating from the old GenCopy

If you have project(s) that already use the old GenCopy, there's no need to migrate everything by hand. An automatic migration feature has been made available, take a look at the GenCopy Migration guide.