mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r14115) -Codechange: add make bundle_exe which makes a windows installer and unify the files that go into the bundles (zip/gz/bz2 etc) and installer.
This commit is contained in:
parent
ff749ab09d
commit
2c09760378
|
@ -80,7 +80,7 @@ ifeq ($(shell if test -n "`ls -l \"$(BIN_DIR)/scenario/heightmaps/\"* 2>/dev/nul
|
|||
$(Q)cp "$(BIN_DIR)/scenario/heightmaps/"* "$(BUNDLE_DIR)/scenario/heightmap/"
|
||||
endif
|
||||
ifeq ($(TTD), openttd.exe)
|
||||
$(Q)unix2dos "$(BUNDLE_DIR)/docs/"* "$(BUNDLE_DIR)/readme.txt" "$(BUNDLE_DIR)/COPYING"
|
||||
$(Q)unix2dos "$(BUNDLE_DIR)/docs/"* "$(BUNDLE_DIR)/readme.txt" "$(BUNDLE_DIR)/COPYING" "$(BUNDLE_DIR)/changelog.txt" "$(BUNDLE_DIR)/known-bugs.txt"
|
||||
endif
|
||||
|
||||
### Packing the current bundle into several compressed file formats ###
|
||||
|
@ -123,6 +123,12 @@ bundle_dmg: bundle
|
|||
$(Q)hdiutil create -ov -format UDZO -srcfolder "$(BUNDLES_DIR)/OpenTTD $(REV)" "$(BUNDLES_DIR)/$(BUNDLE_NAME).dmg"
|
||||
$(Q)rm -fr "$(BUNDLES_DIR)/OpenTTD $(REV)"
|
||||
|
||||
bundle_exe: all
|
||||
@echo '[BUNDLE] Creating $(BUNDLE_NAME).exe'
|
||||
$(Q)unix2dos "$(ROOT_DIR)/docs/"* "$(ROOT_DIR)/readme.txt" "$(ROOT_DIR)/COPYING" "$(ROOT_DIR)/changelog.txt" "$(ROOT_DIR)/known-bugs.txt"
|
||||
$(Q)cd $(ROOT_DIR)/os/win32/installer && makensis.exe //DVERSION_INCLUDE=version_$(PLATFORM).txt install.nsi
|
||||
$(Q)mv $(ROOT_DIR)/os/win32/installer/*$(PLATFORM).exe "$(BUNDLES_DIR)/$(BUNDLE_NAME).exe"
|
||||
|
||||
ifdef OSXAPP
|
||||
install:
|
||||
@echo '[INSTALL] Cannot install the OSX Application Bundle'
|
||||
|
|
|
@ -20,8 +20,9 @@ SRC_DIR = "$(ROOT_DIR)/src"
|
|||
BUNDLE_DIR = "$(ROOT_DIR)/bundle"
|
||||
BUNDLES_DIR = "$(ROOT_DIR)/bundles"
|
||||
TTD = "openttd.exe"
|
||||
TARGET := $(shell echo $(PLATFORM) | sed "s/win64/x64/;s/win32/Win32/")
|
||||
|
||||
all:
|
||||
cp objs/$(PLATFORM)/Release/$(TTD) $(BIN_DIR)/$(TTD)
|
||||
$(Q)cp objs/$(TARGET)/Release/$(TTD) $(BIN_DIR)/$(TTD)
|
||||
|
||||
include Makefile.bundle
|
||||
|
|
|
@ -106,7 +106,6 @@ Section "!OpenTTD" Section1
|
|||
; Copy language files
|
||||
SetOutPath "$INSTDIR\lang\"
|
||||
File ${PATH_ROOT}bin\lang\*.lng
|
||||
File ${PATH_ROOT}src\lang\english.txt
|
||||
|
||||
; Copy data files
|
||||
SetOutPath "$INSTDIR\data\"
|
||||
|
@ -131,7 +130,6 @@ Section "!OpenTTD" Section1
|
|||
|
||||
; Copy executable
|
||||
File /oname=openttd.exe ${BINARY_DIR}\openttd.exe
|
||||
File ${PATH_ROOT}objs\strgen\strgen.exe
|
||||
|
||||
|
||||
; Delete old files from the main dir. they are now placed in data/ and lang/
|
||||
|
@ -248,7 +246,6 @@ Section "Uninstall"
|
|||
Delete "$INSTDIR\readme.txt"
|
||||
Delete "$INSTDIR\known-bugs.txt"
|
||||
Delete "$INSTDIR\openttd.exe"
|
||||
Delete "$INSTDIR\strgen.exe"
|
||||
Delete "$INSTDIR\COPYING"
|
||||
Delete "$INSTDIR\INSTALL.LOG"
|
||||
Delete "$INSTDIR\crash.log"
|
||||
|
@ -293,7 +290,6 @@ Section "Uninstall"
|
|||
|
||||
; Language files
|
||||
Delete "$INSTDIR\lang\*.lng"
|
||||
Delete "$INSTDIR\lang\english.txt"
|
||||
|
||||
; Remove remaining directories
|
||||
RMDir "$SMPROGRAMS\$SHORTCUTS\Extras\"
|
||||
|
|
Loading…
Reference in New Issue