Skip to content

Building VStar

mpyat2 edited this page Dec 24, 2021 · 7 revisions

How to Build VStar Windows Installer

Windows installer is created from the vstar-win.zip package.

The installer is built using Inno Setup https://jrsoftware.org/isinfo.php (currently, Inno Setup 6 is used). So a user must install it before creating the setup. After installation of the Inno Setup, please check the line

<property name="InnoSetupCompiler" location="C:/Program Files (x86)/Inno Setup 6/ISCC.exe"/>

in build-win-installer.xml for the correct ISCC.exe path.

To prepare the executable installer, one should:

  1. Build Windows VStar package vstar-win.zip:

>ant win

  1. Build plug-ins:

>cd plugin

>ant aavso

cd ..

  1. Build the installer itself:

>ant -f build-win-installer.xml

Before the next release, a proper VStar version should be specified in the build-win-installer.xml, see the line

<property name="app_version" value ="2.2x.y"/>

What the installer does:

  1. It checks if Java exists (trying to run javaw.exe). If failed, it prompts the user to download and install JRE. This does not prevent installing the VStar itself.

  2. It unpacks VStar core files and plug-isn (in specified) and writes them to the corresponding folders.

  3. It creates desktop and start menu shortcuts to VStar.exe. The VStar.exe is a new Vstar launcher, see below.

  4. It sets Java startup options (maximum heap size) in VStar.ini (launcher configuration) and generates an alternative launcher: VStar.bat with the same startup options. Currently, -Xmx parameter (maximum heap size) is set to a half of physical memory available.

  5. It also creates an alternative '.bat' launcher in the installation directory: VStar.bat. The VStar.bat does essentially the same as VStar.exe launcher, the main difference is that it uses console-mode java.exe instead of javaw.exe. This launcher is completely optional.

VStar launcher VStar.exe

The launcher (VStar.exe) invokes jawaw.exe instead of java.exe to suppress the console window. A configuration file VStar.ini can be used to specify additional jawaw.exe startup parameters (currently, only memory-related options are used). A shortcut to VStar.ini is created in the Windows Start menu in VStar group by the installer.

Windows-specific javaw.exe does not show startup errors (for example, invalid -X specifications) and dies silently. It is recommended to use VStar.bat to test non-standard options. If VStar.exe does not run, a user should open VStar.ini and modify or comment out ‘Parameters’ item. In the critical case, a user can simply delete VStar.ini, in this case no additional parameters will be passed.

See the launcher source code in VStar\install-files\vstar-launcher-windows\src\