From 4391603f371cc2ee772653e35e70fdd3e11c5b66 Mon Sep 17 00:00:00 2001 From: Thomas Bernard Date: Sun, 2 Dec 2018 11:02:37 +0100 Subject: [PATCH] convert .txt in Win32 distribution files to CRLF eol --- .gitlab-ci.yml | 2 +- .travis.yml | 1 + install/Makefile | 6 ++++++ src/Makefile | 9 ++++++++- 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4b1ee6ce..b8273991 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -19,7 +19,7 @@ job_linux: job_win32: stage: build before_script: - - apt-get update -qq && apt-get install -y -qq zip + - apt-get update -qq && apt-get install -y -qq zip dos2unix - apt-get install -y -qq gcc-mingw-w64-i686 g++-mingw-w64-i686 mingw-w64-tools nsis script: - "WIN32CROSS=1 make 3rdparty" diff --git a/.travis.yml b/.travis.yml index 177ea62e..bce1ccd3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,6 +18,7 @@ addons: - libsdl2-ttf-dev - liblua5.2-dev - nsis + - dos2unix sudo: false diff --git a/install/Makefile b/install/Makefile index 4f59a5f5..d223fbaf 100644 --- a/install/Makefile +++ b/install/Makefile @@ -16,7 +16,13 @@ INSTALLER = grafx2-$(API)-$(VERSION).win32.exe all: $(INSTALLER) $(INSTALLER): WinInstaller.nsi $(SOURCES) $(VERSIONTAG) +ifdef WIN32CROSS + for f in ../doc/*.txt; do unix2dos $$f ; done +endif $(SED) -e 's/VERSION .*/VERSION $(VERSION)/' -e 's/API .*/API $(API)/' $< | $(MAKENSIS) - +ifdef WIN32CROSS + for f in ../doc/*.txt; do dos2unix $$f ; done +endif $(SOURCES): $(wildcard ../src/*.c) $(wildcard ../src/*.h) cd ../src && WIN32CROSS=1 $(MAKE) $(SOURCES) diff --git a/src/Makefile b/src/Makefile index dc8e3b3f..934a73f3 100644 --- a/src/Makefile +++ b/src/Makefile @@ -868,7 +868,14 @@ ziprelease: release $(SRCARCH) cd .. && $(ZIP) $(ZIPOPT) "grafx2-$(API)-$(VERSIONTAG)$(TTFLABEL)-$(PLATFORM).$(ZIP)" \ $(BIN:../%=%) share/grafx2/gfx2def.ini $(SCRIPT_FILES:../%=%) $(SKIN_FILES:../%=%) \ share/grafx2/gfx2.gif share/icons/grafx2.svg \ - $(DOC_FILES:../%=%) $(FONT_FILES:../%=%) $(SRCARCH:../%=%) $(PLATFORMFILES:../%=%) + $(FONT_FILES:../%=%) $(SRCARCH:../%=%) $(PLATFORMFILES:../%=%) +ifdef WIN32CROSS + cd .. && $(ZIP) $(ZIPOPT) --to-crlf "grafx2-$(API)-$(VERSIONTAG)$(TTFLABEL)-$(PLATFORM).$(ZIP)" \ + $(DOC_FILES:../%=%) +else + cd .. && $(ZIP) $(ZIPOPT) "grafx2-$(API)-$(VERSIONTAG)$(TTFLABEL)-$(PLATFORM).$(ZIP)" \ + $(DOC_FILES:../%=%) +endif ifeq ($(PLATFORM),Darwin) $(ZIP) $(ZIPOPT) -r ../Grafx2.app-$(shell uname -p)-$(API)-$(VERSIONTAG).zip Grafx2.app cd .. && $(ZIP) $(ZIPOPT) Grafx2.app-$(shell uname -p)-$(API)-$(VERSIONTAG).zip \