Merge branch 'master' of ssh://git.lan.raphnet.net/raphnet/gc_n64_usb-v3

This commit is contained in:
Raphael Assenat 2016-01-21 23:22:45 -05:00
commit ddb63cf8e9
3 changed files with 104 additions and 1 deletions

View File

@ -1,5 +1,6 @@
CC=gcc
LD=$(CC)
VERSION=1.0
UNAME := $(shell uname -s)
ifeq ($(UNAME), Linux)
@ -13,6 +14,7 @@ ifeq ($(shell uname -o), Msys)
COMPAT_OBJS=sleep.o memmem.o strcasestr.o app.o
PLATFORM_CFLAGS=-DWINDOWS
EXTRA_LDFLAGS=-mwindows # uncomment for console output
MAKENSIS=/c/Program\ Files\ \(x86\)/NSIS/makensis
endif
CFLAGS=-Wall -g `pkg-config $(HIDAPI_NAME) --cflags` --std=c99 $(PLATFORM_CFLAGS)
@ -76,6 +78,9 @@ install:
@echo "Install not done yet. Sorry"
release_windows:
cp *.exe release_windows
cp $(addsuffix .exe,$(PROGS)) release_windows
cp gui.xml release_windows
cp project_image.png release_windows
$(MAKENSIS) //DVERSION=$(VERSION) gcn64ctl.nsi
ls installers
@echo "Done"

97
tools/gcn64ctl.nsi Normal file
View File

@ -0,0 +1,97 @@
; example2.nsi
;
; This script is based on example1.nsi, but it remember the directory,
; has uninstall support and (optionally) installs start menu shortcuts.
;
; It will install example2.nsi into a directory that the user selects,
;--------------------------------
; The name of the installer
Name "gcn64ctl"
; The file to write
OutFile "installers/gcn64ctl-install-${VERSION}.exe"
; The default installation directory
InstallDir $PROGRAMFILES\gcn64ctl
; Registry key to check for directory (so if you install again, it will
; overwrite the old one automatically)
InstallDirRegKey HKLM "Software\gcn64ctl" "Install_Dir"
LicenseData ../LICENSE
; Request application privileges for Windows Vista
RequestExecutionLevel admin
;--------------------------------
!include "LogicLib.nsh"
!include "x64.nsh"
; Pages
Page license
Page components
Page directory
Page instfiles
UninstPage uninstConfirm
UninstPage instfiles
;--------------------------------
; The stuff to install
Section "gcn64ctl (required)"
SectionIn RO
; Set output path to the installation directory.
SetOutPath $INSTDIR
; Put file there
File /r "release_windows\*.*"
; Write the installation path into the registry
WriteRegStr HKLM SOFTWARE\gcn64ctl "Install_Dir" "$INSTDIR"
; Write the uninstall keys for Windows
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\gcn64ctl" "DisplayName" "gcn64ctl"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\gcn64ctl" "UninstallString" '"$INSTDIR\uninstall.exe"'
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\gcn64ctl" "NoModify" 1
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\gcn64ctl" "NoRepair" 1
WriteUninstaller "uninstall.exe"
SectionEnd
; Optional section (can be disabled by the user)
Section "Start Menu Shortcuts"
CreateDirectory "$SMPROGRAMS\raphnet-tech GC/N64 adapter manager"
CreateShortCut "$SMPROGRAMS\raphnet-tech GC/N64 adapter manager\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0
CreateShortCut "$SMPROGRAMS\raphnet-tech GC/N64 adapter manager\Commandi-line tools.lnk" "$SYSDIR\cmd.exe" '/K "cd /d $INSTDIR"' "$SYSDIR\cmd.exe" 0
CreateShortCut "$SMPROGRAMS\raphnet-tech GC/N64 adapter manager\GC/N64 adapter manager.lnk" "$INSTDIR\gcn64ctl_gui.exe" "" "$INSTDIR\gcn64ctl_gui.exe" 0
SectionEnd
;--------------------------------
; Uninstaller
Section "Uninstall"
; Remove registry keys
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\gcn64ctl"
DeleteRegKey HKLM SOFTWARE\gcn64ctl
; Remove files and uninstaller
Delete "$INSTDIR\*.*"
; Remove shortcuts, if any
Delete "$SMPROGRAMS\raphnet-tech GC/N64 adapter manager\*.*"
; Remove directories used
RMDir "$SMPROGRAMS\gcn64ctl"
RMDir "$INSTDIR"
SectionEnd

1
tools/installers/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
*.exe