[Gd-chatter] r11042 - trunk/libraries/gui-sniffer

andreas at gwydiondylan.org andreas at gwydiondylan.org
Sat Dec 9 15:50:13 CET 2006


Author: andreas
Date: Sat Dec  9 15:50:10 2006
New Revision: 11042

Added:
   trunk/libraries/gui-sniffer/nnv-install.nsi   (contents, props changed)
Modified:
   trunk/libraries/gui-sniffer/gui-sniffer.dylan
Log:
job: 7299

 * Installer
 * About box

Modified: trunk/libraries/gui-sniffer/gui-sniffer.dylan
==============================================================================
--- trunk/libraries/gui-sniffer/gui-sniffer.dylan	(original)
+++ trunk/libraries/gui-sniffer/gui-sniffer.dylan	Sat Dec  9 15:50:10 2006
@@ -384,7 +384,11 @@
   *count*;
 end;
 
-define variable *debugging?* = #t;
+define function show-about-box (x)
+  start-dialog(make(<about-box>))
+end;
+
+define variable *debugging?* = #f;
 
 define method safe(func :: <function>)
   method(#rest args)
@@ -517,6 +521,8 @@
 define command-table *file-command-table* (*global-command-table*)
   menu-item "Open pcap file..." = open-pcap-file;
   menu-item "Save to pcap file..." = save-pcap-file;
+  menu-item "About" = show-about-box;
+  menu-item "Exit" = exit-application;
 end;
 
 define command-table *interface-command-table* (*global-command-table*)
@@ -819,6 +825,21 @@
   end;
 end;
 
+define constant $about-text = concatenate("Network Night Vision 0.0.1\n",
+                                          "(c) 2005, 2006 Andreas Bogk, Hannes Mehnert\n",
+                                          "All Rights Reserved. Free for non-commercial use.\n",
+                                          "\n",
+                                          "http://www.networknightvision.com/");
+
+define frame <about-box> (<dialog-frame>)
+  pane splash-screen-pane (frame)
+    make(<text-editor>, text: $about-text, read-only?: #t, lines: 5, columns: 50);
+  layout (frame)
+    frame.splash-screen-pane;
+  keyword title: = "About Network Night Vision 0.0.1";
+end;
+
+
 define method reinit-gui (frame :: <gui-sniffer-frame>)
   frame.first-packet-arrived := #f;
   *count* := 0;
@@ -872,7 +893,7 @@
 begin
   initialize-icons();
   let gui-sniffer = make(<gui-sniffer-frame>);
-  set-frame-size(gui-sniffer, 800, 600);
+  set-frame-size(gui-sniffer, 1024, 768);
   deuce/frame-window(gui-sniffer) := gui-sniffer.packet-hex-dump;
   deuce/*editor-frame* := gui-sniffer;
   deuce/*buffer* := deuce/make-initial-buffer();

Added: trunk/libraries/gui-sniffer/nnv-install.nsi
==============================================================================
--- (empty file)
+++ trunk/libraries/gui-sniffer/nnv-install.nsi	Sat Dec  9 15:50:10 2006
@@ -0,0 +1,41 @@
+!include "MUI.nsh"
+Name "Network Night Vision 0.0.1"
+OutFile "nnv-0.0.1-setup.exe"
+InstallDir "$PROGRAMFILES\Network Night Vision"
+InstallDirRegKey HKLM "Software\Network Night Vision" "Install_Dir"
+
+  !insertmacro MUI_PAGE_COMPONENTS
+  !insertmacro MUI_PAGE_DIRECTORY
+  !insertmacro MUI_PAGE_INSTFILES
+  
+  !insertmacro MUI_UNPAGE_CONFIRM
+  !insertmacro MUI_UNPAGE_INSTFILES
+
+Section "Network Night Vision (required)"
+  SectionIn RO
+  SetOutPath $INSTDIR
+  File "network-night-vision.exe"
+  File "*.dll"
+  WriteRegStr HKLM "Software\Network Night Vision" "Install_Dir" "$INSTDIR"
+  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Network Night Vision" "DisplayName" "Network Night Vision"
+  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Network Night Vision" "UninstallString" '"$INSTDIR\uninstall.exe"'
+  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Network Night Vision" "NoModify" 1
+  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Network Night Vision" "NoRepair" 1
+  WriteUninstaller "uninstall.exe"
+SectionEnd
+Section "Start Menu Shortcuts"
+  CreateDirectory "$SMPROGRAMS\Network Night Vision"
+  CreateShortCut "$SMPROGRAMS\Network Night Vision\Uninstall.lnk "$INSTDIR\uninstall.exe "" "$INSTDIR\uninstall.exe" 0
+  CreateShortCut "$SMPROGRAMS\Network Night Vision\network-night-vision.lnk" "$INSTDIR\network-night-vision.exe" "" "$INSTDIR\network-night-vision.exe" 0
+SectionEnd
+Section "Uninstall"
+  DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Network Night Vision"
+  DeleteRegKey HKLM "Software\Network Night Vision"
+  Delete "$INSTDIR\network-night-vision.exe"
+  Delete "$INSTDIR\*.dll"
+  Delete "$INSTDIR\uninstall.exe"
+  Delete "$SMPROGRAMS\Network Night Vision\*"
+  RMDir "$SMPROGRAMS\Network Night Vision"
+  RMDir "$INSTDIR"
+SectionEnd
+



More information about the chatter mailing list