Build and develop

stever edited this page Apr 13, 2012 · 9 revisions

Fetch and unpack source

  1. Download source from here on GitHub.
  2. Use 7-zip to unpack the contents of the following archive files to the same directory of each archive file.
    • nsis\payload\minimerl.7z (pre-compiled, cut-down version of Erlang)
    • nsis\payload\playdar.7z (pre-compiled Playdar core distribution files)
    • nsis\payload\playdar_modules.7z (pre-compiled optional resolver modules)
    • nsis\payload\py2exe\dist.7z (Python resolvers compiled with py2exe)

Build and debug Windar in Visual Studio

  1. Open the Windar solution file in Visual C# 2008 Express Edition, or other 2008 edition if you already have it. You should find the 2008 Express edition as a free download here.
    • You can allow the modified TrayApp project file to load normally and ignore the initial warning, which is due to the included build task. The build task is used to auto-increment the main TrayApp version number. This is particularly useful when building the installer package.
  2. Click on “Set as StartUp Project” in the context menu for the TrayApp project in Solution Explorer.
  3. Rebuild Solution to build plugins, so they’re ready to be used in next step.
  4. Start Debugging (F5)
  5. Click on the Shutdown option in the Windar tray icon context menu to end.

If there are problems preventing a gracefull shutdown, or other software crash, you’ll likely find that you need to kill the erl.exe and epmd.exe processes which are related to Erlang and playdar-core.

It is normal for the epmd.exe process to remain running, however it will lock files in the Windar solution folder, so you may need to kill that process to have a clean start or when deleting or moving the folder.

Build the Windar installer

It is possible to compile Windar and build the installer without Visual Studio using the supplied build.bat file (in the Installer sub-folder). You’ll need the following:

  • .NET Framework 2.0 (x86 or x64) or .NET Framework 3.5.
  • NSIS, a scriptable win32 installer/uninstaller system.
    • Copy nsis\nsis_processes\bin\Processes.dll to the NSIS Plugins folder, which may have a path same or similar to C:\Program Files\NSIS\Plugins.

A suitable version of the .NET Framework will typically be already available on XP, Vista, and Windows 7.

7-zip must still be used to unpack the contents some pre-compiled software as described above.