mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2024-11-22 14:35:43 +01:00
Update build scripts
This commit is contained in:
parent
20a2e80a9f
commit
f95789a0b3
@ -1,3 +1,3 @@
|
|||||||
#!/bin/bash -ex
|
#!/bin/bash -ex
|
||||||
|
|
||||||
docker run -v $(pwd):/citra ubuntu:16.04 /bin/bash /citra/.travis/linux/docker.sh
|
docker run -v $(pwd):/yuzu ubuntu:18.04 /bin/bash /yuzu/.travis/linux/docker.sh
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
#!/bin/sh -ex
|
#!/bin/sh -ex
|
||||||
|
|
||||||
docker pull ubuntu:16.04
|
docker pull ubuntu:18.04
|
||||||
|
@ -1,14 +1,19 @@
|
|||||||
#!/bin/bash -ex
|
#!/bin/bash -ex
|
||||||
|
|
||||||
cd /citra
|
|
||||||
|
|
||||||
apt-get update
|
apt-get update
|
||||||
apt-get install -y build-essential libsdl2-dev qtbase5-dev libqt5opengl5-dev libcurl4-openssl-dev libssl-dev wget git
|
apt-get install -y build-essential git libcurl4-openssl-dev libqt5opengl5-dev libsdl2-dev libssl-dev python qtbase5-dev wget
|
||||||
|
|
||||||
# Get a recent version of CMake
|
# Get a recent version of CMake
|
||||||
wget https://cmake.org/files/v3.9/cmake-3.9.0-Linux-x86_64.sh
|
wget https://cmake.org/files/v3.10/cmake-3.10.1-Linux-x86_64.sh
|
||||||
echo y | sh cmake-3.9.0-Linux-x86_64.sh --prefix=cmake
|
sh cmake-3.10.1-Linux-x86_64.sh --exclude-subdir --prefix=/ --skip-license
|
||||||
export PATH=/citra/cmake/cmake-3.9.0-Linux-x86_64/bin:$PATH
|
|
||||||
|
mkdir /unicorn
|
||||||
|
cd /unicorn
|
||||||
|
git clone https://github.com/yuzu-emu/unicorn .
|
||||||
|
UNICORN_ARCHS=aarch64 ./make.sh
|
||||||
|
./make.sh install
|
||||||
|
|
||||||
|
cd /yuzu
|
||||||
|
|
||||||
mkdir build && cd build
|
mkdir build && cd build
|
||||||
cmake .. -DUSE_SYSTEM_CURL=ON -DCMAKE_BUILD_TYPE=Release
|
cmake .. -DUSE_SYSTEM_CURL=ON -DCMAKE_BUILD_TYPE=Release
|
||||||
|
@ -2,13 +2,13 @@
|
|||||||
|
|
||||||
. .travis/common/pre-upload.sh
|
. .travis/common/pre-upload.sh
|
||||||
|
|
||||||
REV_NAME="citra-linux-${GITDATE}-${GITREV}"
|
REV_NAME="yuzu-linux-${GITDATE}-${GITREV}"
|
||||||
ARCHIVE_NAME="${REV_NAME}.tar.xz"
|
ARCHIVE_NAME="${REV_NAME}.tar.xz"
|
||||||
COMPRESSION_FLAGS="-cJvf"
|
COMPRESSION_FLAGS="-cJvf"
|
||||||
|
|
||||||
mkdir "$REV_NAME"
|
mkdir "$REV_NAME"
|
||||||
|
|
||||||
cp build/src/citra/citra "$REV_NAME"
|
cp build/src/yuzu_cmd/yuzu-cmd "$REV_NAME"
|
||||||
cp build/src/citra_qt/citra-qt "$REV_NAME"
|
cp build/src/yuzu/yuzu "$REV_NAME"
|
||||||
|
|
||||||
. .travis/common/post-upload.sh
|
. .travis/common/post-upload.sh
|
||||||
|
@ -4,8 +4,10 @@ set -o pipefail
|
|||||||
|
|
||||||
export MACOSX_DEPLOYMENT_TARGET=10.9
|
export MACOSX_DEPLOYMENT_TARGET=10.9
|
||||||
export Qt5_DIR=$(brew --prefix)/opt/qt5
|
export Qt5_DIR=$(brew --prefix)/opt/qt5
|
||||||
|
export UNICORNDIR=$(pwd)/externals/unicorn
|
||||||
|
|
||||||
mkdir build && cd build
|
mkdir build && cd build
|
||||||
|
cmake --version
|
||||||
cmake .. -DUSE_SYSTEM_CURL=ON -DCMAKE_OSX_ARCHITECTURES="x86_64;x86_64h" -DCMAKE_BUILD_TYPE=Release
|
cmake .. -DUSE_SYSTEM_CURL=ON -DCMAKE_OSX_ARCHITECTURES="x86_64;x86_64h" -DCMAKE_BUILD_TYPE=Release
|
||||||
make -j4
|
make -j4
|
||||||
|
|
||||||
|
@ -1,4 +1,10 @@
|
|||||||
#!/bin/sh -ex
|
#!/bin/sh -ex
|
||||||
|
|
||||||
brew update
|
brew update
|
||||||
brew install qt5 sdl2 dylibbundler p7zip
|
brew install dylibbundler p7zip qt5 sdl2
|
||||||
|
|
||||||
|
mkdir externals/unicorn
|
||||||
|
pushd externals/unicorn
|
||||||
|
git clone https://github.com/yuzu-emu/unicorn .
|
||||||
|
UNICORN_ARCHS=aarch64 ./make.sh macos-universal-no
|
||||||
|
popd
|
||||||
|
@ -2,22 +2,22 @@
|
|||||||
|
|
||||||
. .travis/common/pre-upload.sh
|
. .travis/common/pre-upload.sh
|
||||||
|
|
||||||
REV_NAME="citra-osx-${GITDATE}-${GITREV}"
|
REV_NAME="yuzu-osx-${GITDATE}-${GITREV}"
|
||||||
ARCHIVE_NAME="${REV_NAME}.tar.gz"
|
ARCHIVE_NAME="${REV_NAME}.tar.gz"
|
||||||
COMPRESSION_FLAGS="-czvf"
|
COMPRESSION_FLAGS="-czvf"
|
||||||
|
|
||||||
mkdir "$REV_NAME"
|
mkdir "$REV_NAME"
|
||||||
|
|
||||||
cp build/src/citra/citra "$REV_NAME"
|
cp build/src/yuzu_cmd/yuzu-cmd "$REV_NAME"
|
||||||
cp -r build/src/citra_qt/citra-qt.app "$REV_NAME"
|
cp -r build/src/yuzu/yuzu.app "$REV_NAME"
|
||||||
|
|
||||||
# move qt libs into app bundle for deployment
|
# move qt libs into app bundle for deployment
|
||||||
$(brew --prefix)/opt/qt5/bin/macdeployqt "${REV_NAME}/citra-qt.app"
|
$(brew --prefix)/opt/qt5/bin/macdeployqt "${REV_NAME}/yuzu.app"
|
||||||
|
|
||||||
# move SDL2 libs into folder for deployment
|
# move SDL2 libs into folder for deployment
|
||||||
dylibbundler -b -x "${REV_NAME}/citra" -cd -d "${REV_NAME}/libs" -p "@executable_path/libs/"
|
dylibbundler -b -x "${REV_NAME}/yuzu-cmd" -cd -d "${REV_NAME}/libs" -p "@executable_path/libs/"
|
||||||
|
|
||||||
# Make the changes to make the citra-qt app standalone (i.e. not dependent on the current brew installation).
|
# Make the changes to make the yuzu app standalone (i.e. not dependent on the current brew installation).
|
||||||
# To do this, the absolute references to each and every QT framework must be re-written to point to the local frameworks
|
# To do this, the absolute references to each and every QT framework must be re-written to point to the local frameworks
|
||||||
# (in the Contents/Frameworks folder).
|
# (in the Contents/Frameworks folder).
|
||||||
# The "install_name_tool" is used to do so.
|
# The "install_name_tool" is used to do so.
|
||||||
@ -33,8 +33,8 @@ QT_BREWS_PATH=$(grealpath "$(brew --prefix qt5)")
|
|||||||
BREW_PATH=$(brew --prefix)
|
BREW_PATH=$(brew --prefix)
|
||||||
QT_VERSION_NUM=5
|
QT_VERSION_NUM=5
|
||||||
|
|
||||||
$BREW_PATH/opt/qt5/bin/macdeployqt "${REV_NAME_ALT}citra-qt.app" \
|
$BREW_PATH/opt/qt5/bin/macdeployqt "${REV_NAME_ALT}yuzu.app" \
|
||||||
-executable="${REV_NAME_ALT}citra-qt.app/Contents/MacOS/citra-qt"
|
-executable="${REV_NAME_ALT}yuzu.app/Contents/MacOS/yuzu"
|
||||||
|
|
||||||
# These are the files that macdeployqt packed into Contents/Frameworks/ - we don't want those, so we replace them.
|
# These are the files that macdeployqt packed into Contents/Frameworks/ - we don't want those, so we replace them.
|
||||||
declare -a macos_libs=("QtCore" "QtWidgets" "QtGui" "QtOpenGL" "QtPrintSupport")
|
declare -a macos_libs=("QtCore" "QtWidgets" "QtGui" "QtOpenGL" "QtPrintSupport")
|
||||||
@ -43,7 +43,7 @@ for macos_lib in "${macos_libs[@]}"
|
|||||||
do
|
do
|
||||||
SC_FRAMEWORK_PART=$macos_lib.framework/Versions/$QT_VERSION_NUM/$macos_lib
|
SC_FRAMEWORK_PART=$macos_lib.framework/Versions/$QT_VERSION_NUM/$macos_lib
|
||||||
# Replace macdeployqt versions of the Frameworks with our own (from /usr/local/opt/qt5/lib/)
|
# Replace macdeployqt versions of the Frameworks with our own (from /usr/local/opt/qt5/lib/)
|
||||||
cp "$BREW_PATH/opt/qt5/lib/$SC_FRAMEWORK_PART" "${REV_NAME_ALT}citra-qt.app/Contents/Frameworks/$SC_FRAMEWORK_PART"
|
cp "$BREW_PATH/opt/qt5/lib/$SC_FRAMEWORK_PART" "${REV_NAME_ALT}yuzu.app/Contents/Frameworks/$SC_FRAMEWORK_PART"
|
||||||
|
|
||||||
# Replace references within the embedded Framework files with "internal" versions.
|
# Replace references within the embedded Framework files with "internal" versions.
|
||||||
for macos_lib2 in "${macos_libs[@]}"
|
for macos_lib2 in "${macos_libs[@]}"
|
||||||
@ -55,11 +55,11 @@ do
|
|||||||
install_name_tool -change \
|
install_name_tool -change \
|
||||||
$QT_BREWS_PATH/lib/$RM_FRAMEWORK_PART \
|
$QT_BREWS_PATH/lib/$RM_FRAMEWORK_PART \
|
||||||
@executable_path/../Frameworks/$RM_FRAMEWORK_PART \
|
@executable_path/../Frameworks/$RM_FRAMEWORK_PART \
|
||||||
"${REV_NAME_ALT}citra-qt.app/Contents/Frameworks/$SC_FRAMEWORK_PART"
|
"${REV_NAME_ALT}yuzu.app/Contents/Frameworks/$SC_FRAMEWORK_PART"
|
||||||
install_name_tool -change \
|
install_name_tool -change \
|
||||||
"$BREW_PATH/opt/qt5/lib/$RM_FRAMEWORK_PART" \
|
"$BREW_PATH/opt/qt5/lib/$RM_FRAMEWORK_PART" \
|
||||||
@executable_path/../Frameworks/$RM_FRAMEWORK_PART \
|
@executable_path/../Frameworks/$RM_FRAMEWORK_PART \
|
||||||
"${REV_NAME_ALT}citra-qt.app/Contents/Frameworks/$SC_FRAMEWORK_PART"
|
"${REV_NAME_ALT}yuzu.app/Contents/Frameworks/$SC_FRAMEWORK_PART"
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
@ -71,40 +71,40 @@ declare -a macos_plugins=("Plugins/platforms/libqcocoa.dylib")
|
|||||||
|
|
||||||
for macos_lib in "${macos_plugins[@]}"
|
for macos_lib in "${macos_plugins[@]}"
|
||||||
do
|
do
|
||||||
install_name_tool -id @executable_path/../$macos_lib "${REV_NAME_ALT}citra-qt.app/Contents/$macos_lib"
|
install_name_tool -id @executable_path/../$macos_lib "${REV_NAME_ALT}yuzu.app/Contents/$macos_lib"
|
||||||
for macos_lib2 in "${macos_libs[@]}"
|
for macos_lib2 in "${macos_libs[@]}"
|
||||||
do
|
do
|
||||||
RM_FRAMEWORK_PART=$macos_lib2.framework/Versions/$QT_VERSION_NUM/$macos_lib2
|
RM_FRAMEWORK_PART=$macos_lib2.framework/Versions/$QT_VERSION_NUM/$macos_lib2
|
||||||
install_name_tool -change \
|
install_name_tool -change \
|
||||||
$QT_BREWS_PATH/lib/$RM_FRAMEWORK_PART \
|
$QT_BREWS_PATH/lib/$RM_FRAMEWORK_PART \
|
||||||
@executable_path/../Frameworks/$RM_FRAMEWORK_PART \
|
@executable_path/../Frameworks/$RM_FRAMEWORK_PART \
|
||||||
"${REV_NAME_ALT}citra-qt.app/Contents/$macos_lib"
|
"${REV_NAME_ALT}yuzu.app/Contents/$macos_lib"
|
||||||
install_name_tool -change \
|
install_name_tool -change \
|
||||||
"$BREW_PATH/opt/qt5/lib/$RM_FRAMEWORK_PART" \
|
"$BREW_PATH/opt/qt5/lib/$RM_FRAMEWORK_PART" \
|
||||||
@executable_path/../Frameworks/$RM_FRAMEWORK_PART \
|
@executable_path/../Frameworks/$RM_FRAMEWORK_PART \
|
||||||
"${REV_NAME_ALT}citra-qt.app/Contents/$macos_lib"
|
"${REV_NAME_ALT}yuzu.app/Contents/$macos_lib"
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
for macos_lib in "${macos_libs[@]}"
|
for macos_lib in "${macos_libs[@]}"
|
||||||
do
|
do
|
||||||
# Debugging info for Travis-CI
|
# Debugging info for Travis-CI
|
||||||
otool -L "${REV_NAME_ALT}citra-qt.app/Contents/Frameworks/$macos_lib.framework/Versions/$QT_VERSION_NUM/$macos_lib"
|
otool -L "${REV_NAME_ALT}yuzu.app/Contents/Frameworks/$macos_lib.framework/Versions/$QT_VERSION_NUM/$macos_lib"
|
||||||
done
|
done
|
||||||
|
|
||||||
# Make the citra-qt.app application launch a debugging terminal.
|
# Make the yuzu.app application launch a debugging terminal.
|
||||||
# Store away the actual binary
|
# Store away the actual binary
|
||||||
mv ${REV_NAME_ALT}citra-qt.app/Contents/MacOS/citra-qt ${REV_NAME_ALT}citra-qt.app/Contents/MacOS/citra-qt-bin
|
mv ${REV_NAME_ALT}yuzu.app/Contents/MacOS/yuzu ${REV_NAME_ALT}yuzu.app/Contents/MacOS/yuzu-bin
|
||||||
|
|
||||||
cat > ${REV_NAME_ALT}citra-qt.app/Contents/MacOS/citra-qt <<EOL
|
cat > ${REV_NAME_ALT}yuzu.app/Contents/MacOS/yuzu <<EOL
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
cd "\`dirname "\$0"\`"
|
cd "\`dirname "\$0"\`"
|
||||||
chmod +x citra-qt-bin
|
chmod +x yuzu-bin
|
||||||
open citra-qt-bin --args "\$@"
|
open yuzu-bin --args "\$@"
|
||||||
EOL
|
EOL
|
||||||
# Content that will serve as the launching script for citra (within the .app folder)
|
# Content that will serve as the launching script for yuzu (within the .app folder)
|
||||||
|
|
||||||
# Make the launching script executable
|
# Make the launching script executable
|
||||||
chmod +x ${REV_NAME_ALT}citra-qt.app/Contents/MacOS/citra-qt
|
chmod +x ${REV_NAME_ALT}yuzu.app/Contents/MacOS/yuzu
|
||||||
|
|
||||||
. .travis/common/post-upload.sh
|
. .travis/common/post-upload.sh
|
||||||
|
18
appveyor.yml
18
appveyor.yml
@ -42,9 +42,9 @@ before_build:
|
|||||||
- ps: |
|
- ps: |
|
||||||
if ($env:BUILD_TYPE -eq 'msvc') {
|
if ($env:BUILD_TYPE -eq 'msvc') {
|
||||||
# redirect stderr and change the exit code to prevent powershell from cancelling the build if cmake prints a warning
|
# redirect stderr and change the exit code to prevent powershell from cancelling the build if cmake prints a warning
|
||||||
cmd /C 'cmake -G "Visual Studio 15 2017 Win64" -DCITRA_USE_BUNDLED_QT=1 -DCITRA_USE_BUNDLED_SDL2=1 -DCMAKE_USE_OPENSSL=0 .. 2>&1 && exit 0'
|
cmd /C 'cmake -G "Visual Studio 15 2017 Win64" -DYUZU_USE_BUNDLED_QT=1 -DYUZU_USE_BUNDLED_SDL2=1 -DYUZU_USE_BUNDLED_UNICORN=1 -DCMAKE_USE_OPENSSL=0 .. 2>&1 && exit 0'
|
||||||
} else {
|
} else {
|
||||||
C:\msys64\usr\bin\bash.exe -lc "cmake -G 'MSYS Makefiles' -DUSE_SYSTEM_CURL=1 -DCITRA_USE_BUNDLED_CURL=1 -DCMAKE_BUILD_TYPE=Release .. 2>&1"
|
C:\msys64\usr\bin\bash.exe -lc "cmake -G 'MSYS Makefiles' -DUSE_SYSTEM_CURL=1 -DYUZU_USE_BUNDLED_CURL=1 -DCMAKE_BUILD_TYPE=Release .. 2>&1"
|
||||||
}
|
}
|
||||||
- cd ..
|
- cd ..
|
||||||
|
|
||||||
@ -52,7 +52,7 @@ build_script:
|
|||||||
- ps: |
|
- ps: |
|
||||||
if ($env:BUILD_TYPE -eq 'msvc') {
|
if ($env:BUILD_TYPE -eq 'msvc') {
|
||||||
# https://www.appveyor.com/docs/build-phase
|
# https://www.appveyor.com/docs/build-phase
|
||||||
msbuild msvc_build/citra.sln /maxcpucount /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
|
msbuild msvc_build/yuzu.sln /maxcpucount /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
|
||||||
} else {
|
} else {
|
||||||
C:\msys64\usr\bin\bash.exe -lc 'mingw32-make -C mingw_build/ 2>&1'
|
C:\msys64\usr\bin\bash.exe -lc 'mingw32-make -C mingw_build/ 2>&1'
|
||||||
}
|
}
|
||||||
@ -72,9 +72,9 @@ after_build:
|
|||||||
|
|
||||||
if ($env:BUILD_TYPE -eq 'msvc') {
|
if ($env:BUILD_TYPE -eq 'msvc') {
|
||||||
# Where are these spaces coming from? Regardless, let's remove them
|
# Where are these spaces coming from? Regardless, let's remove them
|
||||||
$MSVC_BUILD_ZIP = "citra-windows-msvc-$GITDATE-$GITREV.zip" -replace " ", ""
|
$MSVC_BUILD_ZIP = "yuzu-windows-msvc-$GITDATE-$GITREV.zip" -replace " ", ""
|
||||||
$MSVC_BUILD_PDB = "citra-windows-msvc-$GITDATE-$GITREV-debugsymbols.zip" -replace " ", ""
|
$MSVC_BUILD_PDB = "yuzu-windows-msvc-$GITDATE-$GITREV-debugsymbols.zip" -replace " ", ""
|
||||||
$MSVC_SEVENZIP = "citra-windows-msvc-$GITDATE-$GITREV.7z" -replace " ", ""
|
$MSVC_SEVENZIP = "yuzu-windows-msvc-$GITDATE-$GITREV.7z" -replace " ", ""
|
||||||
|
|
||||||
# set the build names as env vars so the artifacts can upload them
|
# set the build names as env vars so the artifacts can upload them
|
||||||
$env:BUILD_ZIP = $MSVC_BUILD_ZIP
|
$env:BUILD_ZIP = $MSVC_BUILD_ZIP
|
||||||
@ -91,8 +91,8 @@ after_build:
|
|||||||
7z a -tzip $MSVC_BUILD_ZIP $RELEASE_DIST\*
|
7z a -tzip $MSVC_BUILD_ZIP $RELEASE_DIST\*
|
||||||
7z a $MSVC_SEVENZIP $RELEASE_DIST
|
7z a $MSVC_SEVENZIP $RELEASE_DIST
|
||||||
} else {
|
} else {
|
||||||
$MINGW_BUILD_ZIP = "citra-windows-mingw-$GITDATE-$GITREV.zip" -replace " ", ""
|
$MINGW_BUILD_ZIP = "yuzu-windows-mingw-$GITDATE-$GITREV.zip" -replace " ", ""
|
||||||
$MINGW_SEVENZIP = "citra-windows-mingw-$GITDATE-$GITREV.7z" -replace " ", ""
|
$MINGW_SEVENZIP = "yuzu-windows-mingw-$GITDATE-$GITREV.7z" -replace " ", ""
|
||||||
# not going to bother adding separate debug symbols for mingw, so just upload a README for it
|
# not going to bother adding separate debug symbols for mingw, so just upload a README for it
|
||||||
# if someone wants to add them, change mingw to compile with -g and use objdump and strip to separate the symbols from the binary
|
# if someone wants to add them, change mingw to compile with -g and use objdump and strip to separate the symbols from the binary
|
||||||
$MINGW_NO_DEBUG_SYMBOLS = "README_No_Debug_Symbols.txt"
|
$MINGW_NO_DEBUG_SYMBOLS = "README_No_Debug_Symbols.txt"
|
||||||
@ -111,7 +111,7 @@ after_build:
|
|||||||
mkdir $RELEASE_DIST/platforms
|
mkdir $RELEASE_DIST/platforms
|
||||||
|
|
||||||
# copy the compiled binaries and other release files to the release folder
|
# copy the compiled binaries and other release files to the release folder
|
||||||
Get-ChildItem "$CMAKE_BINARY_DIR" -Recurse -Filter "citra*.exe" | Copy-Item -destination $RELEASE_DIST
|
Get-ChildItem "$CMAKE_BINARY_DIR" -Recurse -Filter "yuzu*.exe" | Copy-Item -destination $RELEASE_DIST
|
||||||
# copy the libcurl dll
|
# copy the libcurl dll
|
||||||
Get-ChildItem "$CMAKE_BINARY_DIR" -Recurse -Filter "libcurl.dll" | Copy-Item -destination $RELEASE_DIST
|
Get-ChildItem "$CMAKE_BINARY_DIR" -Recurse -Filter "libcurl.dll" | Copy-Item -destination $RELEASE_DIST
|
||||||
Copy-Item -path "$CMAKE_SOURCE_DIR/license.txt" -destination $RELEASE_DIST
|
Copy-Item -path "$CMAKE_SOURCE_DIR/license.txt" -destination $RELEASE_DIST
|
||||||
|
Loading…
Reference in New Issue
Block a user