Mac app hangs on splash screen
### Steps to reproduce

Open Mac app

### Expected result

App opens

### Actual result

App hangs. If I Force Quit and open the app again, it usually opens.

### Environment and GUI version

Mac OpenSim cb3043e-2018-04-23
diff --git a/.travis.yml b/.travis.yml
index 36ff21e0..b183163e 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -40,23 +40,15 @@ install:
   # Only get certain submodules (not OpenSimAPI).
   - git submodule update --init --recursive -- opensim-models opensim-visualizer Gui/opensim/threejs
 
-  # Tweak installer files for the sourceforge deployment.
-  - COMMIT_HASH=`git describe --always` # short commit hash or annotated tag, if one exists.
-  - echo $COMMIT_HASH
-  - COMMIT_DATE=`git show -s --format=%cd --date=short HEAD`
-  - echo $COMMIT_DATE
-  - VERSION=$COMMIT_HASH
-  - echo $VERSION
-  # If this is not a tag, append commit date.
-  - if [ "$TRAVIS_TAG" != "$COMMIT_HASH" ]; then VERSION=$VERSION-$COMMIT_DATE; fi
-  # TODO sed has a different interface on Mac than on Linux.
-  - sed -i '' -e "s/app.version=4.0.Beta/app.version=$VERSION/g" Gui/opensim/nbproject/project.properties
-
   # Build.
   - mkdir ../build && cd ../build
   - cmake ../opensim-gui -DCMAKE_PREFIX_PATH=~/opensim-core -DAnt_EXECUTABLE="/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/extide/ant/bin/ant" -DANT_ARGS="-Dnbplatform.default.netbeans.dest.dir=/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans;-Dnbplatform.default.harness.dir=/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/harness"
   - make CopyOpenSimCore
   - make PrepareInstaller
+
+  # Read the value of the cache variable storing the GUI build version.
+  - VERSION=`cmake -L . | grep OPENSIMGUI_BUILD_VERSION | cut -d "=" -f2`
+  - echo $VERSION
   
 script: 
   - echo "No tests."
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 58fdee1d..17c8c9ac 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,4 +1,7 @@
-PROJECT (OpenSimApp)
+# Allow specifying VERSION for the project.
+cmake_policy(SET CMP0048 NEW)
+
+project(OpenSimApp VERSION 4.0)
 
 cmake_minimum_required(VERSION 3.1.3)
 
diff --git a/Gui/opensim/CMakeLists.txt b/Gui/opensim/CMakeLists.txt
index fec63721..4b037f89 100644
--- a/Gui/opensim/CMakeLists.txt
+++ b/Gui/opensim/CMakeLists.txt
@@ -16,6 +16,48 @@ endif()
 
 find_package(Ant REQUIRED)
 
