Packaging Windows

From emergent
Jump to: navigation, search
Emergent Logo
Installing and Building Emergent
  • Build from source (expert)

Steps for Packaging on Windows.

First, see Build Windows for general info on the build process.

  • Install NSIS installation system:
  • run the vsinit15 shell with administrator privileges -- otherwise the install process will fail -- right click on command alias and select option to run with admin..
jom install   # MUST do install first before package -- package uses the installed version -- doesn't work without that!
jom package

Rest of this page is OLD and should be moved somewhere or deleted!!!

Building prerequisite libraries

The prerequisite libraries for Windows are already built and uploaded to the FTP site; the build script downloads them automatically for you. There are 32-bit and 64-bit versions (debug and release versions of each). If you need to rebuild any of these libraries, there are instructions in this repository:

Recompile plugins

  • Install both 32-bit and 64-bit emergent from the packages just built.
    • Need to install since you can't compile a plugin against a development directory.
    • Must install to a path without spaces, e.g., C:\emergent-5.3.0-64\.
    • For emergent 6.2.0 onward, change the following lines in "FindTemt.cmake" (in the CMakeModules subdirectory of your installation path):
  if (NOT EXISTS "${EMERGENTDIR}/include/ta_type.h")
    message(FATAL_ERROR "EMERGENTDIR environment variable must point to Emergent install directory!")
  endif (NOT EXISTS "${EMERGENTDIR}/include/ta_type.h")


  if (NOT EXISTS "${EMERGENTDIR}/include/ta_stdef.h")
    message(FATAL_ERROR "EMERGENTDIR environment variable must point to Emergent install directory!")
  endif (NOT EXISTS "${EMERGENTDIR}/include/ta_stdef.h")
  • Update the plugin's version number (see EMERVER below).
  • Recompile the plugin for 32-bit build.
  • Recompile the plugin for 64-bit build.
    • Eventually it will be possible to compile the plugin from within emergent, as is done on Mac and Linux. For now, see notes below.
  • Test the new version of emergent and new plugin.
  • Check in any plugin source code changes and the DLLs.

Commands to compile plugin

REM Edit these values as needed
set EMERVER=5.3.10
set BITS=64
set BUILD_TYPE=Release
set MSVC_YEAR=2010
set PLUGIN_NAME=MyPlugin
set SRC_DIR=C:\src\myplugin

if %BITS%==32 (
  set ARCH=86
  set DEST_DLL=%PLUGIN_NAME%32.dll
  set DEST_DIR=%USERPROFILE%\emergent\plugins
) else (
  set ARCH=64
  set DEST_DLL=%PLUGIN_NAME%64.dll
  set DEST_DIR=%USERPROFILE%\emergent\plugins64

"c:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.Cmd" /x%ARCH%

cd /d %SRC_DIR%
mkdir build-msvs%MSVC_YEAR%-%EMERVER%-%BITS%
cd build-msvs%MSVC_YEAR%-%EMERVER%-%BITS%

set EMER_3RDPARTY_DIR=C:\src\devtools\tools-msvs%MSVC_YEAR%-%BITS%\3rdparty
set COINDIR=C:\src\devtools\tools-msvs%MSVC_YEAR%-%BITS%\Coin\3.1.3
set QTDIR=C:\Qt\4.8.2-msvs%MSVC_YEAR%-%BITS%

path C:\Program Files (x86)\CMake 2.8.8\bin;%QTDIR%\bin;%COINDIR%\bin;%EMER_3RDPARTY_DIR%\bin;%EMERGENTDIR%\bin;%PATH%
cmake.exe .. -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=%BUILD_TYPE%
REM Also copy any auxiliary files the plugin needs