summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-x.travis-upload.sh228
-rw-r--r--.travis.yml2
-rw-r--r--appveyor.yml12
3 files changed, 116 insertions, 126 deletions
diff --git a/.travis-upload.sh b/.travis-upload.sh
index 8cfab31cb..17959b0e1 100755
--- a/.travis-upload.sh
+++ b/.travis-upload.sh
@@ -1,134 +1,132 @@
1if [ "$TRAVIS_EVENT_TYPE" = "push" ]&&[ "$TRAVIS_BRANCH" = "master" ]; then 1GITDATE="`git show -s --date=short --format='%ad' | sed 's/-//g'`"
2 GITDATE="`git show -s --date=short --format='%ad' | sed 's/-//g'`" 2GITREV="`git show -s --format='%h'`"
3 GITREV="`git show -s --format='%h'`" 3mkdir -p artifacts
4 mkdir -p artifacts 4
5 5if [ "$TRAVIS_OS_NAME" = "linux" -o -z "$TRAVIS_OS_NAME" ]; then
6 if [ "$TRAVIS_OS_NAME" = "linux" -o -z "$TRAVIS_OS_NAME" ]; then 6 REV_NAME="citra-linux-${GITDATE}-${GITREV}"
7 REV_NAME="citra-linux-${GITDATE}-${GITREV}" 7 ARCHIVE_NAME="${REV_NAME}.tar.xz"
8 ARCHIVE_NAME="${REV_NAME}.tar.xz" 8 COMPRESSION_FLAGS="-cJvf"
9 COMPRESSION_FLAGS="-cJvf" 9 mkdir "$REV_NAME"
10 mkdir "$REV_NAME" 10
11 11 cp build/src/citra/citra "$REV_NAME"
12 cp build/src/citra/citra "$REV_NAME" 12 cp build/src/citra_qt/citra-qt "$REV_NAME"
13 cp build/src/citra_qt/citra-qt "$REV_NAME" 13elif [ "$TRAVIS_OS_NAME" = "osx" ]; then
14 elif [ "$TRAVIS_OS_NAME" = "osx" ]; then 14 REV_NAME="citra-osx-${GITDATE}-${GITREV}"
15 REV_NAME="citra-osx-${GITDATE}-${GITREV}" 15 ARCHIVE_NAME="${REV_NAME}.tar.gz"
16 ARCHIVE_NAME="${REV_NAME}.tar.gz" 16 COMPRESSION_FLAGS="-czvf"
17 COMPRESSION_FLAGS="-czvf" 17 mkdir "$REV_NAME"
18 mkdir "$REV_NAME" 18
19 19 cp build/src/citra/Release/citra "$REV_NAME"
20 cp build/src/citra/Release/citra "$REV_NAME" 20 cp -r build/src/citra_qt/Release/citra-qt.app "$REV_NAME"
21 cp -r build/src/citra_qt/Release/citra-qt.app "$REV_NAME" 21
22 22 # move qt libs into app bundle for deployment
23 # move qt libs into app bundle for deployment 23 $(brew --prefix)/opt/qt5/bin/macdeployqt "${REV_NAME}/citra-qt.app"
24 $(brew --prefix)/opt/qt5/bin/macdeployqt "${REV_NAME}/citra-qt.app" 24
25 25 # move SDL2 libs into folder for deployment
26 # move SDL2 libs into folder for deployment 26 dylibbundler -b -x "${REV_NAME}/citra" -cd -d "${REV_NAME}/libs" -p "@executable_path/libs/"
27 dylibbundler -b -x "${REV_NAME}/citra" -cd -d "${REV_NAME}/libs" -p "@executable_path/libs/" 27
28 28 # Make the changes to make the citra-qt app standalone (i.e. not dependent on the current brew installation).
29 # Make the changes to make the citra-qt app standalone (i.e. not dependent on the current brew installation). 29 # To do this, the absolute references to each and every QT framework must be re-written to point to the local frameworks
30 # To do this, the absolute references to each and every QT framework must be re-written to point to the local frameworks 30 # (in the Contents/Frameworks folder).
31 # (in the Contents/Frameworks folder). 31 # The "install_name_tool" is used to do so.
32 # The "install_name_tool" is used to do so. 32
33 33 # Coreutils is a hack to coerce Homebrew to point to the absolute Cellar path (symlink dereferenced). i.e:
34 # Coreutils is a hack to coerce Homebrew to point to the absolute Cellar path (symlink dereferenced). i.e: 34 # ls -l /usr/local/opt/qt5:: /usr/local/opt/qt5 -> ../Cellar/qt5/5.6.1-1
35 # ls -l /usr/local/opt/qt5:: /usr/local/opt/qt5 -> ../Cellar/qt5/5.6.1-1 35 # grealpath ../Cellar/qt5/5.6.1-1:: /usr/local/Cellar/qt5/5.6.1-1
36 # grealpath ../Cellar/qt5/5.6.1-1:: /usr/local/Cellar/qt5/5.6.1-1 36 brew install coreutils
37 brew install coreutils 37
38 38 REV_NAME_ALT=$REV_NAME/
39 REV_NAME_ALT=$REV_NAME/ 39 # grealpath is located in coreutils, there is no "realpath" for OS X :(
40 # grealpath is located in coreutils, there is no "realpath" for OS X :( 40 QT_BREWS_PATH=$(grealpath "$(brew --prefix qt5)")
41 QT_BREWS_PATH=$(grealpath "$(brew --prefix qt5)") 41 BREW_PATH=$(brew --prefix)
42 BREW_PATH=$(brew --prefix) 42 QT_VERSION_NUM=5
43 QT_VERSION_NUM=5 43
44 44 $BREW_PATH/opt/qt5/bin/macdeployqt "${REV_NAME_ALT}citra-qt.app" \
45 $BREW_PATH/opt/qt5/bin/macdeployqt "${REV_NAME_ALT}citra-qt.app" \ 45 -executable="${REV_NAME_ALT}citra-qt.app/Contents/MacOS/citra-qt"
46 -executable="${REV_NAME_ALT}citra-qt.app/Contents/MacOS/citra-qt" 46
47 47 # These are the files that macdeployqt packed into Contents/Frameworks/ - we don't want those, so we replace them.
48 # These are the files that macdeployqt packed into Contents/Frameworks/ - we don't want those, so we replace them. 48 declare -a macos_libs=("QtCore" "QtWidgets" "QtGui" "QtOpenGL" "QtPrintSupport")
49 declare -a macos_libs=("QtCore" "QtWidgets" "QtGui" "QtOpenGL" "QtPrintSupport") 49
50 50 for macos_lib in "${macos_libs[@]}"
51 for macos_lib in "${macos_libs[@]}" 51 do
52 SC_FRAMEWORK_PART=$macos_lib.framework/Versions/$QT_VERSION_NUM/$macos_lib
53 # Replace macdeployqt versions of the Frameworks with our own (from /usr/local/opt/qt5/lib/)
54 cp "$BREW_PATH/opt/qt5/lib/$SC_FRAMEWORK_PART" "${REV_NAME_ALT}citra-qt.app/Contents/Frameworks/$SC_FRAMEWORK_PART"
55
56 # Replace references within the embedded Framework files with "internal" versions.
57 for macos_lib2 in "${macos_libs[@]}"
52 do 58 do
53 SC_FRAMEWORK_PART=$macos_lib.framework/Versions/$QT_VERSION_NUM/$macos_lib 59 # Since brew references both the non-symlinked and symlink paths of QT5, it needs to be duplicated.
54 # Replace macdeployqt versions of the Frameworks with our own (from /usr/local/opt/qt5/lib/) 60 # /usr/local/Cellar/qt5/5.6.1-1/lib and /usr/local/opt/qt5/lib both resolve to the same files.
55 cp "$BREW_PATH/opt/qt5/lib/$SC_FRAMEWORK_PART" "${REV_NAME_ALT}citra-qt.app/Contents/Frameworks/$SC_FRAMEWORK_PART" 61 # So the two lines below are effectively duplicates when resolved as a path, but as strings, they aren't.
56 62 RM_FRAMEWORK_PART=$macos_lib2.framework/Versions/$QT_VERSION_NUM/$macos_lib2
57 # Replace references within the embedded Framework files with "internal" versions. 63 install_name_tool -change \
58 for macos_lib2 in "${macos_libs[@]}" 64 $QT_BREWS_PATH/lib/$RM_FRAMEWORK_PART \
59 do 65 @executable_path/../Frameworks/$RM_FRAMEWORK_PART \
60 # Since brew references both the non-symlinked and symlink paths of QT5, it needs to be duplicated. 66 "${REV_NAME_ALT}citra-qt.app/Contents/Frameworks/$SC_FRAMEWORK_PART"
61 # /usr/local/Cellar/qt5/5.6.1-1/lib and /usr/local/opt/qt5/lib both resolve to the same files. 67 install_name_tool -change \
62 # So the two lines below are effectively duplicates when resolved as a path, but as strings, they aren't. 68 "$BREW_PATH/opt/qt5/lib/$RM_FRAMEWORK_PART" \
63 RM_FRAMEWORK_PART=$macos_lib2.framework/Versions/$QT_VERSION_NUM/$macos_lib2 69 @executable_path/../Frameworks/$RM_FRAMEWORK_PART \
64 install_name_tool -change \ 70 "${REV_NAME_ALT}citra-qt.app/Contents/Frameworks/$SC_FRAMEWORK_PART"
65 $QT_BREWS_PATH/lib/$RM_FRAMEWORK_PART \
66 @executable_path/../Frameworks/$RM_FRAMEWORK_PART \
67 "${REV_NAME_ALT}citra-qt.app/Contents/Frameworks/$SC_FRAMEWORK_PART"
68 install_name_tool -change \
69 "$BREW_PATH/opt/qt5/lib/$RM_FRAMEWORK_PART" \
70 @executable_path/../Frameworks/$RM_FRAMEWORK_PART \
71 "${REV_NAME_ALT}citra-qt.app/Contents/Frameworks/$SC_FRAMEWORK_PART"
72 done
73 done 71 done
74 72 done
75 # Handles `This application failed to start because it could not find or load the Qt platform plugin "cocoa"` 73
76 # Which manifests itself as: 74 # Handles `This application failed to start because it could not find or load the Qt platform plugin "cocoa"`
77 # "Exception Type: EXC_CRASH (SIGABRT) | Exception Codes: 0x0000000000000000, 0x0000000000000000 | Exception Note: EXC_CORPSE_NOTIFY" 75 # Which manifests itself as:
78 # There may be more dylibs needed to be fixed... 76 # "Exception Type: EXC_CRASH (SIGABRT) | Exception Codes: 0x0000000000000000, 0x0000000000000000 | Exception Note: EXC_CORPSE_NOTIFY"
79 declare -a macos_plugins=("Plugins/platforms/libqcocoa.dylib") 77 # There may be more dylibs needed to be fixed...
80 78 declare -a macos_plugins=("Plugins/platforms/libqcocoa.dylib")
81 for macos_lib in "${macos_plugins[@]}" 79
80 for macos_lib in "${macos_plugins[@]}"
81 do
82 install_name_tool -id @executable_path/../$macos_lib "${REV_NAME_ALT}citra-qt.app/Contents/$macos_lib"
83 for macos_lib2 in "${macos_libs[@]}"
82 do 84 do
83 install_name_tool -id @executable_path/../$macos_lib "${REV_NAME_ALT}citra-qt.app/Contents/$macos_lib" 85 RM_FRAMEWORK_PART=$macos_lib2.framework/Versions/$QT_VERSION_NUM/$macos_lib2
84 for macos_lib2 in "${macos_libs[@]}" 86 install_name_tool -change \
85 do 87 $QT_BREWS_PATH/lib/$RM_FRAMEWORK_PART \
86 RM_FRAMEWORK_PART=$macos_lib2.framework/Versions/$QT_VERSION_NUM/$macos_lib2 88 @executable_path/../Frameworks/$RM_FRAMEWORK_PART \
87 install_name_tool -change \ 89 "${REV_NAME_ALT}citra-qt.app/Contents/$macos_lib"
88 $QT_BREWS_PATH/lib/$RM_FRAMEWORK_PART \ 90 install_name_tool -change \
89 @executable_path/../Frameworks/$RM_FRAMEWORK_PART \ 91 "$BREW_PATH/opt/qt5/lib/$RM_FRAMEWORK_PART" \
90 "${REV_NAME_ALT}citra-qt.app/Contents/$macos_lib" 92 @executable_path/../Frameworks/$RM_FRAMEWORK_PART \
91 install_name_tool -change \ 93 "${REV_NAME_ALT}citra-qt.app/Contents/$macos_lib"
92 "$BREW_PATH/opt/qt5/lib/$RM_FRAMEWORK_PART" \
93 @executable_path/../Frameworks/$RM_FRAMEWORK_PART \
94 "${REV_NAME_ALT}citra-qt.app/Contents/$macos_lib"
95 done
96 done 94 done
95 done
97 96
98 for macos_lib in "${macos_libs[@]}" 97 for macos_lib in "${macos_libs[@]}"
99 do 98 do
100 # Debugging info for Travis-CI 99 # Debugging info for Travis-CI
101 otool -L "${REV_NAME_ALT}citra-qt.app/Contents/Frameworks/$macos_lib.framework/Versions/$QT_VERSION_NUM/$macos_lib" 100 otool -L "${REV_NAME_ALT}citra-qt.app/Contents/Frameworks/$macos_lib.framework/Versions/$QT_VERSION_NUM/$macos_lib"
102 done 101 done
103 102
104 # Make the citra-qt.app application launch a debugging terminal. 103 # Make the citra-qt.app application launch a debugging terminal.
105 # Store away the actual binary 104 # Store away the actual binary
106 mv ${REV_NAME_ALT}citra-qt.app/Contents/MacOS/citra-qt ${REV_NAME_ALT}citra-qt.app/Contents/MacOS/citra-qt-bin 105 mv ${REV_NAME_ALT}citra-qt.app/Contents/MacOS/citra-qt ${REV_NAME_ALT}citra-qt.app/Contents/MacOS/citra-qt-bin
107 106
108 cat > ${REV_NAME_ALT}citra-qt.app/Contents/MacOS/citra-qt <<EOL 107 cat > ${REV_NAME_ALT}citra-qt.app/Contents/MacOS/citra-qt <<EOL
109#!/usr/bin/env bash 108#!/usr/bin/env bash
110cd "\`dirname "\$0"\`" 109cd "\`dirname "\$0"\`"
111chmod +x citra-qt-bin 110chmod +x citra-qt-bin
112open citra-qt-bin --args "\$@" 111open citra-qt-bin --args "\$@"
113EOL 112EOL
114 # Content that will serve as the launching script for citra (within the .app folder) 113 # Content that will serve as the launching script for citra (within the .app folder)
115 114
116 # Make the launching script executable 115 # Make the launching script executable
117 chmod +x ${REV_NAME_ALT}citra-qt.app/Contents/MacOS/citra-qt 116 chmod +x ${REV_NAME_ALT}citra-qt.app/Contents/MacOS/citra-qt
118 117
119 fi 118fi
120 119
121 # Copy documentation 120# Copy documentation
122 cp license.txt "$REV_NAME" 121cp license.txt "$REV_NAME"
123 cp README.md "$REV_NAME" 122cp README.md "$REV_NAME"
124 123
125 tar $COMPRESSION_FLAGS "$ARCHIVE_NAME" "$REV_NAME" 124tar $COMPRESSION_FLAGS "$ARCHIVE_NAME" "$REV_NAME"
126 125
127 mv "$REV_NAME" nightly 126mv "$REV_NAME" nightly
128 127
129 7z a "$REV_NAME.7z" nightly 1287z a "$REV_NAME.7z" nightly
130 129
131 # move the compiled archive into the artifacts directory to be uploaded by travis releases 130# move the compiled archive into the artifacts directory to be uploaded by travis releases
132 mv "$ARCHIVE_NAME" artifacts/ 131mv "$ARCHIVE_NAME" artifacts/
133 mv "$REV_NAME.7z" artifacts/ 132mv "$REV_NAME.7z" artifacts/
134fi
diff --git a/.travis.yml b/.travis.yml
index 846758881..3da22eb5d 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -37,4 +37,4 @@ deploy:
37 file: "artifacts/*" 37 file: "artifacts/*"
38 skip_cleanup: true 38 skip_cleanup: true
39 on: 39 on:
40 repo: citra-emu/citra-nightly 40 tags: true
diff --git a/appveyor.yml b/appveyor.yml
index d062a1f3e..eb4e7df87 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -1,9 +1,6 @@
1# shallow clone 1# shallow clone
2clone_depth: 10 2clone_depth: 10
3 3
4# don't build on tag
5skip_tags: true
6
7cache: 4cache:
8 - C:\ProgramData\chocolatey\bin -> appveyor.yml 5 - C:\ProgramData\chocolatey\bin -> appveyor.yml
9 - C:\ProgramData\chocolatey\lib -> appveyor.yml 6 - C:\ProgramData\chocolatey\lib -> appveyor.yml
@@ -72,16 +69,11 @@ artifacts:
72 69
73deploy: 70deploy:
74 provider: GitHub 71 provider: GitHub
75 release: nightly-$(appveyor_build_number) 72 release: $(appveyor_repo_tag_name)
76 description: |
77 Citra nightly releases. Please choose the correct download for your operating system from the list below.
78
79 Short Commit Hash $(GITREV)
80 auth_token: 73 auth_token:
81 secure: "dbpsMC/MgPKWFNJCXpQl4cR8FYhepkPLjgNp/pRMktZ8oLKTqPYErfreaIxb/4P1" 74 secure: "dbpsMC/MgPKWFNJCXpQl4cR8FYhepkPLjgNp/pRMktZ8oLKTqPYErfreaIxb/4P1"
82 artifact: msvcupdate,msvcbuild 75 artifact: msvcupdate,msvcbuild
83 draft: false 76 draft: false
84 prerelease: false 77 prerelease: false
85 on: 78 on:
86 branch: master 79 appveyor_repo_tag: true
87 appveyor_repo_name: citra-emu/citra-nightly