[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-user: WINDOWS BUILD WARNING (WAS: Re: Random thoughts on the future interface of PCB)
On Sun, 2010-12-12 at 17:03 +0000, Peter Clifton wrote:
> I've used Cesar Strauss' "minipack" tools to build it before. This isn't
> particularly maintained, but the latest gEDA version is packaged up here
> for testing:
> 
> http://www2.eng.cam.ac.uk/~pcjc2/geda-windows.html
WARNING::
A colleague of mine tried this installer on Windows 7, and it _ERASED_
and REPLACED the the PATH environment variable, rather than appending to
it.
Please be very cautious installing this on a production system, and / or
Windows 7. I've not noticed this behaviour before when testing myself,
but it is quite possible my PATH variable was blank before I installed
anyway.
BEWARE!
(PS. If anyone has a suggested fix, for the installer script (attached).
please let me know).
-- 
Peter Clifton
Electrical Engineering Division,
Engineering Department,
University of Cambridge,
9, JJ Thomson Avenue,
Cambridge
CB3 0FA
Tel: +44 (0)7729 980173 - (No signal in the lab!)
Tel: +44 (0)1223 748328 - (Shared lab phone, ask for me)
;; $Id$
;;
;; Installer script file for gEDA for windows.  See http://nsis.sourceforge.net
;; for details on NSIS.
;;
; Started with:
;
;NSIS Modern User Interface
;Start Menu Folder Selection Example Script
;Written by Joost Verburg
;
; and modified for wcalc by Dan McMahill
;
; Later copied for use by PCB by Dan McMahill
;
; Adapted for gEDA by Peter Clifton
;--------------------------------
;Include Modern UI
  !include "MUI.nsh"
;--------------------------------
;Include some utility functions
  !include "EnvVarUpdate.nsh"
  !include "LogicLib.nsh"
;--------------------------------
;General
  ;Name and file
  Name "gEDA/gaf 1.6.0"
  OutFile "geda-gaf-1.6.0-4.exe"
  ;Default installation folder
  InstallDir "$PROGRAMFILES\gEDA"
  
  ;Get installation folder from registry if available
  InstallDirRegKey HKCU "Software\gEDA" ""
;--------------------------------
;Variables
  Var MUI_TEMP
  Var STARTMENU_FOLDER
;--------------------------------
;Interface Settings
  !define MUI_ABORTWARNING
;--------------------------------
;Pages
; Skip over these for now.. naughty, but its an alpha..
;  !insertmacro MUI_PAGE_LICENSE "@pcb_srcdir@\COPYING"
;  !insertmacro MUI_PAGE_LICENSE "@gd_win32_runtime@\gd-license.txt"
;  !insertmacro MUI_PAGE_LICENSE "@gtk_win32_runtime@\LICENSE-gpl"
;  !insertmacro MUI_PAGE_LICENSE "@gtk_win32_runtime@\LICENSE-lgpl"
;  !insertmacro MUI_PAGE_LICENSE "@gtk_win32_runtime@\LICENSE-expat"
;  !insertmacro MUI_PAGE_LICENSE "@gtk_win32_runtime@\LICENSE-fontconfig"
;  !insertmacro MUI_PAGE_LICENSE "@gtk_win32_runtime@\LICENSE-jpeg"
;  !insertmacro MUI_PAGE_LICENSE "@gtk_win32_runtime@\LICENSE-png"
;  !insertmacro MUI_PAGE_LICENSE "@gtk_win32_runtime@\LICENSE-tiff"
;  !insertmacro MUI_PAGE_LICENSE "@gtk_win32_runtime@\LICENSE-xpm"
;  !insertmacro MUI_PAGE_LICENSE "@gtk_win32_runtime@\LICENSE-zlib"
;  !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\gEDA" 
  !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 "Dummy Section" SecDummy
  SetOutPath "$INSTDIR"
  
  ;ADD YOUR OWN FILES HERE...
;  File /a /r "@gtk_win32_runtime@\*.*"
;  File /a /r "@gd_win32_runtime@\*.*"
;  File /a /r "@pcb_prefix@\*.*"
  File /a /r "result-1.6.0-release-4\*.*"
  ;Store installation folder
  WriteRegStr HKCU "Software\gEDA" "" $INSTDIR
  ;Set path
  ${EnvVarUpdate} $0 "PATH" "A" "HKLM" "$INSTDIR\bin"
  ;Set relocation environment variables
  ${EnvVarUpdate} $0 "GEDADATA"        "A" "HKLM" "$INSTDIR\share\gEDA"
  ${EnvVarUpdate} $0 "GUILE_LOAD_PATH" "A" "HKLM" "$INSTDIR\share\guile\1.8"
  ;Create uninstaller
  WriteUninstaller "$INSTDIR\Uninstall.exe"
  
  !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
    
    ;Create shortcuts
    CreateDirectory "$SMPROGRAMS\$STARTMENU_FOLDER"
    CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
;    CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\HTML Manual.lnk" "$INSTDIR\share\pcb\pcb.html"
;    CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\PDF Manual.lnk" "$INSTDIR\share\pcb\pcb.pdf"
;    CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Readme.lnk" "$INSTDIR\share\pcb-@pcb_version@\Readme.txt"
    CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\pcb.lnk" "$INSTDIR\bin\pcb.exe" "" "$INSTDIR\bin\pcb.exe" 0 "" "" "pcb: Printed Circuit Board Layout Editor"
    CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\gschem.lnk" "$INSTDIR\bin\gschem.exe" "" "$INSTDIR\bin\gschem.exe" 0 "" "" "gschem: Schematic / symbol editor"
    CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\gattrib.lnk" "$INSTDIR\bin\gattrib.exe" "" "$INSTDIR\bin\gattrib.exe" 0 "" "" "gattrib: Schematic / symbol attributes editor"
;; CreateShortCut  link.lnk target.file [parameters [icon.file [icon_index_number [start_options [keyboard_shortcut [description]]]]]]
  !insertmacro MUI_STARTMENU_WRITE_END
SectionEnd
;--------------------------------
;Descriptions
  ;Language strings
;  LangString DESC_SecDummy ${LANG_ENGLISH} "A test section."
  ;Assign language strings to sections
;  !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
;    !insertmacro MUI_DESCRIPTION_TEXT ${SecDummy} $(DESC_SecDummy)
;  !insertmacro MUI_FUNCTION_DESCRIPTION_END
;--------------------------------
;Uninstaller Section
Section "Uninstall"
  ;ADD YOUR OWN FILES HERE...
  Delete "$INSTDIR\Uninstall.exe"
  Delete "$INSTDIR\*.*"
  RMDir /r "$INSTDIR\*.*"
  RMDir "$INSTDIR"
  ;Remove path
  ${un.EnvVarUpdate} $0 "PATH" "R" "HKLM" "$INSTDIR\bin"
  ;Set relocation environment variables
  ${un.EnvVarUpdate} $0 "GEDADATA"        "R" "HKLM" "$INSTDIR\share\gEDA"
  ${un.EnvVarUpdate} $0 "GUILE_LOAD_PATH" "R" "HKLM" "$INSTDIR\share\guile\1.8"
  ;Remove relocation variables
  !insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP
    
;  Delete "$SMPROGRAMS\$MUI_TEMP\HTML Manual.lnk"
  Delete "$SMPROGRAMS\$MUI_TEMP\pcb.lnk"
  Delete "$SMPROGRAMS\$MUI_TEMP\gschem.lnk"
  Delete "$SMPROGRAMS\$MUI_TEMP\gattrib.lnk"
;  Delete "$SMPROGRAMS\$MUI_TEMP\PDF Manual.lnk"
;  Delete "$SMPROGRAMS\$MUI_TEMP\Readme.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\gEDA"
SectionEnd
_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user