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
|
.PHONY: debug
|
||||||
debug: $(DEPS_DBG)
|
debug: $(DEPS_DBG)
|
||||||
$(MAKE) -f GNUmakefile debug=yes
|
$(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
|
.PHONY: release
|
||||||
release: $(DEPS)
|
release: $(DEPS)
|
||||||
$(MAKE) -f GNUmakefile debug=no
|
$(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
|
.PHONY: release-deployment
|
||||||
release-deployment: $(DEPS)
|
release-deployment: $(DEPS)
|
||||||
@ -61,15 +63,18 @@ release-deployment: $(DEPS)
|
|||||||
.PHONY: release-snapshot
|
.PHONY: release-snapshot
|
||||||
release-snapshot: $(DEPS)
|
release-snapshot: $(DEPS)
|
||||||
$(MAKE) -f GNUmakefile SNAPSHOT_BUILD=yes VERSION_STRING=$(VER) debug=no
|
$(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
|
# Here are targets using the provided dependencies
|
||||||
.PHONY: deps-debug
|
.PHONY: deps-debug
|
||||||
deps-debug: $(DEPS_DBG)
|
deps-debug: $(DEPS_DBG)
|
||||||
$(MAKE) -f GNUmakefile debug=yes use_deps=yes
|
$(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
|
.PHONY: deps-release
|
||||||
deps-release: $(DEPS)
|
deps-release: $(DEPS)
|
||||||
$(MAKE) -f GNUmakefile debug=no use_deps=yes
|
$(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
|
.PHONY: deps-release-deployment
|
||||||
deps-release-deployment: $(DEPS)
|
deps-release-deployment: $(DEPS)
|
||||||
@ -78,6 +83,7 @@ deps-release-deployment: $(DEPS)
|
|||||||
.PHONY: deps-release-snapshot
|
.PHONY: deps-release-snapshot
|
||||||
deps-release-snapshot: $(DEPS)
|
deps-release-snapshot: $(DEPS)
|
||||||
$(MAKE) -f GNUmakefile SNAPSHOT_BUILD=yes VERSION_STRING=$(VER) debug=no use_deps=yes
|
$(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
|
.PHONY: LIBJS_DBG
|
||||||
LIBJS_DBG:
|
LIBJS_DBG:
|
||||||
@ -101,6 +107,7 @@ endif
|
|||||||
clean:
|
clean:
|
||||||
$(MAKE) -f GNUmakefile clean
|
$(MAKE) -f GNUmakefile clean
|
||||||
$(RM) -rf obj obj.dbg oolite.app
|
$(RM) -rf obj obj.dbg oolite.app
|
||||||
|
$(RM) -rf AddOns && cd DebugOXP && $(MAKE) clean && cd ..
|
||||||
|
|
||||||
.PHONY: distclean
|
.PHONY: distclean
|
||||||
distclean: clean
|
distclean: clean
|
||||||
@ -170,6 +177,7 @@ pkg-win: release ${NSISVERSIONS}
|
|||||||
|
|
||||||
.PHONY: pkg-win-deployment
|
.PHONY: pkg-win-deployment
|
||||||
pkg-win-deployment: release-deployment ${NSISVERSIONS}
|
pkg-win-deployment: release-deployment ${NSISVERSIONS}
|
||||||
|
@echo "!define DEPLOYMENT 1" >> ${NSISVERSIONS}
|
||||||
$(NSIS) installers/win32/OOlite.nsi
|
$(NSIS) installers/win32/OOlite.nsi
|
||||||
|
|
||||||
.PHONY: pkg-win-snapshot
|
.PHONY: pkg-win-snapshot
|
||||||
|
@ -2,6 +2,10 @@
|
|||||||
; adding of the changelog file in the non-snapshot distributions
|
; adding of the changelog file in the non-snapshot distributions
|
||||||
!include "LogicLib.nsh"
|
!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
|
; 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
|
; and it's too much work to try to dynamically edit this file
|
||||||
!include /NONFATAL "OoliteVersions.nsh"
|
!include /NONFATAL "OoliteVersions.nsh"
|
||||||
@ -32,6 +36,13 @@
|
|||||||
!define ADDCHANGELOG 0 ; Snapshot distributions do not need changelog
|
!define ADDCHANGELOG 0 ; Snapshot distributions do not need changelog
|
||||||
!endif
|
!endif
|
||||||
|
|
||||||
|
!ifndef DEPLOYMENT
|
||||||
|
!define DEBUGOXPINCLUDED 1
|
||||||
|
!else
|
||||||
|
!define DEBUGOXPINCLUDED 0
|
||||||
|
!endif
|
||||||
|
|
||||||
|
|
||||||
!include "MUI.nsh"
|
!include "MUI.nsh"
|
||||||
|
|
||||||
SetCompress auto
|
SetCompress auto
|
||||||
@ -77,6 +88,9 @@ VIProductVersion "${VER}"
|
|||||||
!define MUI_UNICON oolite.ico
|
!define MUI_UNICON oolite.ico
|
||||||
|
|
||||||
!insertmacro MUI_PAGE_DIRECTORY
|
!insertmacro MUI_PAGE_DIRECTORY
|
||||||
|
!ifndef DEPLOYMENT
|
||||||
|
!insertmacro MUI_PAGE_COMPONENTS
|
||||||
|
!endif
|
||||||
!insertmacro MUI_PAGE_INSTFILES
|
!insertmacro MUI_PAGE_INSTFILES
|
||||||
|
|
||||||
; NSIS first runs the finishpage_run macro, then finishpage_showreadme.
|
; NSIS first runs the finishpage_run macro, then finishpage_showreadme.
|
||||||
@ -97,6 +111,26 @@ VIProductVersion "${VER}"
|
|||||||
|
|
||||||
!insertmacro MUI_LANGUAGE "English"
|
!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
|
Function .onInit
|
||||||
; 1. Get the system drive
|
; 1. Get the system drive
|
||||||
StrCpy $R9 $WINDIR 2
|
StrCpy $R9 $WINDIR 2
|
||||||
@ -139,6 +173,20 @@ uninst:
|
|||||||
done:
|
done:
|
||||||
FunctionEnd
|
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
|
Function readMe
|
||||||
; don't do a thing until the user finishes reading the readme!
|
; don't do a thing until the user finishes reading the readme!
|
||||||
ExecWait "notepad.exe $INSTDIR\Oolite_Readme.txt"
|
ExecWait "notepad.exe $INSTDIR\Oolite_Readme.txt"
|
||||||
@ -160,7 +208,10 @@ Section ""
|
|||||||
SetOutPath $INSTDIR
|
SetOutPath $INSTDIR
|
||||||
|
|
||||||
; Package files
|
; Package files
|
||||||
|
; Inclusion of the DebugOXP files is handled in the ooDebugOXP section
|
||||||
|
${If} ${DEBUGOXPINCLUDED} == "0"
|
||||||
CreateDirectory "$INSTDIR\AddOns"
|
CreateDirectory "$INSTDIR\AddOns"
|
||||||
|
${EndIf}
|
||||||
CreateDirectory "$INSTDIR\oolite.app\Logs"
|
CreateDirectory "$INSTDIR\oolite.app\Logs"
|
||||||
CreateDirectory "$INSTDIR\oolite.app\oolite-saves"
|
CreateDirectory "$INSTDIR\oolite.app\oolite-saves"
|
||||||
CreateDirectory "$INSTDIR\oolite.app\oolite-saves\snapshots"
|
CreateDirectory "$INSTDIR\oolite.app\oolite-saves\snapshots"
|
||||||
@ -224,11 +275,16 @@ Delete "$INSTDIR\Oolite_Readme.txt"
|
|||||||
Delete "$INSTDIR\OoliteRS.pdf"
|
Delete "$INSTDIR\OoliteRS.pdf"
|
||||||
Delete "$INSTDIR\AdviceForNewCommanders.pdf"
|
Delete "$INSTDIR\AdviceForNewCommanders.pdf"
|
||||||
Delete "$INSTDIR\OoliteReadMe.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:
|
ChangelogExists:
|
||||||
Delete "$INSTDIR\CHANGELOG.TXT"
|
Delete "$INSTDIR\CHANGELOG.TXT"
|
||||||
|
|
||||||
ChangelogDoesNotExist:
|
ChangelogDoesNotExist:
|
||||||
; Nothing to do in this case, just continue
|
; Nothing to do in this case, just continue
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user