Table of Contents
Creating a Custom Installer for macOS (Older Versions)
VDN lets you create and distribute Embedded Server with your own custom solutions. You can use the following steps to easily package and distribute Embedded Server for your customers.
In order to create a installer, you should review the following steps.
STEP1: prepare folders.
1) You need install Valentina Server to your computer. Default installation of Vserver includes 2 folders:
2) Copy into other location folder “/Library/ValentinaServer”, which looks as
ValentinaServer databases masterdb.vdb may be something else licenses license_mac_xxxxxxxx Server.dylib ValentinasServer ValentinasServer.ini ValentinasServer.log
3) replace file “license_mac_xxxxxxxx” on your “license_emb_xxxxxx” file.
4) delete .log file
5) delete all files in the folder “databases”
6) Rename all files and folders to your application name. So you get the following:
MyAppServer databases licenses license_emb_xxxxxxxx MyAppServer MyAppServer.ini Server.dylib
7) open ini file and specify the port number for your application.
8) Now copy also folder “/Library/StartupItems/ValentinaServer” into other location.
9) in the copy, rename all “Valentina” names to “MyServer”
10) open file “StartupItems/ValentinaServer/ValentinaServer” by any TEXT EDITOR and also rename all “Valentina” entries.
STEP2: installer steps.
Now you have folders ready for installation on a customer computer. For installation you can use any Installer you prefer or Apple's Packager that is included into each OS X.
To understand better what steps should be executed on a customer computer lets consider MANUAL way to install MyAppServer.
On MacOS X it is quite simple steps. You need just:
1) into folder “/Library/StuartupItems” your folder with sturtup scripts. So you will get “/Library/StartupItems/MyAppServer”
2) into folder “/Librarary” your folder of “MyAppServer” So you will get “/Library/MyAppServer”
3) restart computer.
STEP3: deinstaller steps.
1) stop the server (using kill command).
2) Remove from disk all Server folders.
Installer based on Apple Packager.
This part will describe how you can create installer using Apple Packager.
1) create the following folders:
MyServer Package Files Resources ReadMe.rtf Server-exec Library MyAppServer <<< folder of step 1-6 Server-start Library StartupItems MyAppServer <<< folder of step 1-10 Scripts
2) Run Apple Packager.
3) Create a new script “Server-exec” and save it into the folder “Scripts”.
- in the tab “Files” choose folder “Server-exec”
- in the tab “Info” specify
Default location "/" Restart Action "Required Restart" Authorisation Action "Root Authorisation" Required true Root Volume true Overrite Permission true
4) Save script again. You will be able use this script many times later. To create package choose menu command “File→Create Package”. Save package into the same folder “Scripts”.
5) Create a new script “Server-start” and save it into the folder “Scripts”
- in the tab “Files” choose folder “Server-start”
- in the tab “Info” specify
Default location "/" Restart Action "No Restart" Authorisation Action "Root Authorisation" Required true Root Volume true Overrite Permission true
Create package chosing menu command “File→Create Package”
6) Now you have folder Scripts that looks as
Scripts Server-exec Server-exec.pkg Server-start Server-start.pkg
7) Create a new METAPACKAGE script “MyAppServer” and save it into the folder “Scripts”
- add both generated packages to Package list.
- in the tab-panel “Resources” choose folder “Resources”.
- rest info fill as you need.
8) Save “MyAppServer”. You will be able to use it later many times.
Generate by command “File→Create Package” final package. It will be named MyAppServer.mpkg
9) Now just a new folder “MyAppServer Installer” and copy 3 package files to it. You will get final folder which you can distribute.
MyAppServer Installer Server-exec.pkg Server-start.pkg MyAppServer.mpkg
To run installer user need double click “MyAppServer.mpkg”.