Index: .hgignore
===================================================================
--- .hgignore	(revision 19)
+++ .hgignore	(revision 20)
@@ -1,2 +1,5 @@
 .+\.pyc
 pyuipc.pyd
+MANIFEST
+dist/.+
+build/.+
Index: MANIFEST.in
===================================================================
--- MANIFEST.in	(revision 20)
+++ MANIFEST.in	(revision 20)
@@ -0,0 +1,3 @@
+include mlx.nsi
+include makeinst.bat
+include license.txt
Index: license.txt
===================================================================
--- license.txt	(revision 20)
+++ license.txt	(revision 20)
@@ -0,0 +1,3 @@
+Copyright ©  2012 István Váradi
+
+This software is placed in the public domain. In no event should the author should be held liable for any damages arising from the use of this software.
Index: makeinst.bat
===================================================================
--- makeinst.bat	(revision 20)
+++ makeinst.bat	(revision 20)
@@ -0,0 +1,7 @@
+set MSVCRDIR=c:\windows\winsxs\x86_Microsoft.VC90.CRT*9.0.21022.8*
+set GTKRTDIR=c:\Python27\Lib\site-packages\gtk-2.0\runtime
+set NSISDIR=C:\Program Files\NSIS
+
+python setup.py py2exe
+
+"%NSISDIR%\makensis" mlx.nsi
Index: makesdist.sh
===================================================================
--- makesdist.sh	(revision 20)
+++ makesdist.sh	(revision 20)
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+python setup.py sdist
Index: mlx.nsi
===================================================================
--- mlx.nsi	(revision 20)
+++ mlx.nsi	(revision 20)
@@ -0,0 +1,126 @@
+; NSIS installer script for MAVA Logger X
+
+;--------------------------------
+;Include Modern UI
+
+  !include "MUI.nsh"
+  !include "mlx-common.nsh"
+
+;--------------------------------
+;General
+
+  ;Name and file
+  Name "MAVA Logger X"
+  Caption "MAVA Logger X ${MLX_VERSION} Setup"
+  OutFile "MAVA Logger X-${MLX_VERSION}-Setup.exe"
+
+  ;Default installation folder
+  InstallDir "$PROGRAMFILES\MAVA Logger X"
+  
+  ;Get installation folder from registry if available
+  InstallDirRegKey HKCU "Software\MAVA Logger X" ""
+
+  ;Vista redirects $SMPROGRAMS to all users without this
+  RequestExecutionLevel admin
+
+;--------------------------------
+;Variables
+
+  Var MUI_TEMP
+  Var STARTMENU_FOLDER
+
+;--------------------------------
+;Interface Settings
+
+  ;!define MUI_ICON "cflib\cfgui.ico"
+  ;!define MUI_UNICON "cflib\cfgui_uninst.ico"
+  !define MUI_ABORTWARNING
+
+;--------------------------------
+;Pages
+
+  !insertmacro MUI_PAGE_LICENSE "license.txt"
+  !insertmacro MUI_PAGE_COMPONENTS
+  !insertmacro MUI_PAGE_DIRECTORY
+
+  ;Start Menu Folder Page Configuration
+  !define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKCU" 
+  !define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\MAVA Logger X" 
+  !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder"
+  
+  !insertmacro MUI_PAGE_STARTMENU Application $STARTMENU_FOLDER
+
+  !insertmacro MUI_PAGE_INSTFILES
+  
+  !insertmacro MUI_UNPAGE_CONFIRM
+  !insertmacro MUI_UNPAGE_INSTFILES
+  
+;--------------------------------
+;Languages
+ 
+  !insertmacro MUI_LANGUAGE "English"
+
+;--------------------------------
+;Installer Sections
+
+Section "MAVA Logger X" SecMLX
+
+  SetOutPath "$INSTDIR"
+  
+  ;ADD YOUR OWN FILES HERE...
+  File /r dist\*.*
+
+  ;Store installation folder
+  WriteRegStr HKCU "Software\MAVA Logger X" "" $INSTDIR
+  
+  ;Create uninstaller
+  WriteUninstaller "$INSTDIR\Uninstall.exe"
+
+  !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
+    ;Create shortcuts
+    CreateDirectory "$SMPROGRAMS\$STARTMENU_FOLDER"
+    CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\MAVA Logger X.lnk" "$INSTDIR\runmlx.exe"
+    CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
+    CreateShortCut "$DESKTOP\MAVA Logger X.lnk" "$INSTDIR\runmlx.exe"
+  !insertmacro MUI_STARTMENU_WRITE_END
+SectionEnd
+
+;--------------------------------
+;Descriptions
+
+  ;Language strings
+  LangString DESC_SecMLX ${LANG_ENGLISH} "MAVA Logger X."
+
+  ;Assign language strings to sections
+  !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
+    !insertmacro MUI_DESCRIPTION_TEXT ${SecMLX} $(DESC_SecMLX)
+  !insertmacro MUI_FUNCTION_DESCRIPTION_END
+
+;--------------------------------
+;Uninstaller Section
+
+Section "Uninstall"
+
+  RMDir /r "$INSTDIR"
+
+  !insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP
+    
+  Delete "$DESKTOP\MAVA Logger X.lnk"
+  Delete "$SMPROGRAMS\$MUI_TEMP\MAVA Logger X.lnk"
+  Delete "$SMPROGRAMS\$MUI_TEMP\Uninstall.lnk"
+  
+  ;Delete empty start menu parent diretories
+  StrCpy $MUI_TEMP "$SMPROGRAMS\$MUI_TEMP"
+ 
+  startMenuDeleteLoop:
+    ClearErrors
+    RMDir $MUI_TEMP
+    GetFullPathName $MUI_TEMP "$MUI_TEMP\.."
+    
+    IfErrors startMenuDeleteLoopDone
+  
+    StrCmp $MUI_TEMP $SMPROGRAMS startMenuDeleteLoopDone startMenuDeleteLoop
+  startMenuDeleteLoopDone:
+
+  DeleteRegKey /ifempty HKCU "Software\MAVA Logger X"
+SectionEnd
Index: setup.py
===================================================================
--- setup.py	(revision 20)
+++ setup.py	(revision 20)
@@ -0,0 +1,53 @@
+# -*- coding: iso-8859-2 -*-
+
+import sys
+import os
+from glob import glob
+from distutils.core import setup
+
+sys.path.insert(0, os.path.join(os.path.dirname(sys.argv[0]), "src"))
+
+import const
+
+data_files = []
+if os.name=="nt":
+    import py2exe
+
+    msvcrDir = os.environ["MSVCRDIR"] if "MSVCRDIR" in os.environ else None
+    if msvcrDir:
+        data_files.append(("Microsoft.VC90.CRT",  glob(os.path.join(msvcrDir, "*.*"))))
+
+    gtkRuntimeDir = os.environ["GTKRTDIR"] if "GTKRTDIR" in os.environ else None
+    if gtkRuntimeDir:
+        path = os.path.join("lib", "gtk-2.0", "2.10.0", "engines")
+        data_files.append((path, [os.path.join(gtkRuntimeDir, path, "libwimp.dll")]))
+
+        path = os.path.join("share", "themes", "MS-Windows", "gtk-2.0")
+        data_files.append((path, glob(os.path.join(gtkRuntimeDir, path, "*"))))
+        
+    with open("mlx-common.nsh", "wt") as f:
+            print >>f, '!define MLX_VERSION "%s"' % (const.VERSION)
+            f.close()
+
+long_description="""MAVA Logger X
+
+This is a program to log and evaluate the actions
+of a pilot flying a virtual Malév flight operated
+by MAVA."""
+
+setup(name = "mlx",
+      version = const.VERSION,
+      description = "MAVA Logger X",
+      long_description = long_description,
+      author = "István Váradi",
+      author_email = "ivaradi@gmail.com",
+      url = "http://mlx.varadiistvan.hu",
+      package_dir = { "" : "src" },
+      packages = [""],
+      requires = ["pyuipc"],
+      windows = [{ "script" : "src/runmlx.py" }],
+      options = { "py2exe" : { "includes": "gio, pango, atk, pangocairo"} },
+      data_files = data_files,
+      platforms = ["Win32", "Linux"],
+      license = "Public Domain"
+      )
Index: src/const.py
===================================================================
--- src/const.py	(revision 11)
+++ src/const.py	(revision 20)
@@ -1,3 +1,8 @@
 # Various constants used in the logger
