Skip to content

Commit

Permalink
Merge upstream changes (#4)
Browse files Browse the repository at this point in the history
* Allow sub plugins for instruments aswell

* Move m_key member of Effect into Plugin
* Pass key to Instrument ctors and instantiaters
* Add pluginKeys to all plugin selector widgets, and let them pass the keys
  when instantiating the instruments; or, if the keys must be passed over
  threads, pass the keys to the Engine using `Engine::setDndPluginKey()`
* As instrument plugin libraries now also need to get their key passed, their
  second argument, which was always the same as the first, is now used to pass
  the sub plugin keys. This affects *all* instrument plugins.
* Plugin.h: Add more virtuals to `SubPluginFeatures` in order to draw logos
  and images into instrument selector widgets
* LadspaSubPluginFeatures: Implement the `displayName` virtual because the
  new behaviour to resolve displayNames is to first look at the
  SubPluginFeatures, which, without override, returns the superior plugin's
  name (Plugin.cpp)

Additional:

* PluginFactory.h: Allow setting up search paths without discovering plugins
  yet
* Plugin.h: Add full documentation (should be checked)

* Fix Engine.cpp not compiling on some compilers

* Fix or remove wrong or useless debug printfs

* Fix missing IntrumentTrack header

* Use QString for SubPluginFeatures' virtuals

The former virtuals returned `const char*`, which lead to invalid reads when
`LadspaSubPluginFeatures` returned pointers to temporary `QByteArray::data`.

* Test deployment preparation in regular builds  (LMMS#4847)

Tests whether contributions break packaging inadvertently

* Add needed macOS shortcuts (LMMS#4851)

Fix insert bars, delete bars, delete notes on Apple keyboard

* Move apt_mingw_cache out of build directory (LMMS#4842)

* Add missing include

Compilation fails with debug build. Fixes regression from
dd99f3a

* Fix DrumSynth sscanf (LMMS#4869)

* Fix failing build due to missing include

Fix the build of MixHelpers.cpp which fails due to a missing include of
cstdio (printf is not defined).

* Add /sbin to AppImage search path
Closes LMMS#4846

* Fix AudioFileProcessor tooltip (LMMS#4868)

* Disable soundio on macOS

Temporarily disable soundio on macOS to address stability issues with PortAudio
Closes LMMS#4864

* Blacklist $HOME as VST directory
Closes LMMS#4854

* Sync Debian version (LMMS#4840)

* Sync Debian version

* Drop temporary logging

* Install 32-bit RemoteVstPlugin to a separate directory (LMMS#4797)

* Fix loading 32bit VSTs on Linux

Fix a regression in LMMS#4797

* Fix loading 32bit VSTs when loading LMMS in the build directory

Fix another regression in LMMS#4797

* Fix MidiJack crash on exit

* Fix uninitialized m_jackClient being used in MidiJack destructor
* Fix destruction order in Mixer.cpp so that MidiJack doesn't access the
  deleted AudioJack instance

Fixes LMMS#4688

* Fix LMMS#3926: QCursor in AFP

Fix a crash that occurred on the following steps:
1. Add an AFP track.
2. Open it, and move the waveform display to overlap the track label
button.
3. Close the AFP window and open it again by clicking the track label.
4. Move the mouse pointer.

The problem occurs because the code makes the implicit assumption that
AudioFileProcessorWaveView::enterEvent (and hence
QApplication::setOverrideCursor) is called before
AudioFileProcessorWaveView::mouseMoveEvent. This is not the case when
the waveform display is on top of the track label. In this case the AFP
windows is opened with the mouse being immediately positioned over the
wave form display. There is no enter event and move events are issues
directly. This then leads to a crash in
AudioFileProcessorWaveView::mouseMoveEvent when trying to determine the
value for is_size_cursor because the override cursor is still null but
is dereferenced directly without checking.

Only adding a check would not solve the problem because in that case the
cursor would not change to the hand cursor when being moved inside the
waveform display.

The solution is to remove all calls to the global methods
setOverrideCursor and restoreOverrideCursor and to only set the cursor
locally.

This fix is based on a patch by gi0e5b06 which is committed under 8a10c52
in his repository but for which he never created a pull request.

* Fix CONTRIBUTORS override

* Debian integration: update build dependencies

It was wrongly done in 231a840.

* Debian: don't bundle CALF LADSPA library separately anymore

It's LMMS specific now

* Better Wine detection and support

* Support more Wine packagings

* Allow building 64-bit RemoteVstPlugin using 32-bit Wine tools if possible

* Provide suitable library paths for creating AppImages

* Check if winegcc works before building RemoteVstPlugin

* Modify VST build systems to make debian integration work correctly

* Allow creating AppImages on systems newer than linuxdeployqt officially supports

Note that the additional -unsupported-allow-new-glibc switch
may result in an AppImage which is unusable on old systems.

* Support FX Mixer for sample tracks and add controls to sample track window (LMMS#3866)

This work is based on LMMS#3632 by @grejppi.

* Fix zyn pitch on project load/export
Closes LMMS#3451

* Add info about LadspaControls::m_noLink

* Fix compilation on Qt4

* Avoid shallow clones in all Debian sid builds (LMMS#4888)

hallow clone may break version detection. This is fatal in Debian builds, so use full clone.

Note: This is safe for stable-1.2 but needs review after merging to master due to submodules.  See LMMS#4888 for more information.

* Add VST always-on-top config option

* Ensure VST windows show properly in taskbar

* Don't show error when loading empty VeSTige instance

* Fix layout of VstSyncData struct

Ensure member of type double is 8-byte aligned for consistent layout between 32- and 64-bit Linux builds.

* Rework after code reading

* Fix possible segfault in `SubPluginFeatures::displayName`
* Minor fixes

* Allow TabWidget to be variable sized

* Allow instrument views to grow with contents

Make InstrumentTrackWindow as large as the InstrumentView requires

* Make instrument window's piano optional

* Make Model class visitable

* Forbid copying the Knob class

* Always instantiate at least a dummy plugin

* Fix too small instrument tabs

Previously, they had been resized by the fixed size parent tab widget. We need
to do this manually now.

* Fix Blackman-Harris window formula (LMMS#4895)

Adds missing parentheses

* Automation Editor: Don't accept drag events when there's no pattern

Fixes LMMS#4857

* TCO drag: Fix Ctrl+Drag crash

Fix some assumptions that source and target of a drag actions are the same
track container. Instead of looking up necessary information (track name,
type and container id) by track index, add it to the metadata.
Refactor canPasteSelection to take QDropEvent instead of the drop event's
QMimeData. Coincidentally, this fixes the method to be consistent with its
documentation.

Fixes LMMS#4844

* Bump zyn submodule
Per LMMS#4642

* Allow new Zyn bank creation on Linux (LMMS#4905)

Allow new Zyn bank creation on Linux
Closes LMMS#4642

* Fix empty editors after closing them and creating a new project (LMMS#4891)

* Remove useless include

* Fix invalid display names

* Travis: use carla instead of carla-git

Due to some breaking changes in the development branch of Carla,
we can't use the package right now.
Fortunately, the carla package now points to 2.0 series. So we will use it.

See also: https://kx.studio/News/?action=view&url=changes-in-kxstudio-repos-regarding-carla-and-jack2

* Travis: fix shellcheck warnings for the Debian sid script

* Remove some Qt4 compatibility code

* SetupDialog: fix file dialog not opening for theme directory 

It was caused by a typo affecting a signal-slot connection.

* Fix instrument window tab sizes

- Fix the instrument window tabs minimum width and height formulae
- Also set minimum height and width for instrument tab

* PluginBrowser: Tree layout and search bar

* [Equalizer] Bright analyzer colors, opacity increased (LMMS#4772)

* [Equalizer] Bright analyzer colors, opacity incr

Brightened spectrum analyzer colors and increased opacity a tad to make more visible

* Fixed RGB Value

* Update EqControlsDialog.cpp

* Fixed color change

* Changed colors again

* Fixed colors, now brighter and bluer

* Ok, its actually bright now lol

* Replace Monstro icons

* Shrink ComboBox arrow section slightly

This is being done for two reasons:

1. The new Monstro icons (and the icons for Microwave when it's finished) are too large.
2. All ComboBoxes (subjectively) look much nicer this way.

* Don't try to connect to nonexistent controllers (LMMS#4939)

Fixes crash on loading presets with controllers.

* Allow sample track TCOs to resize smaller than one bar (LMMS#4933)

Other changes:
* Update TCO position more exact when a drag leaves a TCO and enters `TrackContentWidget` (required to detect that the cursor has really moved when leaving a TCO with length < 1 to the right)
* Use exact length when samples are loaded, don't round it up
* Reset size when reloading same file

* Use local cursor for TrackContentObjectView (LMMS#4918)

Fixes crash on cloning patterns on Qt >= 5.12.

* Add PluginIssue class (LMMS#4901)

* Move macro definition out of class

* Fix -1 offset in plugin tab

In the instrument plugin tab, there was an orange stripe for
TripleOscillator. This was because internally, TabWidget moves up the
widget by 1 (TabWidget.cpp, line 89).

The size of the whole window is:

```
widget->height() + m_tabbarHeight - 1
```

So this code adds an offset of "-1" to the necessary computations.

* Fix bad identation in old code

* Coding conventions

* FileBrowser: Backup expanded directories and restore that state when the tree is reloaded.

* Allow build for Wayland w/o X11Extras, if VST off

@lukas-w reminds in 134dae8 comments that X11Extras help Linux users of
VST effects LMMS#3786. Now LMMS builds and runs on Weston without X11
dependencies, though only if WANT_VST is off.

* Document Effect::checkGate

* Document graph widget

* Update wiki submodule

* Fix wiki submodule

* Fix notes getting stuck under high CPU conditions (LMMS#4908)

* Record chords (LMMS#4938)

* Added check for chord to notes recorded from keyboard

* Make more connections direct for automation (LMMS#4942)

* Improve dcast

* document `dcast`
* make `dcast` not only cast exact, but also upwards
* add `dcast` test
* rename `dcast` -> `dynamicCast`

* AutomatableModelTest: Improve tests

Check whether returned pointers from the cast are equal to the original
pointers, rather than just checking wether they are not `nullptr`.

* Fix CI on windows

* Code style + Extend for TempoSyncKnob

* Travis: fix a debootstrap error from missing keyrings

Uses 18.04's debian-archive-keyring to fix the missing keyrings.

* Don't draw note detuning info over the volume/panning area (LMMS#4965)

* Show/Focus BBEditor on TrackLabelButton click LMMS#4946 (LMMS#4959)

It will be shown even if the parent is hidden.

* Use extracted linuxdeployqt directly

As of probonopd/linuxdeployqt#370,
the AppRun of linuxdeployqt unsets LD_LIBRARY_PATH.
This behavior isn't suitable for our cases, so we use
the extracted binary directly as a workaround.

* Fix invisible note editing handles when a note has detuning info

Fixes a regression in 32df2d7,
the clipping area was restored in a wrong place.
Also, a wrong value was used while restoring.

* Fix the wrong merge

* fix hanging mouse in piano roll (LMMS#4822) (LMMS#4960)

* fix hanging mouse in piano roll (LMMS#4822)

* fix hanging mouse in automation & pianoroll (LMMS#4822);

* fix hanging mouse in automation & pianoroll (LMMS#4822)

removed TODO comment that I forgot in the code

* Fix race conditions in NotePlayHandleManager (LMMS#4966)

NotePlayHandleManager::acquire uses a read lock unless the pool is empty.
If two threads try to acquire NotePlayHandle simultaneously
when the value of s_availableIndex is 1, one thread will try to read s_available[-1].
If the acquire action and the release action are done at the same time,
NotePlayHandleManager::acquire may try to read data
before NotePlayHandleManager::release actually writes.

This commit prevents them by always using the write lock when acquiring a NotePlayHandle.

* Nescaline and Freeboy - Better default sound (LMMS#4968)

* Fix controller loading error on loading projects

Fixes a regression in 91f9f1a,
which added the range check into the wrong if statement.

* Extend ProjectJournal docs, thx to @DomClark

* Fixes LMMS#4781: Don't disconnect LADSPA automation on export

* playing/recording pianoRoll's chord notes (LMMS#4963)

* SampleTrack: call requestChangesInModel before unref SampleBuffer (LMMS#4982)

To avoid a race condition between the gui thread which destroys the
samplebuffer and the mixer thread which increases the buffer's ref-
count, we'll make sure to touch the ref-count only when wh're synced
with the mixer.

* Making clearer the hierarchy. (LMMS#4967)

Add `override` keyword

* i18n: update translations from Transifex

* Bugfix - SampleTrack -> Load & Save: Fix recorded sample track not being
played correctly after saving and loading a project due to sample rate
not getting saved in the project file.

* Bugfix - SampleTrack -> Play: Fix sample track not being played in the
right place when it not played from the begining.

That has created a difference between the ticks and the metronome and
the sample track.

The cause of the problem was that the calculation of the frame to play
was wrong: we had calculated `framesPerTick` according to the current
engine's sample rate instead of the SampleBuffer's sample rate.

* SampleBuffer -> Use processingSampleRate.

SampleBuffer was using baseSampleRate as the default samplerate instead of the actual processingSampleRate.

* i18n: update template strings

* Travis: fix macOS build due to the old default version of Node.js

appdmg recently dropped support for Node.js < 8.5

* MP3 export: initialize ID3 tag with id3tag_init

Fixes wrongly set 'Blues' genre(ID 0) in exported mp3 files.

* updated splash (LMMS#5002)

* Fixes LMMS#4996: Fix metadata when exporting multiple tracks (LMMS#5005)

Co-Authored-By: Hyunjin Song <tteu.ingog@gmail.com>

* Fix German translation

* Fix "Export Tracks"
* Add "Export MIDI"

[ci skip]

* DMG rebranding (LMMS#5013)

Rebrand macOS DMG background
- Design and artwork courtesy @RebeccaDeField
- Closes LMMS#4289

* fix color profile error (LMMS#5019)

* Bump version to 1.2.0

* Add a save option to discard MIDI connections (LMMS#5021)

* Song: add isSavingProject.
* VersionedSaveDialog: Add support for a custom option dialog.
* AutomatableModel: Support the discardMIDIConnections save option.
* InstrumentTrack: Support the discardMIDIConnections save option.
* SaveOptions: Show the save option dialog on "save as".

* Enable dark title bar on macOS
Closes LMMS#5031

* Travis: drop unneeded prefix setting for npm

* Fix macOS builds

* Increase Mixer fader falloff speed

This also fixes a display bug that is present with large fader falloff speeds.

*  Replace tLimit() with qBound() and remove templates.h (LMMS#5040)

* Replace tLimit() with qBound()

* Remove templates.h

* Add .editorconfig

This file tells the github online editor to use tabs of width 4 instead
of 8. Open
[this](https://github.com/JohannesLorenz/github_test/blob/master/test.cpp)
test file in your browser to see how it works (the width is 5 in the
example).

Actually, it also tells many other editors...

* FadeButtons now remain partially lit as a note plays out (LMMS#4969)

* MDI Subwindow Decoration for VeSTige instruments closes LMMS#2824 (LMMS#2826)

* MDI Subwindow Decoration for VeSTige instruments closes LMMS#2824

* revert changes

* change QMdiSubWindow to our SubWindow in Vestige

* Drop sample on sampletracks (LMMS#5043)

* implements drag and drop samples to sampletracks

* clean up / take care of timeLineWidget heigth in songeditor

* unused memeber removed

* clean up

* Update include/TrackContainerView.h

Co-Authored-By: Spekular <Spekular@users.noreply.github.com>

* Update src/gui/TrackContainerView.cpp

Co-Authored-By: Spekular <Spekular@users.noreply.github.com>

* Update src/gui/TrackContainerView.cpp

Co-Authored-By: Spekular <Spekular@users.noreply.github.com>

* Update src/gui/editors/SongEditor.cpp

Co-Authored-By: Spekular <Spekular@users.noreply.github.com>

* load AFP if we don't drop on a sample track

* take care of timeLineWidget size changes

* clean up

* consolidate some code

* requested changes by code review

* move logic to SampleTrackView

* clean up

* clean up

* clean up

* Closes LMMS#5050: Add Mixer threading comments (LMMS#5069)

[ci skip]
  • Loading branch information
Spekular authored Jul 13, 2019
1 parent 231a840 commit d2a3c94
Show file tree
Hide file tree
Showing 190 changed files with 19,587 additions and 47,781 deletions.
5 changes: 5 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
root = true

[*]
indent_style = tab
tab_width = 4
11 changes: 10 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ dist: trusty
sudo: required
cache:
directories:
- apt_mingw_cache
- $HOME/apt_mingw_cache
- $HOME/.ccache
- $HOME/pbuilder-bases
matrix:
Expand All @@ -14,11 +14,20 @@ matrix:
- env: TARGET_OS=win32
- env: TARGET_OS=win64
- env: TARGET_OS=debian-sid TARGET_DEPLOY=True
git:
depth: false
- env: TARGET_OS=debian-sid TARGET_ARCH=i386
git:
depth: false
- compiler: clang
env: TARGET_OS=debian-sid
git:
depth: false
- os: osx
osx_image: xcode8.3
before_install:
# appdmg doesn't work with old Node.js
- if [ "$TRAVIS_OS_NAME" = osx ]; then nvm install 10; fi
install: ${TRAVIS_BUILD_DIR}/.travis/install.sh
script: ${TRAVIS_BUILD_DIR}/.travis/script.sh
after_script: ${TRAVIS_BUILD_DIR}/.travis/after_script.sh
Expand Down
1 change: 1 addition & 0 deletions .travis/debian_pkgs.sha256
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
314ef4af137903dfb13e8c3ef1e6ea56cfdb23808d52ec4f5f50e288c73610c5 pbuilder_0.229.1_all.deb
fa82aa8ed3055c6f6330104deedf080b26778295e589426d4c4dd0f2c2a5defa debootstrap_1.0.95_all.deb
2ef4c09f7841b72f93412803ddd142f72658536dbfabe00e449eb548f432f3f8 debian-archive-keyring_2017.7ubuntu1_all.deb
2 changes: 1 addition & 1 deletion .travis/linux..install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ sudo apt-get install -y $PACKAGES
sudo add-apt-repository -y ppa:kxstudio-debian/libs
sudo add-apt-repository -y ppa:kxstudio-debian/apps
sudo apt-get update
sudo apt-get install -y carla-git
sudo apt-get install -y carla
5 changes: 3 additions & 2 deletions .travis/linux.debian-sid.install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@
set -e

sudo apt-get install -y \
debian-archive-keyring \
dpkg \
pbuilder

# work around a pbuilder bug which breaks ccache
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=666525
# and also missing signing keys in Trusty's debian-archive-keyring
cd /tmp
wget http://archive.ubuntu.com/ubuntu/pool/main/p/pbuilder/pbuilder_0.229.1_all.deb
wget http://archive.ubuntu.com/ubuntu/pool/main/d/debootstrap/debootstrap_1.0.95_all.deb
wget http://archive.ubuntu.com/ubuntu/pool/universe/d/debian-archive-keyring/debian-archive-keyring_2017.7ubuntu1_all.deb
sha256sum -c "$TRAVIS_BUILD_DIR/.travis/debian_pkgs.sha256"
sudo dpkg -i pbuilder_0.229.1_all.deb debootstrap_1.0.95_all.deb
sudo dpkg -i pbuilder_0.229.1_all.deb debootstrap_1.0.95_all.deb debian-archive-keyring_2017.7ubuntu1_all.deb
cd "$OLDPWD"
41 changes: 36 additions & 5 deletions .travis/linux.debian-sid.script.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
set -e

: "${TARGET_ARCH:=amd64}"
Expand All @@ -21,19 +21,50 @@ fi
if [ ! -e "$BASETGZ.stamp" ]
then
mkdir -p "$HOME/pbuilder-bases"
# debootstrap fails to resolve dependencies which are virtual packages
# e.g. perl-openssl-abi-1.1 provided by perl-openssl-defaults, needed for building SWH
# See also: https://bugs.launchpad.net/ubuntu/+source/debootstrap/+bug/86536
sudo pbuilder --create --basetgz "$BASETGZ" --mirror $MIRROR \
--distribution sid --architecture $TARGET_ARCH \
--debootstrapopts --variant=buildd \
--debootstrapopts --keyring=$KEYRING \
--debootstrapopts --include=perl,libxml2-utils,libxml-perl,liblist-moreutils-perl,perl-openssl-defaults
--debootstrapopts --include=perl
touch "$BASETGZ.stamp"
else
sudo pbuilder --update --basetgz "$BASETGZ"
fi

sync_version() {
local VERSION
local MMR
local STAGE
local EXTRA

VERSION=$(git describe --tags --match v[0-9].[0-9].[0-9]*)
VERSION=${VERSION#v}
MMR=${VERSION%%-*}
case $VERSION in
*-*-*-*)
VERSION=${VERSION%-*}
STAGE=${VERSION#*-}
STAGE=${STAGE%-*}
EXTRA=${VERSION##*-}
VERSION=$MMR~$STAGE.$EXTRA
;;
*-*-*)
VERSION=${VERSION%-*}
EXTRA=${VERSION##*-}
VERSION=$MMR.$EXTRA
;;
*-*)
STAGE=${VERSION#*-}
VERSION=$MMR~$STAGE
;;
esac

sed "1 s/@VERSION@/$VERSION/" -i debian/changelog
echo "Set Debian version to $VERSION"
}

sync_version

DIR="$PWD"
cd ..
dpkg-source -b "$DIR"
Expand Down
2 changes: 1 addition & 1 deletion .travis/linux.win.download.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e

CACHE_DIR=$TRAVIS_BUILD_DIR/apt_mingw_cache/$1
CACHE_DIR=$HOME/apt_mingw_cache/$1
mkdir -p "$CACHE_DIR"

pushd "$CACHE_DIR"
Expand Down
2 changes: 1 addition & 1 deletion .travis/osx..install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ brew install $PACKAGES
# fftw tries to install gcc which conflicts with travis
brew install fftw --ignore-dependencies

sudo npm install -g appdmg
npm install -g appdmg
8 changes: 5 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ SET(PROJECT_COPYRIGHT "2008-${PROJECT_YEAR} ${PROJECT_AUTHOR}")
SET(VERSION_MAJOR "1")
SET(VERSION_MINOR "2")
SET(VERSION_RELEASE "0")
SET(VERSION_STAGE "rc8")
SET(VERSION_STAGE "")
SET(VERSION_BUILD "0")
SET(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_RELEASE}")
IF(VERSION_STAGE)
Expand Down Expand Up @@ -67,14 +67,16 @@ OPTION(WANT_STK "Include Stk (Synthesis Toolkit) support" ON)
OPTION(WANT_SWH "Include Steve Harris's LADSPA plugins" ON)
OPTION(WANT_TAP "Include Tom's Audio Processing LADSPA plugins" ON)
OPTION(WANT_VST "Include VST support" ON)
OPTION(WANT_VST_NOWINE "Include partial VST support (without wine)" OFF)
OPTION(WANT_VST_32 "Include 32-bit VST support" ON)
OPTION(WANT_VST_64 "Include 64-bit VST support" ON)
OPTION(WANT_WINMM "Include WinMM MIDI support" OFF)
OPTION(WANT_DEBUG_FPE "Debug floating point exceptions" OFF)


IF(LMMS_BUILD_APPLE)
# Fix linking on 10.14+. See issue #4762 on github
LINK_DIRECTORIES(/usr/local/lib)
SET(WANT_SOUNDIO OFF)
SET(WANT_ALSA OFF)
SET(WANT_PULSEAUDIO OFF)
SET(WANT_VST OFF)
Expand Down Expand Up @@ -155,7 +157,7 @@ SET(QT_LIBRARIES
Qt5::Xml
)

IF(LMMS_BUILD_LINUX)
IF(LMMS_BUILD_LINUX AND WANT_VST)
FIND_PACKAGE(Qt5 COMPONENTS X11Extras REQUIRED)
LIST(APPEND QT_LIBRARIES Qt5::X11Extras)
ENDIF()
Expand Down
Binary file modified cmake/apple/dmg_branding.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added cmake/apple/dmg_branding@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions cmake/apple/lmms.plist.in
Original file line number Diff line number Diff line change
Expand Up @@ -147,5 +147,7 @@
<string>NSApplication</string>
<key>NSHighResolutionCapable</key>
<string>True</string>
<key>NSRequiresAquaSystemAppearance</key>
<string>False</string>
</dict>
</plist>
6 changes: 3 additions & 3 deletions cmake/apple/package_apple.json.in
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"title": "@MACOSX_BUNDLE_BUNDLE_NAME@ @MACOSX_BUNDLE_LONG_VERSION_STRING@",
"background": "@CMAKE_SOURCE_DIR@/cmake/apple/dmg_branding.png",
"icon-size": 72,
"icon-size": 128,
"contents": [
{ "x": 460, "y": 260, "type": "link", "path": "/Applications" },
{ "x": 220, "y": 260, "type": "file", "path": "@CMAKE_BINARY_DIR@/@MACOSX_BUNDLE_BUNDLE_NAME@.app" }
{ "x": 139, "y": 200, "type": "file", "path": "@CMAKE_BINARY_DIR@/@MACOSX_BUNDLE_BUNDLE_NAME@.app" },
{ "x": 568, "y": 200, "type": "link", "path": "/Applications" }
]
}
15 changes: 10 additions & 5 deletions cmake/linux/package_linux.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,10 @@ else
success "Downloaded $LINUXDEPLOYQT"
# Extract AppImage and replace LINUXDEPLOYQT variable with extracted binary
# to support systems without fuse
# Also, we need to set LD_LIBRARY_PATH, but linuxdepoyqt's AppRun unsets it
# See https://github.com/probonopd/linuxdeployqt/pull/370/
"$LINUXDEPLOYQT" --appimage-extract > /dev/null 2>&1
LINUXDEPLOYQT="squashfs-root/AppRun"
LINUXDEPLOYQT="squashfs-root/usr/bin/linuxdeployqt"
success "Extracted $APPIMAGETOOL"
fi

Expand All @@ -101,6 +103,7 @@ mv "${APPDIR}usr/bin/lmms" "${APPDIR}usr/bin/lmms.real"
cat >"${APPDIR}usr/bin/lmms" <<EOL
#!/usr/bin/env bash
DIR="\$( cd "\$( dirname "\${BASH_SOURCE[0]}" )" && pwd )"
export PATH="$PATH:/sbin"
if which carla > /dev/null 2>&1; then
CARLAPATH="\$(which carla)"
CARLAPREFIX="\${CARLAPATH%/bin*}"
Expand Down Expand Up @@ -134,15 +137,15 @@ export LD_LIBRARY_PATH="${APPDIR}usr/lib/lmms/":$LD_LIBRARY_PATH

# Handle wine linking
if [ -d "@WINE_32_LIBRARY_DIR@" ]; then
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$LD_LIBRARY_PATH/wine/:@WINE_32_LIBRARY_DIR@:@WINE_32_LIBRARY_DIR@wine/
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:@WINE_32_LIBRARY_DIRS@
fi
if [ -d "@WINE_64_LIBRARY_DIR@" ]; then
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$LD_LIBRARY_PATH/wine/:@WINE_64_LIBRARY_DIR@:@WINE_64_LIBRARY_DIR@wine/
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:@WINE_64_LIBRARY_DIRS@
fi

# Move executables so linuxdeployqt can find them
ZYNLIB="${APPDIR}usr/lib/lmms/RemoteZynAddSubFx"
VSTLIB32="${APPDIR}usr/lib/lmms/RemoteVstPlugin32.exe.so"
VSTLIB32="${APPDIR}usr/lib/lmms/32/RemoteVstPlugin32.exe.so"
VSTLIB64="${APPDIR}usr/lib/lmms/RemoteVstPlugin64.exe.so"

ZYNBIN="${APPDIR}usr/bin/RemoteZynAddSubFx"
Expand Down Expand Up @@ -172,8 +175,10 @@ executables="${executables} -executable=${APPDIR}usr/lib/lmms/ladspa/pitch_scale
# Bundle both qt and non-qt dependencies into appimage format
echo -e "\nBundling and relinking system dependencies..."
echo -e ">>>>> linuxdeployqt" > "$LOGFILE"
# FIXME: -unsupported-allow-new-glibc may result in an AppImage which is unusable on old systems.

# shellcheck disable=SC2086
"$LINUXDEPLOYQT" "$DESKTOPFILE" $executables -bundle-non-qt-libs -verbose=$VERBOSITY $STRIP >> "$LOGFILE" 2>&1
"$LINUXDEPLOYQT" "$DESKTOPFILE" $executables -unsupported-allow-new-glibc -bundle-non-qt-libs -verbose=$VERBOSITY $STRIP >> "$LOGFILE" 2>&1
success "Bundled and relinked dependencies"

# Link to original location so lmms can find them
Expand Down
27 changes: 27 additions & 0 deletions cmake/modules/CheckWineGcc.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
INCLUDE(CheckCXXSourceCompiles)

FUNCTION(CheckWineGcc BITNESS WINEGCC_EXECUTABLE RESULT)
FILE(WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/winegcc_test.cxx" "
#include <iostream>
#define USE_WS_PREFIX
#include <windows.h>
int main(int argc, const char* argv[]) {
return 0;
}
")
EXECUTE_PROCESS(COMMAND ${WINEGCC_EXECUTABLE} "-m${BITNESS}"
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/winegcc_test.cxx"
"-o" "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/winegcc_test"
OUTPUT_QUIET ERROR_QUIET
RESULT_VARIABLE WINEGCC_RESULT
)
FILE(REMOVE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/winegcc_test.cxx"
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/winegcc_test"
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/winegcc_test.exe.so"
)
IF(WINEGCC_RESULT EQUAL 0)
SET(${RESULT} True PARENT_SCOPE)
ELSE()
SET(${RESULT} False PARENT_SCOPE)
ENDIF()
ENDFUNCTION()
Loading

0 comments on commit d2a3c94

Please sign in to comment.