Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
884601f
Use CMake GenerateExportHeader
lukas-w Nov 24, 2017
74d4b2f
CMake: Fix MSVC architecture detection
lukas-w Nov 26, 2017
81a0ec3
MSVC: Port RemoteVstPlugin
lukas-w Nov 26, 2017
c41d59b
RemoteVstPlugin: Debug LoadLibrary failure
lukas-w Nov 26, 2017
2b1b3d3
MSVC: Fix VST build
lukas-w Nov 26, 2017
b416036
VST: Fix main entry calling convention
lukas-w Nov 26, 2017
9c35487
Linux compile fixes
lukas-w Nov 26, 2017
c3d0dc5
Fix Linux VST compilation
lukas-w Nov 26, 2017
e95a587
MSVC: Fix VST arch detection
lukas-w Nov 26, 2017
e644202
MSVC: Fix RemoteVstPlugin module path
lukas-w Nov 26, 2017
8fce500
VST build fixes
lukas-w Nov 27, 2017
f702738
CMake quoting fixes
lukas-w Nov 27, 2017
5b9579d
MinGW fixes
lukas-w Nov 28, 2017
9a9580a
Fix export errors with MinGW
lukas-w Nov 28, 2017
a0bd296
Mingw64 compilation fixes
lukas-w Nov 28, 2017
39d83ee
More export fixes
lukas-w Nov 28, 2017
be0c02f
Fix 64bit VSTs on Linux by fixing callback calling convention
lukas-w Jan 14, 2018
5744c2a
CMake: Fix Clang detection
lukas-w May 9, 2018
3beac2c
MSVC fixes (#4352)
May 22, 2018
9db8cbf
Enable 64bit VSTs on Linux
lukas-w Jun 7, 2018
cd35ec2
MSVC VST compilation fixes
lukas-w Jun 11, 2018
225e902
AudioSdl: Add support for full SDL2 with float samples and recording
Reflexe Nov 7, 2017
aa2c867
AudioSDL -> SDL2: Fix a crash from calling a SDL1 function instead of
Reflexe Dec 21, 2017
3d98b0a
Fix cherry-pick
lukas-w Jun 11, 2018
ad4c4f0
AudioSdl: Use NULL for device names in order to get the default device.
lukas-w Jun 11, 2018
00fda3f
Fix AppImage VST
lukas-w Jun 11, 2018
4d5eb7f
CircleCI: Display Appimage log when failing
lukas-w Jun 11, 2018
0349b97
Fix AppImage 64bit RemoteVstPlugin libwine discovery
lukas-w Jun 11, 2018
af57300
VstPlugin: Fix define naming conflict with MinGW
lukas-w Jun 11, 2018
57fdaed
winegcc_wrapper: Remove misleading usage hint
lukas-w Jun 16, 2018
40a1e36
RemotePlugin: Revert unnecessary invalidate() changes
lukas-w Jun 24, 2018
642703e
Whitespace fix
lukas-w Jun 24, 2018
66c2047
CircleCI: Make sure build fails when AppImage building does
lukas-w Jun 25, 2018
65ccaff
RemoteVstPlugin: Fix confusing variable names
lukas-w Jun 25, 2018
d04965a
Merge branch 'master' into msvc/vst
lukas-w Jul 6, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix AppImage 64bit RemoteVstPlugin libwine discovery
  • Loading branch information
lukas-w committed Jun 11, 2018
commit 0349b976c8b52dd1cbea019fa0fcae1cebd73b1b
7 changes: 5 additions & 2 deletions cmake/linux/package_linux.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,11 @@ unset LD_LIBRARY_PATH
export LD_LIBRARY_PATH="${APPDIR}usr/lib/lmms/":$LD_LIBRARY_PATH

# Handle wine linking
if [ -d "@WINE_LIBRARY_FIX@" ]; then
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:@WINE_LIBRARY_FIX@:@WINE_LIBRARY_FIX@wine/
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/
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/
fi

# Move executables so linuxdeployqt can find them
Expand Down
19 changes: 14 additions & 5 deletions cmake/modules/FindWine.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,19 @@

LIST(APPEND CMAKE_PREFIX_PATH /opt/wine-stable /opt/wine-devel /opt/wine-staging /usr/lib/wine/)


FIND_PATH(WINE_INCLUDE_DIR wine/exception.h PATH_SUFFIXES wine)
FIND_LIBRARY(WINE_LIBRARY NAMES wine PATH_SUFFIXES wine i386-linux-gnu/wine)
FIND_PROGRAM(WINE_CXX
NAMES wineg++ winegcc winegcc64 winegcc32 winegcc-stable
PATHS /usr/lib/wine)
FIND_PROGRAM(WINE_BUILD NAMES winebuild)

SET(_ARCHITECTURE ${CMAKE_LIBRARY_ARCHITECTURE})

FIND_LIBRARY(WINE_LIBRARY NAMES wine PATH_SUFFIXES wine i386-linux-gnu/wine)

SET(CMAKE_LIBRARY_ARCHITECTURE ${_ARCHITECTURE})

SET(WINE_INCLUDE_DIRS ${WINE_INCLUDE_DIR} )
SET(WINE_LIBRARIES ${WINE_LIBRARY} )

Expand All @@ -25,6 +31,10 @@ STRING(REPLACE " " ";" WINEBUILD_FLAGS "${WINEBUILD_OUTPUT}")

FOREACH(FLAG ${WINEBUILD_FLAGS})
IF("${FLAG}" MATCHES "libwinecrt0.a.*")
STRING(REGEX REPLACE "/wine/libwinecrt0.a.*" "" FLAG "${FLAG}")

SET(WINE_64_LIBRARY_DIR "${FLAG}/")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unusual, but it is possible to use 32-bit WINE toolchain wine32-tools on 64-bit Debian/Ubuntu. In that case, 64-bit VST compilation needs the inverse replacing(32-bit toolchain uses 32-bit libraries, even if -m64 is specified).

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that something we have supported before and that this PR breaks?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that something we have supported

It's an issue when building 64-bit VST on Linux, so no.


# Debian systems
STRING(REPLACE "/lib/x86_64-" "/lib/i386-" FLAG "${FLAG}")
# Fedora systems
Expand All @@ -34,8 +44,7 @@ FOREACH(FLAG ${WINEBUILD_FLAGS})
# WineHQ (/opt/wine-stable, /opt/wine-devel, /opt/wine-staging)
STRING(REPLACE "/lib64/wine/" "/lib/wine/" FLAG "${FLAG}")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This logic doesn't work anymore because we drop /wine/ before it and causes #4501.
Some possible solutions:

  • Use a regular expression to match trailing lib64
  • Remove /wine/libwinecrt0.a.* after replacing
  • Always replace lib64 with lib if it doesn't break other platforms

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for tracking this down. Fixed with 515fefa.

STRING(REGEX REPLACE "/wine/libwinecrt0.a.*" "" WINE_LIBRARY_FIX "${FLAG}")
SET(WINE_LIBRARY_FIX "${WINE_LIBRARY_FIX}/")
SET(WINE_32_LIBRARY_DIR "${FLAG}/")
ENDIF()
ENDFOREACH()

Expand All @@ -44,8 +53,8 @@ find_package_handle_standard_args(Wine DEFAULT_MSG WINE_CXX WINE_LIBRARIES WINE_

mark_as_advanced(WINE_INCLUDE_DIR WINE_LIBRARY WINE_CXX WINE_BUILD)

IF(WINE_LIBRARY_FIX)
SET(WINE_32_FLAGS "-L${WINE_LIBRARY_FIX}wine/ -L${WINE_LIBRARY_FIX}")
IF(WINE_32_LIBRARY_DIR)
SET(WINE_32_FLAGS "-L${WINE_32_LIBRARY_DIR}wine/ -L${WINE_32_LIBRARY_DIR}")
ENDIF()

# Create winegcc wrapper
Expand Down