Skip to content

Commit

Permalink
adding XBSlink installer creation scripts and dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
seuffert committed Feb 21, 2011
1 parent 6619e8d commit 13e0d02
Show file tree
Hide file tree
Showing 7 changed files with 185 additions and 0 deletions.
3 changes: 3 additions & 0 deletions XBSlink Installer/.gitignore
@@ -0,0 +1,3 @@
/XBSlink_setup_*.exe
/XBSlink_v*.tar.gz
/XBSlink_version.txt
145 changes: 145 additions & 0 deletions XBSlink Installer/XBSlink_installer_MUI2.nsi
@@ -0,0 +1,145 @@
;NSIS Modern User Interface
;Welcome/Finish Page Example Script
;Written by Joost Verburg

;--------------------------------
!include "MUI2.nsh"
!include "FileFunc.nsh"
!system "xbslink_version_info.exe"
!include "XBSlink_version.txt"
;--------------------------------
;General

;Name and file
Name "XBSlink"
OutFile "XBSlink_setup_${Version}.exe"

;Default installation folder
InstallDir "$PROGRAMFILES\XBSlink"

;Get installation folder from registry if available
InstallDirRegKey HKCU "Software\XBSlink" ""

;Request application privileges for Windows Vista
RequestExecutionLevel admin

SetCompressor /SOLID lzma

Icon "..\XBSlink\XBSlink.ico"

Caption "XBSlink Setup - v${Version}"

;--------------------------------
;Interface Settings

!define MUI_ABORTWARNING

;--------------------------------
;Pages

!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_LICENSE "XBSlink_license.txt"
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH

!insertmacro MUI_UNPAGE_WELCOME
!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES
!insertmacro MUI_UNPAGE_FINISH

;--------------------------------
;Languages

!insertmacro MUI_LANGUAGE "English"

;--------------------------------
;Version Info

VIProductVersion ${Version}
VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductName" "XBSlink"
VIAddVersionKey /LANG=${LANG_ENGLISH} "Comments" "A Xbox360 System Link Proxy"
VIAddVersionKey /LANG=${LANG_ENGLISH} "CompanyName" "Oliver Seuffert"
VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalCopyright" "Copyright Oliver Seuffert"
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileDescription" "XBSlink"
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" ${Version}

;--------------------------------
;Installer Sections

; The stuff to install
Section "XBSlink (required)" XBSlink

SectionIn RO

; Set output path to the installation directory.
SetOutPath $INSTDIR

; Put file there
File /r "..\XBSlink\bin\Release\*"

; Write the installation path into the registry
WriteRegStr HKLM SOFTWARE\XBSlink "Install_Dir" "$INSTDIR"

; Write the uninstall keys for Windows
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\XBSlink" "DisplayName" "XBSlink"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\XBSlink" "UninstallString" '"$INSTDIR\uninstall.exe"'
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\XBSlink" "NoModify" 1
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\XBSlink" "NoRepair" 1
WriteUninstaller "uninstall.exe"

SectionEnd

;--------------------------------

; Optional section (can be disabled by the user)
Section "Start Menu Shortcuts" StartMenuShortcuts

CreateDirectory "$SMPROGRAMS\XBSlink"
CreateShortCut "$SMPROGRAMS\XBSlink\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0
CreateShortCut "$SMPROGRAMS\XBSlink\XBSlink.lnk" "$INSTDIR\XBSlink.exe" "" "$INSTDIR\XBSlink.exe" 0

SectionEnd

;--------------------------------
Section "WinPCap Capture Library" WinPCap
SetOutPath $TEMP
File "winpcap_setup.exe"
ExecWait '"$TEMP\winpcap_setup.exe"'
Delete "$TEMP\winpcap_setup.exe"
SectionEnd
;--------------------------------
;Uninstaller Section

Section "Uninstall"

; Remove registry keys
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\XBSlink"
DeleteRegKey HKLM SOFTWARE\XBSlink

;ADD YOUR OWN FILES HERE...
Delete "$INSTDIR\Uninstall.exe"
Delete $INSTDIR\*

; Remove shortcuts, if any
Delete "$SMPROGRAMS\XBSlink\*.*"

; Remove directories used
RMDir "$SMPROGRAMS\XBSlink"
RMDir "$INSTDIR"

DeleteRegKey /ifempty HKCU "Software\XBSlink"

SectionEnd


LangString DESC_XBSlink ${LANG_ENGLISH} "The core components of XBSlink."
LangString DESC_StartMenuShortcuts ${LANG_ENGLISH} "Shortcuts to XBSlink in the Startmenu."
LangString DESC_WinPCap ${LANG_ENGLISH} "The WinPCap Packet Capture Library.(see http://www.winpcap.org for more information)"

!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
!insertmacro MUI_DESCRIPTION_TEXT ${XBSlink} $(DESC_XBSlink)
!insertmacro MUI_DESCRIPTION_TEXT ${StartMenuShortcuts} $(DESC_StartMenuShortcuts)
!insertmacro MUI_DESCRIPTION_TEXT ${WinPCap} $(DESC_WinPCap)
!insertmacro MUI_FUNCTION_DESCRIPTION_END
11 changes: 11 additions & 0 deletions XBSlink Installer/XBSlink_license.txt
@@ -0,0 +1,11 @@
This free software program by Oliver Seuffert may be freely distributed, provided that no charge above the cost of distribution is levied, and that this disclaimer is always attached to it.

The program is provided as is without any guarantees or warranty.
Although the author has attempted to find and correct any bugs in the free software programs, the author is not responsible for any damage or losses of any kind caused by the use or misuse of the programs.
In general terms that means you use them at your own risk, and we accept NO RESPONSIBILITY WHATSOEVER for anything that may occur as a result of your use of, or inability to use, any item provided by this program.
The author is under no obligation to provide support, service, corrections, or upgrades to the free software programs.

If you wish to distribute any item or to include any part of any item in a commercial project, please ask for permission first.

For more information, please send and email to xbslink@secudb.de or visit http://www.secudb.de/~seuffert/xbslink/

4 changes: 4 additions & 0 deletions XBSlink Installer/create_linux_package.sh
@@ -0,0 +1,4 @@
#!/bin/sh
cd ../XBSlink/bin/Release
tar -czf "../../../XBSlink Installer/XBSlink_release.tar.gz" *
cd "../../../XBSlink Installer"
22 changes: 22 additions & 0 deletions XBSlink Installer/get_xbs_version.nsi
@@ -0,0 +1,22 @@
!define File "..\XBSlink\bin\Release\XBSlink.exe"

OutFile "xbslink_version_info.exe"
SilentInstall silent
RequestExecutionLevel user

Section

## Get file version
GetDllVersion "${File}" $R0 $R1
IntOp $R2 $R0 / 0x00010000
IntOp $R3 $R0 & 0x0000FFFF
IntOp $R4 $R1 / 0x00010000
IntOp $R5 $R1 & 0x0000FFFF
StrCpy $R1 "$R2.$R3.$R4.$R5"

## Write it to a !define for use in main script
FileOpen $R0 "$EXEDIR\XBSlink_version.txt" w
FileWrite $R0 '!define Version "$R1"'
FileClose $R0

SectionEnd
Binary file added XBSlink Installer/winpcap_setup.exe
Binary file not shown.
Binary file added XBSlink Installer/xbslink_version_info.exe
Binary file not shown.

0 comments on commit 13e0d02

Please sign in to comment.