Sharing Projects

Index of All Documentation » Wing Pro Reference Manual » Project Manager »

The default Project Type, accessed from Project Properties > Options in the Project menu, is Shared (Two Files). This stores sharable project data in a file with extension .wpr and user-specific project data in a file with extension .wpu. Only the .wpr file should be checked into revision control or shared with other users or machines. This file is designed to work across all supported OSes and avoids storing values that are likely to be user-specific.

If the project type is changed to Single User (One File) only a single .wpr file will be written, with all project data, and the .wpu file will be removed from disk.

Only Single User (One File) projects can be read by Wing Personal.

Making Project Files More Sharable

In most cases sharing the *.wpr file will just work. File paths are stored relative to the project's location on disk, so they will work in different configurations.

If revision control conflicts do arise among different users of a .wpr file, environment variables can be used to make the project work for all users and on all machines. The environment variable values can either be inherited from outside of Wing or set using Environment in Project Properties. The values for the Environment property are stored in the .wpu file and thus may vary by user.

File Format

Both the .wpr and .wpu files use the same textual file format that is used for the preferences file. See section Preferences File Format for more information on the format itself.

Changing Which Attributes are Shared

Which project properties are stored in the main project file may be set by modifying the .wpr file with a text editor and setting the proj.shared-attribute-names attribute to a list of attribute names to add or remove from the default set. Each entry in this list is an attribute name preceded by - to move a shared attribute to the non-shared file, or + to move a non-shared attribute to the shared file. This specification is applied to the default set of shared attributes in order to determine which attributes to share in this project.

The following example would move the commands defined in the OS Commands tool into the user-specific file and would share the Python Executable and Python defined in Project Properties in the .wpr file:

proj.shared-attribute-names = [

Note that sharing the Python Executable and Python Path works only if the value are valid on all the machines where the project is used. This can be easier to achieve if the values use environment variable references such as ${WING:PROJECT_DIR}/a/b/c for a path entry.

The default set of shared attributes is:


Note that only non-empty and non-default values are stored in the project file. For example, proj.file-list will be missing if no files are individually added to the project.

The names of other potentially sharable attributes can be found in the .wpu file.