From db855e8cf57e96bee0ee9b3254654e14dddfd4d1 Mon Sep 17 00:00:00 2001 From: wangqr Date: Mon, 9 Mar 2020 19:47:07 -0400 Subject: [PATCH 1/6] Fix Travis warning --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index abe9bda34..af96b9bcd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,4 @@ -sudo: required +os: linux dist: bionic language: cpp From 460cf9a9fdd7eb4b791450db62a5f207ed36f36d Mon Sep 17 00:00:00 2001 From: wangqr Date: Mon, 9 Mar 2020 19:50:56 -0400 Subject: [PATCH 2/6] Drop support for macOS < 10.10 They are less than 2.4% in all macOS and 0.2% in all OS --- Makefile.target | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile.target b/Makefile.target index 003f21935..8db12b106 100644 --- a/Makefile.target +++ b/Makefile.target @@ -5,9 +5,9 @@ COMMANDS := all install clean distclean test depclean osx-bundle osx-dmg test-au # Would be nice to move this somewhere else (Makefile.inc?) ifeq (yes, $(BUILD_DARWIN)) -CFLAGS += -mmacosx-version-min=10.8 -gfull -DLUAJIT_ENABLE_GC64 -CXXFLAGS += -mmacosx-version-min=10.8 -gfull -DLUAJIT_ENABLE_GC64 -LDFLAGS += -mmacosx-version-min=10.8 -Wl,-dead_strip +CFLAGS += -mmacosx-version-min=10.10 -gfull -DLUAJIT_ENABLE_GC64 +CXXFLAGS += -mmacosx-version-min=10.10 -gfull -DLUAJIT_ENABLE_GC64 +LDFLAGS += -mmacosx-version-min=10.10 -Wl,-dead_strip LIB_SHARED_LINK = $(LIB_SHARED_LINK_OSX) endif From 3096376ee6a1dc14ff9a0aad3eb40465af1bd2a3 Mon Sep 17 00:00:00 2001 From: wangqr Date: Mon, 9 Mar 2020 19:56:24 -0400 Subject: [PATCH 3/6] Revert special naming for LuaJIT shared object This was a hack on macOS when LuaJIT is dynamic only, and no longer needed as we are also using static LuaJIT on macOS now --- vendor/luajit/src/Makefile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/vendor/luajit/src/Makefile b/vendor/luajit/src/Makefile index 9965ef2f6..c29c0b5a1 100644 --- a/vendor/luajit/src/Makefile +++ b/vendor/luajit/src/Makefile @@ -215,8 +215,7 @@ TARGET_STRIP= $(CROSS)strip #TARGET_LIBPATH= $(or $(PREFIX),/usr/local)/$(or $(MULTILIB),lib) TARGET_LIBPATH= $(CURDIR) TARGET_SONAME= libluajit-$(ABIVER).so.$(MAJVER) -#TARGET_DYLIBNAME= libluajit-$(ABIVER).$(MAJVER).dylib -TARGET_DYLIBNAME= libluajit-aegisub.so +TARGET_DYLIBNAME= libluajit-$(ABIVER).$(MAJVER).dylib TARGET_DYLIBPATH= $(TARGET_LIBPATH)/$(TARGET_DYLIBNAME) TARGET_DLLNAME= lua$(NODOTABIVER).dll TARGET_XSHLDFLAGS= -shared -fPIC -Wl,-soname,$(TARGET_SONAME) @@ -503,7 +502,7 @@ LIB_VMDEFP= $(LIB_VMDEF) LUAJIT_O= luajit.o LUAJIT_A= libluajit.a -LUAJIT_SO= libluajit-aegisub.so +LUAJIT_SO= libluajit.so LUAJIT_T= luajit ALL_T= $(LUAJIT_T) $(LUAJIT_A) $(LUAJIT_SO) $(HOST_T) From 7cad0e06f9ff6e04f5ffa9e468c4bdae6b7eb629 Mon Sep 17 00:00:00 2001 From: wangqr Date: Mon, 9 Mar 2020 20:01:24 -0400 Subject: [PATCH 4/6] Remove redundant email notification --- .travis.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index af96b9bcd..a8ed231de 100644 --- a/.travis.yml +++ b/.travis.yml @@ -76,9 +76,3 @@ script: make -j2 || travis_terminate 1; make test || travis_terminate 1; fi - -notifications: - email: - - on_success: change - - on_failure: change - From b6b21930fa2b3592ba41000f6713dfd8db632e29 Mon Sep 17 00:00:00 2001 From: wangqr Date: Mon, 9 Mar 2020 20:17:03 -0400 Subject: [PATCH 5/6] Use homebrew addon instead of manually executing --- .travis.yml | 17 +++++++++++++++++ .travis/install.sh | 6 ++---- README.md | 4 ++-- 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index a8ed231de..983bc82d3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -33,6 +33,23 @@ addons: - libgtest-dev - gcc-9 - g++-9 + homebrew: + packages: + - autoconf + - boost + - ffmpeg + - ffms2 + - fftw + - freetype + - fribidi + - gettext + - icu4c + - libass + - lua + - luarocks + - m4 + - wxmac + update: true env: - '' diff --git a/.travis/install.sh b/.travis/install.sh index 405a139ca..8334a4d27 100755 --- a/.travis/install.sh +++ b/.travis/install.sh @@ -2,12 +2,10 @@ set -e -if [ $TRAVIS_OS_NAME = 'osx' ]; then - brew install autoconf ffmpeg freetype gettext ffms2 fftw fribidi libass m4 icu4c boost wxmac lua luarocks -else +if [ "$TRAVIS_OS_NAME" = 'linux' ]; then # Remove the CMake provided by travis sudo rm -rf /usr/local/cmake* - if [ "$BUILD_SUIT" = "autotools" ]; then + if [ "$BUILD_SUIT" = 'autotools' ]; then sudo pip install -U cpp-coveralls; git submodule --quiet init; git submodule --quiet update vendor/googletest; diff --git a/README.md b/README.md index 136c159ad..183703f44 100644 --- a/README.md +++ b/README.md @@ -36,8 +36,8 @@ and optional dependencies: You can use the package manager provided by your distro to install these dependencies. Package name varies by distro. Some useful references are: * For ArchLinux, refer to [AUR](https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=aegisub-git). -* For Ubuntu, refer to [Travis](https://github.com/wangqr/Aegisub/blob/dev/.travis.yml#L14-L35). -* For macOS, refer to [Travis](https://github.com/wangqr/Aegisub/blob/dev/.travis/install.sh#L6). In addition to the packages listed in the `brew install` line, you also need `automake` and `pkg-config`. They are not listed there because Travis preinstalled them. For some packages, you need to either [set environment variables during build](https://github.com/wangqr/Aegisub/blob/dev/.travis.yml#L54-L58) or [force link them](https://github.com/Aegisub/Aegisub/#os-x). +* For Ubuntu, refer to [Travis](.travis.yml#L14-L35). +* For macOS, refer to [Travis](.travis.yml#L38-L51). In addition to the packages listed in the `brew install` line, you also need `automake` and `pkg-config`. They are not listed there because Travis preinstalled them. For some packages, you need to either [set environment variables during build](.travis.yml#L71-L75) or [force link them](https://github.com/Aegisub/Aegisub/#os-x). After installing the dependencies, you can clone and build Aegisub with: ```sh From 64d0f86d8dc2e477cf0dcea23467d2b1fffcae38 Mon Sep 17 00:00:00 2001 From: wangqr Date: Wed, 11 Mar 2020 17:07:33 -0400 Subject: [PATCH 6/6] Add git_version.h generation to CMake --- .travis.yml | 1 - CMakeLists.txt | 17 +++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 983bc82d3..1ccf3e2e3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -86,7 +86,6 @@ script: make test || travis_terminate 1; coveralls --exclude vendor --exclude src --exclude build --exclude tools --exclude libaegisub/windows > /dev/null; else - ./build/version.sh .; mkdir build-dir; cd build-dir; cmake -DCMAKE_CXX_FLAGS='-Wall -Wextra -Wno-unused-parameter -pedantic' -DCMAKE_C_FLAGS='-Wall' -DWITH_STARTUPLOG=ON -DWITH_TEST=ON ..; diff --git a/CMakeLists.txt b/CMakeLists.txt index 8e5e7c93f..8459bb1b9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -470,6 +470,23 @@ add_executable(Aegisub WIN32 target_link_libraries(Aegisub ${CMAKE_DL_LIBS} libaegisub luabins luajit resrc csri) target_compile_definitions(Aegisub PRIVATE CMAKE_BUILD) +if(WIN32) + if(NOT EXISTS "${PROJECT_SOURCE_DIR}/build/git_version.h") + message(SEND_ERROR + "build/git_version.h not found.\n" + "Automatic generation of build/git_version.h is not supported on Windows. Please run\n" + " build/version.sh .\n" + "at the source directory from an environment with bash and git. You may use WSL, msys (git bash), or Cygwin." + ) + endif() +else() + add_custom_target(git_version build/version.sh . + BYPRODUCTS "${PROJECT_SOURCE_DIR}/build/git_version.h" "${PROJECT_SOURCE_DIR}/build/git_version.xml" + WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}" + ) + add_dependencies(Aegisub git_version) +endif() + set(WITH_BUILD_CREDIT OFF CACHE BOOL "Whether show build credit in about dialog") if(WITH_BUILD_CREDIT) set(BUILD_CREDIT "" CACHE STRING "Build credit shown in about dialog")