Bundling and installing
Follow these steps to build and install a very simple SyncroSim package.
Note
Make sure the SyncroSim software is closed before you create a new package.
Step 1: Create a configuration file
Each package must contain an XML configuration file called package.xml.
Begin by opening your text editor of preference (e.g. Visual Studio Code, Notepad ++). Create a new file called helloworld and type the commands below.
<?xml version="1.0" encoding="utf-8"?>
<package name="helloworld" displayName="Hello World Package" version="1.0.0"/>
Notice the single mandatory <package> element, which includes the following mandatory attributes:
name: unique name of the package. Only alphanumeric characters are allowed (i.e. no underscores, dashes or other special characters).displayName: plain language name of the package.version: your own 3-part version number for the package.
Next, setup the following file and folder structure for your helloworld package:
- Create a working folder (e.g.
C:\temp). - Create a subfolder under your working folder with the name of the package (e.g.
C:\temp\helloworld). - Save the text above to a file called
package.xmlin thehelloworldsubfolder.
Note
If you plan to create your own configuration file, consider using an XML text editor (e.g. Notepad++).
Step 2: Bundle the package
Open Command Prompt on your device, and using the command cd, navigate to your working folder (i.e. where you saved the helloworld folder).
cd C:\temp
Call the SyncroSim console Package Manager from your working folder (e.g. C:\temp) and bundle the contents of the package into a single .ssimpkg file. To do this on a Windows computer with SyncroSim installed in its default location, the required call would be:
"C:\Program Files\SyncroSim Studio\SyncroSim.PackageManager.exe" --create=helloworld
This will create a SyncroSim package file in your working folder called helloworld.ssimpkg.
Note
As with all console calls, you will need to provide the full path to the location of the SyncroSim.PackageManager.exe executable as exemplified above. For the remainder of this tutorial, we will only refer to the file path as SyncroSim.PackageManager.exe for simplification purposes.
Step 3: Install the package
Use the Package Manager (either from SyncroSim Studio or console) to install the new package in SyncroSim. Here is the syntax to install from the console:
SyncroSim.PackageManager.exe --finstall=helloworld.ssimpkg
Now use the Package Manager again (SyncroSim Studio or console) to check that the package was successfully installed:
SyncroSim.PackageManager.exe --installed
This command will list all the packages that are installed in SyncroSim. Make sure the package you installed is listed before you proceed.
Step 4: Rebuild the package
If you ever need to change the package, you will need to rebuild it. Use the Package Manager (either from SyncroSim Studio or console) to uninstall the previous version of the package (if it has previously been installed). Here is the syntax for the console:
SyncroSim.PackageManager.exe --uninstall=helloworld
What's next?
- Add a model to your package.