Creating a Package: Bundling and Installing
Follow these steps to build and install a very simple SyncroSim Package.
Step 1 - Create a Configuration File
Each Package must contain an XML configuration file called package.xml. Here is the package.xml file for a new Package that we will call helloworld:
<?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.
If you plan to create your own configuration file, consider using an XML text editor (e.g. Notepad++).
Step 2 - Bundle the Package
Call the SyncroSim command-line Package Manager from your working folder (e.g. c:\temp) to bundle the contents of the Package into a single .ssimpkg file:
As with all command line calls, you will need to provide the full path to the location of the SyncroSim.PackageManager.exe executable.
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
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:
Next bundle and reinstall the new version of the Package (i.e. with the revised package.xml and model.R files) by repeating steps 2-3 again.
- Add a Model to your new Package