Skip to content
This repository has been archived by the owner on Dec 21, 2020. It is now read-only.

Commit

Permalink
Added installer, incremented version to 1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
ascendedguard committed Feb 20, 2012
1 parent 24114dd commit 914a4a6
Show file tree
Hide file tree
Showing 5 changed files with 206 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Expand Up @@ -7,4 +7,5 @@ starboard-remote/obj
*.ReSharper.user
*StyleCop.Cache
*.dotCover
*.user
*.user
*DotSettings
21 changes: 21 additions & 0 deletions Installer/License.txt
@@ -0,0 +1,21 @@
The MIT License

Copyright (c) 2012 William Eddins

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
180 changes: 180 additions & 0 deletions Installer/StarboardInstallScript.nsi
@@ -0,0 +1,180 @@
;Starboard Install Script
;Uses Modern UI in NSIS
;Written by Will Eddins
;Based off Modern UI Example code

;--------------------------------
;Include Modern UI

!include "MUI2.nsh"

;--------------------------------
;General

;Name and file
Name "Starboard"
OutFile "StarboardSetup.exe"
SetCompressor lzma

CRCCheck on

;Default installation folder
!ifdef D
InstallDir "${D}"
!else
InstallDir "$LOCALAPPDATA\Starboard\Application\"
!endif

;Get installation folder from registry if available
InstallDirRegKey HKCU "Software\Ascend\Starboard" "Install_Dir"

;Request application privileges for Windows Vista
RequestExecutionLevel admin

VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductName" "Starboard"
VIAddVersionKey /LANG=${LANG_ENGLISH} "CompanyName" "Will 'Ascend' Eddins"
VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalCopyright" "Copyright © 2012"
VIAddVersionKey /LANG=${LANG_ENGLISH} "Comments" "Installation package for Starboard"
VIProductVersion 1.5.0.0

BrandingText "Starboard Installation"

;--------------------------------
;Interface Configuration

!define MUI_HEADERIMAGE
; !define MUI_HEADERIMAGE_BITMAP "Veriacty Data Viewer.bmp" ; optional
!define MUI_ABORTWARNING

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

!insertmacro MUI_PAGE_LICENSE "License.txt"
;!insertmacro MUI_PAGE_COMPONENTS
;!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES

!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES

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

!insertmacro MUI_LANGUAGE "English"

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

Section "Prerequisites" Prerequisites

DetailPrint "Installing Prerequisite Files..."

SetOutPath "$TEMP"

; Check if .NET 4.0 Client Profile is already installed
ReadRegDWORD $0 HKLM "SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Client" Install
IntOp $8 $0 & 1

IntCmp $8 1 InstallDone

File .\dotNetFx40_Client_setup.exe
ExecWait '"$TEMP\dotNetFx40_Client_setup.exe" /showfinalerror /norestart' $0
Delete "$TEMP\dotNetFx40_Client_setup.exe"

IntCmp $0 1614 RequireReboot
IntCmp $0 1641 RequireReboot
IntCmp $0 3010 RequireReboot

Goto InstallDone

RequireReboot:
; .NET needs to reboot the system
SetRebootFlag true

InstallDone:
; Nothing left to do here.

SectionEnd

Section "Remove Previous Versions" RemovePreviousVersion

DetailPrint "Uninstall previous version..."

; We don't want any left-over files. There's nothing important from previous versions.
RMDir /r "$LOCALAPPDATA\Starboard\Application\"

SectionEnd

Section "Required Files" RequiredFiles
SectionIn 1 RO

DetailPrint "Installation Application Files..."

SetOutPath "$INSTDIR"

File "..\starboard-sc2\bin\Release\noconn.png"
File "..\starboard-sc2\bin\Release\nosignal.png"
File "..\starboard-sc2\bin\Release\notloaded.png"
File "..\starboard-sc2\bin\Release\starboard.xbs"
File "..\starboard-sc2\bin\Release\starboard-sc2.exe"

SetOutPath "$INSTDIR"

;Store installation folder
WriteRegStr HKCU "Software\Ascend\Starboard" "Install_Dir" $INSTDIR

;Create uninstaller
WriteUninstaller "$INSTDIR\Uninstall.exe"

;Add to Add/Remove Programs
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Starboard" "DisplayName" "Starboard"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Starboard" "InstallLocation" '"$INSTDIR"'
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Starboard" "UninstallString" '"$INSTDIR\Uninstall.exe"'
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Starboard" "Publisher" "Ascend"
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Starboard" "NoModify" 1
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Starboard" "NoRepair" 1

SectionEnd

Section "Desktop Shortcut" DesktopShort

CreateShortCut "$DESKTOP\Starboard.lnk" "$INSTDIR\starboard-sc2.exe"

SectionEnd

Section /o "Start Menu Shortcut" StartShort

CreateShortCut "$SMPROGRAMS\Starboard.lnk" "$INSTDIR\starboard-sc2.exe"

SectionEnd

;--------------------------------
;Descriptions

;Language strings
LangString DESC_RequiredFiles ${LANG_ENGLISH} "Files required to install Starboard. This step is required."
LangString DESC_DesktopShort ${LANG_ENGLISH} "Creates a shortcut on the desktop."
LangString DESC_StartShort ${LANG_ENGLISH} "Creates a shortcut in the start menu."
;Assign language strings to sections
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
!insertmacro MUI_DESCRIPTION_TEXT ${RequiredFiles} $(DESC_RequiredFiles)
!insertmacro MUI_DESCRIPTION_TEXT ${DesktopShort} $(DESC_DesktopShort)
!insertmacro MUI_DESCRIPTION_TEXT ${StartShort} $(DESC_StartShort)
!insertmacro MUI_FUNCTION_DESCRIPTION_END

;--------------------------------
;Uninstaller Section

Section "Uninstall"

RMDir /r "$LOCALAPPDATA\Starboard\Application\"

RMDir "$LOCALAPPDATA\Starboard\"

DeleteRegKey HKCU "Software\Ascend\Starboard"
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Starboard"

Delete "$DESKTOP\Starboard.lnk"
Delete "$SMPROGRAMS\Starboard.lnk"

SectionEnd
Binary file added Installer/dotNetFx40_Client_setup.exe
Binary file not shown.
6 changes: 3 additions & 3 deletions starboard-sc2/Properties/AssemblyInfo.cs
Expand Up @@ -19,12 +19,12 @@
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyCompany("Ascend")]
[assembly: AssemblyProduct("starboard-sc2")]
[assembly: AssemblyCopyright("Copyright © Starboard 2011")]
[assembly: AssemblyCopyright("Copyright © Starboard 2012")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]

[assembly: ThemeInfo(ResourceDictionaryLocation.None, ResourceDictionaryLocation.SourceAssembly)]

[assembly: AssemblyVersion("1.4.0.*")]
[assembly: AssemblyFileVersion("1.4.0.0")]
[assembly: AssemblyVersion("1.5.0.*")]
[assembly: AssemblyFileVersion("1.5.0.0")]

0 comments on commit 914a4a6

Please sign in to comment.