some path updates and mac travis fixes
This commit is contained in:
+2
-2
@@ -1,8 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
||||
brew install ffmpeg qt5
|
||||
export PATH="/usr/local/opt/qt/bin:$PATH"
|
||||
brew install ffmpeg qt5 python@2
|
||||
export PATH="/usr/local/opt/qt/bin:/usr/local/opt/python@2/libexec/bin:$PATH"
|
||||
elif [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
|
||||
if [ "$ARCH" == "x86_64" ]; then sudo apt-get -y install qt59base qt59multimedia libavformat-dev libavcodec-dev libavfilter-dev libavutil-dev libswscale-dev libswresample-dev frei0r-plugins-dev frei0r-plugins fuse; fi
|
||||
if [ "$ARCH" == "i386" ]; then sudo apt-get -y install gcc-multilib g++-multilib qt59base:i386 qt59multimedia:i386 libavformat-dev:i386 libavcodec-dev:i386 libavfilter-dev:i386 libavutil-dev:i386 libswscale-dev:i386 libswresample-dev:i386 frei0r-plugins-dev:i386 frei0r-plugins:i386 pkg-config:i386 libgl1-mesa-dev:i386 fuse:i386; fi
|
||||
|
||||
+40
-1
@@ -1,25 +1,64 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
||||
# generate translation files
|
||||
lrelease olive.pro
|
||||
|
||||
# generate Makefile
|
||||
qmake CONFIG+=release PREFIX=/usr
|
||||
|
||||
# run Makefile
|
||||
make -j$(nproc)
|
||||
|
||||
# move Qt deps into bundle
|
||||
macdeployqt Olive.app
|
||||
|
||||
# fix other deps that macdeployqt missed
|
||||
wget -c -nv https://github.com/arl/macdeployqtfix/raw/master/macdeployqtfix.py
|
||||
python2 macdeployqtfix.py Olive.app/Contents/MacOS/Olive /usr/local/Cellar/qt5/5.*/
|
||||
|
||||
# move translations into bundle
|
||||
mkdir Olive.app/Contents/Translations
|
||||
mv ts/*.qm Olive.app/Contents/Translations
|
||||
|
||||
# move external effects into bundle
|
||||
mkdir Olive.app/Contents/Effects
|
||||
cp effects/* Olive.app/Contents/Effects
|
||||
|
||||
# distribute in zip
|
||||
zip -r Olive-$(git rev-parse --short HEAD)-macOS.zip Olive.app
|
||||
elif [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
|
||||
# generate translation files
|
||||
lrelease olive.pro
|
||||
|
||||
# generate Makefile
|
||||
if [ "$ARCH" == "i386" ]; then
|
||||
# use extra compiler flags to force 32-bit build
|
||||
qmake CONFIG+=release "QMAKE_CFLAGS+=-m32" "QMAKE_CXXFLAGS+=-m32" "QMAKE_LFLAGS+=-m32" PREFIX=/usr -spec linux-g++-32
|
||||
else
|
||||
qmake CONFIG+=release PREFIX=/usr
|
||||
fi
|
||||
|
||||
# run Makefile
|
||||
make -j$(nproc)
|
||||
|
||||
# use `make install` on `appdir` to place files in the correct place
|
||||
make INSTALL_ROOT=appdir -j$(nproc) install ; find appdir/
|
||||
|
||||
# download linuxdeployqt
|
||||
wget -c -nv "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage"
|
||||
chmod a+x linuxdeployqt-continuous-x86_64.AppImage
|
||||
|
||||
unset QTDIR; unset QT_PLUGIN_PATH ; unset LD_LIBRARY_PATH
|
||||
export VERSION=$(git rev-parse --short HEAD) # linuxdeployqt uses this for naming the file
|
||||
|
||||
# linuxdeployqt uses this for naming the file
|
||||
export VERSION=$(git rev-parse --short HEAD)
|
||||
|
||||
# use linuxdeployqt to set up dependencies
|
||||
./linuxdeployqt-continuous-x86_64.AppImage appdir/usr/share/applications/*.desktop -appimage
|
||||
|
||||
# 64-bit linuxdeployqt can only generate a 64-bit AppImage
|
||||
# to generate a 32-bit one, we need to download and run 32-bit AppImageTool
|
||||
if [ "$ARCH" == "i386" ]; then
|
||||
rm Olive*.AppImage
|
||||
wget -c -nv "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-i686.AppImage"
|
||||
|
||||
+24
-2
@@ -31,12 +31,24 @@ QString get_config_path() {
|
||||
}
|
||||
|
||||
QList<QString> get_effects_paths() {
|
||||
// returns a list of the effects paths to search
|
||||
|
||||
QList<QString> effects_paths;
|
||||
effects_paths.append(get_app_dir() + "/effects");
|
||||
|
||||
// "effects" subfolder in program folder - best for Windows
|
||||
effects_paths.append(get_app_dir() + "/effects");
|
||||
|
||||
// "Effects" folder one level above the program's directory - best for Mac
|
||||
effects_paths.append(get_app_dir() + "/../Effects");
|
||||
|
||||
// folder in share folder - best for Linux
|
||||
effects_paths.append(get_app_dir() + "/../share/olive-editor/effects");
|
||||
|
||||
// Olive will also accept a manually provided folder with an environment variable
|
||||
QString env_path(qgetenv("OLIVE_EFFECTS_PATH"));
|
||||
if (!env_path.isEmpty()) effects_paths.append(env_path);
|
||||
return effects_paths;
|
||||
|
||||
return effects_paths;
|
||||
}
|
||||
|
||||
QString get_file_hash(const QString& filename) {
|
||||
@@ -47,9 +59,19 @@ QString get_file_hash(const QString& filename) {
|
||||
|
||||
QList<QString> get_language_paths() {
|
||||
QList<QString> language_paths;
|
||||
|
||||
// subfolder in program folder - best for Windows (or compiling+running from source dir)
|
||||
language_paths.append(get_app_dir() + "/ts");
|
||||
|
||||
// folder one level above the program's directory - best for Mac
|
||||
language_paths.append(get_app_dir() + "/../Translations");
|
||||
|
||||
// folder in share folder - best for Linux
|
||||
language_paths.append(get_app_dir() + "/../share/olive-editor/ts");
|
||||
|
||||
// Olive will also accept a manually provided folder with an environment variable
|
||||
QString env_path(qgetenv("OLIVE_LANG_PATH"));
|
||||
if (!env_path.isEmpty()) language_paths.append(env_path);
|
||||
|
||||
return language_paths;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user