Makefile now builds also Basic-debug.oxp on Windows and Linux systems. The Windows installer has now an additional page which allows the user to select whether to install Basic-debug.oxp or not. This page is available only in the test-release and test-release-snapshot configurations.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4489 127b21dd-08f5-0310-b4b7-95ae10353056
This commit is contained in:
parent
f95311f6e4
commit
0aef9f29fd
8
Makefile
8
Makefile
@ -49,10 +49,12 @@ endif
|
||||
.PHONY: debug
|
||||
debug: $(DEPS_DBG)
|
||||
$(MAKE) -f GNUmakefile debug=yes
|
||||
cd DebugOXP && $(MAKE) && cd .. && mkdir -p AddOns && rm -rf AddOns/Basic-debug.oxp && mv -f DebugOXP/Basic-debug.oxp AddOns/
|
||||
|
||||
.PHONY: release
|
||||
release: $(DEPS)
|
||||
$(MAKE) -f GNUmakefile debug=no
|
||||
cd DebugOXP && $(MAKE) && cd .. && mkdir -p AddOns && rm -rf AddOns/Basic-debug.oxp && mv -f DebugOXP/Basic-debug.oxp AddOns/
|
||||
|
||||
.PHONY: release-deployment
|
||||
release-deployment: $(DEPS)
|
||||
@ -61,15 +63,18 @@ release-deployment: $(DEPS)
|
||||
.PHONY: release-snapshot
|
||||
release-snapshot: $(DEPS)
|
||||
$(MAKE) -f GNUmakefile SNAPSHOT_BUILD=yes VERSION_STRING=$(VER) debug=no
|
||||
cd DebugOXP && $(MAKE) && cd .. && mkdir -p AddOns && rm -rf AddOns/Basic-debug.oxp && mv -f DebugOXP/Basic-debug.oxp AddOns/
|
||||
|
||||
# Here are targets using the provided dependencies
|
||||
.PHONY: deps-debug
|
||||
deps-debug: $(DEPS_DBG)
|
||||
$(MAKE) -f GNUmakefile debug=yes use_deps=yes
|
||||
cd DebugOXP && $(MAKE) && cd .. && mkdir -p AddOns && rm -rf AddOns/Basic-debug.oxp && mv -f DebugOXP/Basic-debug.oxp AddOns/
|
||||
|
||||
.PHONY: deps-release
|
||||
deps-release: $(DEPS)
|
||||
$(MAKE) -f GNUmakefile debug=no use_deps=yes
|
||||
cd DebugOXP && $(MAKE) && cd .. && mkdir -p AddOns && rm -rf AddOns/Basic-debug.oxp && mv -f DebugOXP/Basic-debug.oxp AddOns/
|
||||
|
||||
.PHONY: deps-release-deployment
|
||||
deps-release-deployment: $(DEPS)
|
||||
@ -78,6 +83,7 @@ deps-release-deployment: $(DEPS)
|
||||
.PHONY: deps-release-snapshot
|
||||
deps-release-snapshot: $(DEPS)
|
||||
$(MAKE) -f GNUmakefile SNAPSHOT_BUILD=yes VERSION_STRING=$(VER) debug=no use_deps=yes
|
||||
cd DebugOXP && $(MAKE) && cd .. && mkdir -p AddOns && rm -rf AddOns/Basic-debug.oxp && mv -f DebugOXP/Basic-debug.oxp AddOns/
|
||||
|
||||
.PHONY: LIBJS_DBG
|
||||
LIBJS_DBG:
|
||||
@ -101,6 +107,7 @@ endif
|
||||
clean:
|
||||
$(MAKE) -f GNUmakefile clean
|
||||
$(RM) -rf obj obj.dbg oolite.app
|
||||
$(RM) -rf AddOns && cd DebugOXP && $(MAKE) clean && cd ..
|
||||
|
||||
.PHONY: distclean
|
||||
distclean: clean
|
||||
@ -170,6 +177,7 @@ pkg-win: release ${NSISVERSIONS}
|
||||
|
||||
.PHONY: pkg-win-deployment
|
||||
pkg-win-deployment: release-deployment ${NSISVERSIONS}
|
||||
@echo "!define DEPLOYMENT 1" >> ${NSISVERSIONS}
|
||||
$(NSIS) installers/win32/OOlite.nsi
|
||||
|
||||
.PHONY: pkg-win-snapshot
|
||||
|
@ -2,6 +2,10 @@
|
||||
; adding of the changelog file in the non-snapshot distributions
|
||||
!include "LogicLib.nsh"
|
||||
|
||||
; Include the Sections library, required for being able to provide the
|
||||
; Basic-debug.OXP as an optional installation component
|
||||
!include "Sections.nsh"
|
||||
|
||||
; Need to include the versions as we can't pass them in as parameters
|
||||
; and it's too much work to try to dynamically edit this file
|
||||
!include /NONFATAL "OoliteVersions.nsh"
|
||||
@ -32,6 +36,13 @@
|
||||
!define ADDCHANGELOG 0 ; Snapshot distributions do not need changelog
|
||||
!endif
|
||||
|
||||
!ifndef DEPLOYMENT
|
||||
!define DEBUGOXPINCLUDED 1
|
||||
!else
|
||||
!define DEBUGOXPINCLUDED 0
|
||||
!endif
|
||||
|
||||
|
||||
!include "MUI.nsh"
|
||||
|
||||
SetCompress auto
|
||||
@ -77,6 +88,9 @@ VIProductVersion "${VER}"
|
||||
!define MUI_UNICON oolite.ico
|
||||
|
||||
!insertmacro MUI_PAGE_DIRECTORY
|
||||
!ifndef DEPLOYMENT
|
||||
!insertmacro MUI_PAGE_COMPONENTS
|
||||
!endif
|
||||
!insertmacro MUI_PAGE_INSTFILES
|
||||
|
||||
; NSIS first runs the finishpage_run macro, then finishpage_showreadme.
|
||||
@ -97,6 +111,26 @@ VIProductVersion "${VER}"
|
||||
|
||||
!insertmacro MUI_LANGUAGE "English"
|
||||
|
||||
!ifndef DEPLOYMENT
|
||||
; Create the main game and Debug OXP sections
|
||||
Section "Oolite Game" ooGame
|
||||
SectionIn RO ; The game itself cannot be unselected
|
||||
SectionEnd
|
||||
|
||||
Section "Basic-debug.OXP" ooDebugOXP
|
||||
; Do not use any of the Debug OXP files when we are building Deployment
|
||||
SetOutPath $INSTDIR
|
||||
File /r "..\..\AddOns"
|
||||
SectionEnd
|
||||
|
||||
; Below are the descriptions of the two component sections
|
||||
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${ooGame} "The core game files (required)."
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${ooDebugOXP} "Allows Oolite to communicate with the Debug Console. If you already have a Basic-debug.OXP in your \
|
||||
destination AddOns folder, it will be overwritten."
|
||||
!insertmacro MUI_FUNCTION_DESCRIPTION_END
|
||||
!endif
|
||||
|
||||
Function .onInit
|
||||
; 1. Get the system drive
|
||||
StrCpy $R9 $WINDIR 2
|
||||
@ -139,6 +173,20 @@ uninst:
|
||||
done:
|
||||
FunctionEnd
|
||||
|
||||
!ifndef DEPLOYMENT
|
||||
Function .onSelChange
|
||||
${If} ${SectionIsSelected} ${ooDebugOXP}
|
||||
!insertmacro SelectSection ${ooDebugOXP}
|
||||
!undef DEBUGOXPINCLUDED
|
||||
!define DEBUGOXPINCLUDED 1
|
||||
${Else}
|
||||
!insertmacro UnselectSection ${ooDebugOXP}
|
||||
!undef DEBUGOXPINCLUDED
|
||||
!define DEBUGOXPINCLUDED 0
|
||||
${EndIf}
|
||||
FunctionEnd
|
||||
!endif
|
||||
|
||||
Function readMe
|
||||
; don't do a thing until the user finishes reading the readme!
|
||||
ExecWait "notepad.exe $INSTDIR\Oolite_Readme.txt"
|
||||
@ -160,7 +208,10 @@ Section ""
|
||||
SetOutPath $INSTDIR
|
||||
|
||||
; Package files
|
||||
CreateDirectory "$INSTDIR\AddOns"
|
||||
; Inclusion of the DebugOXP files is handled in the ooDebugOXP section
|
||||
${If} ${DEBUGOXPINCLUDED} == "0"
|
||||
CreateDirectory "$INSTDIR\AddOns"
|
||||
${EndIf}
|
||||
CreateDirectory "$INSTDIR\oolite.app\Logs"
|
||||
CreateDirectory "$INSTDIR\oolite.app\oolite-saves"
|
||||
CreateDirectory "$INSTDIR\oolite.app\oolite-saves\snapshots"
|
||||
@ -224,11 +275,16 @@ Delete "$INSTDIR\Oolite_Readme.txt"
|
||||
Delete "$INSTDIR\OoliteRS.pdf"
|
||||
Delete "$INSTDIR\AdviceForNewCommanders.pdf"
|
||||
Delete "$INSTDIR\OoliteReadMe.pdf"
|
||||
IfFileExists "$INSTDIR\CHANGELOG.TXT" ChangelogExists ChangelogDoesNotExist
|
||||
|
||||
IfFileExists "$INSTDIR\AddOns\Basic-debug.oxp\*.*" DebugOXPRemove DebugOXPIgnore
|
||||
DebugOXPRemove:
|
||||
RMDIR /r "$INSTDIR\AddOns\Basic-debug.oxp"
|
||||
DebugOXPIgnore:
|
||||
; Nothing to do in this case, just continue
|
||||
|
||||
IfFileExists "$INSTDIR\CHANGELOG.TXT" ChangelogExists ChangelogDoesNotExist
|
||||
ChangelogExists:
|
||||
Delete "$INSTDIR\CHANGELOG.TXT"
|
||||
|
||||
ChangelogDoesNotExist:
|
||||
; Nothing to do in this case, just continue
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user