mirror of
https://github.com/Dark98/threeSD.git
synced 2026-07-03 00:38:58 +00:00
Add experimental support for linux and macos releases
This commit is contained in:
+24
@@ -6,6 +6,30 @@ matrix:
|
|||||||
sudo: required
|
sudo: required
|
||||||
dist: trusty
|
dist: trusty
|
||||||
services: docker
|
services: docker
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
packages:
|
||||||
|
- p7zip-full
|
||||||
install: "./.travis/linux/deps.sh"
|
install: "./.travis/linux/deps.sh"
|
||||||
script: "./.travis/linux/build.sh"
|
script: "./.travis/linux/build.sh"
|
||||||
|
after_success: "./.travis/linux/upload.sh"
|
||||||
cache: ccache
|
cache: ccache
|
||||||
|
- os: osx
|
||||||
|
env: NAME="macos build"
|
||||||
|
sudo: false
|
||||||
|
osx_image: xcode10.2
|
||||||
|
install: "./.travis/macos/deps.sh"
|
||||||
|
script: "./.travis/macos/build.sh"
|
||||||
|
after_success: "./.travis/macos/upload.sh"
|
||||||
|
cache: ccache
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
provider: releases
|
||||||
|
api_key:
|
||||||
|
secure: m5ZWgdaBW7fCjP7eGh15E3uP0xkufPxi1MFifEAmjFjUm54d0yUhghoUxp/o9LUMrpRfveHyieJJzyBzCxr7ZhTs//4bPuQDpK7d1LMGobCvpnftwWRNG/cDBn57pc/Ixn9M0qPP8GAhTXg9hrmaUllRUOhUTxxlBB6Ew7ecEVMcqnZyYnTQTeaoYgiZENICpM43v9Pl7ew38qrEO4x6B3CqwGnYUEUuKxS/jRQBlbFQ7rdVj14AsJjDzI8WWuZfJwy21NtFqCnRnlObVY/YSEgSJgsD9JT6RSa7Q9AAAghVqFAv+kSf7vbpIdOIEWx4RSWAD1qFnPUsU+6/0QATbbt6s2McVRBBowQhwwg1nhWVkFDADV0fC9NgosVXsInqmk8ISHEvGa0tmG5gTnFVTcLtKlGJ2tsHMSQiOwqVaRxfui7NdoHIRhryP9DMlEGHMlsk82iSyM1cJXTeRewbXpIWPMY0yEG5VErC+v8uvfyt1LFqMMZvaGPjhrvup1zd0h3t699grAv+mFyq+RHYOMwn1SPLNdFt6LnUeam55ibBSijkhqGYWzY6LErdNmVNk81wUY9HksP1j0oKj9Xe3aLSclbsXv7UE0PruV2N762dykBloQYHl2s4zyt/wb/3tdF6uOhShwD5ZDs9Z73Op8q9wWFwE8v/4uZpCP/rTnw=
|
||||||
|
file_glob: true
|
||||||
|
file: "artifacts/*"
|
||||||
|
skip_cleanup: true
|
||||||
|
draft: true
|
||||||
|
on:
|
||||||
|
repo: zhaowenlan1779/threeSD
|
||||||
|
|||||||
Executable
+24
@@ -0,0 +1,24 @@
|
|||||||
|
#!/bin/bash -ex
|
||||||
|
|
||||||
|
# Copy documentation
|
||||||
|
cp license.txt "$REV_NAME"
|
||||||
|
cp README.md "$REV_NAME"
|
||||||
|
|
||||||
|
cp dist/threeSDumper.gm9 "$REV_NAME/dist"
|
||||||
|
|
||||||
|
tar $COMPRESSION_FLAGS "$ARCHIVE_NAME" "$REV_NAME"
|
||||||
|
|
||||||
|
# Find out what release we are building
|
||||||
|
if [ -z $TRAVIS_TAG ]; then
|
||||||
|
RELEASE_NAME=head
|
||||||
|
else
|
||||||
|
RELEASE_NAME=$(echo $TRAVIS_TAG | cut -d- -f1)
|
||||||
|
fi
|
||||||
|
|
||||||
|
mv "$REV_NAME" $RELEASE_NAME
|
||||||
|
|
||||||
|
7z a "$REV_NAME.7z" $RELEASE_NAME
|
||||||
|
|
||||||
|
# move the compiled archive into the artifacts directory to be uploaded by travis releases
|
||||||
|
mv "$ARCHIVE_NAME" artifacts/
|
||||||
|
mv "$REV_NAME.7z" artifacts/
|
||||||
Executable
+6
@@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/bash -ex
|
||||||
|
|
||||||
|
GITDATE="`git show -s --date=short --format='%ad' | sed 's/-//g'`"
|
||||||
|
GITREV="`git show -s --format='%h'`"
|
||||||
|
|
||||||
|
mkdir -p artifacts
|
||||||
@@ -5,5 +5,3 @@ cd /threeSD
|
|||||||
mkdir build && cd build
|
mkdir build && cd build
|
||||||
cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=/usr/lib/ccache/gcc -DCMAKE_CXX_COMPILER=/usr/lib/ccache/g++
|
cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=/usr/lib/ccache/gcc -DCMAKE_CXX_COMPILER=/usr/lib/ccache/g++
|
||||||
ninja
|
ninja
|
||||||
|
|
||||||
ctest -VV -C Release
|
|
||||||
|
|||||||
Executable
+15
@@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/bash -ex
|
||||||
|
|
||||||
|
. .travis/common/pre-upload.sh
|
||||||
|
|
||||||
|
REV_NAME="threeSD-linux-${GITDATE}-${GITREV}"
|
||||||
|
ARCHIVE_NAME="${REV_NAME}.tar.xz"
|
||||||
|
COMPRESSION_FLAGS="-cJvf"
|
||||||
|
|
||||||
|
mkdir "$REV_NAME"
|
||||||
|
|
||||||
|
cp build/bin/threeSD "$REV_NAME"
|
||||||
|
|
||||||
|
mkdir "$REV_NAME/dist"
|
||||||
|
|
||||||
|
. .travis/common/post-upload.sh
|
||||||
Executable
+11
@@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/bash -ex
|
||||||
|
|
||||||
|
set -o pipefail
|
||||||
|
|
||||||
|
export MACOSX_DEPLOYMENT_TARGET=10.13
|
||||||
|
export Qt5_DIR=$(brew --prefix)/opt/qt5
|
||||||
|
export PATH="/usr/local/opt/ccache/libexec:$PATH"
|
||||||
|
|
||||||
|
mkdir build && cd build
|
||||||
|
cmake .. -DCMAKE_BUILD_TYPE=Release
|
||||||
|
make -j4
|
||||||
Executable
+6
@@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/sh -ex
|
||||||
|
|
||||||
|
brew update
|
||||||
|
brew unlink python@2
|
||||||
|
brew install qt5 sdl2 p7zip ccache
|
||||||
|
pip3 install macpack
|
||||||
Executable
+24
@@ -0,0 +1,24 @@
|
|||||||
|
#!/bin/bash -ex
|
||||||
|
|
||||||
|
. .travis/common/pre-upload.sh
|
||||||
|
|
||||||
|
REV_NAME="threeSD-macos-${GITDATE}-${GITREV}"
|
||||||
|
ARCHIVE_NAME="${REV_NAME}.tar.gz"
|
||||||
|
COMPRESSION_FLAGS="-czvf"
|
||||||
|
|
||||||
|
mkdir "$REV_NAME"
|
||||||
|
|
||||||
|
cp -r build/bin/threeSD.app "$REV_NAME"
|
||||||
|
|
||||||
|
# move libs into folder for deployment
|
||||||
|
macpack "${REV_NAME}/threeSD.app/Contents/MacOS/threeSD" -d "../Frameworks"
|
||||||
|
# move qt frameworks into app bundle for deployment
|
||||||
|
$(brew --prefix)/opt/qt5/bin/macdeployqt "${REV_NAME}/threeSD.app" -executable="${REV_NAME}/threeSD.app/Contents/MacOS/threeSD"
|
||||||
|
|
||||||
|
# Make the launching script executable
|
||||||
|
chmod +x ${REV_NAME}/threeSD.app/Contents/MacOS/threeSD
|
||||||
|
|
||||||
|
# Verify loader instructions
|
||||||
|
find "$REV_NAME" -exec otool -L {} \;
|
||||||
|
|
||||||
|
. .travis/common/post-upload.sh
|
||||||
@@ -34,12 +34,11 @@ target_link_libraries(threeSD PRIVATE qdevicewatcher)
|
|||||||
target_link_libraries(threeSD PRIVATE ${PLATFORM_LIBRARIES} Threads::Threads)
|
target_link_libraries(threeSD PRIVATE ${PLATFORM_LIBRARIES} Threads::Threads)
|
||||||
|
|
||||||
if (APPLE)
|
if (APPLE)
|
||||||
# TODO: support macOS
|
|
||||||
# set(MACOSX_ICON "../../dist/citra.icns")
|
# set(MACOSX_ICON "../../dist/citra.icns")
|
||||||
# set_source_files_properties(${MACOSX_ICON} PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
|
# set_source_files_properties(${MACOSX_ICON} PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
|
||||||
# target_sources(threeSD PRIVATE ${MACOSX_ICON})
|
# target_sources(threeSD PRIVATE ${MACOSX_ICON})
|
||||||
# set_target_properties(threeSD PROPERTIES MACOSX_BUNDLE TRUE)
|
set_target_properties(threeSD PROPERTIES MACOSX_BUNDLE TRUE)
|
||||||
# set_target_properties(threeSD PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist)
|
set_target_properties(threeSD PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist)
|
||||||
elseif(WIN32)
|
elseif(WIN32)
|
||||||
# compile as a win32 gui application instead of a console application
|
# compile as a win32 gui application instead of a console application
|
||||||
target_link_libraries(threeSD PRIVATE Qt5::WinMain)
|
target_link_libraries(threeSD PRIVATE Qt5::WinMain)
|
||||||
|
|||||||
@@ -0,0 +1,40 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
|
<string>English</string>
|
||||||
|
<key>CFBundleExecutable</key>
|
||||||
|
<string>${EXECUTABLE_NAME}</string>
|
||||||
|
<key>CFBundleGetInfoString</key>
|
||||||
|
<string></string>
|
||||||
|
<!-- <key>CFBundleIconFile</key>
|
||||||
|
<string>citra.icns</string> -->
|
||||||
|
<key>CFBundleIdentifier</key>
|
||||||
|
<string>cn.com.zhupengfei.threeSD</string>
|
||||||
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
|
<string>6.0</string>
|
||||||
|
<key>CFBundleLongVersionString</key>
|
||||||
|
<string></string>
|
||||||
|
<key>CFBundleName</key>
|
||||||
|
<string>threeSD</string>
|
||||||
|
<key>CFBundlePackageType</key>
|
||||||
|
<string>APPL</string>
|
||||||
|
<key>CFBundleShortVersionString</key>
|
||||||
|
<string></string>
|
||||||
|
<key>CFBundleSignature</key>
|
||||||
|
<string>????</string>
|
||||||
|
<key>CFBundleVersion</key>
|
||||||
|
<string></string>
|
||||||
|
<key>CSResourcesFileMapped</key>
|
||||||
|
<true/>
|
||||||
|
<key>LSRequiresCarbon</key>
|
||||||
|
<true/>
|
||||||
|
<key>NSHumanReadableCopyright</key>
|
||||||
|
<string></string>
|
||||||
|
<key>NSPrincipalClass</key>
|
||||||
|
<string>NSApplication</string>
|
||||||
|
<key>NSHighResolutionCapable</key>
|
||||||
|
<string>True</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
Reference in New Issue
Block a user