Skip to content

Commit

Permalink
Merge branch 'dev-small-changes' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
wangqr committed Mar 21, 2020
2 parents ef99ce1 + 64d0f86 commit 4b096e6
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 19 deletions.
26 changes: 18 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
sudo: required
os: linux
dist: bionic
language: cpp

Expand Down Expand Up @@ -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:
- ''
Expand Down Expand Up @@ -69,16 +86,9 @@ 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 ..;
make -j2 || travis_terminate 1;
make test || travis_terminate 1;
fi

notifications:
email:
- on_success: change
- on_failure: change

6 changes: 2 additions & 4 deletions .travis/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
17 changes: 17 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
6 changes: 3 additions & 3 deletions Makefile.target
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ 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 Ubuntu, refer to [Travis](.travis.yml#L14-L35).
* For macOS, see [Special notice for macOS](https://github.com/wangqr/Aegisub/wiki/Special-notice-for-macOS) on project Wiki.

After installing the dependencies, you can clone and build Aegisub with:
Expand Down
5 changes: 2 additions & 3 deletions vendor/luajit/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 4b096e6

Please sign in to comment.