Proper use of SlicerApp_APPLICATION_NAME

I have a custom build of Slicer and I am trying to override the application name by setting SlicerApp_APPLICATION_NAME. However, I get a pile of CMake errors when i build. It seems to fail to find several targets whose names are based on SlicerApp_APPLICATION_NAME. The name I set it to is similar to “Slicer (XXX Edition)”. Is there a limitation on what characters may be used in the name? What is the proper method for changing the name of the Slicer app?

The variable SlicerApp_APPLICATION_NAME can not contain special characters. If you would like to set a string like “Slicer (XXX Edition)”, I suggest you set a different window title.

Assuming you use the KitwareMedical/SlicerCustomAppTemplate, you could easily customize the value in the Main.cpp associated with the application. See here

I’m not using the template - can I just set Slicer_MAIN_PROJECT_APPLICATION_NAME?

I would strongly recommend to use the custom application template as it enables much more refined customization and much cleaner separation of Slicer core and customized code. Also, now all the custom/commercial Slicer editions use the custom application template, so it is very well tested and continuously improved. To avoid redundancy, alternative customization methods (such as changing just the application name) may be deprecated in the future.

Are there instructions for running the template tool on Windows?

Also, if I already have a Slicer repository with my custom changes in it, can I still use it, or do I have to start over?

All the instructions for all platforms are described in the git repository of the custom application template. The custom app template allows you to customize Slicer without modifying any Slicer core file, thereby allowing clean separation of all custom changes from Slicer core updates. If you modified Slicer core files then you need to make changes accordingly in the project generated by the template.

Is the custom project created by the template based on any particular branch/version of Slicer? Can the branch/repo be specified in the template tool?

By default, the generated project use the github.com/Slicer/Slicer and the latest commit hash. Once the project is generated, you can definitely change the value in the project CMakeLists.txt. For example, here is what we do in SlicerSALT:

In this case, we may have some change specific to Slicer fork specific to SlicerSALT. These ones are tracked in https://github.com/slicersalt/Slicer (see associated README for naming convention of branches in the fork). This is particularly useful waiting improvements to Slicer core are integrated in upstream project.

2 posts were split to a new topic: Can you explaing the vaiables Slicer_MODULES_DISABLED and Slicer_MODULES_ENABLED?