Creating a Package: 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.xml in the helloworld subfolder.
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 command-line 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\SyncroSim.PackageManager.exe" --create=helloworld
This will create a SyncroSim Package File in your working folder called helloworld.ssimpkg.
Note
As with all command line 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.
For example, on a Windows computer with SyncroSim installed in its default location, the required call would be:
"C:\Program Files\SyncroSim\SyncroSim.PackageManager.exe" --create=helloworld
This will create a SyncroSim Package in your working folder called helloworld.ssimpkg.
Step 3 - Install the Package
Use the Package Manager (either from the user interface or command line) to install the new Package in SyncroSim. Here is the syntax to install from the command line:
SyncroSim.PackageManager.exe --finstall=helloworld.ssimpkg
Now use the Package Manager again (user interface or command line) 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 the user interface or command line) to uninstall the previous version of the Package (if it has previously been installed). Here is the syntax for the command line:
SyncroSim.PackageManager.exe --uninstall=helloworld