+# http://xit0.org/2013/04/cmake-use-git-branch-and-commit-details-in-project/
+# Get the latest abbreviated commit hash of the working branch
+set(VERSION_SUFFIX "")
+find_package(Git)
+if(Git_FOUND)
+    # This command provides the annotated tag for the current commit, if it
+    # exists, and returns an error if a tag does not exist.
+    execute_process(
+      COMMAND git describe --exact-match
+      WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+      RESULT_VARIABLE GIT_DESCRIBE_EXACT_MATCH_RETVAL
+      OUTPUT_VARIABLE GIT_TAG
+      OUTPUT_STRIP_TRAILING_WHITESPACE
+      OUTPUT_QUIET
+      ERROR_QUIET
+    )
+    if(${GIT_DESCRIBE_EXACT_MATCH_RETVAL} EQUAL 0)
+        # A tag exists.
+        # set(VERSION_SUFFIX "${GIT_TAG}")
+        # Do not add anything to the version.
+    else()
+        execute_process(
+            COMMAND git log -1 --format=%h
+            WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+            OUTPUT_VARIABLE GIT_COMMIT_HASH
+            OUTPUT_STRIP_TRAILING_WHITESPACE
+            )
+        # prepend date so that build ids can meaningfully be sorted
+        execute_process(
+            COMMAND git show -s --format=%cd --date=short HEAD
+            WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+            OUTPUT_VARIABLE GIT_COMMIT_DATE
+            OUTPUT_STRIP_TRAILING_WHITESPACE
+            )
+        set(VERSION_SUFFIX "-${GIT_COMMIT_DATE}-${GIT_COMMIT_HASH}")
+    endif()
+endif()
+set(OPENSIMGUI_BUILD_VERSION "${PROJECT_VERSION}${VERSION_SUFFIX}" CACHE STRING
+    "<date>-<commit>, or <tag> if this commit is tagged." FORCE)
+# inform user of created build version.
+message(STATUS "Build VERSION: ${OPENSIMGUI_BUILD_VERSION}")
+
 add_custom_target(CopyOpenSimCore ALL
                   COMMAND ${Ant_EXECUTABLE} copy-java-bindings -DapiJava.dir="${OpenSim_JAVA_FILES_DIR}"
                   ${ANT_ARGS}
@@ -35,7 +77,7 @@ if (WIN32)
     set(MSVC_REDIST_EXE "${MSVC_REDIST_DIR}/vcredist_x64.exe")
 
     add_custom_target(PrepareInstaller ALL
-                  COMMAND ${Ant_EXECUTABLE} copy-installer-files -Dapi.dir="${OpenSim_ROOT_DIR}" -Dmsvc.redist.exe="${MSVC_REDIST_EXE}"
+                  COMMAND ${Ant_EXECUTABLE} copy-installer-files -Dapi.dir="${OpenSim_ROOT_DIR}" -Dmsvc.redist.exe="${MSVC_REDIST_EXE}" -Dapp.version="${OPENSIMGUI_BUILD_VERSION}"
                   ${ANT_ARGS}
                   DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/build.xml"
                   WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
@@ -94,6 +136,7 @@ if (APPLE)
                   COMMAND ${Ant_EXECUTABLE} build-mac-installer
                   -Dapi.dir="${OpenSim_ROOT_DIR}"
                   -Dmodels.dir="${MODELS_INSTALL_DIR}"
+                  -Dapp.version="${OPENSIMGUI_BUILD_VERSION}"
                   ${ANT_ARGS}
                   DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/build.xml"
                   WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
diff --git a/Gui/opensim/build.xml b/Gui/opensim/build.xml
index 3a1b5c0f..6b199cf1 100644
--- a/Gui/opensim/build.xml
+++ b/Gui/opensim/build.xml
@@ -9,6 +9,7 @@
     <property name="models.dir" value="C:/Dev/gui/opensim-models"/>
     <property name="visualizer.dir" value="/Users/aymanhabib/dev/src/unused"/>
     <property name="jre.dir" value="${java.home}"/>
+    <property name="app.version" value="Dev"/>
     <condition property="installer-files.dir" value="installer_files/Windows">
         <os family="windows"/>
     </condition>
@@ -116,8 +117,11 @@
         <replace file="${opensim.dist.dir}/../make_installer.nsi" value="${app.version}">
             <replacefilter token="@VERSION@" />
         </replace>
-
-        <!-- http://wiki.netbeans.org/DevFaqExecutableIcon -->
+      <replace file="${opensim.dist.dir}/etc/OpenSim.conf"
+          value="${app.version}">
+        <replacefilter token="@VERSION@" />
+      </replace>
+     <!-- http://wiki.netbeans.org/DevFaqExecutableIcon -->
         <exec executable="installer_files/Windows/ReplaceVistaIcon.exe" resolveexecutable="true">
             <arg line="${opensim.dist.dir}/bin/OpenSim64.exe installer_files/Windows/OpenSimLogoWindows.ico"/>
         </exec>
@@ -221,7 +225,7 @@
             <replacefilter token="@VERSION@" />
         </replace>
 
-        <copy todir="dist/OpenSim.app/Contents/Resources/"
+      <copy todir="dist/OpenSim.app/Contents/Resources/"
             file="installer_files/OSX/OpenSimDocument.icns" />
 
         <copy tofile="${mac.dist.inner.dir}/LICENSE.txt"
@@ -235,7 +239,6 @@
             file="jfreechart/gpl-3.0.txt"/>
         <copy todir="${mac.dist.inner.dir}/third_party_license_texts/"
             file="visualViewer/src/org/opensim/topologyEditor/cddl.txt"/>
-
         <!-- Create top level folder -->
         <property name="mac.dist.outer.dir" value="dist/pkgroot/OpenSim ${app.version}" />
         <property name="mac.final.app.name" value="OpenSim ${app.version}.app" />
diff --git a/Gui/opensim/helpUtils/src/org/opensim/helputils/helpmenu/AboutJPanel.form b/Gui/opensim/helpUtils/src/org/opensim/helputils/helpmenu/AboutJPanel.form
index 19c5470b..1f74d37c 100644
--- a/Gui/opensim/helpUtils/src/org/opensim/helputils/helpmenu/AboutJPanel.form
+++ b/Gui/opensim/helpUtils/src/org/opensim/helputils/helpmenu/AboutJPanel.form
@@ -16,7 +16,7 @@
   <Layout>
     <DimensionLayout dim="0">
       <Group type="103" groupAlignment="0" attributes="0">
-          <Component id="jTabbedPane1" alignment="0" pref="497" max="32767" attributes="0"/>
+          <Component id="jTabbedPane1" alignment="0" pref="526" max="32767" attributes="0"/>
       </Group>
     </DimensionLayout>
     <DimensionLayout dim="1">
@@ -50,7 +50,7 @@
           <Layout>
             <DimensionLayout dim="0">
               <Group type="103" groupAlignment="0" attributes="0">
-                  <EmptySpace min="0" pref="492" max="32767" attributes="0"/>
+                  <EmptySpace min="0" pref="521" max="32767" attributes="0"/>
               </Group>
             </DimensionLayout>
             <DimensionLayout dim="1">
@@ -107,54 +107,51 @@
               <Layout>
                 <DimensionLayout dim="0">
                   <Group type="103" groupAlignment="0" attributes="0">
-                      <Group type="102" attributes="0">
+                      <Group type="102" alignment="0" attributes="0">
                           <Group type="103" groupAlignment="0" attributes="0">
-                              <Group type="103" groupAlignment="0" attributes="0">
-                                  <Group type="103" groupAlignment="0" attributes="0">
-                                      <Group type="102" attributes="0">
-                                          <Group type="103" groupAlignment="0" attributes="0">
-                                              <Component id="jLabel2" alignment="0" max="32767" attributes="1"/>
-                                              <Component id="jLabel3" alignment="0" max="32767" attributes="1"/>
-                                              <Component id="jLabel4" alignment="0" max="32767" attributes="1"/>
-                                              <Component id="jLabel6" max="32767" attributes="1"/>
-                                              <Component id="jLabel5" alignment="1" max="32767" attributes="1"/>
-                                          </Group>
-                                          <EmptySpace max="-2" attributes="0"/>
-                                      </Group>
-                                      <Group type="102" alignment="0" attributes="0">
-                                          <Component id="jLabel7" min="-2" max="-2" attributes="0"/>
-                                          <EmptySpace min="-2" pref="56" max="-2" attributes="0"/>
-                                      </Group>
-                                  </Group>
-                                  <Group type="102" alignment="0" attributes="0">
-                                      <Component id="jLabel8" min="-2" max="-2" attributes="0"/>
-                                      <EmptySpace min="-2" pref="110" max="-2" attributes="0"/>
-                                  </Group>
-                              </Group>
                               <Group type="102" alignment="0" attributes="0">
                                   <Group type="103" groupAlignment="0" attributes="0">
+                                      <Component id="jLabel7" alignment="0" min="-2" max="-2" attributes="0"/>
+                                      <Component id="jLabel8" alignment="0" min="-2" max="-2" attributes="0"/>
                                       <Component id="jLabel1" alignment="0" min="-2" max="-2" attributes="0"/>
                                       <Component id="jLabel9" min="-2" max="-2" attributes="0"/>
                                   </Group>
                                   <EmptySpace min="-2" pref="120" max="-2" attributes="0"/>
                               </Group>
+                              <Group type="102" attributes="0">
+                                  <Group type="103" groupAlignment="0" attributes="0">
+                                      <Component id="jLabel2" alignment="0" pref="212" max="32767" attributes="1"/>
+                                      <Component id="jLabel4" alignment="0" max="32767" attributes="1"/>
+                                      <Component id="jLabel6" max="32767" attributes="1"/>
+                                      <Component id="jLabel5" alignment="1" max="32767" attributes="1"/>
+                                      <Group type="102" alignment="0" attributes="0">
+                                          <Component id="jLabel3" min="-2" pref="151" max="-2" attributes="1"/>
+                                          <EmptySpace min="0" pref="0" max="32767" attributes="0"/>
+                                      </Group>
+                                  </Group>
+                                  <EmptySpace max="-2" attributes="0"/>
+                              </Group>
                           </Group>
                           <Group type="103" groupAlignment="0" attributes="0">
-                              <Component id="operatingSystemString" pref="190" max="32767" attributes="1"/>
-                              <Component id="versionString" alignment="0" pref="190" max="32767" attributes="1"/>
-                              <Component id="jreString" alignment="0" pref="190" max="32767" attributes="1"/>
                               <Group type="102" attributes="0">
                                   <Group type="103" groupAlignment="0" attributes="0">
-                                      <Component id="VMvendorString" min="-2" max="-2" attributes="0"/>
-                                      <Component id="jHomeDirString" alignment="0" min="-2" max="-2" attributes="1"/>
-                                      <Component id="jLabelOpenSimHomeString" min="-2" max="-2" attributes="0"/>
-                                      <Component id="compilerVersionLabel" alignment="0" min="-2" max="-2" attributes="0"/>
-                                      <Component id="libraryPathString" alignment="0" min="-2" max="-2" attributes="0"/>
+                                      <Component id="operatingSystemString" pref="210" max="32767" attributes="1"/>
+                                      <Component id="jreString" alignment="0" pref="202" max="32767" attributes="1"/>
+                                      <Group type="102" attributes="0">
+                                          <Group type="103" groupAlignment="0" attributes="0">
+                                              <Component id="VMvendorString" min="-2" max="-2" attributes="0"/>
+                                              <Component id="jHomeDirString" alignment="0" min="-2" max="-2" attributes="1"/>
+                                              <Component id="jLabelOpenSimHomeString" min="-2" max="-2" attributes="0"/>
+                                              <Component id="compilerVersionLabel" alignment="0" min="-2" max="-2" attributes="0"/>
+                                              <Component id="libraryPathString" alignment="0" min="-2" max="-2" attributes="0"/>
+                                          </Group>
+                                          <EmptySpace min="0" pref="43" max="32767" attributes="0"/>
+                                      </Group>
                                   </Group>
-                                  <EmptySpace min="0" pref="71" max="32767" attributes="0"/>
+                                  <EmptySpace max="-2" attributes="0"/>
                               </Group>
+                              <Component id="jVersionTextField" max="32767" attributes="0"/>
                           </Group>
-                          <EmptySpace max="-2" attributes="0"/>
                       </Group>
                   </Group>
                 </DimensionLayout>
@@ -163,10 +160,10 @@
                       <Group type="102" alignment="0" attributes="0">
                           <EmptySpace min="-2" pref="27" max="-2" attributes="0"/>
                           <Component id="jLabel1" min="-2" max="-2" attributes="0"/>
-                          <EmptySpace min="-2" pref="18" max="-2" attributes="0"/>
+                          <EmptySpace min="-2" pref="15" max="-2" attributes="0"/>
                           <Group type="103" groupAlignment="3" attributes="0">
                               <Component id="jLabel2" alignment="3" min="-2" max="-2" attributes="0"/>
-                              <Component id="versionString" alignment="3" min="-2" max="-2" attributes="0"/>
+                              <Component id="jVersionTextField" alignment="3" min="-2" max="-2" attributes="0"/>
                           </Group>
                           <EmptySpace max="-2" attributes="0"/>
                           <Group type="103" groupAlignment="3" attributes="0">
@@ -249,11 +246,6 @@
                     <Property name="text" type="java.lang.String" value="Home Dir:"/>
                   </Properties>
                 </Component>
-                <Component class="javax.swing.JLabel" name="versionString">
-                  <Properties>
-                    <Property name="text" type="java.lang.String" value="v1.0"/>
-                  </Properties>
-                </Component>
                 <Component class="javax.swing.JLabel" name="operatingSystemString">
                   <Properties>
                     <Property name="text" type="java.lang.String" value="Windows XP SP2"/>
@@ -321,6 +313,16 @@
                     <Property name="text" type="java.lang.String" value="jLabel10"/>
                   </Properties>
                 </Component>
+                <Component class="javax.swing.JTextField" name="jVersionTextField">
+                  <Properties>
+                    <Property name="editable" type="boolean" value="false"/>
+                    <Property name="text" type="java.lang.String" value="4.0"/>
+                    <Property name="toolTipText" type="java.lang.String" value="ID for the current version of the application, use it when reporting bugs/issues/requests"/>
+                    <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
+                      <Border info="null"/>
+                    </Property>
+                  </Properties>
+                </Component>
               </SubComponents>
             </Container>
           </SubComponents>
diff --git a/Gui/opensim/helpUtils/src/org/opensim/helputils/helpmenu/AboutJPanel.java b/Gui/opensim/helpUtils/src/org/opensim/helputils/helpmenu/AboutJPanel.java
index 2c45e117..6a570574 100644
--- a/Gui/opensim/helpUtils/src/org/opensim/helputils/helpmenu/AboutJPanel.java
+++ b/Gui/opensim/helpUtils/src/org/opensim/helputils/helpmenu/AboutJPanel.java
@@ -82,7 +82,6 @@ public final class AboutJPanel extends javax.swing.JPanel implements ImageObserv
         jLabel3 = new javax.swing.JLabel();
         jLabel4 = new javax.swing.JLabel();
         jLabel5 = new javax.swing.JLabel();
-        versionString = new javax.swing.JLabel();
         operatingSystemString = new javax.swing.JLabel();
         jreString = new javax.swing.JLabel();
         jHomeDirString = new javax.swing.JLabel();
@@ -94,6 +93,7 @@ public final class AboutJPanel extends javax.swing.JPanel implements ImageObserv
         compilerVersionLabel = new javax.swing.JLabel();
         jLabel9 = new javax.swing.JLabel();
         jLabelOpenSimHomeString = new javax.swing.JLabel();
+        jVersionTextField = new javax.swing.JTextField();
         jCreditsPanel = new javax.swing.JPanel();
         jPanel3 = new javax.swing.JPanel();
         jPanel2 = new javax.swing.JPanel();
@@ -112,7 +112,7 @@ public final class AboutJPanel extends javax.swing.JPanel implements ImageObserv
         jPanel1.setLayout(jPanel1Layout);
         jPanel1Layout.setHorizontalGroup(
             jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
-            .add(0, 492, Short.MAX_VALUE)
+            .add(0, 521, Short.MAX_VALUE)
         );
         jPanel1Layout.setVerticalGroup(
             jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
@@ -147,8 +147,6 @@ public final class AboutJPanel extends javax.swing.JPanel implements ImageObserv
         jLabel5.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
         jLabel5.setText("Home Dir:");
 
-        versionString.setText("v1.0");
-
         operatingSystemString.setText("Windows XP SP2");
 
         jreString.setText("Java 1.5_06");
@@ -175,56 +173,59 @@ public final class AboutJPanel extends javax.swing.JPanel implements ImageObserv
 
         jLabelOpenSimHomeString.setText("jLabel10");
 
+        jVersionTextField.setEditable(false);
+        jVersionTextField.setText("4.0");
+        jVersionTextField.setToolTipText("ID for the current version of the application, use it when reporting bugs/issues/requests");
+        jVersionTextField.setBorder(null);
+
         org.jdesktop.layout.GroupLayout jPanel5Layout = new org.jdesktop.layout.GroupLayout(jPanel5);
         jPanel5.setLayout(jPanel5Layout);
         jPanel5Layout.setHorizontalGroup(
             jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
             .add(jPanel5Layout.createSequentialGroup()
                 .add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
-                    .add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
-                        .add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
-                            .add(jPanel5Layout.createSequentialGroup()
-                                .add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
-                                    .add(jLabel2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
-                                    .add(jLabel3, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
-                                    .add(jLabel4, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
-                                    .add(jLabel6, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
-                                    .add(org.jdesktop.layout.GroupLayout.TRAILING, jLabel5, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
-                                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED))
-                            .add(jPanel5Layout.createSequentialGroup()
-                                .add(jLabel7)
-                                .add(56, 56, 56)))
-                        .add(jPanel5Layout.createSequentialGroup()
-                            .add(jLabel8)
-                            .add(110, 110, 110)))
                     .add(jPanel5Layout.createSequentialGroup()
                         .add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+                            .add(jLabel7)
+                            .add(jLabel8)
                             .add(jLabel1)
                             .add(jLabel9))
-                        .add(120, 120, 120)))
+                        .add(120, 120, 120))
+                    .add(jPanel5Layout.createSequentialGroup()
+                        .add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+                            .add(jLabel2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 212, Short.MAX_VALUE)
+                            .add(jLabel4, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+                            .add(jLabel6, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+                            .add(org.jdesktop.layout.GroupLayout.TRAILING, jLabel5, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+                            .add(jPanel5Layout.createSequentialGroup()
+                                .add(jLabel3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 151, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+                                .add(0, 0, Short.MAX_VALUE)))
+                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)))
                 .add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
-                    .add(operatingSystemString, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 190, Short.MAX_VALUE)
-                    .add(versionString, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 190, Short.MAX_VALUE)
-                    .add(jreString, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 190, Short.MAX_VALUE)
                     .add(jPanel5Layout.createSequentialGroup()
                         .add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
-                            .add(VMvendorString)
-                            .add(jHomeDirString)
-                            .add(jLabelOpenSimHomeString)
-                            .add(compilerVersionLabel)
-                            .add(libraryPathString))
-                        .add(0, 71, Short.MAX_VALUE)))
-                .addContainerGap())
+                            .add(operatingSystemString, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 210, Short.MAX_VALUE)
+                            .add(jreString, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 202, Short.MAX_VALUE)
+                            .add(jPanel5Layout.createSequentialGroup()
+                                .add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+                                    .add(VMvendorString)
+                                    .add(jHomeDirString)
+                                    .add(jLabelOpenSimHomeString)
+                                    .add(compilerVersionLabel)
+                                    .add(libraryPathString))
+                                .add(0, 43, Short.MAX_VALUE)))
+                        .addContainerGap())
+                    .add(jVersionTextField)))
         );
         jPanel5Layout.setVerticalGroup(
             jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
             .add(jPanel5Layout.createSequentialGroup()
                 .add(27, 27, 27)
                 .add(jLabel1)
-                .add(18, 18, 18)
+                .add(15, 15, 15)
                 .add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                     .add(jLabel2)
-                    .add(versionString))
+                    .add(jVersionTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                 .add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                     .add(jLabel8)
@@ -392,7 +393,7 @@ public final class AboutJPanel extends javax.swing.JPanel implements ImageObserv
         this.setLayout(layout);
         layout.setHorizontalGroup(
             layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
-            .add(jTabbedPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 497, Short.MAX_VALUE)
+            .add(jTabbedPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 526, Short.MAX_VALUE)
         );
         layout.setVerticalGroup(
             layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
@@ -430,10 +431,10 @@ public final class AboutJPanel extends javax.swing.JPanel implements ImageObserv
     private javax.swing.JTextArea jTextArea2;
     private javax.swing.JTextArea jTextArea4;
     private javax.swing.JTextArea jTextArea5;
+    private javax.swing.JTextField jVersionTextField;
     private javax.swing.JLabel jreString;
     private javax.swing.JLabel libraryPathString;
     private javax.swing.JLabel operatingSystemString;
-    private javax.swing.JLabel versionString;
     // End of variables declaration//GEN-END:variables
 
     @Override
@@ -537,7 +538,7 @@ public final class AboutJPanel extends javax.swing.JPanel implements ImageObserv
     }
 
     private void populateDetailsPanel() {
-        versionString.setText(System.getProperty ("netbeans.buildnumber"));
+        jVersionTextField.setText(System.getProperty ("opensim.buildnumber"));
         operatingSystemString.setText(System.getProperty("os.name")+" version "+System.getProperty("os.version"));
         jreString.setText(System.getProperty("java.home"));
         jreString.setToolTipText("<html>"+System.getProperty("java.home")+"</html");
@@ -549,6 +550,7 @@ public final class AboutJPanel extends javax.swing.JPanel implements ImageObserv
         libraryPathString.setToolTipText("<html>"+System.getProperty("java.library.path").replace(";", "<br>")+"</html>");
         jLabelOpenSimHomeString.setText(TheApp.getInstallDir());
         jLabelOpenSimHomeString.setToolTipText("<html>"+TheApp.getInstallDir()+"</html");
+        jDetailsPanel.validate();
     }
     
 }
diff --git a/Gui/opensim/installer_files/OSX/opensim.conf b/Gui/opensim/installer_files/OSX/opensim.conf
index 5b4a1e26..e304a211 100644
--- a/Gui/opensim/installer_files/OSX/opensim.conf
+++ b/Gui/opensim/installer_files/OSX/opensim.conf
@@ -4,7 +4,7 @@ default_mac_userdir="${HOME}/Library/Application Support/${APPNAME}/@VERSION@"
 
 # options used by the launcher by default, can be overridden by explicit
 # command line switches
-default_options="--branding opensim -J-Xms24m -J-Xmx1024m -J-Djava.library.path='${progdir}/../sdk/lib'"
+default_options="--branding opensim -J-Xms24m -J-Xmx1024m -J-Djava.library.path='${progdir}/../sdk/lib' -J-Dopensim.buildnumber=@VERSION@"
 # for development purposes you may wish to append: -J-Dnetbeans.logger.console=true -J-ea
 
 # default location of JDK/JRE, can be overridden by using --jdkhome <dir> switch
diff --git a/Gui/opensim/installer_files/Windows/opensim.conf b/Gui/opensim/installer_files/Windows/opensim.conf
index 9ff0e521..98b1450a 100644
--- a/Gui/opensim/installer_files/Windows/opensim.conf
+++ b/Gui/opensim/installer_files/Windows/opensim.conf
@@ -1,10 +1,10 @@
 # ${HOME} will be replaced by user home directory according to platform
-default_userdir="${HOME}/.${APPNAME}/dev"
+default_userdir="${HOME}/.${APPNAME}/@VERSION@"
 default_mac_userdir="${HOME}/Library/Application Support/${APPNAME}/dev"
 
 # options used by the launcher by default, can be overridden by explicit
 # command line switches
-default_options="--branding opensim -J-Xms24m -J-Xmx1024m -J-Dsun.java2d.ddoffscreen=false -J-Dsun.java2d.gdiblit=false -J-Dsun.java2d.noddraw=true -J-Duser.language=en"
+default_options="--branding opensim -J-Xms24m -J-Xmx1024m -J-Dsun.java2d.ddoffscreen=false -J-Dsun.java2d.gdiblit=false -J-Dsun.java2d.noddraw=true -J-Duser.language=en -J-Dopensim.buildnumber=@VERSION@"
 # for development purposes you may wish to append: -J-Dnetbeans.logger.console=true -J-ea
 
 # default location of JDK/JRE, can be overridden by using --jdkhome <dir> switch
diff --git a/Gui/opensim/nbproject/project.properties b/Gui/opensim/nbproject/project.properties
index de6ec6b9..52a57389 100644
--- a/Gui/opensim/nbproject/project.properties
+++ b/Gui/opensim/nbproject/project.properties
@@ -2,7 +2,6 @@ app.icon=branding/core/core.jar/org/netbeans/core/startup/frame48.gif
 app.icon.icns=installer_files/OSX/opensim.icns
 app.name=OpenSim
 app.title=OpenSim
-app.version=4.0.Beta
 auxiliary.org-netbeans-modules-apisupport-installer.license-type=no
 auxiliary.org-netbeans-modules-apisupport-installer.os-linux=false
 auxiliary.org-netbeans-modules-apisupport-installer.os-macosx=false
diff --git a/Gui/opensim/utils/nbproject/private/private.properties b/Gui/opensim/utils/nbproject/private/private.properties
deleted file mode 100644
index e69de29b..00000000
diff --git a/Gui/opensim/utils/nbproject/private/private.xml b/Gui/opensim/utils/nbproject/private/private.xml
deleted file mode 100644
index 65d519ac..00000000
--- a/Gui/opensim/utils/nbproject/private/private.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project-private xmlns="http://www.netbeans.org/ns/project-private/1">
-    <editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/1"/>
-    <open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
-        <group/>
-    </open-files>
-</project-private>
diff --git a/Gui/opensim/utils/src/org/opensim/utils/TheApp.java b/Gui/opensim/utils/src/org/opensim/utils/TheApp.java
index 0b2e7386..59a83a6e 100644
--- a/Gui/opensim/utils/src/org/opensim/utils/TheApp.java
+++ b/Gui/opensim/utils/src/org/opensim/utils/TheApp.java
@@ -201,7 +201,7 @@ public final class TheApp {
     public static String installResources() {
         // Popup a directory browser dialog prompting for install location of Models, Scripts
         String userHome = System.getProperty("user.home")+File.separator+"Documents"+File.separator+"OpenSim"+
-                        File.separator+System.getProperty ("netbeans.buildnumber");
+                        File.separator+System.getProperty ("opensim.buildnumber");
         FileUtils.getInstance().setWorkingDirectoryPreference(userHome);
         String userSelection = null;
         boolean exists = false;
diff --git a/Gui/opensim/view/src/org/opensim/view/Installer.java b/Gui/opensim/view/src/org/opensim/view/Installer.java
index 4fcb1759..61d5338e 100644
--- a/Gui/opensim/view/src/org/opensim/view/Installer.java
+++ b/Gui/opensim/view/src/org/opensim/view/Installer.java
@@ -29,6 +29,8 @@ import java.io.File;
 import java.io.FileInputStream;
 import java.io.FileNotFoundException;
 import java.io.IOException;
+import java.io.InputStream;
+import java.util.Properties;
 import java.util.prefs.Preferences;
 import javax.swing.JFrame;
 import javax.swing.JPopupMenu;
@@ -36,6 +38,7 @@ import javax.swing.SwingUtilities;
 import javax.swing.UIManager;
 import javax.swing.UnsupportedLookAndFeelException;
 import org.openide.modules.ModuleInstall;
+import org.openide.util.Exceptions;
 import org.openide.util.NbBundle;
 import org.openide.windows.WindowManager;
 import org.opensim.modeling.OpenSimObject;
@@ -77,7 +80,6 @@ public class Installer extends ModuleInstall {
 
     public void restored() {
         super.restored();
-        System.setProperty ("netbeans.buildnumber", "4.0.Beta"); // Should get that from JNI but sometimes doesn't work'
         try {
              // Put your startup code here.
             UIManager.setLookAndFeel( UIManager.getSystemLookAndFeelClassName() );
@@ -147,19 +149,24 @@ public class Installer extends ModuleInstall {
      * built nito the application */
     private void restorePrefs()
     {
-         String currentVersionStr = NbBundle.getMessage(TheApp.class, "CTL_BuildDate");
-         String savedVersionStr = TheApp.getCurrentVersionPreferences().get("Internal.BuildDate", null);
          boolean updateResources = false;
-         if (!currentVersionStr.equalsIgnoreCase(savedVersionStr)){
-             updateResources = true;
-             // First launch, copy resources to User selected folder and save that as OpenSimUserDir
+         String relaunch_check_filepath = TheApp.getUserDir()+"first_launch.text";
+         boolean firstLaunch = !new File(relaunch_check_filepath).exists();
+         if (firstLaunch){
+            updateResources = true;
             SwingUtilities.invokeLater( new Runnable(){
                 public void run() {
                  String userDir = TheApp.installResources();
                  TheApp.getCurrentVersionPreferences().put("Internal.OpenSimResourcesDir", userDir);
                }
             });
-            TheApp.getCurrentVersionPreferences().put("Internal.BuildDate", currentVersionStr);
+            try {
+                 // First launch, copy resources to User selected folder and save that as OpenSimUserDir
+                 new File(relaunch_check_filepath).createNewFile();
+             } catch (IOException ex) {
+                 // need to report 
+                 Exceptions.printStackTrace(ex);
+             }        
          }
          
          String defaultGeometryPath = TheApp.getDefaultGeometrySearchPath();
@@ -167,7 +174,7 @@ public class Installer extends ModuleInstall {
          if (saved.isEmpty()||saved.equalsIgnoreCase("")){
              saved = defaultGeometryPath;
          }
-         else if (!saved.contains(defaultGeometryPath) && updateResources)
+         else if (!saved.contains(defaultGeometryPath))
              saved = saved.concat(File.pathSeparator+defaultGeometryPath);
          TheApp.getCurrentVersionPreferences().put("Paths: Geometry Search Path", saved);
          // Push changes to API side
diff --git a/appveyor.yml b/appveyor.yml
index e15c6bcd..6809e0f2 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -58,14 +58,6 @@ install:
   - git submodule update --init --recursive -- opensim-models opensim-visualizer Gui/opensim/threejs
   
 build_script:
-  # Tweak installer files for the AppVeyor deployment.
-  - ps: $env:commitHash = git describe --always # short commit hash or annotated tag, if one exists.
-  - ps: $env:commitDate = git show -s --format=%cd --date=short HEAD
-  - ps: $env:VERSION = "$env:commitHash"
-  - ps: if (!($env.APPVEYOR_REPO_TAG)) { $env:VERSION = "$env:VERSION-$env:commitDate" }
-  - ps: $env:VERSION
-  - ps: (Get-Content $env:APPVEYOR_BUILD_FOLDER/Gui/opensim/installer_files/Windows/opensim.conf).replace('/dev', '/' + $env:VERSION) | Set-Content $env:APPVEYOR_BUILD_FOLDER/Gui/opensim/installer_files/Windows/opensim.conf
-  - ps: (Get-Content $env:APPVEYOR_BUILD_FOLDER/Gui/opensim/nbproject/project.properties).replace('app.version=4.0.Beta', 'app.version=' + $env:VERSION) | Set-Content $env:APPVEYOR_BUILD_FOLDER/Gui/opensim/nbproject/project.properties
   - ps: mkdir ../build
   - cd ../build
   - cmake ../opensim-gui -G"Visual Studio 15 2017 Win64" -DCMAKE_PREFIX_PATH=C:\opensim-core-VC141 -DANT_ARGS="-Dnbplatform.default.netbeans.dest.dir=C:/Program Files/NetBeans 8.2;-Dnbplatform.default.harness.dir=C:/Program Files/NetBeans 8.2/harness"
@@ -76,6 +68,11 @@ build_script:
   - cmake --build . --target CopyVisualizer --config Release
   #
   # TODO edit the .opensim folder name (in opensim.conf)
+
+  # Read the value of the cache variable storing the GUI build version.
+  - ps: $env:match = cmake -L . | Select-String -Pattern OPENSIMGUI_BUILD_VERSION
+  - ps: $env:VERSION = $env:match.split('=')[1]
+  - ps: $env:VERSION
   
 test_script:
   ## Run tests.
['Gui/opensim/nbproject/project.properties', 'Gui/opensim/installer_files/OSX/opensim.conf', 'CMakeLists.txt', 'appveyor.yml', 'Gui/opensim/CMakeLists.txt', 'Gui/opensim/helpUtils/src/org/opensim/helputils/helpmenu/AboutJPanel.java', 'Gui/opensim/helpUtils/src/org/opensim/helputils/helpmenu/AboutJPanel.form', 'Gui/opensim/utils/src/org/opensim/utils/TheApp.java', 'Gui/opensim/view/src/org/opensim/view/Installer.java', '.travis.yml', 'Gui/opensim/installer_files/Windows/opensim.conf', 'Gui/opensim/build.xml']