+
+#-------------------------------------------------------------------------------
+
+# The version of the program
+VERSION="0.001"
 
 #-------------------------------------------------------------------------------
Index: src/mlx.py
===================================================================
--- src/mlx.py	(revision 18)
+++ src/mlx.py	(revision 20)
@@ -55,5 +55,5 @@
         """Build the GUI."""
         win = gtk.Window()
-        win.set_title("MAVA Logger X 0.001 Test")
+        win.set_title("MAVA Logger X " + const.VERSION)
         win.connect("delete-event", gtk.main_quit)
 
@@ -586,10 +586,14 @@
         buffer.insert(buffer.get_end_iter(), msg)
         self._logView.scroll_mark_onscreen(buffer.get_insert())
-              
-if __name__ == "__main__":
+
+def main():
+    """The main operation of the program."""
     gobject.threads_init()
     gui = GUI()
     gui.build()
     gui.run()
-
-
+              
+if __name__ == "__main__":
+    main()
+
+
Index: c/pyuipc.pyd
===================================================================
--- src/pyuipc.pyd	(revision 3)
+++ 	(revision )
@@ -1,1 +1,0 @@
-../pyuipc.pyd
Index: src/runmlx.py
===================================================================
--- src/runmlx.py	(revision 20)
+++ src/runmlx.py	(revision 20)
@@ -0,0 +1,5 @@
+# Script to run the logger
+
+if __name__ == "__main__":
+    import mlx
+    mlx.main()
