Compare commits
30 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7a3c8324b0 | ||
|
|
c536dcdf9d | ||
|
|
4037f98441 | ||
|
|
f94bb2cb66 | ||
|
|
f2d1d74cbf | ||
|
|
3fefa8db52 | ||
|
|
4685223110 | ||
|
|
5449af4e6f | ||
|
|
5df52a588c | ||
|
|
c317e60b83 | ||
|
|
e2f9c65d2c | ||
|
|
a265e0c2df | ||
|
|
5af988b653 | ||
|
|
33b5b28cd9 | ||
|
|
22f822bf12 | ||
|
|
b70e210cf1 | ||
|
|
28d8ac4b76 | ||
|
|
84e05a7388 | ||
|
|
86c781b8b3 | ||
|
|
eb49d6c11d | ||
|
|
0cd237877a | ||
|
|
1ce450523f | ||
|
|
9ea778d246 | ||
|
|
337578b1ce | ||
|
|
d369b6c0bf | ||
|
|
bb72d54ac3 | ||
|
|
2b1f2a79a4 | ||
|
|
7941e2f1da | ||
|
|
29853b8db6 | ||
|
|
a252706ee2 |
@@ -1,84 +0,0 @@
|
||||
---
|
||||
# Language
|
||||
Language: Cpp
|
||||
Standard: c++20
|
||||
|
||||
# Indentation
|
||||
TabWidth: 4
|
||||
UseTab: Always
|
||||
IndentWidth: 4
|
||||
ColumnLimit: 120
|
||||
|
||||
# Indentation detail
|
||||
AlignAfterOpenBracket: DontAlign
|
||||
ContinuationIndentWidth: 4
|
||||
BreakConstructorInitializers: BeforeComma
|
||||
ConstructorInitializerIndentWidth: 4
|
||||
ConstructorInitializerAllOnOneLineOrOnePerLine: false
|
||||
BinPackParameters: true
|
||||
BinPackArguments: true
|
||||
AlignOperands: false
|
||||
|
||||
# Alignment
|
||||
AlignEscapedNewlines: DontAlign
|
||||
AccessModifierOffset: -4
|
||||
AllowShortBlocksOnASingleLine: Always
|
||||
AllowShortIfStatementsOnASingleLine: Always
|
||||
AllowShortCaseLabelsOnASingleLine: false
|
||||
AllowShortFunctionsOnASingleLine: InlineOnly
|
||||
BreakBeforeBinaryOperators: All
|
||||
|
||||
# Includes
|
||||
IncludeBlocks: Regroup
|
||||
IncludeCategories:
|
||||
# windows.h must go before everything else
|
||||
# otherwise, you will get errors
|
||||
- Regex: '^<windows.h>$'
|
||||
Priority: -99
|
||||
# the "main header" implicitly gets priority 0
|
||||
# system headers
|
||||
- Regex: '^<[^>]+>$'
|
||||
Priority: 1
|
||||
# non-system headers
|
||||
- Regex: '.*'
|
||||
Priority: 2
|
||||
SortIncludes: true
|
||||
|
||||
# Spaces
|
||||
SpaceBeforeAssignmentOperators: true
|
||||
SpaceBeforeParens: ControlStatements
|
||||
SpacesInAngles: false
|
||||
SpacesInCStyleCastParentheses: false
|
||||
SpacesInParentheses: false
|
||||
|
||||
# Brace wrapping
|
||||
# Not directly mentioned in the coding conventions,
|
||||
# but required to avoid tons of auto reformatting
|
||||
BreakBeforeBraces: Custom
|
||||
BraceWrapping:
|
||||
AfterClass: true
|
||||
AfterControlStatement: Always
|
||||
AfterEnum: true
|
||||
AfterFunction: true
|
||||
AfterNamespace: false
|
||||
AfterStruct: true
|
||||
AfterUnion: true
|
||||
AfterExternBlock: false
|
||||
BeforeCatch: true
|
||||
BeforeElse: true
|
||||
IndentBraces: false
|
||||
SplitEmptyFunction: true
|
||||
SplitEmptyRecord: true
|
||||
SplitEmptyNamespace: true
|
||||
BeforeWhile: false
|
||||
BeforeLambdaBody: false
|
||||
|
||||
# Do not break doxygen comments
|
||||
CommentPragmas: '^[[:space:]]*\\.+'
|
||||
|
||||
# Pointers
|
||||
# Use pointer close to type: `const char* const* function()`
|
||||
PointerAlignment: Left
|
||||
|
||||
...
|
||||
|
||||
50
.clang-tidy
@@ -1,50 +0,0 @@
|
||||
---
|
||||
Checks: >
|
||||
bugprone-macro-parentheses,
|
||||
bugprone-macro-repeated-side-effects,
|
||||
modernize-avoid-c-arrays,
|
||||
modernize-loop-convert,
|
||||
modernize-redundant-void-arg,
|
||||
modernize-use-auto,
|
||||
modernize-use-bool-literals,
|
||||
modernize-use-emplace,
|
||||
modernize-use-equals-default,
|
||||
modernize-use-equals-delete,
|
||||
modernize-use-override,
|
||||
modernize-use-using,
|
||||
performance-trivially-destructible,
|
||||
readability-braces-around-statements,
|
||||
readability-const-return-type,
|
||||
readability-identifier-naming,
|
||||
readability-misleading-indentation,
|
||||
readability-simplify-boolean-expr
|
||||
WarningsAsErrors: ''
|
||||
HeaderFilterRegex: '' # don't show errors from headers
|
||||
FormatStyle: none
|
||||
User: user
|
||||
CheckOptions:
|
||||
- key: readability-identifier-naming.ClassCase
|
||||
value: CamelCase
|
||||
- key: readability-identifier-naming.EnumCase
|
||||
value: CamelCase
|
||||
- key: readability-identifier-naming.TypedefCase
|
||||
value: CamelCase
|
||||
- key: readability-identifier-naming.UnionCase
|
||||
value: CamelCase
|
||||
- key: readability-identifier-naming.StructCase
|
||||
value: CamelCase
|
||||
- key: readability-identifier-naming.UnionCase
|
||||
value: CamelCase
|
||||
# not yet working, as it currently applies both for static and object members
|
||||
# - key: readability-identifier-naming.MemberPrefix
|
||||
# value: 'm_'
|
||||
# currently only working for local static variables:
|
||||
- key: readability-identifier-naming.StaticVariablePrefix
|
||||
value: 's_'
|
||||
# not yet working
|
||||
# - key: readability-identifier-naming.VariableCase
|
||||
# value: camelBack
|
||||
- key: readability-identifier-naming.FunctionCase
|
||||
value: camelBack
|
||||
...
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
root = true
|
||||
|
||||
[*]
|
||||
indent_style = tab
|
||||
tab_width = 4
|
||||
5
.gitattributes
vendored
@@ -1,5 +0,0 @@
|
||||
.gitattributes export-ignore
|
||||
.gitignore export-ignore
|
||||
data/locale/* linguist-documentation
|
||||
* text=auto eol=lf
|
||||
*.{bin,bmp,flac,icns,ico,mmpz,ogg,png,xiz,xmz,wav} binary
|
||||
2
.github/FUNDING.yml
vendored
@@ -1,2 +0,0 @@
|
||||
---
|
||||
custom: https://lmms.io/get-involved/#donate
|
||||
91
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
@@ -1,91 +0,0 @@
|
||||
# yamllint disable-file rule:line-length
|
||||
name: Bug Report
|
||||
description: File a bug report to help us improve
|
||||
labels:
|
||||
- bug
|
||||
body:
|
||||
- type: input
|
||||
id: system-information
|
||||
attributes:
|
||||
label: System Information
|
||||
description: |
|
||||
- The operating system you use to run LMMS.
|
||||
- When relevant, also include your hardware information.
|
||||
placeholder: ex. Fedora Linux 39, KDE Plasma 5.27.10 - 13th Gen Intel® Core™ i9-13950HX, 32GB RAM
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
id: affected-version
|
||||
attributes:
|
||||
label: LMMS Version(s)
|
||||
description: |
|
||||
- The version of LMMS affected by the bug.
|
||||
- Can be an official version number, nightly release identifier, or commit hash.
|
||||
- The version number can be found under the Help > About menu.
|
||||
placeholder: ex. 1.2.2, 1.3.0-alpha.1.518+gdd53bec31, 2d185df
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
id: working-version
|
||||
attributes:
|
||||
label: Most Recent Working Version
|
||||
description: |
|
||||
- If there is a previous version of LMMS that did not exhibit the bug, include it here.
|
||||
placeholder: ex. 1.2.2, 1.3.0-alpha.1.518+gdd53bec31, 2d185df
|
||||
validations:
|
||||
required: false
|
||||
- type: textarea
|
||||
id: bug-summary
|
||||
attributes:
|
||||
label: Bug Summary
|
||||
description: Briefly describe the bug.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: expected-behaviour
|
||||
attributes:
|
||||
label: Expected Behaviour
|
||||
description: Describe what should have happened.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: steps-to-reproduce
|
||||
attributes:
|
||||
label: Steps To Reproduce
|
||||
description: |
|
||||
- Describe the minimum set of steps required to reproduce this bug.
|
||||
- If you included a minimum reproducible project below, you can describe here how it should be used.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: logs
|
||||
attributes:
|
||||
label: Logs
|
||||
description: |
|
||||
- Copy and paste any relevant log output here.
|
||||
value: |
|
||||
<details>
|
||||
<summary>Click to expand</summary>
|
||||
<pre>
|
||||
<!-- paste logs here -->
|
||||
</pre>
|
||||
</details>
|
||||
validations:
|
||||
required: false
|
||||
- type: textarea
|
||||
id: supporting-files
|
||||
attributes:
|
||||
label: Screenshots / Minimum Reproducible Project
|
||||
description: |
|
||||
- Upload any screenshots showing the bug in action.
|
||||
- If possible, also include a .mmp/.mmpz project containing the simplest possible
|
||||
setup needed to reproduce the bug.
|
||||
|
||||
***Note:** To upload a project file to GitHub, it will need to be placed in a .zip archive.*
|
||||
- type: checkboxes
|
||||
id: search-for-existing
|
||||
attributes:
|
||||
label: Please search the issue tracker for existing bug reports before submitting your own.
|
||||
options:
|
||||
- label: I have searched all existing issues and confirmed that this is not a duplicate.
|
||||
required: true
|
||||
5
.github/ISSUE_TEMPLATE/config.yml
vendored
@@ -1,5 +0,0 @@
|
||||
---
|
||||
contact_links:
|
||||
- name: Get help on Discord
|
||||
url: https://lmms.io/chat/
|
||||
about: Need help? Have a question? Reach out to other LMMS users on our Discord server!
|
||||
32
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
@@ -1,32 +0,0 @@
|
||||
# yamllint disable-file rule:line-length
|
||||
name: Feature Request
|
||||
description: Suggest an idea for the project
|
||||
labels:
|
||||
- "enhancement"
|
||||
body:
|
||||
- type: textarea
|
||||
id: enhancement-summary
|
||||
attributes:
|
||||
label: Enhancement Summary
|
||||
description: |
|
||||
- Briefly describe the enhancement.
|
||||
- Explain why you believe the proposed enhancement to be a good idea, and (if applicable) how it helps
|
||||
overcome a limitation of LMMS you are currently facing.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: mockup
|
||||
attributes:
|
||||
label: Implementation Details / Mockup
|
||||
description: |
|
||||
- Explain how you believe this enhancement should be implemented.
|
||||
- If your proposal encompasses changes to the user interface, include diagrams displaying your intent.
|
||||
validations:
|
||||
required: true
|
||||
- type: checkboxes
|
||||
id: search-for-existing
|
||||
attributes:
|
||||
label: Please search the issue tracker for existing feature requests before submitting your own.
|
||||
options:
|
||||
- label: I have searched all existing issues and confirmed that this is not a duplicate.
|
||||
required: true
|
||||
3
.github/no-response.yml
vendored
@@ -1,3 +0,0 @@
|
||||
---
|
||||
# Label requiring a response
|
||||
responseRequiredLabel: "response required"
|
||||
490
.github/workflows/build.yml
vendored
@@ -1,490 +0,0 @@
|
||||
---
|
||||
name: build
|
||||
'on': [push, pull_request]
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
jobs:
|
||||
linux-x86_64:
|
||||
name: linux-x86_64
|
||||
runs-on: ubuntu-22.04
|
||||
env:
|
||||
CMAKE_OPTS: >-
|
||||
-DUSE_WERROR=ON
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo
|
||||
-DUSE_COMPILE_CACHE=ON
|
||||
-DWANT_DEBUG_CPACK=ON
|
||||
CCACHE_MAXSIZE: 0
|
||||
CCACHE_NOCOMPRESS: 1
|
||||
MAKEFLAGS: -j2
|
||||
steps:
|
||||
- name: Configure git
|
||||
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
||||
- name: Check out
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
submodules: recursive
|
||||
- name: Clone fltk
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: fltk/fltk
|
||||
path: fltk
|
||||
ref: 27d991f046bdebb12bfd58f7c05a19f135979c29
|
||||
fetch-depth: 1
|
||||
- name: Configure winehq
|
||||
run: |
|
||||
sudo dpkg --add-architecture i386
|
||||
sudo mkdir -pm755 /etc/apt/keyrings
|
||||
wget -O - https://dl.winehq.org/wine-builds/winehq.key | \
|
||||
sudo gpg --dearmor -o /etc/apt/keyrings/winehq-archive.key -
|
||||
sudo wget -NP /etc/apt/sources.list.d/ \
|
||||
https://dl.winehq.org/wine-builds/ubuntu/dists/$(lsb_release -cs)/winehq-$(lsb_release -cs).sources
|
||||
- name: Install packages
|
||||
run: |
|
||||
sudo apt-get update -y
|
||||
sudo apt-get install -y --no-install-recommends \
|
||||
$(xargs < .github/workflows/deps-ubuntu-24.04-gcc.txt)
|
||||
sudo apt-get install -y --install-recommends g++-multilib gcc-multilib winehq-devel wine-devel-dev
|
||||
sudo apt-get install -y --install-recommends \
|
||||
$(xargs < .github/workflows/deps-ubuntu-24.04-fltk.txt)
|
||||
- name: Cache ccache data
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
key: ccache-${{ github.job }}-${{ github.ref }}-${{ github.run_id }}
|
||||
restore-keys: |
|
||||
ccache-${{ github.job }}-${{ github.ref }}-
|
||||
ccache-${{ github.job }}-
|
||||
path: ~/.ccache
|
||||
- name: Configure fltk
|
||||
run: |
|
||||
cmake -S fltk -B fltk/build -DFLTK_BUILD_SHARED_LIBS=ON -DFLTK_BACKEND_WAYLAND=ON \
|
||||
-DFLTK_USE_LIBDECOR_GTK=OFF -DFLTK_BUILD_TEST=OFF -DFLTK_BUILD_GL=OFF
|
||||
- name: Install fltk
|
||||
run: |
|
||||
cmake --build fltk/build
|
||||
sudo cmake --install fltk/build --prefix /usr
|
||||
- name: Configure
|
||||
run: |
|
||||
ccache --zero-stats
|
||||
source /opt/qt5*/bin/qt5*-env.sh || true
|
||||
cmake -S . \
|
||||
-B build \
|
||||
$CMAKE_OPTS
|
||||
- name: Build
|
||||
run: cmake --build build
|
||||
- name: Run tests
|
||||
run: |
|
||||
cd build/tests
|
||||
ctest --output-on-failure -j2
|
||||
- name: Package
|
||||
run: |
|
||||
cmake --build build --target package
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: linux
|
||||
path: build/lmms-*.AppImage
|
||||
- name: Trim ccache and print statistics
|
||||
run: |
|
||||
ccache --cleanup
|
||||
echo "[ccache config]"
|
||||
ccache --show-config
|
||||
echo "[ccache stats]"
|
||||
ccache --show-stats
|
||||
env:
|
||||
CCACHE_MAXSIZE: 500M
|
||||
linux-arm64:
|
||||
name: linux-arm64
|
||||
runs-on: ubuntu-24.04-arm
|
||||
env:
|
||||
CMAKE_OPTS: >-
|
||||
-DUSE_WERROR=ON
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo
|
||||
-DUSE_COMPILE_CACHE=ON
|
||||
-DWANT_DEBUG_CPACK=ON
|
||||
CCACHE_MAXSIZE: 0
|
||||
CCACHE_NOCOMPRESS: 1
|
||||
MAKEFLAGS: -j2
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
steps:
|
||||
- name: Configure git
|
||||
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
||||
- name: Check out
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
submodules: recursive
|
||||
- name: Clone fltk
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: fltk/fltk
|
||||
path: fltk
|
||||
ref: 27d991f046bdebb12bfd58f7c05a19f135979c29
|
||||
fetch-depth: 1
|
||||
- name: Install system packages
|
||||
run: |
|
||||
sudo apt-get update -y
|
||||
sudo apt-get install -y --no-install-recommends \
|
||||
$(xargs < .github/workflows/deps-ubuntu-24.04-gcc.txt)
|
||||
sudo apt-get install -y --install-recommends \
|
||||
$(xargs < .github/workflows/deps-ubuntu-24.04-fltk.txt)
|
||||
- name: Cache ccache data
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
key: ccache-${{ github.job }}-${{ github.ref }}-${{ github.run_id }}
|
||||
restore-keys: |
|
||||
ccache-${{ github.job }}-${{ github.ref }}-
|
||||
ccache-${{ github.job }}-
|
||||
path: ~/.ccache
|
||||
- name: Configure fltk
|
||||
run: |
|
||||
cmake -S fltk -B fltk/build -DFLTK_BUILD_SHARED_LIBS=ON -DFLTK_BACKEND_WAYLAND=ON \
|
||||
-DFLTK_USE_LIBDECOR_GTK=OFF -DFLTK_BUILD_TEST=OFF -DFLTK_BUILD_GL=OFF
|
||||
- name: Install fltk
|
||||
run: |
|
||||
cmake --build fltk/build
|
||||
sudo cmake --install fltk/build --prefix /usr
|
||||
- name: Configure
|
||||
run: |
|
||||
ccache --zero-stats
|
||||
cmake -S . \
|
||||
-B build \
|
||||
$CMAKE_OPTS
|
||||
- name: Build
|
||||
run: cmake --build build
|
||||
- name: Run tests
|
||||
run: |
|
||||
cd build/tests
|
||||
ctest --output-on-failure -j2
|
||||
- name: Package
|
||||
run: |
|
||||
cmake --build build --target package
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: linux-arm64
|
||||
path: build/lmms-*.AppImage
|
||||
- name: Trim ccache and print statistics
|
||||
run: |
|
||||
ccache --cleanup
|
||||
echo "[ccache config]"
|
||||
ccache --show-config
|
||||
echo "[ccache stats]"
|
||||
ccache --show-stats
|
||||
env:
|
||||
CCACHE_MAXSIZE: 500M
|
||||
macos:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
arch: [ x86_64, arm64 ]
|
||||
include:
|
||||
- arch: x86_64
|
||||
os: macos-15-intel
|
||||
xcode: "16.4"
|
||||
- arch: arm64
|
||||
os: macos-15
|
||||
xcode: "16.4"
|
||||
name: macos-${{ matrix.arch }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
env:
|
||||
CMAKE_OPTS: >-
|
||||
-Werror=dev
|
||||
-DUSE_WERROR=ON
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo
|
||||
-DUSE_COMPILE_CACHE=ON
|
||||
CCACHE_MAXSIZE: 0
|
||||
CCACHE_NOCOMPRESS: 1
|
||||
MAKEFLAGS: -j3
|
||||
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
|
||||
steps:
|
||||
- name: Check out
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
submodules: recursive
|
||||
- name: Clean up Homebrew download cache
|
||||
run: rm -rf ~/Library/Caches/Homebrew/downloads
|
||||
- name: Restore Homebrew download cache
|
||||
id: cache-homebrew
|
||||
uses: actions/cache/restore@v3
|
||||
with:
|
||||
key: n/a - only restore from restore-keys
|
||||
restore-keys: |
|
||||
homebrew-${{ matrix.arch }}-
|
||||
path: ~/Library/Caches/Homebrew/downloads
|
||||
- name: Cache ccache data
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
key: "ccache-${{ github.job }}-${{ matrix.arch }}-${{ github.ref }}\
|
||||
-${{ github.run_id }}"
|
||||
restore-keys: |
|
||||
ccache-${{ github.job }}-${{ matrix.arch }}-${{ github.ref }}-
|
||||
ccache-${{ github.job }}-${{ matrix.arch }}-
|
||||
path: ~/Library/Caches/ccache
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
brew bundle install --verbose
|
||||
npm update -g npm
|
||||
npm install --location=global appdmg
|
||||
env:
|
||||
HOMEBREW_NO_AUTO_UPDATE: 1
|
||||
HOMEBREW_NO_INSTALL_UPGRADE: 1
|
||||
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1
|
||||
- name: Configure
|
||||
run: |
|
||||
ccache --zero-stats
|
||||
source .github/workflows/macos-env.sh
|
||||
mkdir build
|
||||
cmake -S . \
|
||||
-B build \
|
||||
-DCMAKE_OSX_ARCHITECTURES=${{ matrix.arch }} \
|
||||
$CMAKE_OPTS \
|
||||
-DUSE_WERROR=OFF
|
||||
- name: Build
|
||||
run: cmake --build build
|
||||
- name: Run tests
|
||||
run: |
|
||||
cd build/tests
|
||||
ctest --output-on-failure -j3
|
||||
- name: Package
|
||||
run: |
|
||||
cmake --build build --target package
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: macos-${{ matrix.arch }}
|
||||
path: build/lmms-*.dmg
|
||||
- name: Trim ccache and print statistics
|
||||
run: |
|
||||
ccache --cleanup
|
||||
echo "[ccache config]"
|
||||
ccache --show-config
|
||||
echo "[ccache stats]"
|
||||
ccache --show-stats --verbose
|
||||
env:
|
||||
CCACHE_MAXSIZE: 500MB
|
||||
- name: Save Homebrew download cache
|
||||
if: ${{ steps.cache-homebrew.outputs.cache-matched-key != env.key }}
|
||||
uses: actions/cache/save@v3
|
||||
with:
|
||||
key: ${{ env.key }}
|
||||
path: ~/Library/Caches/Homebrew/downloads
|
||||
env:
|
||||
key: "homebrew-${{ matrix.arch }}\
|
||||
-${{ hashFiles('Brewfile.lock.json') }}"
|
||||
mingw:
|
||||
name: mingw64
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CMAKE_OPTS: >-
|
||||
-Werror=dev
|
||||
-DUSE_WERROR=ON
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo
|
||||
-DUSE_COMPILE_CACHE=ON
|
||||
CCACHE_MAXSIZE: 0
|
||||
CCACHE_NOCOMPRESS: 1
|
||||
MAKEFLAGS: -j2
|
||||
steps:
|
||||
- name: Configure apt
|
||||
run: |
|
||||
sudo sh -c 'echo "deb http://ppa.launchpad.net/tobydox/mingw-w64/ubuntu focal main" > \
|
||||
/etc/apt/sources.list.d/tobydox-mingw-w64.list'
|
||||
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 72931B477E22FEFD47F8DECE02FE5F12ADDE29B2
|
||||
sudo apt-get update -y
|
||||
- name: Configure git
|
||||
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
||||
- name: Check out
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
submodules: recursive
|
||||
- name: Cache ccache data
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
key: "ccache-${{ github.job }}-64-${{ github.ref }}\
|
||||
-${{ github.run_id }}"
|
||||
restore-keys: |
|
||||
ccache-${{ github.job }}-64-${{ github.ref }}-
|
||||
ccache-${{ github.job }}-64-
|
||||
path: ~/.ccache
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get install -y --no-install-recommends \
|
||||
$(xargs < .github/workflows/deps-ubuntu-24.04-mingw.txt)
|
||||
- name: Configure
|
||||
run: |
|
||||
ccache --zero-stats
|
||||
cmake -S . \
|
||||
-B build \
|
||||
-DCMAKE_TOOLCHAIN_FILE="./cmake/toolchains/MinGW-W64-64.cmake" \
|
||||
$CMAKE_OPTS
|
||||
- name: Build
|
||||
run: cmake --build build
|
||||
- name: Package
|
||||
run: cmake --build build --target package
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: mingw64
|
||||
path: build/lmms-*.exe
|
||||
- name: Trim ccache and print statistics
|
||||
run: |
|
||||
ccache --cleanup
|
||||
echo "[ccache config]"
|
||||
ccache --show-config
|
||||
echo "[ccache stats]"
|
||||
ccache --show-stats
|
||||
env:
|
||||
CCACHE_MAXSIZE: 500M
|
||||
msvc:
|
||||
name: msvc-x64
|
||||
runs-on: windows-2022
|
||||
env:
|
||||
CCACHE_MAXSIZE: 0
|
||||
CCACHE_NOCOMPRESS: 1
|
||||
steps:
|
||||
- name: Check out
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
submodules: recursive
|
||||
- name: Cache vcpkg dependencies
|
||||
id: cache-deps
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
key: vcpkg-msvc-x86_64-${{ hashFiles('vcpkg.json') }}
|
||||
restore-keys: |
|
||||
vcpkg-msvc-x86_64-
|
||||
path: build\vcpkg_installed
|
||||
- name: Cache ccache data
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
# yamllint disable rule:line-length
|
||||
key: "ccache-${{ github.job }}-x64-${{ github.ref }}\
|
||||
-${{ github.run_id }}"
|
||||
restore-keys: |
|
||||
ccache-${{ github.job }}-x64-${{ github.ref }}-
|
||||
ccache-${{ github.job }}-x64-
|
||||
path: ~\AppData\Local\ccache
|
||||
# yamllint enable rule:line-length
|
||||
- name: Install tools
|
||||
run: choco install ccache
|
||||
- name: Install Qt
|
||||
uses: jurplel/install-qt-action@d325aaf2a8baeeda41ad0b5d39f84a6af9bcf005
|
||||
with:
|
||||
version: '6.8.*'
|
||||
arch: "win64_msvc2022_64"
|
||||
archives: qtbase qtsvg qttools
|
||||
cache: true
|
||||
- name: Set up build environment
|
||||
uses: ilammy/msvc-dev-cmd@cec98b9d092141f74527d0afa6feb2af698cfe89
|
||||
with:
|
||||
arch: x64
|
||||
- name: Configure
|
||||
run: |
|
||||
ccache --zero-stats
|
||||
mkdir build -Force
|
||||
cmake -S . `
|
||||
-B build `
|
||||
-G Ninja `
|
||||
--toolchain C:/vcpkg/scripts/buildsystems/vcpkg.cmake `
|
||||
-Werror=dev `
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo `
|
||||
-DWANT_QT6=ON `
|
||||
-DUSE_COMPILE_CACHE=ON `
|
||||
-DUSE_WERROR=ON `
|
||||
-DVCPKG_TARGET_TRIPLET="x64-windows" `
|
||||
-DVCPKG_HOST_TRIPLET="x64-windows" `
|
||||
-DVCPKG_MANIFEST_INSTALL="${{ env.should_install_manifest }}"
|
||||
env:
|
||||
should_install_manifest:
|
||||
${{ steps.cache-deps.outputs.cache-hit == 'true' && 'NO' || 'YES' }}
|
||||
- name: Build
|
||||
run: cmake --build build
|
||||
- name: Run tests
|
||||
run: |
|
||||
cd build/tests
|
||||
ctest --output-on-failure -j2
|
||||
- name: Package
|
||||
run: cmake --build build --target package
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: msvc-x64
|
||||
path: build\lmms-*.exe
|
||||
- name: Trim ccache and print statistics
|
||||
run: |
|
||||
ccache --cleanup
|
||||
echo "[ccache config]"
|
||||
ccache --show-config
|
||||
echo "[ccache stats]"
|
||||
ccache --show-stats --verbose
|
||||
env:
|
||||
CCACHE_MAXSIZE: 500MB
|
||||
msys2:
|
||||
name: windows-arm64
|
||||
runs-on: windows-11-arm
|
||||
defaults:
|
||||
run:
|
||||
shell: msys2 {0}
|
||||
env:
|
||||
CMAKE_OPTS: >-
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo
|
||||
-DUSE_COMPILE_CACHE=ON
|
||||
-DCPACK_NSIS_EXECUTABLE=/clang64/bin/makensis.exe
|
||||
CCACHE_MAXSIZE: 0
|
||||
CCACHE_NOCOMPRESS: 1
|
||||
MAKEFLAGS: -j2
|
||||
steps:
|
||||
- name: Check out
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
submodules: recursive
|
||||
- name: Cache msys2 dependencies
|
||||
id: cache-deps
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
key: windows-arm64-${{ hashFiles('.github/workflows/deps-msys2-clangarm64.txt') }}
|
||||
restore-keys: |
|
||||
windows-arm64-
|
||||
path: \msys64\var\cache\pacman\pkg
|
||||
- name: Install msys2
|
||||
uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
msystem: CLANGARM64
|
||||
update: true
|
||||
- name: Install dependencies
|
||||
run: pacman --needed --noconfirm -S - < .github/workflows/deps-msys2-clangarm64.txt
|
||||
- name: Cache ccache data
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
key: ccache-${{ github.job }}-${{ github.ref }}-${{ github.run_id }}
|
||||
restore-keys: |
|
||||
ccache-${{ github.job }}-${{ github.ref }}-
|
||||
ccache-${{ github.job }}-
|
||||
path: ~\AppData\Local\ccache
|
||||
- name: Configure
|
||||
run: |
|
||||
/clang64/bin/ccache.exe --zero-stats
|
||||
cmake -B build $CMAKE_OPTS
|
||||
- name: Build
|
||||
run: cmake --build build
|
||||
- name: Package
|
||||
run: cmake --build build --target package
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: windows-arm64
|
||||
path: build\lmms-*.exe
|
||||
- name: Trim ccache and print statistics
|
||||
run: |
|
||||
/clang64/bin/ccache.exe --cleanup
|
||||
echo "[ccache config]"
|
||||
/clang64/bin/ccache.exe --show-config
|
||||
echo "[ccache stats]"
|
||||
/clang64/bin/ccache.exe --show-stats --verbose
|
||||
env:
|
||||
CCACHE_MAXSIZE: 500MB
|
||||
40
.github/workflows/checks.yml
vendored
@@ -1,40 +0,0 @@
|
||||
---
|
||||
name: checks
|
||||
'on': [push, pull_request]
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
jobs:
|
||||
scripted-checks:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Install python-tinycss2
|
||||
run: sudo apt-get install -y python3-tinycss2
|
||||
- name: Update submodules
|
||||
run: git submodule update --init --recursive
|
||||
- name: Verify scripted tests
|
||||
run: tests/scripted/verify
|
||||
- name: Run check-strings
|
||||
run: tests/scripted/check-strings
|
||||
- name: Run check-namespace
|
||||
run: tests/scripted/check-namespace
|
||||
shellcheck:
|
||||
runs-on: ubuntu-latest
|
||||
container: koalaman/shellcheck-alpine:v0.9.0
|
||||
steps:
|
||||
- name: Check out
|
||||
uses: actions/checkout@v3
|
||||
- name: Run shellcheck
|
||||
run: |
|
||||
shellcheck \
|
||||
$(find "./cmake/" -type f -name '*.sh' -o -name "*.sh.in") \
|
||||
doc/bash-completion/lmms \
|
||||
buildtools/update_locales
|
||||
yamllint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out
|
||||
uses: actions/checkout@v3
|
||||
- name: Run yamllint
|
||||
run: for i in $(git ls-files '*.yml'); do yamllint $i; done
|
||||
25
.github/workflows/deps-msys2-clangarm64.txt
vendored
@@ -1,25 +0,0 @@
|
||||
base
|
||||
base-devel
|
||||
filesystem
|
||||
git
|
||||
mingw-w64-clang-aarch64-SDL2
|
||||
mingw-w64-clang-aarch64-ccache
|
||||
mingw-w64-clang-aarch64-clang
|
||||
mingw-w64-clang-aarch64-cmake
|
||||
mingw-w64-clang-aarch64-fftw
|
||||
mingw-w64-clang-aarch64-fltk
|
||||
mingw-w64-clang-aarch64-fluidsynth
|
||||
mingw-w64-clang-aarch64-libgig
|
||||
mingw-w64-clang-aarch64-libsamplerate
|
||||
mingw-w64-clang-aarch64-libsndfile
|
||||
mingw-w64-clang-aarch64-lilv
|
||||
mingw-w64-clang-aarch64-lv2
|
||||
mingw-w64-clang-aarch64-qt5-base
|
||||
mingw-w64-clang-aarch64-qt5-svg
|
||||
mingw-w64-clang-aarch64-suil
|
||||
mingw-w64-clang-aarch64-stk
|
||||
mingw-w64-clang-x86_64-nsis
|
||||
mingw-w64-clang-x86_64-ccache
|
||||
msys2-runtime
|
||||
perl-List-MoreUtils
|
||||
perl-XML-Parser
|
||||
3
.github/workflows/deps-ubuntu-24.04-fltk.txt
vendored
@@ -1,3 +0,0 @@
|
||||
libcairo2-dev
|
||||
libpango1.0-dev
|
||||
wayland-protocols
|
||||
52
.github/workflows/deps-ubuntu-24.04-gcc.txt
vendored
@@ -1,52 +0,0 @@
|
||||
binutils
|
||||
ca-certificates
|
||||
ccache
|
||||
cmake
|
||||
file
|
||||
fluid
|
||||
gcc
|
||||
git
|
||||
gpg
|
||||
g++
|
||||
libasound2-dev
|
||||
libc6-dev
|
||||
libfftw3-dev
|
||||
libfluidsynth-dev
|
||||
libgig-dev
|
||||
libgtk2.0-0
|
||||
libjack-jackd2-dev
|
||||
liblilv-dev
|
||||
liblist-moreutils-perl
|
||||
libmp3lame-dev
|
||||
libogg-dev
|
||||
libqt5svg5-dev
|
||||
libqt5x11extras5-dev
|
||||
libsamplerate0-dev
|
||||
libsdl2-dev
|
||||
libsndfile1-dev
|
||||
libsoundio-dev
|
||||
libstk-dev
|
||||
libsuil-dev
|
||||
libvorbis-dev
|
||||
libx11-xcb-dev
|
||||
libxcb-keysyms1-dev
|
||||
libxcb-util0-dev
|
||||
libxft-dev
|
||||
libxinerama-dev
|
||||
libxml2-utils
|
||||
libxml-perl
|
||||
lsb-release
|
||||
lv2-dev
|
||||
make
|
||||
perl
|
||||
portaudio19-dev
|
||||
qt5-qmake
|
||||
qtbase5-dev
|
||||
qtbase5-dev-tools
|
||||
qtbase5-private-dev
|
||||
qttools5-dev-tools
|
||||
qtwayland5
|
||||
software-properties-common
|
||||
ssh-client
|
||||
stk
|
||||
wget
|
||||
32
.github/workflows/deps-ubuntu-24.04-mingw.txt
vendored
@@ -1,32 +0,0 @@
|
||||
binutils-mingw-w64
|
||||
ccache
|
||||
cmake
|
||||
fftw-mingw-w64
|
||||
file
|
||||
flac-mingw-w64
|
||||
fltk-mingw-w64
|
||||
fluidsynth-mingw-w64
|
||||
g++-mingw-w64-i686
|
||||
g++-mingw-w64-x86-64
|
||||
gcc-mingw-w64
|
||||
gcc-mingw-w64-i686
|
||||
gcc-mingw-w64-x86-64
|
||||
git
|
||||
glib2-mingw-w64
|
||||
lame-mingw-w64
|
||||
libgig-mingw-w64
|
||||
liblist-moreutils-perl
|
||||
libsamplerate-mingw-w64
|
||||
libsndfile-mingw-w64
|
||||
libsoundio-mingw-w64
|
||||
libvorbis-mingw-w64
|
||||
libxml-parser-perl
|
||||
libz-mingw-w64-dev
|
||||
mingw-w64-tools
|
||||
nsis
|
||||
portaudio-mingw-w64
|
||||
qt5base-mingw-w64
|
||||
qt5svg-mingw-w64
|
||||
qttools5-dev-tools
|
||||
sdl2-mingw-w64
|
||||
stk-mingw-w64
|
||||
121
.github/workflows/macos-env.sh
vendored
@@ -1,121 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# Calculate macOS-specific environment variables
|
||||
# 1. Sets the value of MACOSX_DEPLOYMENT_TARGET by matching another binary on the system.
|
||||
#
|
||||
# Usage:
|
||||
# source macos-env.sh [package_manager] [package_name] [package_version]
|
||||
#
|
||||
# Example:
|
||||
# source macos-env.sh brew qt 5
|
||||
# source macos-env.sh port wget
|
||||
|
||||
set -e
|
||||
|
||||
unset package_manager package_name package_version
|
||||
|
||||
# Obtain the package manager
|
||||
if [ -n "$1" ]; then
|
||||
# Set package manager to first parameter
|
||||
package_manager="$1"
|
||||
case "$package_manager" in
|
||||
"homebrew")
|
||||
package_manager="brew"
|
||||
;;
|
||||
"macports")
|
||||
package_manager="port"
|
||||
;;
|
||||
esac
|
||||
# Test the command
|
||||
if ! command -v "$package_manager" &> /dev/null; then
|
||||
echo "ERROR: Command '$package_manager' was not found, aborting." 1>&2
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
# Try to guess the package manager
|
||||
if command -v brew &> /dev/null; then
|
||||
package_manager="brew"
|
||||
elif command -v port &> /dev/null; then
|
||||
package_manager="port"
|
||||
else
|
||||
echo "WARNING: A compatible package manager wasn't found, we'll search for '$package_name' on \$PATH instead" 1>&2
|
||||
fi
|
||||
fi
|
||||
|
||||
# Obtain the package name
|
||||
if [ -n "$2" ]; then
|
||||
package_name="$2"
|
||||
else
|
||||
package_name="qt"
|
||||
fi
|
||||
|
||||
# Special fallback handling for when package_name != binary_name, adjust as needed
|
||||
if [ "$package_name" = "qt" ]; then
|
||||
binary_name="qmake"
|
||||
elif [ "$package_name" = "fltk" ]; then
|
||||
binary_name="fluid"
|
||||
else
|
||||
# Assume the binary_name is the package_name
|
||||
binary_name="$package_name"
|
||||
fi
|
||||
|
||||
# Obtain the package version
|
||||
if [ -n "$3" ]; then
|
||||
package_version="$3"
|
||||
else
|
||||
if [ "$package_name" = "qt" ]; then
|
||||
# Sane fallback for qt, adjust as needed
|
||||
package_version="5"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Format $package_name to include $package_version
|
||||
if [ -n "$package_version" ]; then
|
||||
# Specify qt version in package name
|
||||
case "$package_manager" in
|
||||
"port")
|
||||
case "$package_name" in
|
||||
"qt")
|
||||
# Special handling for "qt5-qtbase"
|
||||
package_name="$package_name${package_version}-${package_name}base"
|
||||
;;
|
||||
*)
|
||||
package_name="$package_name$package_version"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
"brew" | *)
|
||||
package_name="$package_name@$package_version"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Determine MACOSX_DEPLOYMENT_TARGET
|
||||
if [ -n "$package_manager" ]; then
|
||||
# Specify qt version in package name
|
||||
case "$package_manager" in
|
||||
"port")
|
||||
binary_path="$(port contents "$package_name" |grep "bin/${binary_name}\$" |head -1 |sed -e 's/^[[:space:]]*//')"
|
||||
;;
|
||||
"brew" | *)
|
||||
binary_path="$("$package_manager" --prefix "$package_name")/bin/$binary_name"
|
||||
;;
|
||||
esac
|
||||
otool_out="$(otool -l "$binary_path")"
|
||||
|
||||
else
|
||||
otool_out="$(otool -l "$(which "$binary_name")")"
|
||||
fi
|
||||
|
||||
echo "Using '$binary_name' (from $package_manager) to calculate the macOS deployment target..."
|
||||
|
||||
min_ver="$(echo "$otool_out" |grep "minos" || echo "$otool_out" |grep -A 2 "LC_VERSION_MIN_MACOS"|grep "version")"
|
||||
MACOSX_DEPLOYMENT_TARGET="$(echo "$min_ver"|awk '{print $2}')"
|
||||
|
||||
# Echo the lowest target macOS version supported by this SDK
|
||||
sdk_settings="$(xcrun --sdk macosx --show-sdk-path)/SDKSettings.plist"
|
||||
sdk_min="$(plutil -extract SupportedTargets.macosx.MinimumDeploymentTarget raw "$sdk_settings")"
|
||||
echo "- Lowest SDK supported by this environment is '$sdk_min' based on $sdk_settings"
|
||||
|
||||
# Echo the sane target macOS version based on another build dependency
|
||||
export MACOSX_DEPLOYMENT_TARGET
|
||||
echo "- Exporting 'MACOSX_DEPLOYMENT_TARGET=$MACOSX_DEPLOYMENT_TARGET' based on $binary_name"
|
||||
14
.gitignore
vendored
@@ -1,14 +0,0 @@
|
||||
/build/
|
||||
/target/
|
||||
.*.sw?
|
||||
.DS_Store
|
||||
*~
|
||||
/CMakeLists.txt.user
|
||||
/plugins/ZynAddSubFx/zynaddsubfx/ExternalPrograms/Controller/Makefile
|
||||
/plugins/ZynAddSubFx/zynaddsubfx/ExternalPrograms/Spliter/Makefile
|
||||
/plugins/ZynAddSubFx/zynaddsubfx/doc/Makefile
|
||||
/plugins/ZynAddSubFx/zynaddsubfx/doc/gen/Makefile
|
||||
/data/locale/*.qm
|
||||
Brewfile.lock.json
|
||||
/.cache/
|
||||
compile_commands.json
|
||||
52
.gitmodules
vendored
@@ -1,52 +0,0 @@
|
||||
[submodule "src/3rdparty/qt5-x11embed"]
|
||||
path = src/3rdparty/qt5-x11embed
|
||||
url = https://github.com/Lukas-W/qt5-x11embed.git
|
||||
[submodule "plugins/ZynAddSubFx/zynaddsubfx"]
|
||||
path = plugins/ZynAddSubFx/zynaddsubfx
|
||||
url = https://github.com/lmms/zynaddsubfx.git
|
||||
[submodule "plugins/FreeBoy/game-music-emu"]
|
||||
path = plugins/FreeBoy/game-music-emu
|
||||
url = https://github.com/libgme/game-music-emu.git
|
||||
[submodule "plugins/OpulenZ/adplug"]
|
||||
path = plugins/OpulenZ/adplug
|
||||
url = https://github.com/adplug/adplug.git
|
||||
[submodule "plugins/LadspaEffect/calf/veal"]
|
||||
path = plugins/LadspaEffect/calf/veal
|
||||
url = https://github.com/lmms/veal
|
||||
[submodule "plugins/Xpressive/exprtk"]
|
||||
path = plugins/Xpressive/exprtk
|
||||
url = https://github.com/ArashPartow/exprtk
|
||||
branch = release
|
||||
[submodule "plugins/LadspaEffect/swh/ladspa"]
|
||||
path = plugins/LadspaEffect/swh/ladspa
|
||||
url = https://github.com/swh/ladspa
|
||||
[submodule "plugins/LadspaEffect/tap/tap-plugins"]
|
||||
path = plugins/LadspaEffect/tap/tap-plugins
|
||||
url = https://github.com/lmms/tap-plugins
|
||||
[submodule "src/3rdparty/weakjack/weakjack"]
|
||||
path = src/3rdparty/weakjack/weakjack
|
||||
url = https://github.com/x42/weakjack.git
|
||||
[submodule "doc/wiki"]
|
||||
path = doc/wiki
|
||||
url = https://github.com/lmms/lmms.wiki.git
|
||||
[submodule "src/3rdparty/ringbuffer"]
|
||||
path = src/3rdparty/ringbuffer
|
||||
url = https://github.com/JohannesLorenz/ringbuffer.git
|
||||
[submodule "plugins/CarlaBase/carla"]
|
||||
path = plugins/CarlaBase/carla
|
||||
url = https://github.com/falktx/carla
|
||||
[submodule "plugins/Sid/resid/resid"]
|
||||
path = plugins/Sid/resid/resid
|
||||
url = https://github.com/libsidplayfp/resid
|
||||
[submodule "src/3rdparty/jack2"]
|
||||
path = src/3rdparty/jack2
|
||||
url = https://github.com/jackaudio/jack2
|
||||
[submodule "plugins/LadspaEffect/cmt/cmt"]
|
||||
path = plugins/LadspaEffect/cmt/cmt
|
||||
url = https://github.com/lmms/cmt
|
||||
[submodule "src/3rdparty/hiir/hiir"]
|
||||
path = src/3rdparty/hiir/hiir
|
||||
url = https://github.com/LostRobotMusic/hiir
|
||||
[submodule "plugins/MidiImport/portsmf"]
|
||||
path = plugins/MidiImport/portsmf
|
||||
url = https://github.com/portsmf/portsmf
|
||||
33
.mailmap
@@ -1,33 +0,0 @@
|
||||
Alexandre Almeida <wilsalx@gmail.com>
|
||||
Tobias Junghans <tobias.doerffel@gmail.com>
|
||||
Dave French <dave.french3@googlemail.com>
|
||||
Paul Giblock <drfaygo@gmail.com> <pgib@users.sf.net>
|
||||
Paul Giblock <drfaygo@gmail.com> <p@pgiblock.net>
|
||||
Andrew Kelley <superjoe30@gmail.com> <andrew.r.kelley@gmail.com>
|
||||
Andrew Kelley <superjoe30@gmail.com> <andy@debian.superjoesoftware>
|
||||
Janne Sinisalo <janne.m.sinisalo@gmail.com> <janne@janne-desktop.(none)>
|
||||
Raine M. Ekman <raine@iki.fi> <raine@raine.(none)>
|
||||
Raine M. Ekman <raine@iki.fi> <raine@raine.damex.fi>
|
||||
Lukas W <lukaswhl@gmail.com> <lukaswhl@googlemail.com>
|
||||
Vesa <contact.diizy@nbl.fi> <vesa@isokone.(none)>
|
||||
Vesa <contact.diizy@nbl.fi> <diizy@users.noreply.github.com>
|
||||
Tres Finocchiaro <tres.finocchiaro@gmail.com>
|
||||
Tres Finocchiaro <tres.finocchiaro@gmail.com> <tres@ubuntu-1204.(none)>
|
||||
Tres Finocchiaro <tres.finocchiaro@gmail.com> <ubuntu@ubuntu-1204.(none)>
|
||||
Tres Finocchiaro <tres.finocchiaro@gmail.com> <tresf@github.com>
|
||||
Rüdiger Ranft <rudi@qzzq.de> <_rdi_@web.de>
|
||||
Spekular <Spekularr@gmail.com> <Spekular@users.noreply.github.com>
|
||||
unfa <unfa00@gmail.com> <unfa@unfa.(none)>
|
||||
mikobuntu <chrissy.mc.1@hotmail.co.uk> <mikobuntu@mikobuntu-Aspire-5332.(none)>
|
||||
Jonathan Aquilina <eagles051387@gmail.com>
|
||||
midi-pascal <midi-pascal@videotron.ca>
|
||||
midi-pascal <midi-pascal@videotron.ca> <pascal@TDE.(none)>
|
||||
Thomas Clark <the.thomas.j.clark@gmail.com>
|
||||
Thomas Clark <the.thomas.j.clark@gmail.com> <tjclark@wpi.edu>
|
||||
anonymous <support@lmms.io> Locale updater <>
|
||||
grejppi <grejppi@gmail.com>
|
||||
Johannes Lorenz <j.git@lorenz-ho.me> <johannes89@mailueberfall.de>
|
||||
Johannes Lorenz <j.git@lorenz-ho.me> <1042576+JohannesLorenz@users.noreply.github.com>
|
||||
Noah Brecht <noahb2713@gmail.com>
|
||||
Olivier Humbert <trebmuh@tuxfamily.org> <trebmuh@users.noreply.github.com>
|
||||
Hussam al-Homsi <sawuare@gmail.com> Hussam Eddin Alhomsi <hussameddin.alhomsi@gmail.com>
|
||||
10
.tx/config
@@ -1,10 +0,0 @@
|
||||
[main]
|
||||
host = https://app.transifex.com
|
||||
minimum_perc = 51
|
||||
#Need to finish at least 51% before merging back
|
||||
|
||||
[o:lmms:p:lmms:r:lmms]
|
||||
file_filter = data/locale/<lang>.ts
|
||||
source_file = data/locale/en.ts
|
||||
source_lang = en
|
||||
type = QT
|
||||
@@ -1,3 +0,0 @@
|
||||
rules:
|
||||
line-length:
|
||||
max: 120 # be conforming to LMMS coding rules
|
||||
27
AUTHORS
Normal file
@@ -0,0 +1,27 @@
|
||||
Tobias Doerffel
|
||||
<tobydox/at/users/dot/sourceforge/dot/net>
|
||||
Maintainer, main-development, artwork etc.
|
||||
|
||||
Danny McRae
|
||||
<khjklujn/at/yahoo.com>
|
||||
development
|
||||
|
||||
Javier Serrano Polo
|
||||
<jasp00/at/terra/dot/es>
|
||||
development
|
||||
|
||||
Zolo
|
||||
<the-zolo/at/gmx/dot/de>
|
||||
theme "Blue Scene"
|
||||
|
||||
Sebastian Tilsch
|
||||
<djcompilation/at/gmx/dot/de>
|
||||
recording of many samples
|
||||
|
||||
gabriel
|
||||
<kryos1/at/shaw/dot/ca>
|
||||
additional artwork
|
||||
|
||||
Andreas Brandmaier
|
||||
<andy/at/brandmaier/dot/de>
|
||||
BitInvader plugin
|
||||
20
Brewfile
@@ -1,20 +0,0 @@
|
||||
brew "carla"
|
||||
brew "ccache"
|
||||
brew "fftw"
|
||||
brew "fltk"
|
||||
brew "fluid-synth"
|
||||
brew "jack"
|
||||
brew "lame"
|
||||
brew "libgig"
|
||||
brew "libogg"
|
||||
brew "libsamplerate"
|
||||
brew "libsndfile"
|
||||
brew "libsoundio"
|
||||
brew "libvorbis"
|
||||
brew "lilv"
|
||||
brew "lv2"
|
||||
brew "pkgconf"
|
||||
brew "portaudio"
|
||||
brew "qt@5"
|
||||
brew "sdl2"
|
||||
brew "stk"
|
||||
914
CMakeLists.txt
@@ -1,914 +0,0 @@
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 3.13)
|
||||
SET(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
|
||||
# Set the given policy to NEW. If it does not exist, it will not be set. If it
|
||||
# is already set to NEW (most likely due to predating the minimum required CMake
|
||||
# version), a developer warning is emitted indicating that the policy need no
|
||||
# longer be explicitly set.
|
||||
function(enable_policy_if_exists id)
|
||||
if(POLICY "${id}")
|
||||
cmake_policy(GET "${id}" current_value)
|
||||
if(current_value STREQUAL "NEW")
|
||||
message(AUTHOR_WARNING "${id} is now set to NEW by default, and no longer needs to be explicitly set.")
|
||||
else()
|
||||
cmake_policy(SET "${id}" NEW)
|
||||
endif()
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
enable_policy_if_exists(CMP0092) # MSVC warning flags are not in CMAKE_<LANG>_FLAGS by default.
|
||||
# Needed for ccache support with MSVC
|
||||
enable_policy_if_exists(CMP0141) # MSVC debug information format flags are selected by an abstraction.
|
||||
|
||||
PROJECT(lmms)
|
||||
|
||||
SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" ${CMAKE_MODULE_PATH})
|
||||
SET(LMMS_BINARY_DIR ${CMAKE_BINARY_DIR})
|
||||
SET(LMMS_SOURCE_DIR ${CMAKE_SOURCE_DIR})
|
||||
|
||||
# Import of windows.h breaks min()/max()
|
||||
ADD_DEFINITIONS(-DNOMINMAX)
|
||||
|
||||
# CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES is not set correctly for MinGW until
|
||||
# CMake 3.14.1, so avoid specifying system include directories on affected
|
||||
# versions. Normal include directories are safe, since GCC ignores them if they
|
||||
# are already in the built-in search path.
|
||||
if(MINGW AND CMAKE_VERSION VERSION_LESS "3.14.1")
|
||||
set(CMAKE_NO_SYSTEM_FROM_IMPORTED TRUE)
|
||||
endif()
|
||||
|
||||
INCLUDE(PluginList)
|
||||
INCLUDE(CheckSubmodules)
|
||||
INCLUDE(AddFileDependencies)
|
||||
INCLUDE(CheckIncludeFiles)
|
||||
INCLUDE(FindPkgConfig)
|
||||
INCLUDE(GenerateExportHeader)
|
||||
include(StaticDependencies)
|
||||
|
||||
STRING(TOUPPER "${CMAKE_PROJECT_NAME}" PROJECT_NAME_UCASE)
|
||||
|
||||
SET(PROJECT_YEAR 2026)
|
||||
|
||||
SET(PROJECT_AUTHOR "LMMS Developers")
|
||||
SET(PROJECT_URL "https://lmms.io")
|
||||
SET(PROJECT_EMAIL "lmms-devel@lists.sourceforge.net")
|
||||
SET(PROJECT_DESCRIPTION "${PROJECT_NAME_UCASE} - Free music production software")
|
||||
SET(PROJECT_COPYRIGHT "2008-${PROJECT_YEAR} ${PROJECT_AUTHOR}")
|
||||
SET(VERSION_MAJOR "1")
|
||||
SET(VERSION_MINOR "3")
|
||||
SET(VERSION_RELEASE "0")
|
||||
SET(VERSION_STAGE "alpha")
|
||||
SET(VERSION_BUILD "")
|
||||
SET(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_RELEASE}")
|
||||
IF(VERSION_STAGE)
|
||||
SET(VERSION "${VERSION}-${VERSION_STAGE}")
|
||||
ENDIF()
|
||||
IF(VERSION_BUILD)
|
||||
SET(VERSION "${VERSION}-${VERSION_BUILD}")
|
||||
ENDIF()
|
||||
|
||||
# Override version information for non-base builds
|
||||
INCLUDE(VersionInfo)
|
||||
INCLUDE(DetectMachine)
|
||||
|
||||
OPTION(WANT_ALSA "Include ALSA (Advanced Linux Sound Architecture) support" ON)
|
||||
OPTION(WANT_OSS "Include Open Sound System support" ON)
|
||||
OPTION(WANT_CALF "Include CALF LADSPA plugins" ON)
|
||||
OPTION(WANT_CAPS "Include C* Audio Plugin Suite (LADSPA plugins)" ON)
|
||||
OPTION(WANT_CARLA "Include Carla plugin" ON)
|
||||
OPTION(WANT_CMT "Include Computer Music Toolkit LADSPA plugins" ON)
|
||||
OPTION(WANT_JACK "Include JACK (Jack Audio Connection Kit) support" ON)
|
||||
OPTION(WANT_WEAKJACK "Loosely link JACK libraries" ON)
|
||||
OPTION(WANT_LV2 "Include Lv2 plugins" ON)
|
||||
OPTION(WANT_SUIL "Include SUIL for LV2 plugin UIs" ON)
|
||||
OPTION(WANT_MP3LAME "Include MP3/Lame support" ON)
|
||||
OPTION(WANT_OGGVORBIS "Include OGG/Vorbis support" ON)
|
||||
OPTION(WANT_PULSEAUDIO "Include PulseAudio support" ON)
|
||||
OPTION(WANT_PORTAUDIO "Include PortAudio support" ON)
|
||||
OPTION(WANT_SNDIO "Include sndio support" ON)
|
||||
OPTION(WANT_SOUNDIO "Include libsoundio support" ON)
|
||||
OPTION(WANT_SDL "Include SDL (Simple DirectMedia Layer) support" ON)
|
||||
OPTION(WANT_SF2 "Include SoundFont2 player plugin" ON)
|
||||
OPTION(WANT_GIG "Include GIG player plugin" ON)
|
||||
option(WANT_SID "Include Sid instrument" ON)
|
||||
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_32 "Include 32-bit Windows VST support" ON)
|
||||
OPTION(WANT_VST_64 "Include 64-bit Windows VST support" ON)
|
||||
OPTION(WANT_WINMM "Include WinMM MIDI support" OFF)
|
||||
OPTION(WANT_DEBUG_FPE "Debug floating point exceptions" OFF)
|
||||
option(WANT_DEBUG_ASAN "Enable AddressSanitizer" OFF)
|
||||
option(WANT_DEBUG_TSAN "Enable ThreadSanitizer" OFF)
|
||||
option(WANT_DEBUG_MSAN "Enable MemorySanitizer" OFF)
|
||||
option(WANT_DEBUG_UBSAN "Enable UndefinedBehaviorSanitizer" OFF)
|
||||
option(WANT_DEBUG_GPROF "Enable gprof profiler" OFF)
|
||||
OPTION(BUNDLE_QT_TRANSLATIONS "Install Qt translation files for LMMS" OFF)
|
||||
option(WANT_DEBUG_CPACK "Show detailed logs for packaging commands" OFF)
|
||||
option(WANT_CPACK_TARBALL "Request CPack to create a tarball instead of an installer" OFF)
|
||||
option(WANT_QT6 "Build with experimental Qt6 support" OFF)
|
||||
|
||||
|
||||
IF(LMMS_BUILD_APPLE)
|
||||
# Fix linking on 10.14+. See issue #4762 on github
|
||||
LINK_DIRECTORIES("${APPLE_PREFIX}/lib")
|
||||
SET(WANT_SOUNDIO OFF)
|
||||
SET(WANT_ALSA OFF)
|
||||
SET(WANT_OSS OFF)
|
||||
SET(WANT_PULSEAUDIO OFF)
|
||||
SET(WANT_VST OFF)
|
||||
SET(STATUS_ALSA "<not supported on this platform>")
|
||||
SET(STATUS_OSS "<not supported on this platform>")
|
||||
SET(STATUS_PULSEAUDIO "<not supported on this platform>")
|
||||
SET(STATUS_APPLEMIDI "OK")
|
||||
ELSE(LMMS_BUILD_APPLE)
|
||||
SET(STATUS_APPLEMIDI "<not supported on this platform>")
|
||||
ENDIF(LMMS_BUILD_APPLE)
|
||||
|
||||
|
||||
IF(LMMS_BUILD_WIN32)
|
||||
SET(WANT_ALSA OFF)
|
||||
SET(WANT_OSS OFF)
|
||||
SET(WANT_PULSEAUDIO OFF)
|
||||
SET(WANT_SNDIO OFF)
|
||||
SET(WANT_SOUNDIO OFF)
|
||||
SET(WANT_WINMM ON)
|
||||
SET(BUNDLE_QT_TRANSLATIONS ON)
|
||||
SET(LMMS_HAVE_WINMM TRUE)
|
||||
if(NOT LMMS_BUILD_WIN64)
|
||||
set(WANT_VST_64 OFF)
|
||||
endif()
|
||||
SET(STATUS_ALSA "<not supported on this platform>")
|
||||
SET(STATUS_OSS "<not supported on this platform>")
|
||||
SET(STATUS_PULSEAUDIO "<not supported on this platform>")
|
||||
SET(STATUS_SOUNDIO "<disabled in this release>")
|
||||
SET(STATUS_SNDIO "<not supported on this platform>")
|
||||
SET(STATUS_WINMM "OK")
|
||||
SET(STATUS_APPLEMIDI "<not supported on this platform>")
|
||||
ELSE(LMMS_BUILD_WIN32)
|
||||
SET(STATUS_WINMM "<not supported on this platform>")
|
||||
ENDIF(LMMS_BUILD_WIN32)
|
||||
|
||||
SET(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
CHECK_INCLUDE_FILES(pthread.h LMMS_HAVE_PTHREAD_H)
|
||||
CHECK_INCLUDE_FILES(semaphore.h LMMS_HAVE_SEMAPHORE_H)
|
||||
CHECK_INCLUDE_FILES(unistd.h LMMS_HAVE_UNISTD_H)
|
||||
CHECK_INCLUDE_FILES(sys/types.h LMMS_HAVE_SYS_TYPES_H)
|
||||
CHECK_INCLUDE_FILES(sys/ipc.h LMMS_HAVE_SYS_IPC_H)
|
||||
CHECK_INCLUDE_FILES(sys/time.h LMMS_HAVE_SYS_TIME_H)
|
||||
CHECK_INCLUDE_FILES(sys/times.h LMMS_HAVE_SYS_TIMES_H)
|
||||
CHECK_INCLUDE_FILES(sys/prctl.h LMMS_HAVE_SYS_PRCTL_H)
|
||||
CHECK_INCLUDE_FILES(sched.h LMMS_HAVE_SCHED_H)
|
||||
CHECK_INCLUDE_FILES(sys/soundcard.h LMMS_HAVE_SYS_SOUNDCARD_H)
|
||||
CHECK_INCLUDE_FILES(soundcard.h LMMS_HAVE_SOUNDCARD_H)
|
||||
CHECK_INCLUDE_FILES(fcntl.h LMMS_HAVE_FCNTL_H)
|
||||
CHECK_INCLUDE_FILES(sys/ioctl.h LMMS_HAVE_SYS_IOCTL_H)
|
||||
CHECK_INCLUDE_FILES(ctype.h LMMS_HAVE_CTYPE_H)
|
||||
CHECK_INCLUDE_FILES(string.h LMMS_HAVE_STRING_H)
|
||||
CHECK_INCLUDE_FILES(process.h LMMS_HAVE_PROCESS_H)
|
||||
CHECK_INCLUDE_FILES(locale.h LMMS_HAVE_LOCALE_H)
|
||||
|
||||
include(CheckLibraryExists)
|
||||
check_library_exists(rt shm_open "" LMMS_HAVE_LIBRT)
|
||||
|
||||
LIST(APPEND CMAKE_PREFIX_PATH "${CMAKE_INSTALL_PREFIX}")
|
||||
|
||||
if(WANT_QT6)
|
||||
set(QT_VERSION_MAJOR 6)
|
||||
if(MSVC)
|
||||
set(LMMS_QT_MIN_VERSION 6.8.0)
|
||||
else()
|
||||
set(LMMS_QT_MIN_VERSION 6.0.0)
|
||||
endif()
|
||||
set(STATUS_QT6 "Enabled")
|
||||
else()
|
||||
set(QT_VERSION_MAJOR 5)
|
||||
set(LMMS_QT_MIN_VERSION 5.15.0)
|
||||
set(STATUS_QT6 "Disabled")
|
||||
endif()
|
||||
|
||||
find_package(Qt${QT_VERSION_MAJOR} ${LMMS_QT_MIN_VERSION} COMPONENTS Core Gui Widgets Xml Svg REQUIRED)
|
||||
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS LinguistTools QUIET)
|
||||
|
||||
include_directories(SYSTEM
|
||||
${Qt${QT_VERSION_MAJOR}Core_INCLUDE_DIRS}
|
||||
${Qt${QT_VERSION_MAJOR}Gui_INCLUDE_DIRS}
|
||||
${Qt${QT_VERSION_MAJOR}Widgets_INCLUDE_DIRS}
|
||||
${Qt${QT_VERSION_MAJOR}Xml_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
set(QT_LIBRARIES
|
||||
Qt${QT_VERSION_MAJOR}::Core
|
||||
Qt${QT_VERSION_MAJOR}::Gui
|
||||
Qt${QT_VERSION_MAJOR}::Widgets
|
||||
Qt${QT_VERSION_MAJOR}::Xml
|
||||
Qt${QT_VERSION_MAJOR}::Svg
|
||||
)
|
||||
|
||||
IF(LMMS_BUILD_LINUX AND WANT_VST AND NOT WANT_QT6)
|
||||
FIND_PACKAGE(Qt5 COMPONENTS X11Extras REQUIRED)
|
||||
LIST(APPEND QT_LIBRARIES Qt5::X11Extras)
|
||||
ENDIF()
|
||||
|
||||
# Resolve qmake to full path for use in packaging scripts
|
||||
get_target_property(QT_QMAKE_EXECUTABLE Qt${QT_VERSION_MAJOR}::qmake IMPORTED_LOCATION)
|
||||
|
||||
# Find the location of Qt translation files
|
||||
execute_process(COMMAND ${QT_QMAKE_EXECUTABLE} -query QT_INSTALL_TRANSLATIONS
|
||||
OUTPUT_VARIABLE QT_TRANSLATIONS_DIR
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
ERROR_QUIET
|
||||
)
|
||||
IF(EXISTS "${QT_TRANSLATIONS_DIR}")
|
||||
MESSAGE("-- Found Qt translations in ${QT_TRANSLATIONS_DIR}")
|
||||
ADD_DEFINITIONS("-DQT_TRANSLATIONS_DIR=\"${QT_TRANSLATIONS_DIR}\"")
|
||||
ENDIF()
|
||||
|
||||
FIND_PACKAGE(Qt${QT_VERSION_MAJOR}Test)
|
||||
SET(QT_QTTEST_LIBRARY Qt${QT_VERSION_MAJOR}::Test)
|
||||
|
||||
# check for libsndfile
|
||||
FIND_PACKAGE(SndFile REQUIRED)
|
||||
IF(SNDFILE_FOUND)
|
||||
IF(SndFile_VERSION VERSION_GREATER_EQUAL "1.1.0")
|
||||
SET(LMMS_HAVE_SNDFILE_MP3 TRUE)
|
||||
ELSE()
|
||||
MESSAGE("libsndfile version is < 1.1.0; MP3 import disabled")
|
||||
SET(LMMS_HAVE_SNDFILE_MP3 FALSE)
|
||||
ENDIF()
|
||||
ELSE()
|
||||
MESSAGE(FATAL_ERROR "LMMS requires libsndfile1 and libsndfile1-dev >= 1.0.18 - please install, remove CMakeCache.txt and try again!")
|
||||
ENDIF()
|
||||
# check if we can use SFC_SET_COMPRESSION_LEVEL
|
||||
INCLUDE(CheckCXXSourceCompiles)
|
||||
CHECK_CXX_SOURCE_COMPILES(
|
||||
"#include <sndfile.h>
|
||||
int main() {SFC_SET_COMPRESSION_LEVEL;}"
|
||||
LMMS_HAVE_SF_COMPLEVEL
|
||||
)
|
||||
|
||||
# check for perl
|
||||
if(LMMS_BUILD_APPLE)
|
||||
# Prefer system perl over Homebrew, MacPorts, etc
|
||||
set(Perl_ROOT "/usr/bin")
|
||||
endif()
|
||||
find_package(Perl)
|
||||
|
||||
if(WANT_LV2)
|
||||
if(PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(LV2 lv2)
|
||||
endif()
|
||||
|
||||
find_package(Lilv)
|
||||
if(Lilv_FOUND)
|
||||
set(LILV_LIBRARIES Lilv::lilv)
|
||||
endif()
|
||||
|
||||
# Ensure both dependencies are found
|
||||
if(NOT LV2_FOUND)
|
||||
set(STATUS_LV2 "not found, install lv2 or set PKG_CONFIG_PATH appropriately")
|
||||
elseif(NOT Lilv_FOUND)
|
||||
set(STATUS_LV2 "not found, install lilv or set PKG_CONFIG_PATH appropriately")
|
||||
else()
|
||||
set(LMMS_HAVE_LV2 TRUE)
|
||||
set(STATUS_LV2 "OK")
|
||||
endif()
|
||||
else()
|
||||
set(STATUS_LV2 "not built as requested")
|
||||
endif()
|
||||
|
||||
IF(WANT_SUIL)
|
||||
IF(PKG_CONFIG_FOUND)
|
||||
PKG_CHECK_MODULES(SUIL suil-0)
|
||||
IF(SUIL_FOUND)
|
||||
SET(LMMS_HAVE_SUIL TRUE)
|
||||
SET(STATUS_SUIL "OK")
|
||||
find_package(SuilModules)
|
||||
ELSE()
|
||||
SET(STATUS_SUIL "not found, install it or set PKG_CONFIG_PATH appropriately")
|
||||
ENDIF()
|
||||
ELSE()
|
||||
SET(STATUS_SUIL "not found, requires pkg-config")
|
||||
ENDIF()
|
||||
ELSE(WANT_SUIL)
|
||||
SET(STATUS_SUIL "not built as requested")
|
||||
ENDIF(WANT_SUIL)
|
||||
|
||||
IF(WANT_CALF)
|
||||
SET(LMMS_HAVE_CALF TRUE)
|
||||
SET(STATUS_CALF "OK")
|
||||
ELSE(WANT_CALF)
|
||||
SET(STATUS_CALF "not built as requested")
|
||||
ENDIF(WANT_CALF)
|
||||
|
||||
IF(WANT_CAPS)
|
||||
SET(LMMS_HAVE_CAPS TRUE)
|
||||
SET(STATUS_CAPS "OK")
|
||||
ELSE(WANT_CAPS)
|
||||
SET(STATUS_CAPS "not built as requested")
|
||||
ENDIF(WANT_CAPS)
|
||||
|
||||
IF(WANT_CMT)
|
||||
SET(LMMS_HAVE_CMT TRUE)
|
||||
SET(STATUS_CMT "OK")
|
||||
ELSE(WANT_CMT)
|
||||
SET(STATUS_CMT "not built as requested")
|
||||
ENDIF(WANT_CMT)
|
||||
|
||||
IF(WANT_SWH)
|
||||
IF(PERL_FOUND)
|
||||
SET(LMMS_HAVE_SWH TRUE)
|
||||
SET(STATUS_SWH "OK")
|
||||
ELSE()
|
||||
SET(STATUS_SWH "Skipping, perl is missing")
|
||||
ENDIF()
|
||||
ELSE(WANT_SWH)
|
||||
SET(STATUS_SWH "not built as requested")
|
||||
ENDIF(WANT_SWH)
|
||||
|
||||
IF(WANT_TAP)
|
||||
SET(LMMS_HAVE_TAP TRUE)
|
||||
SET(STATUS_TAP "OK")
|
||||
ELSE(WANT_TAP)
|
||||
SET(STATUS_TAP "not built as requested")
|
||||
ENDIF(WANT_TAP)
|
||||
|
||||
|
||||
# check for CARLA
|
||||
IF(WANT_CARLA)
|
||||
PKG_CHECK_MODULES(CARLA carla-native-plugin)
|
||||
# look for carla under old name
|
||||
IF(NOT CARLA_FOUND)
|
||||
PKG_CHECK_MODULES(CARLA carla-standalone>=1.9.5)
|
||||
ENDIF()
|
||||
IF(CARLA_FOUND)
|
||||
SET(LMMS_HAVE_CARLA TRUE)
|
||||
SET(STATUS_CARLA "OK")
|
||||
ELSE(CARLA_FOUND)
|
||||
SET(LMMS_HAVE_WEAKCARLA TRUE)
|
||||
SET(STATUS_CARLA "OK (weak linking enabled)")
|
||||
ENDIF(CARLA_FOUND)
|
||||
ENDIF(WANT_CARLA)
|
||||
|
||||
|
||||
# check for SDL2
|
||||
IF(WANT_SDL)
|
||||
FIND_PACKAGE(SDL2)
|
||||
IF(SDL2_FOUND)
|
||||
SET(LMMS_HAVE_SDL TRUE)
|
||||
SET(STATUS_SDL "OK")
|
||||
SET(SDL2_LIBRARY "SDL2::SDL2")
|
||||
ELSE()
|
||||
SET(STATUS_SDL "not found, please install libsdl2-dev (or similar) if you require SDL support")
|
||||
SET(SDL2_LIBRARY "")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
# check for Sid
|
||||
if(WANT_SID)
|
||||
if(PERL_FOUND)
|
||||
set(LMMS_HAVE_SID TRUE)
|
||||
set(STATUS_SID "OK")
|
||||
else()
|
||||
set(STATUS_SID "not found, please install perl if you require the Sid instrument")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# check for Stk
|
||||
IF(WANT_STK)
|
||||
FIND_PACKAGE(STK)
|
||||
IF(STK_FOUND)
|
||||
SET(LMMS_HAVE_STK TRUE)
|
||||
SET(STATUS_STK "OK")
|
||||
ELSE(STK_FOUND)
|
||||
SET(STK_INCLUDE_DIR "")
|
||||
SET(STATUS_STK "not found, please install libstk0-dev (or similar) "
|
||||
"if you require the Mallets instrument")
|
||||
ENDIF(STK_FOUND)
|
||||
ENDIF(WANT_STK)
|
||||
|
||||
|
||||
# check for PortAudio
|
||||
IF(WANT_PORTAUDIO)
|
||||
FIND_PACKAGE(Portaudio)
|
||||
IF(Portaudio_FOUND)
|
||||
SET(LMMS_HAVE_PORTAUDIO TRUE)
|
||||
SET(STATUS_PORTAUDIO "OK")
|
||||
ELSE()
|
||||
SET(STATUS_PORTAUDIO "not found, please install portaudio19-dev (or similar, version >= 1.9) "
|
||||
"if you require PortAudio support")
|
||||
ENDIF()
|
||||
ENDIF(WANT_PORTAUDIO)
|
||||
|
||||
# check for libsoundio
|
||||
IF(WANT_SOUNDIO)
|
||||
FIND_PACKAGE(SoundIo)
|
||||
IF(SOUNDIO_FOUND)
|
||||
SET(LMMS_HAVE_SOUNDIO TRUE)
|
||||
SET(STATUS_SOUNDIO "OK")
|
||||
include_directories(SYSTEM "${SOUNDIO_INCLUDE_DIR}")
|
||||
ELSE(SOUNDIO_FOUND)
|
||||
SET(SOUNDIO_INCLUDE_DIR "")
|
||||
SET(STATUS_SOUNDIO "not found, please install libsoundio if you require libsoundio support")
|
||||
SET(SOUNDIO_LIBRARY "")
|
||||
ENDIF(SOUNDIO_FOUND)
|
||||
ENDIF(WANT_SOUNDIO)
|
||||
|
||||
|
||||
# check for PulseAudio
|
||||
IF(WANT_PULSEAUDIO)
|
||||
FIND_PACKAGE(PulseAudio)
|
||||
IF(PULSEAUDIO_FOUND)
|
||||
SET(LMMS_HAVE_PULSEAUDIO TRUE)
|
||||
SET(STATUS_PULSEAUDIO "OK")
|
||||
ELSE(PULSEAUDIO_FOUND)
|
||||
SET(STATUS_PULSEAUDIO "not found, please install libpulse-dev (or similar) "
|
||||
"if you require PulseAudio support")
|
||||
ENDIF(PULSEAUDIO_FOUND)
|
||||
ENDIF(WANT_PULSEAUDIO)
|
||||
IF(NOT LMMS_HAVE_PULSEAUDIO)
|
||||
SET(PULSEAUDIO_INCLUDE_DIR "")
|
||||
SET(PULSEAUDIO_LIBRARIES "")
|
||||
ENDIF(NOT LMMS_HAVE_PULSEAUDIO)
|
||||
|
||||
|
||||
# check for MP3/Lame-libraries
|
||||
IF(WANT_MP3LAME)
|
||||
FIND_PACKAGE(Lame)
|
||||
IF(LAME_FOUND)
|
||||
SET(LMMS_HAVE_MP3LAME TRUE)
|
||||
SET(STATUS_MP3LAME "OK")
|
||||
ELSE(LAME_FOUND)
|
||||
SET(STATUS_MP3LAME "not found, please install libmp3lame-dev (or similar)")
|
||||
ENDIF(LAME_FOUND)
|
||||
ELSE(WANT_MP3LAME)
|
||||
SET(STATUS_MP3LAME "Disabled for build")
|
||||
ENDIF(WANT_MP3LAME)
|
||||
|
||||
# check for OGG/Vorbis-libraries
|
||||
IF(WANT_OGGVORBIS)
|
||||
FIND_PACKAGE(OggVorbis)
|
||||
IF(OGGVORBIS_FOUND)
|
||||
SET(LMMS_HAVE_OGGVORBIS TRUE)
|
||||
SET(STATUS_OGGVORBIS "OK")
|
||||
ELSE(OGGVORBIS_FOUND)
|
||||
SET(STATUS_OGGVORBIS "not found, libogg-dev and libvorbis-dev (or similar) "
|
||||
"is highly recommended")
|
||||
ENDIF(OGGVORBIS_FOUND)
|
||||
ENDIF(WANT_OGGVORBIS)
|
||||
|
||||
|
||||
# check for OSS
|
||||
IF(WANT_OSS AND (LMMS_HAVE_SOUNDCARD_H OR LMMS_HAVE_SYS_SOUNDCARD_H))
|
||||
SET(LMMS_HAVE_OSS TRUE)
|
||||
SET(STATUS_OSS "OK")
|
||||
ELSEIF(WANT_OSS)
|
||||
SET(STATUS_OSS "<not found or not supported on this platform>")
|
||||
ENDIF()
|
||||
|
||||
|
||||
# check for ALSA
|
||||
IF(WANT_ALSA)
|
||||
FIND_PACKAGE(Alsa)
|
||||
IF(ALSA_FOUND)
|
||||
SET(LMMS_HAVE_ALSA TRUE)
|
||||
SET(STATUS_ALSA "OK")
|
||||
ELSE(ALSA_FOUND)
|
||||
SET(STATUS_ALSA "not found, please install libasound2-dev (or similar) "
|
||||
"if you require ALSA support")
|
||||
ENDIF(ALSA_FOUND)
|
||||
ENDIF(WANT_ALSA)
|
||||
IF(NOT LMMS_HAVE_ALSA)
|
||||
SET(ASOUND_LIBRARY "")
|
||||
ENDIF(NOT LMMS_HAVE_ALSA)
|
||||
|
||||
|
||||
# check for JACK
|
||||
IF(WANT_JACK)
|
||||
IF(WANT_WEAKJACK)
|
||||
SET(LMMS_HAVE_WEAKJACK TRUE)
|
||||
SET(STATUS_JACK "OK (weak linking enabled)")
|
||||
set(JACK_INCLUDE_DIRS "")
|
||||
set(JACK_LIBRARIES weakjack)
|
||||
SET(LMMS_HAVE_JACK TRUE)
|
||||
SET(LMMS_HAVE_JACK_PRENAME TRUE)
|
||||
SET(JACK_FOUND TRUE)
|
||||
ELSE()
|
||||
PKG_CHECK_MODULES(JACK jack>=0.77)
|
||||
IF(JACK_FOUND)
|
||||
SET(LMMS_HAVE_JACK TRUE)
|
||||
SET(STATUS_JACK "OK")
|
||||
SET(CMAKE_REQUIRED_LIBRARIES_BACKUP "${CMAKE_REQUIRED_LIBRARIES}")
|
||||
SET(CMAKE_REQUIRED_LIBRARIES "${JACK_LIBRARIES}")
|
||||
CHECK_LIBRARY_EXISTS(jack jack_port_rename "" LMMS_HAVE_JACK_PRENAME)
|
||||
SET(CMAKE_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES_BACKUP}")
|
||||
UNSET(CMAKE_REQUIRED_LIBRARIES_BACKUP)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
IF(NOT JACK_FOUND)
|
||||
SET(JACK_INCLUDE_DIRS "")
|
||||
SET(STATUS_JACK "not found")
|
||||
ENDIF()
|
||||
ENDIF(WANT_JACK)
|
||||
|
||||
# check for FFTW3F-library
|
||||
FIND_PACKAGE(FFTW COMPONENTS fftw3f REQUIRED)
|
||||
|
||||
# check for FLTK
|
||||
set(FLTK_SKIP_OPENGL TRUE)
|
||||
set(FLTK_SKIP_FORMS TRUE)
|
||||
set(FLTK_SKIP_IMAGES TRUE)
|
||||
set(FLTK_SKIP_MATH TRUE)
|
||||
if(MINGW_PREFIX)
|
||||
set(FLTK_SKIP_FLUID TRUE)
|
||||
endif()
|
||||
FIND_PACKAGE(FLTK)
|
||||
IF(FLTK_FOUND)
|
||||
SET(STATUS_ZYN "OK")
|
||||
ELSE()
|
||||
SET(STATUS_ZYN "not found, please install fltk")
|
||||
ENDIF()
|
||||
|
||||
# check for Fluidsynth
|
||||
IF(WANT_SF2)
|
||||
find_package(FluidSynth 1.1.7)
|
||||
if(FluidSynth_FOUND)
|
||||
SET(LMMS_HAVE_FLUIDSYNTH TRUE)
|
||||
if(FluidSynth_VERSION_STRING VERSION_GREATER_EQUAL 2)
|
||||
set(STATUS_FLUIDSYNTH "OK")
|
||||
else()
|
||||
set(STATUS_FLUIDSYNTH "OK (FluidSynth version < 2: per-note panning unsupported)")
|
||||
endif()
|
||||
else()
|
||||
SET(STATUS_FLUIDSYNTH "not found, libfluidsynth-dev (or similar)"
|
||||
"is highly recommended")
|
||||
endif()
|
||||
ENDIF(WANT_SF2)
|
||||
|
||||
# check for libgig
|
||||
If(WANT_GIG)
|
||||
PKG_CHECK_MODULES(GIG gig)
|
||||
IF(GIG_FOUND)
|
||||
SET(LMMS_HAVE_GIG TRUE)
|
||||
SET(STATUS_GIG "OK")
|
||||
ELSE(GIG_FOUND)
|
||||
SET(STATUS_GIG "not found, libgig needed for decoding .gig files")
|
||||
ENDIF(GIG_FOUND)
|
||||
ENDIF(WANT_GIG)
|
||||
|
||||
# check for pthreads
|
||||
IF(LMMS_BUILD_LINUX OR LMMS_BUILD_APPLE OR LMMS_BUILD_OPENBSD OR LMMS_BUILD_FREEBSD OR LMMS_BUILD_HAIKU)
|
||||
FIND_PACKAGE(Threads)
|
||||
ENDIF(LMMS_BUILD_LINUX OR LMMS_BUILD_APPLE OR LMMS_BUILD_OPENBSD OR LMMS_BUILD_FREEBSD OR LMMS_BUILD_HAIKU)
|
||||
|
||||
# check for sndio (roaraudio won't work yet)
|
||||
IF(WANT_SNDIO)
|
||||
FIND_PACKAGE(Sndio)
|
||||
IF(SNDIO_FOUND)
|
||||
SET(LMMS_HAVE_SNDIO TRUE)
|
||||
SET(STATUS_SNDIO "OK")
|
||||
ELSE()
|
||||
SET(STATUS_SNDIO "<not found or not supported on this platform>")
|
||||
ENDIF(SNDIO_FOUND)
|
||||
ENDIF(WANT_SNDIO)
|
||||
|
||||
# check for WINE
|
||||
if(WANT_VST)
|
||||
if((WANT_VST_32 OR WANT_VST_64) AND NOT LMMS_BUILD_WIN32)
|
||||
find_package(Wine)
|
||||
include(CheckWineGcc)
|
||||
endif()
|
||||
macro(check_vst bits)
|
||||
if(NOT WANT_VST_${bits})
|
||||
set(STATUS_VST_${bits} "Not built, as requested")
|
||||
elseif(LMMS_BUILD_WIN32)
|
||||
set(STATUS_VST_${bits} "OK")
|
||||
set(LMMS_HAVE_VST_${bits} TRUE)
|
||||
elseif(NOT WINE_FOUND)
|
||||
set(STATUS_VST_${bits} "not found, please install (lib)wine-dev (or similar) - 64 bit systems additionally need gcc-multilib and g++-multilib")
|
||||
else()
|
||||
CheckWineGcc("${bits}" "${WINEGCC}" WINEGCC_WORKING)
|
||||
if(WINEGCC_WORKING)
|
||||
set(LMMS_HAVE_VST_${bits} TRUE)
|
||||
if(WINE_LIBRARY_FIX)
|
||||
set(STATUS_VST_${bits} "OK, with workaround linking ${WINE_LIBRARY_FIX}")
|
||||
else()
|
||||
set(STATUS_VST_${bits} "OK")
|
||||
endif()
|
||||
else()
|
||||
set(STATUS_VST_${bits} "winegcc fails to compile ${bits}-bit binaries, please make sure you have ${bits}-bit GCC libraries")
|
||||
endif()
|
||||
endif()
|
||||
endmacro()
|
||||
check_vst(32)
|
||||
check_vst(64)
|
||||
if(LMMS_HAVE_VST_32 OR LMMS_HAVE_VST_64 OR LMMS_BUILD_LINUX)
|
||||
set(LMMS_HAVE_VST TRUE)
|
||||
set(STATUS_VST "OK")
|
||||
else()
|
||||
set(STATUS_VST "No hosts selected and available")
|
||||
endif()
|
||||
if(WINE_ASLR_ENABLED)
|
||||
set(STATUS_VST_64 "${STATUS_VST_64}\n\tWARNING: You are using wine ${WINE_VERSION} which cannot disable ASLR, please consider upgrading to wine 10.14 or higher. ASLR may cause crashes with older VSTs.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
IF(WANT_DEBUG_FPE)
|
||||
IF(LMMS_BUILD_LINUX OR LMMS_BUILD_APPLE)
|
||||
SET(LMMS_DEBUG_FPE TRUE)
|
||||
SET (STATUS_DEBUG_FPE "Enabled")
|
||||
ELSE()
|
||||
SET (STATUS_DEBUG_FPE "Wanted but disabled due to unsupported platform")
|
||||
ENDIF()
|
||||
ELSE()
|
||||
SET (STATUS_DEBUG_FPE "Disabled")
|
||||
ENDIF(WANT_DEBUG_FPE)
|
||||
|
||||
if(WANT_DEBUG_CPACK)
|
||||
if((LMMS_BUILD_WIN32 AND CMAKE_VERSION VERSION_LESS "3.19") OR WANT_CPACK_TARBALL)
|
||||
set(STATUS_DEBUG_CPACK "Wanted but disabled due to unsupported configuration")
|
||||
else()
|
||||
set(CPACK_DEBUG TRUE)
|
||||
set(STATUS_DEBUG_CPACK "Enabled")
|
||||
endif()
|
||||
else()
|
||||
set(STATUS_DEBUG_CPACK "Disabled")
|
||||
endif()
|
||||
|
||||
# check for libsamplerate
|
||||
FIND_PACKAGE(Samplerate 0.1.8 MODULE REQUIRED)
|
||||
|
||||
IF(NOT CMAKE_BUILD_TYPE)
|
||||
message(STATUS "Setting build type to 'Release' as none was specified.")
|
||||
set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build." FORCE)
|
||||
# Set the possible values of build type for cmake-gui
|
||||
SET_PROPERTY(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release"
|
||||
"MinSizeRel" "RelWithDebInfo")
|
||||
ENDIF()
|
||||
|
||||
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DLMMS_DEBUG")
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DLMMS_DEBUG")
|
||||
|
||||
if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
add_compile_definitions(NDEBUG)
|
||||
SET(STATUS_ASSERTIONS "Disabled")
|
||||
else()
|
||||
remove_definitions(-DNDEBUG)
|
||||
SET(STATUS_ASSERTIONS "Enabled")
|
||||
endif()
|
||||
|
||||
if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.16")
|
||||
set(NOOP_COMMAND "${CMAKE_COMMAND}" "-E" "true")
|
||||
else()
|
||||
set(NOOP_COMMAND "${CMAKE_COMMAND}" "-E" "echo")
|
||||
endif()
|
||||
|
||||
if(STRIP)
|
||||
# TODO CMake 3.19: Now that CONFIG generator expressions support testing for
|
||||
# multiple configurations, combine the OR into a single CONFIG expression.
|
||||
set(STRIP_COMMAND "$<IF:$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>,${NOOP_COMMAND},${STRIP}>")
|
||||
else()
|
||||
set(STRIP_COMMAND "${NOOP_COMMAND}")
|
||||
endif()
|
||||
|
||||
# people simply updating git will still have this and mess up build with it
|
||||
FILE(REMOVE include/lmmsconfig.h)
|
||||
|
||||
FILE(GLOB LMMS_INCLUDES "${CMAKE_SOURCE_DIR}/include/*.h")
|
||||
LIST(SORT LMMS_INCLUDES)
|
||||
|
||||
# Get list of all committers from git history, ordered by number of commits.
|
||||
# The CONTRIBUTORS file is used by AboutDialog. This information can be provided
|
||||
# with -DCONTRIBUTORS=/path/to/CONTRIBUTORS instead. For instance, to generate
|
||||
# this file for version 1.1.3, the command is:
|
||||
# git shortlog -sne v1.1.3 | cut -c8-
|
||||
FIND_PACKAGE(Git)
|
||||
IF(GIT_FOUND AND NOT CONTRIBUTORS)
|
||||
SET(CONTRIBUTORS "${CMAKE_BINARY_DIR}/CONTRIBUTORS")
|
||||
EXECUTE_PROCESS(
|
||||
COMMAND "${GIT_EXECUTABLE}" shortlog -sne
|
||||
COMMAND cut -c8-
|
||||
OUTPUT_FILE "${CONTRIBUTORS}"
|
||||
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
|
||||
TIMEOUT 1)
|
||||
ENDIF()
|
||||
|
||||
# we somehow have to make LMMS-binary depend on MOC-files
|
||||
ADD_FILE_DEPENDENCIES("${CMAKE_BINARY_DIR}/lmmsconfig.h")
|
||||
|
||||
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang" AND NOT WIN32)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC -DPIC")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -DPIC")
|
||||
elseif(MSVC)
|
||||
# Use UTF-8 as the source and execution character set
|
||||
add_compile_options("/utf-8")
|
||||
ENDIF()
|
||||
|
||||
# gcc builds support gprof for profiling
|
||||
# clang too seems to support gprof, but i couldn't get it working.
|
||||
# if needed, change the if condition to "GNU|CLANG"
|
||||
if(NOT CMAKE_CXX_COMPILER_ID MATCHES "GNU")
|
||||
set(STATUS_GPROF ", NOT SUPPORTED BY THIS COMPILER")
|
||||
set(WANT_DEBUG_GPROF OFF)
|
||||
endif()
|
||||
|
||||
if(WANT_DEBUG_GPROF)
|
||||
add_compile_options(-pg)
|
||||
add_link_options(-pg)
|
||||
set(STATUS_GPROF "OK")
|
||||
else()
|
||||
set(STATUS_GPROF "Disabled ${STATUS_GPROF}")
|
||||
endif()
|
||||
|
||||
# add enabled sanitizers
|
||||
function(add_sanitizer sanitizer supported_compilers want_flag status_flag)
|
||||
if(${want_flag})
|
||||
if(CMAKE_CXX_COMPILER_ID MATCHES "${supported_compilers}")
|
||||
set("${status_flag}" "Enabled" PARENT_SCOPE)
|
||||
string(REPLACE ";" " " additional_flags "${ARGN}")
|
||||
# todo CMake 3.13: use add_compile_options/add_link_options instead
|
||||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -fsanitize=${sanitizer} ${additional_flags}" PARENT_SCOPE)
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fsanitize=${sanitizer} ${additional_flags}" PARENT_SCOPE)
|
||||
else()
|
||||
set("${status_flag}" "Wanted but disabled due to unsupported compiler" PARENT_SCOPE)
|
||||
endif()
|
||||
else()
|
||||
set("${status_flag}" "Disabled" PARENT_SCOPE)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
add_sanitizer(address "GNU|Clang|MSVC" WANT_DEBUG_ASAN STATUS_DEBUG_ASAN)
|
||||
add_sanitizer(thread "GNU|Clang" WANT_DEBUG_TSAN STATUS_DEBUG_TSAN)
|
||||
add_sanitizer(memory "Clang" WANT_DEBUG_MSAN STATUS_DEBUG_MSAN -fno-omit-frame-pointer)
|
||||
# UBSan does not link with vptr enabled due to a problem with references from PeakControllerEffect
|
||||
# not being found by PeakController
|
||||
add_sanitizer(undefined "GNU|Clang" WANT_DEBUG_UBSAN STATUS_DEBUG_UBSAN -fno-sanitize=vptr)
|
||||
|
||||
# Add warning and error flags
|
||||
include(ErrorFlags)
|
||||
|
||||
# use ccache
|
||||
include(CompileCache)
|
||||
|
||||
# make sub-directories
|
||||
ADD_SUBDIRECTORY(cmake)
|
||||
ADD_SUBDIRECTORY(src)
|
||||
ADD_SUBDIRECTORY(plugins)
|
||||
ADD_SUBDIRECTORY(tests)
|
||||
ADD_SUBDIRECTORY(data)
|
||||
ADD_SUBDIRECTORY(doc)
|
||||
|
||||
# install tasks
|
||||
ADD_SUBDIRECTORY(cmake/install)
|
||||
|
||||
FIND_PACKAGE(UnixCommands)
|
||||
IF(GZIP)
|
||||
ADD_CUSTOM_COMMAND(OUTPUT "${CMAKE_BINARY_DIR}/lmms.1.gz"
|
||||
COMMAND ${GZIP} -c ${CMAKE_SOURCE_DIR}/doc/lmms.1 > ${CMAKE_BINARY_DIR}/lmms.1.gz
|
||||
DEPENDS "${CMAKE_SOURCE_DIR}/doc/lmms.1"
|
||||
COMMENT "Generating lmms.1.gz"
|
||||
VERBATIM)
|
||||
|
||||
|
||||
ADD_CUSTOM_TARGET(manpage ALL
|
||||
DEPENDS "${CMAKE_BINARY_DIR}/lmms.1.gz")
|
||||
ELSEIF(UNIX)
|
||||
MESSAGE(FATAL_ERROR "Can't find gzip required for generating lmms.1.gz")
|
||||
ENDIF()
|
||||
|
||||
# install headers
|
||||
|
||||
IF(LMMS_BUILD_LINUX)
|
||||
INSTALL(FILES ${LMMS_INCLUDES}
|
||||
"${CMAKE_BINARY_DIR}/lmmsconfig.h"
|
||||
"${CMAKE_BINARY_DIR}/lmmsversion.h"
|
||||
"${CMAKE_SOURCE_DIR}/src/gui/embed.cpp"
|
||||
DESTINATION "include/lmms/")
|
||||
ENDIF(LMMS_BUILD_LINUX)
|
||||
|
||||
#
|
||||
# add distclean-target
|
||||
#
|
||||
ADD_CUSTOM_TARGET(distclean
|
||||
COMMAND make clean
|
||||
COMMAND rm -rf `find -name cmake_install.cmake` `find -name Makefile` `find -type d -name CMakeFiles` CMakeCache.txt lmmsconfig.h lmms.1.gz)
|
||||
|
||||
#
|
||||
# add tarball-target
|
||||
#
|
||||
SET(TMP "lmms-${VERSION}")
|
||||
ADD_CUSTOM_TARGET(dist
|
||||
COMMAND make clean
|
||||
COMMAND rm -rf "${TMP}"
|
||||
COMMAND mkdir -p "${TMP}"
|
||||
COMMAND cp CMakeLists.txt LICENSE.txt INSTALL.txt README.md "${TMP}"
|
||||
COMMAND cp -r buildtools cmake data doc include plugins src "${TMP}"
|
||||
COMMAND rm -rf `find "${TMP}" -name cmake_install.cmake` `find "${TMP}" -name Makefile` `find "${TMP}" -type d -name CMakeFiles` "${TMP}/CMakeCache.txt"
|
||||
COMMAND tar cjf lmms-${VERSION}-src.tar.bz2 "${TMP}"
|
||||
COMMAND rm -rf "${TMP}")
|
||||
|
||||
|
||||
#
|
||||
# add uninstall-target
|
||||
#
|
||||
ADD_CUSTOM_TARGET(uninstall
|
||||
COMMAND ${CMAKE_COMMAND} -DCMAKE_INSTALL_PREFIX="${CMAKE_INSTALL_PREFIX}" -P "${CMAKE_CURRENT_SOURCE_DIR}/cmake/uninstall.cmake"
|
||||
)
|
||||
|
||||
#
|
||||
# display configuration information
|
||||
#
|
||||
|
||||
MESSAGE("\n"
|
||||
"Installation Summary\n"
|
||||
"--------------------\n"
|
||||
"* Install Directory : ${CMAKE_INSTALL_PREFIX}\n"
|
||||
)
|
||||
|
||||
MESSAGE(
|
||||
"Supported audio interfaces\n"
|
||||
"--------------------------\n"
|
||||
"* ALSA : ${STATUS_ALSA}\n"
|
||||
"* JACK : ${STATUS_JACK}\n"
|
||||
"* OSS : ${STATUS_OSS}\n"
|
||||
"* Sndio : ${STATUS_SNDIO}\n"
|
||||
"* PortAudio : ${STATUS_PORTAUDIO}\n"
|
||||
"* libsoundio : ${STATUS_SOUNDIO}\n"
|
||||
"* PulseAudio : ${STATUS_PULSEAUDIO}\n"
|
||||
"* SDL : ${STATUS_SDL}\n"
|
||||
)
|
||||
|
||||
MESSAGE(
|
||||
"Supported MIDI interfaces\n"
|
||||
"-------------------------\n"
|
||||
"* ALSA : ${STATUS_ALSA}\n"
|
||||
"* OSS : ${STATUS_OSS}\n"
|
||||
"* Sndio : ${STATUS_SNDIO}\n"
|
||||
"* JACK : ${STATUS_JACK}\n"
|
||||
"* WinMM : ${STATUS_WINMM}\n"
|
||||
"* AppleMidi : ${STATUS_APPLEMIDI}\n"
|
||||
)
|
||||
|
||||
MESSAGE(
|
||||
"Supported file formats for project export\n"
|
||||
"-----------------------------------------\n"
|
||||
"* WAVE : OK\n"
|
||||
"* FLAC : OK\n"
|
||||
"* OGG/VORBIS : ${STATUS_OGGVORBIS}\n"
|
||||
"* MP3/Lame : ${STATUS_MP3LAME}\n"
|
||||
)
|
||||
|
||||
MESSAGE(
|
||||
"Optional plugins\n"
|
||||
"----------------\n"
|
||||
"* Lv2 plugins : ${STATUS_LV2}\n"
|
||||
"* SUIL for plugin UIs : ${STATUS_SUIL}\n"
|
||||
"* ZynAddSubFX instrument : ${STATUS_ZYN}\n"
|
||||
"* Carla Patchbay & Rack : ${STATUS_CARLA}\n"
|
||||
"* SoundFont2 player : ${STATUS_FLUIDSYNTH}\n"
|
||||
"* Sid instrument : ${STATUS_SID}\n"
|
||||
"* Stk Mallets : ${STATUS_STK}\n"
|
||||
"* VST plugin host : ${STATUS_VST}\n"
|
||||
" * 32-bit Windows host : ${STATUS_VST_32}\n"
|
||||
" * 64-bit Windows host : ${STATUS_VST_64}\n"
|
||||
"* CALF LADSPA plugins : ${STATUS_CALF}\n"
|
||||
"* CAPS LADSPA plugins : ${STATUS_CAPS}\n"
|
||||
"* CMT LADSPA plugins : ${STATUS_CMT}\n"
|
||||
"* TAP LADSPA plugins : ${STATUS_TAP}\n"
|
||||
"* SWH LADSPA plugins : ${STATUS_SWH}\n"
|
||||
"* GIG player : ${STATUS_GIG}\n"
|
||||
)
|
||||
|
||||
MESSAGE(
|
||||
"Developer options\n"
|
||||
"-----------------------------------------\n"
|
||||
"* Debug FP exceptions : ${STATUS_DEBUG_FPE}\n"
|
||||
"* Debug using AddressSanitizer : ${STATUS_DEBUG_ASAN}\n"
|
||||
"* Debug using ThreadSanitizer : ${STATUS_DEBUG_TSAN}\n"
|
||||
"* Debug using MemorySanitizer : ${STATUS_DEBUG_MSAN}\n"
|
||||
"* Debug using UBSanitizer : ${STATUS_DEBUG_UBSAN}\n"
|
||||
"* Debug packaging commands : ${STATUS_DEBUG_CPACK}\n"
|
||||
"* Profile using GNU profiler : ${STATUS_GPROF}\n"
|
||||
"* Debug assertions : ${STATUS_ASSERTIONS}\n"
|
||||
"* Experimental Qt6 support : ${STATUS_QT6}\n"
|
||||
)
|
||||
|
||||
MESSAGE(
|
||||
"\n"
|
||||
"-----------------------------------------------------------------\n"
|
||||
"IMPORTANT:\n"
|
||||
"after installing missing packages, remove CMakeCache.txt before\n"
|
||||
"running cmake again!\n"
|
||||
"-----------------------------------------------------------------\n"
|
||||
"\n\n")
|
||||
|
||||
SET(CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION "${BIN_DIR}")
|
||||
if(MSVC)
|
||||
# We can't set this on the install time according to the configuration
|
||||
SET(CMAKE_INSTALL_DEBUG_LIBRARIES TRUE)
|
||||
SET(CMAKE_INSTALL_UCRT_LIBRARIES TRUE)
|
||||
endif()
|
||||
INCLUDE(InstallRequiredSystemLibraries)
|
||||
192
INSTALL
Normal file
@@ -0,0 +1,192 @@
|
||||
Quick Instructions
|
||||
==================
|
||||
|
||||
Go to the directory containing the package's source code and type:
|
||||
|
||||
autoreconf -is
|
||||
./configure
|
||||
make install
|
||||
lmms
|
||||
|
||||
Basic Installation
|
||||
==================
|
||||
|
||||
These are generic installation instructions.
|
||||
|
||||
The `configure' shell script attempts to guess correct values for
|
||||
various system-dependent variables used during compilation. It uses
|
||||
those values to create a `Makefile' in each directory of the package.
|
||||
It may also create one or more `.h' files containing system-dependent
|
||||
definitions. Finally, it creates a shell script `config.status' that
|
||||
you can run in the future to recreate the current configuration, a file
|
||||
`config.cache' that saves the results of its tests to speed up
|
||||
reconfiguring, and a file `config.log' containing compiler output
|
||||
(useful mainly for debugging `configure').
|
||||
|
||||
If you need to do unusual things to compile the package, please try
|
||||
to figure out how `configure' could check whether to do them, and mail
|
||||
diffs or instructions to the address given in the `README' so they can
|
||||
be considered for the next release. If at some point `config.cache'
|
||||
contains results you don't want to keep, you may remove or edit it.
|
||||
|
||||
The file `configure.in' is used to create `configure' by a program
|
||||
called `autoconf'. You only need `configure.in' if you want to change
|
||||
it or regenerate `configure' using a newer version of `autoconf'.
|
||||
|
||||
The simplest way to compile this package is:
|
||||
|
||||
1. `cd' to the directory containing the package's source code and type
|
||||
`./configure' to configure the package for your system. If you're
|
||||
using `csh' on an old version of System V, you might need to type
|
||||
`sh ./configure' instead to prevent `csh' from trying to execute
|
||||
`configure' itself.
|
||||
|
||||
Running `configure' takes awhile. While running, it prints some
|
||||
messages telling which features it is checking for.
|
||||
|
||||
2. Type `make' to compile the package.
|
||||
|
||||
3. Optionally, type `make check' to run any self-tests that come with
|
||||
the package.
|
||||
|
||||
4. Type `make install' to install the programs and any data files and
|
||||
documentation.
|
||||
|
||||
5. You can remove the program binaries and object files from the
|
||||
source code directory by typing `make clean'. To also remove the
|
||||
files that `configure' created (so you can compile the package for
|
||||
a different kind of computer), type `make distclean'. There is
|
||||
also a `make maintainer-clean' target, but that is intended mainly
|
||||
for the package's developers. If you use it, you may have to get
|
||||
all sorts of other programs in order to regenerate files that came
|
||||
with the distribution.
|
||||
|
||||
Compilers and Options
|
||||
=====================
|
||||
|
||||
Some systems require unusual options for compilation or linking that
|
||||
the `configure' script does not know about. You can give `configure'
|
||||
initial values for variables by setting them in the environment. Using
|
||||
a Bourne-compatible shell, you can do that on the command line like
|
||||
this:
|
||||
CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
|
||||
|
||||
Or on systems that have the `env' program, you can do it like this:
|
||||
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
|
||||
|
||||
Compiling For Multiple Architectures
|
||||
====================================
|
||||
|
||||
You can compile the package for more than one kind of computer at the
|
||||
same time, by placing the object files for each architecture in their
|
||||
own directory. To do this, you must use a version of `make' that
|
||||
supports the `VPATH' variable, such as GNU `make'. `cd' to the
|
||||
directory where you want the object files and executables to go and run
|
||||
the `configure' script. `configure' automatically checks for the
|
||||
source code in the directory that `configure' is in and in `..'.
|
||||
|
||||
If you have to use a `make' that does not supports the `VPATH'
|
||||
variable, you have to compile the package for one architecture at a time
|
||||
in the source code directory. After you have installed the package for
|
||||
one architecture, use `make distclean' before reconfiguring for another
|
||||
architecture.
|
||||
|
||||
Installation Names
|
||||
==================
|
||||
|
||||
By default, `make install' will install the package's files in
|
||||
`/usr/local/bin', `/usr/local/man', etc. You can specify an
|
||||
installation prefix other than `/usr/local' by giving `configure' the
|
||||
option `--prefix=PATH'.
|
||||
|
||||
You can specify separate installation prefixes for
|
||||
architecture-specific files and architecture-independent files. If you
|
||||
give `configure' the option `--exec-prefix=PATH', the package will use
|
||||
PATH as the prefix for installing programs and libraries.
|
||||
Documentation and other data files will still use the regular prefix.
|
||||
|
||||
In addition, if you use an unusual directory layout you can give
|
||||
options like `--bindir=PATH' to specify different values for particular
|
||||
kinds of files. Run `configure --help' for a list of the directories
|
||||
you can set and what kinds of files go in them.
|
||||
|
||||
If the package supports it, you can cause programs to be installed
|
||||
with an extra prefix or suffix on their names by giving `configure' the
|
||||
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
|
||||
|
||||
Optional Features
|
||||
=================
|
||||
|
||||
Some packages pay attention to `--enable-FEATURE' options to
|
||||
`configure', where FEATURE indicates an optional part of the package.
|
||||
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
|
||||
is something like `gnu-as' or `x' (for the X Window System). The
|
||||
`README' should mention any `--enable-' and `--with-' options that the
|
||||
package recognizes.
|
||||
|
||||
For packages that use the X Window System, `configure' can usually
|
||||
find the X include and library files automatically, but if it doesn't,
|
||||
you can use the `configure' options `--x-includes=DIR' and
|
||||
`--x-libraries=DIR' to specify their locations.
|
||||
|
||||
Specifying the System Type
|
||||
==========================
|
||||
|
||||
There may be some features `configure' can not figure out
|
||||
automatically, but needs to determine by the type of host the package
|
||||
will run on. Usually `configure' can figure that out, but if it prints
|
||||
a message saying it can not guess the host type, give it the
|
||||
`--host=TYPE' option. TYPE can either be a short name for the system
|
||||
type, such as `sun4', or a canonical name with three fields:
|
||||
CPU-COMPANY-SYSTEM
|
||||
|
||||
See the file `config.sub' for the possible values of each field. If
|
||||
`config.sub' isn't included in this package, then this package doesn't
|
||||
need to know the host type.
|
||||
|
||||
If you are building compiler tools for cross-compiling, you can also
|
||||
use the `--target=TYPE' option to select the type of system they will
|
||||
produce code for and the `--build=TYPE' option to select the type of
|
||||
system on which you are compiling the package.
|
||||
|
||||
Sharing Defaults
|
||||
================
|
||||
|
||||
If you want to set default values for `configure' scripts to share,
|
||||
you can create a site shell script called `config.site' that gives
|
||||
default values for variables like `CC', `cache_file', and `prefix'.
|
||||
`configure' looks for `PREFIX/share/config.site' if it exists, then
|
||||
`PREFIX/etc/config.site' if it exists. Or, you can set the
|
||||
`CONFIG_SITE' environment variable to the location of the site script.
|
||||
A warning: not all `configure' scripts look for a site script.
|
||||
|
||||
Operation Controls
|
||||
==================
|
||||
|
||||
`configure' recognizes the following options to control how it
|
||||
operates.
|
||||
|
||||
`--cache-file=FILE'
|
||||
Use and save the results of the tests in FILE instead of
|
||||
`./config.cache'. Set FILE to `/dev/null' to disable caching, for
|
||||
debugging `configure'.
|
||||
|
||||
`--help'
|
||||
Print a summary of the options to `configure', and exit.
|
||||
|
||||
`--quiet'
|
||||
`--silent'
|
||||
`-q'
|
||||
Do not print messages saying which checks are being made. To
|
||||
suppress all normal output, redirect it to `/dev/null' (any error
|
||||
messages will still be shown).
|
||||
|
||||
`--srcdir=DIR'
|
||||
Look for the package's source code in directory DIR. Usually
|
||||
`configure' can determine that directory automatically.
|
||||
|
||||
`--version'
|
||||
Print the version of Autoconf used to generate the `configure'
|
||||
script, and exit.
|
||||
|
||||
`configure' also accepts some other, not widely useful, options.
|
||||
67
INSTALL.txt
@@ -1,67 +0,0 @@
|
||||
This project uses git submodules and several are required for a successful
|
||||
build. If this tarball was NOT provided with submodules (default), some source
|
||||
dependencies will need to be manually added to src/3rdparty.
|
||||
|
||||
If this project WAS provided with submodules, there are detailed dependencies
|
||||
(e.g. supported compilers, cmake requirements, cross-compilation) at
|
||||
doc/wiki/Compiling.md including platform-specific build instructions (e.g.
|
||||
apt-get, dnf, pacman, etc).
|
||||
|
||||
Online documentation:
|
||||
|
||||
https://github.com/LMMS/lmms/wiki/
|
||||
|
||||
Live online chat via Discord (similar to IRC):
|
||||
|
||||
https://lmms.io/chat, Channel #programming
|
||||
|
||||
Basic build steps:
|
||||
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ../
|
||||
make
|
||||
sudo make install
|
||||
# or alternately: su -c 'make install'
|
||||
|
||||
With the above commands an out-of-tree build is performed. You can also run
|
||||
"cmake ." directly in the root of source tree although this is not recommended.
|
||||
When performing an out-of-tree build after there's already an in-tree build,
|
||||
make sure to run "make distclean" before running cmake inside build-directory.
|
||||
|
||||
If you want to use custom compiler flags simply set the environment variables
|
||||
CFLAGS and CXXFLAGS.
|
||||
|
||||
After running cmake (the 3rd command above) you can see a summary of things
|
||||
that are going to be built into LMMS or built as plugins. Install the
|
||||
according libraries and development files if a certain feature is not enabled.
|
||||
Then remove CMakeCache.txt and run cmake again.
|
||||
|
||||
For non-root installs, or to install to a non-standard location, provide an
|
||||
install prefix to cmake, using the flag:
|
||||
|
||||
-DCMAKE_INSTALL_PREFIX=<prefix>
|
||||
|
||||
The Compilation tutorial (see docs/wiki/Compilation.md)
|
||||
specifically uses <prefix> as "../target" for all non-root installations. This
|
||||
is strongly recommended if developing a patch or a feature. For root
|
||||
installations, <prefix> can be /usr, /usr/local, /opt, etc. For most systems,
|
||||
the default is /usr/local.
|
||||
|
||||
If your Qt5 installation does not reside in standard installation paths,
|
||||
additionally pass:
|
||||
|
||||
-DCMAKE_PREFIX_PATH=<prefix>
|
||||
|
||||
Where <prefix> is the location to Qt5 installation, usually /opt/qt5/, etc.
|
||||
|
||||
Important wiki sections:
|
||||
|
||||
doc/wiki/Compiling.md:
|
||||
Dependencies Detailed
|
||||
- Build Toolchain (cmake)
|
||||
- Compiler (gcc, clang)
|
||||
- Libraries (required and optional dependencies)
|
||||
|
||||
doc/wiki/Dependencies-<platform>.md
|
||||
Platform-specific dependencies (Windows, Ubuntu, Fedora, macOS, etc.)
|
||||
430
Makefile.am
Normal file
@@ -0,0 +1,430 @@
|
||||
AUTOMAKE_OPTIONS = foreign 1.4
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
dist-hook:
|
||||
rm -rf `find $(distdir) -name \*.moc`
|
||||
|
||||
|
||||
#install-exec-hook:
|
||||
# cd $(DESTDIR)$(bindir) ; \
|
||||
# strip lmms
|
||||
|
||||
|
||||
if HAVE_RPM
|
||||
$(PACKAGE)-$(VERSION).tar.gz: dist
|
||||
|
||||
# Rule to build RPM distribution package
|
||||
rpm: $(PACKAGE)-$(VERSION).tar.gz $(PACKAGE).spec
|
||||
cp $(PACKAGE)-$(VERSION).tar.gz @RPMSOURCEDIR@
|
||||
rpmbuild -ba $(PACKAGE).spec
|
||||
endif
|
||||
|
||||
|
||||
|
||||
SUBDIRS = buildtools data plugins
|
||||
|
||||
|
||||
INCLUDES = -I$(srcdir)/include -I.
|
||||
#-I/usr/include/wine -I/usr/include/wine/windows
|
||||
bin_PROGRAMS = lmms
|
||||
|
||||
|
||||
AM_CXXFLAGS := $(AM_CXXFLAGS) $(QT_CXXFLAGS)
|
||||
|
||||
|
||||
%.moc: $(srcdir)/include/%.h
|
||||
$(MOC) -o $@ $<
|
||||
|
||||
%.ts:
|
||||
$(LUPDATE) $(lmms_SOURCES) `find plugins/ -type f -name "*.cpp"` -ts data/locale/$@
|
||||
|
||||
%.qm: %.ts
|
||||
$(LRELEASE) $<
|
||||
|
||||
|
||||
man1_MANS = lmms.1
|
||||
|
||||
|
||||
lmms_MOC = \
|
||||
./about_dialog.moc \
|
||||
./arp_and_chords_tab_widget.moc \
|
||||
./automatable_button.moc \
|
||||
./automatable_slider.moc \
|
||||
./automation_editor.moc \
|
||||
./automation_pattern.moc \
|
||||
./automation_track.moc \
|
||||
./bb_editor.moc \
|
||||
./bb_track.moc \
|
||||
./instrument_track.moc \
|
||||
./combobox.moc \
|
||||
./config_mgr.moc \
|
||||
./cpuload_widget.moc \
|
||||
./effect_control_dialog.moc \
|
||||
./effect_label.moc \
|
||||
./effect_select_dialog.moc \
|
||||
./effect_tab_widget.moc \
|
||||
./envelope_and_lfo_widget.moc \
|
||||
./envelope_tab_widget.moc \
|
||||
./export_project_dialog.moc \
|
||||
./fade_button.moc \
|
||||
./file_browser.moc \
|
||||
./group_box.moc \
|
||||
./kmultitabbar.moc \
|
||||
./kmultitabbar-qt3.moc \
|
||||
./knob.moc \
|
||||
./lcd_spinbox.moc \
|
||||
./led_checkbox.moc \
|
||||
./main_window.moc \
|
||||
./mixer.moc \
|
||||
./name_label.moc \
|
||||
./nstate_button.moc \
|
||||
./meter_dialog.moc \
|
||||
./midi_alsa_seq.moc \
|
||||
./midi_tab_widget.moc \
|
||||
./pattern.moc \
|
||||
./piano_roll.moc \
|
||||
./piano_widget.moc \
|
||||
./pixmap_button.moc \
|
||||
./plugin_browser.moc \
|
||||
./project_notes.moc \
|
||||
./rack_plugin.moc \
|
||||
./rack_view.moc \
|
||||
./rubberband.moc \
|
||||
./qxembed.moc \
|
||||
./rename_dialog.moc \
|
||||
./sample_buffer.moc \
|
||||
./sample_play_handle.moc \
|
||||
./sample_track.moc \
|
||||
./setup_dialog.moc \
|
||||
./side_bar.moc \
|
||||
./side_bar_widget.moc \
|
||||
./song_editor.moc \
|
||||
./surround_area.moc \
|
||||
./tab_bar.moc \
|
||||
./tab_button.moc \
|
||||
./tab_widget.moc \
|
||||
./tempo_sync_knob.moc \
|
||||
./timeline.moc \
|
||||
./tool_button.moc \
|
||||
./track_container.moc \
|
||||
./track.moc \
|
||||
./visualization_widget.moc \
|
||||
./volume_knob.moc
|
||||
|
||||
|
||||
BUILT_SOURCES = $(lmms_MOC)
|
||||
|
||||
lmms_EMBEDDED_RESOURCES = $(srcdir)/AUTHORS $(srcdir)/COPYING
|
||||
|
||||
./embedded_resources.h: $(lmms_EMBEDDED_RESOURCES)
|
||||
$(BIN2RES) $(lmms_EMBEDDED_RESOURCES) > $@
|
||||
|
||||
./embed.o: ./embedded_resources.h
|
||||
|
||||
|
||||
if USE_3RDPARTY_LIBSRC
|
||||
LIBSAMPLERATE_SOURCES= $(srcdir)/src/3rdparty/samplerate/samplerate.c \
|
||||
$(srcdir)/src/3rdparty/samplerate/samplerate.h \
|
||||
$(srcdir)/src/3rdparty/samplerate/src_sinc.c \
|
||||
$(srcdir)/src/3rdparty/samplerate/high_qual_coeffs.h \
|
||||
$(srcdir)/src/3rdparty/samplerate/mid_qual_coeffs.h \
|
||||
$(srcdir)/src/3rdparty/samplerate/fastest_coeffs.h \
|
||||
$(srcdir)/src/3rdparty/samplerate/common.h \
|
||||
$(srcdir)/src/3rdparty/samplerate/float_cast.h \
|
||||
$(srcdir)/src/3rdparty/samplerate/src_zoh.c \
|
||||
$(srcdir)/src/3rdparty/samplerate/src_linear.c
|
||||
endif
|
||||
|
||||
THIRD_PARTY_CODE=$(LIBSAMPLERATE_SOURCES)
|
||||
|
||||
|
||||
|
||||
lmms_SOURCES = \
|
||||
$(srcdir)/src/audio/audio_alsa.cpp \
|
||||
$(srcdir)/src/audio/audio_device.cpp \
|
||||
$(srcdir)/src/audio/audio_file_device.cpp \
|
||||
$(srcdir)/src/audio/audio_file_ogg.cpp \
|
||||
$(srcdir)/src/audio/audio_file_wave.cpp \
|
||||
$(srcdir)/src/audio/audio_jack.cpp \
|
||||
$(srcdir)/src/audio/audio_oss.cpp \
|
||||
$(srcdir)/src/audio/audio_port.cpp \
|
||||
$(srcdir)/src/audio/audio_sample_recorder.cpp \
|
||||
$(srcdir)/src/audio/audio_sdl.cpp \
|
||||
$(srcdir)/src/core/about_dialog.cpp \
|
||||
$(srcdir)/src/core/arp_and_chords_tab_widget.cpp \
|
||||
$(srcdir)/src/core/automation_editor.cpp \
|
||||
$(srcdir)/src/core/automation_pattern.cpp \
|
||||
$(srcdir)/src/core/bb_editor.cpp \
|
||||
$(srcdir)/src/core/config_mgr.cpp \
|
||||
$(srcdir)/src/core/effect_chain.cpp \
|
||||
$(srcdir)/src/core/effect_control_dialog.cpp \
|
||||
$(srcdir)/src/core/effect_select_dialog.cpp \
|
||||
$(srcdir)/src/core/effect_tab_widget.cpp \
|
||||
$(srcdir)/src/core/effect.cpp \
|
||||
$(srcdir)/src/core/engine.cpp \
|
||||
$(srcdir)/src/core/envelope_and_lfo_widget.cpp \
|
||||
$(srcdir)/src/core/envelope_tab_widget.cpp \
|
||||
$(srcdir)/src/core/export_project_dialog.cpp \
|
||||
$(srcdir)/src/core/file_browser.cpp \
|
||||
$(srcdir)/src/core/import_filter.cpp \
|
||||
$(srcdir)/src/core/instrument.cpp \
|
||||
$(srcdir)/src/core/main_window.cpp \
|
||||
$(srcdir)/src/core/main.cpp \
|
||||
$(srcdir)/src/core/meter_dialog.cpp \
|
||||
$(srcdir)/src/core/midi_tab_widget.cpp \
|
||||
$(srcdir)/src/core/mixer.cpp \
|
||||
$(srcdir)/src/core/name_label.cpp \
|
||||
$(srcdir)/src/core/note.cpp \
|
||||
$(srcdir)/src/core/note_play_handle.cpp \
|
||||
$(srcdir)/src/core/piano_roll.cpp \
|
||||
$(srcdir)/src/core/piano_widget.cpp \
|
||||
$(srcdir)/src/core/plugin.cpp \
|
||||
$(srcdir)/src/core/plugin_browser.cpp \
|
||||
$(srcdir)/src/core/preset_preview_play_handle.cpp \
|
||||
$(srcdir)/src/core/sample_play_handle.cpp \
|
||||
$(srcdir)/src/core/setup_dialog.cpp \
|
||||
$(srcdir)/src/core/song_editor.cpp \
|
||||
$(srcdir)/src/core/tool.cpp \
|
||||
$(srcdir)/src/core/track.cpp \
|
||||
$(srcdir)/src/core/track_container.cpp \
|
||||
$(srcdir)/src/core/surround_area.cpp \
|
||||
$(srcdir)/src/core/timeline.cpp \
|
||||
$(srcdir)/src/lib/base64.cpp \
|
||||
$(srcdir)/src/lib/clipboard.cpp \
|
||||
$(srcdir)/src/lib/journalling_object.cpp \
|
||||
$(srcdir)/src/lib/project_journal.cpp \
|
||||
$(srcdir)/src/lib/project_version.cpp \
|
||||
$(srcdir)/src/lib/embed.cpp \
|
||||
$(srcdir)/src/lib/mmp.cpp \
|
||||
$(srcdir)/src/lib/oscillator.cpp \
|
||||
$(srcdir)/src/lib/drumsynth.cpp \
|
||||
$(srcdir)/src/lib/sample_buffer.cpp \
|
||||
$(srcdir)/src/lib/string_pair_drag.cpp \
|
||||
$(srcdir)/src/midi/midi_alsa_raw.cpp \
|
||||
$(srcdir)/src/midi/midi_alsa_seq.cpp \
|
||||
$(srcdir)/src/midi/midi_client.cpp \
|
||||
$(srcdir)/src/midi/midi_mapper.cpp \
|
||||
$(srcdir)/src/midi/midi_oss.cpp \
|
||||
$(srcdir)/src/midi/midi_port.cpp \
|
||||
$(srcdir)/src/tracks/automation_track.cpp \
|
||||
$(srcdir)/src/tracks/bb_track.cpp \
|
||||
$(srcdir)/src/tracks/instrument_track.cpp \
|
||||
$(srcdir)/src/tracks/pattern.cpp \
|
||||
$(srcdir)/src/tracks/sample_track.cpp \
|
||||
$(srcdir)/src/widgets/automatable_button.cpp \
|
||||
$(srcdir)/src/widgets/automatable_slider.cpp \
|
||||
$(srcdir)/src/widgets/combobox.cpp \
|
||||
$(srcdir)/src/widgets/cpuload_widget.cpp \
|
||||
$(srcdir)/src/widgets/effect_label.cpp \
|
||||
$(srcdir)/src/widgets/fade_button.cpp \
|
||||
$(srcdir)/src/widgets/group_box.cpp \
|
||||
$(srcdir)/src/widgets/kmultitabbar.cpp \
|
||||
$(srcdir)/src/widgets/knob.cpp \
|
||||
$(srcdir)/src/widgets/lcd_spinbox.cpp \
|
||||
$(srcdir)/src/widgets/led_checkbox.cpp \
|
||||
$(srcdir)/src/widgets/nstate_button.cpp \
|
||||
$(srcdir)/src/widgets/pixmap_button.cpp \
|
||||
$(srcdir)/src/widgets/project_notes.cpp \
|
||||
$(srcdir)/src/widgets/rack_plugin.cpp \
|
||||
$(srcdir)/src/widgets/rack_view.cpp \
|
||||
$(srcdir)/src/widgets/rubberband.cpp \
|
||||
$(srcdir)/src/widgets/qxembed.cpp \
|
||||
$(srcdir)/src/widgets/rename_dialog.cpp \
|
||||
$(srcdir)/src/widgets/side_bar_widget.cpp \
|
||||
$(srcdir)/src/widgets/tab_bar.cpp \
|
||||
$(srcdir)/src/widgets/tab_widget.cpp \
|
||||
$(srcdir)/src/widgets/text_float.cpp \
|
||||
$(srcdir)/src/widgets/tempo_sync_knob.cpp \
|
||||
$(srcdir)/src/widgets/tool_button.cpp \
|
||||
$(srcdir)/src/widgets/tooltip.cpp \
|
||||
$(srcdir)/src/widgets/visualization_widget.cpp \
|
||||
$(srcdir)/src/widgets/volume_knob.cpp \
|
||||
$(srcdir)/src/lmms_single_source.cpp \
|
||||
$(srcdir)/include/aeffectx.h \
|
||||
$(srcdir)/include/debug.h \
|
||||
$(srcdir)/include/detuning_helper.h \
|
||||
$(srcdir)/include/main_window.h \
|
||||
$(srcdir)/include/audio_alsa.h \
|
||||
$(srcdir)/include/audio_device.h \
|
||||
$(srcdir)/include/audio_dummy.h \
|
||||
$(srcdir)/include/audio_file_device.h \
|
||||
$(srcdir)/include/audio_file_ogg.h \
|
||||
$(srcdir)/include/audio_file_wave.h \
|
||||
$(srcdir)/include/audio_jack.h \
|
||||
$(srcdir)/include/audio_oss.h \
|
||||
$(srcdir)/include/audio_sample_recorder.h \
|
||||
$(srcdir)/include/audio_sdl.h \
|
||||
$(srcdir)/include/automation_editor.h \
|
||||
$(srcdir)/include/automation_pattern.h \
|
||||
$(srcdir)/include/automation_track.h \
|
||||
$(srcdir)/include/interpolation.h \
|
||||
$(srcdir)/include/lmms_constants.h \
|
||||
$(srcdir)/include/lmms_math.h \
|
||||
$(srcdir)/include/mixer.h \
|
||||
$(srcdir)/include/pattern.h \
|
||||
$(srcdir)/include/instrument_track.h \
|
||||
$(srcdir)/include/note.h \
|
||||
$(srcdir)/include/volume.h \
|
||||
$(srcdir)/include/panning.h \
|
||||
$(srcdir)/include/song_editor.h \
|
||||
$(srcdir)/include/plugin.h \
|
||||
$(srcdir)/include/instrument.h \
|
||||
$(srcdir)/include/bb_editor.h \
|
||||
$(srcdir)/include/piano_widget.h \
|
||||
$(srcdir)/include/effect_board.h \
|
||||
$(srcdir)/include/pixmap_button.h \
|
||||
$(srcdir)/include/rename_dialog.h \
|
||||
$(srcdir)/include/export_project_dialog.h \
|
||||
$(srcdir)/include/note_play_handle.h \
|
||||
$(srcdir)/include/piano_roll.h \
|
||||
$(srcdir)/include/basic_filters.h \
|
||||
$(srcdir)/include/envelope_tab_widget.h \
|
||||
$(srcdir)/include/envelope_and_lfo_widget.h \
|
||||
$(srcdir)/include/about_dialog.h \
|
||||
$(srcdir)/include/oscillator.h \
|
||||
$(srcdir)/include/arp_and_chords_tab_widget.h \
|
||||
$(srcdir)/include/export.h \
|
||||
$(srcdir)/include/group_box.h \
|
||||
$(srcdir)/include/tab_widget.h \
|
||||
$(srcdir)/include/knob.h \
|
||||
$(srcdir)/include/file_browser.h \
|
||||
$(srcdir)/include/plugin_browser.h \
|
||||
$(srcdir)/include/templates.h \
|
||||
$(srcdir)/include/gui_templates.h \
|
||||
$(srcdir)/include/surround_area.h \
|
||||
$(srcdir)/include/kmultitabbar.h \
|
||||
$(srcdir)/include/kmultitabbar-qt3.h \
|
||||
$(srcdir)/include/side_bar.h \
|
||||
$(srcdir)/include/side_bar_widget.h \
|
||||
$(srcdir)/include/track.h \
|
||||
$(srcdir)/include/track_container.h \
|
||||
$(srcdir)/include/bb_track.h \
|
||||
$(srcdir)/include/sample_track.h \
|
||||
$(srcdir)/include/drumsynth.h \
|
||||
$(srcdir)/include/sample_buffer.h \
|
||||
$(srcdir)/include/name_label.h \
|
||||
$(srcdir)/include/play_handle.h \
|
||||
$(srcdir)/include/mmp.h \
|
||||
$(srcdir)/include/midi.h \
|
||||
$(srcdir)/include/midi_alsa_raw.h \
|
||||
$(srcdir)/include/midi_client.h \
|
||||
$(srcdir)/include/midi_event_processor.h \
|
||||
$(srcdir)/include/midi_oss.h \
|
||||
$(srcdir)/include/midi_port.h \
|
||||
$(srcdir)/include/midi_time.h \
|
||||
$(srcdir)/include/clipboard.h \
|
||||
$(srcdir)/include/types.h \
|
||||
$(srcdir)/include/update_event.h \
|
||||
$(srcdir)/include/qt3support.h \
|
||||
$(srcdir)/include/embed.h \
|
||||
$(srcdir)/include/timeline.h \
|
||||
$(srcdir)/include/config_mgr.h \
|
||||
$(srcdir)/include/spc_bg_hndl_widget.h \
|
||||
$(srcdir)/include/tab_bar.h \
|
||||
$(srcdir)/include/tab_button.h \
|
||||
$(srcdir)/include/project_notes.h \
|
||||
$(srcdir)/include/project_version.h \
|
||||
$(srcdir)/include/visualization_widget.h \
|
||||
$(srcdir)/include/endian_handling.h \
|
||||
$(srcdir)/include/preset_preview_play_handle.h \
|
||||
$(srcdir)/include/sample_play_handle.h \
|
||||
$(srcdir)/include/nstate_button.h \
|
||||
$(srcdir)/include/midi_dummy.h \
|
||||
$(srcdir)/include/midi_mapper.h \
|
||||
$(srcdir)/include/lcd_spinbox.h \
|
||||
$(srcdir)/include/tooltip.h \
|
||||
$(srcdir)/include/automatable_button.h \
|
||||
$(srcdir)/include/automatable_slider.h \
|
||||
$(srcdir)/include/led_checkbox.h \
|
||||
$(srcdir)/include/text_float.h \
|
||||
$(srcdir)/include/tempo_sync_knob.h \
|
||||
$(srcdir)/include/volume_knob.h \
|
||||
$(srcdir)/include/setup_dialog.h \
|
||||
$(srcdir)/include/dummy_plugin.h \
|
||||
$(srcdir)/include/dummy_instrument.h \
|
||||
$(srcdir)/include/instrument_play_handle.h \
|
||||
$(srcdir)/include/string_pair_drag.h \
|
||||
$(srcdir)/include/midi_tab_widget.h \
|
||||
$(srcdir)/include/audio_port.h \
|
||||
$(srcdir)/include/tool.h \
|
||||
$(srcdir)/include/tool_button.h \
|
||||
$(srcdir)/include/cpuload_widget.h \
|
||||
$(srcdir)/include/custom_events.h \
|
||||
$(srcdir)/include/midi_alsa_seq.h \
|
||||
$(srcdir)/include/micro_timer.h \
|
||||
$(srcdir)/include/fade_button.h \
|
||||
$(srcdir)/include/fifo_buffer.h \
|
||||
$(srcdir)/include/combobox.h \
|
||||
$(srcdir)/include/rubberband.h \
|
||||
$(srcdir)/include/base64.h \
|
||||
$(srcdir)/include/automatable_object.h \
|
||||
$(srcdir)/include/automatable_object_templates.h \
|
||||
$(srcdir)/include/journalling_object.h \
|
||||
$(srcdir)/include/level_object.h \
|
||||
$(srcdir)/include/project_journal.h \
|
||||
$(srcdir)/include/shared_object.h \
|
||||
$(srcdir)/include/import_filter.h \
|
||||
$(srcdir)/include/engine.h \
|
||||
$(srcdir)/include/effect.h \
|
||||
$(srcdir)/include/effect_chain.h \
|
||||
$(srcdir)/include/effect_control_dialog.h \
|
||||
$(srcdir)/include/effect_label.h \
|
||||
$(srcdir)/include/effect_tab_widget.h \
|
||||
$(srcdir)/include/rack_plugin.h \
|
||||
$(srcdir)/include/rack_view.h \
|
||||
$(srcdir)/include/effect_select_dialog.h \
|
||||
$(srcdir)/include/dummy_effect.h \
|
||||
$(srcdir)/include/ladspa-1.1.h \
|
||||
$(srcdir)/include/sweep_oscillator.h \
|
||||
$(srcdir)/include/meter_dialog.h \
|
||||
$(srcdir)/include/qxembed.h \
|
||||
$(srcdir)/include/effect_lib.h \
|
||||
$(srcdir)/include/xqmap.h \
|
||||
$(THIRD_PARTY_CODE)
|
||||
|
||||
|
||||
|
||||
EXTRA_DIST = $(lmms_EMBEDDED_RESOURCES) lmms.1
|
||||
|
||||
|
||||
CLEANFILES = $(lmms_MOC) ./embedded_resources.h
|
||||
|
||||
if HAVE_LIBSDL
|
||||
LIB_SDL_LDADD = -lSDL
|
||||
endif
|
||||
|
||||
if HAVE_LIBSDL_SOUND
|
||||
LIB_SDL_SOUND_LDADD = -lSDL_sound
|
||||
endif
|
||||
|
||||
if HAVE_LIBASOUND
|
||||
LIB_ASOUND_LDADD = -lasound
|
||||
endif
|
||||
|
||||
if HAVE_LIBJACK
|
||||
LIB_JACK_LDADD = -ljack
|
||||
endif
|
||||
|
||||
if HAVE_LIBVORBIS
|
||||
LIB_VORBIS_LDADD = -lvorbis -lvorbisenc -lvorbisfile
|
||||
endif
|
||||
|
||||
if USE_3RDPARTY_LIBSRC
|
||||
else
|
||||
LIB_SRC_LDADD = -lsamplerate
|
||||
endif
|
||||
|
||||
if HAVE_LIBSF
|
||||
LIB_SF_LDADD = -lsndfile
|
||||
endif
|
||||
|
||||
if LADSPA_SUPPORT
|
||||
LIB_LADSPABASE_LDADD = -Lplugins/ladspa_base -lladspabase
|
||||
endif
|
||||
|
||||
lmms_LDADD = $(QT_LDADD) $(LIB_SDL_LDADD) $(LIB_ASOUND_LDADD) $(LIB_JACK_LDADD) $(LIB_SDL_SOUND_LDADD) $(LIB_VORBIS_LDADD) $(LIB_SRC_LDADD) $(LIB_SF_LDADD) $(LIB_LADSPABASE_LDADD)
|
||||
if BUILD_LINUX
|
||||
lmms_LDFLAGS = -rdynamic
|
||||
endif
|
||||
#-rpath $(pkglibdir)
|
||||
|
||||
22
Makefile.svn
Normal file
@@ -0,0 +1,22 @@
|
||||
all:
|
||||
@echo
|
||||
@echo Creating neccessary files for configuring and building LMMS
|
||||
@echo
|
||||
@echo \ \* Creating aclocal.m4
|
||||
@aclocal
|
||||
@echo \ \* Running libtoolize
|
||||
@libtoolize -c -f
|
||||
@echo \ \* Creating config.h.in
|
||||
@autoheader
|
||||
@echo \ \* Creating Makefile templates
|
||||
@automake -ac
|
||||
@echo \ \* Creating configure
|
||||
@autoconf
|
||||
@echo \ \* Cleaning up
|
||||
@rm -rf autom4te.cache/
|
||||
@echo
|
||||
@echo ...done\! If something failed make sure you\'ve installed autoconf,
|
||||
@echo automake and libtool.
|
||||
@echo Otherwise you can run now configure \(if you did not so far\) and then make.
|
||||
@echo
|
||||
|
||||
113
README
Normal file
@@ -0,0 +1,113 @@
|
||||
Linux MultiMedia Studio 0.3.2
|
||||
==============================
|
||||
|
||||
Copyright (c) 2004-2008 by LMMS-developers
|
||||
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2 of the License, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
|
||||
|
||||
What is LMMS??
|
||||
--------------
|
||||
|
||||
LMMS aims to be a free alternative to popular (but commercial and closed-
|
||||
source) programs like FruityLoops, Cubase and Logic giving you the ability of
|
||||
producing music with your computer by creating/synthesizing sounds, arranging
|
||||
samples, using effects, playing live with keyboard and much more...
|
||||
|
||||
LMMS combines the features of a sequencer-program (pattern-/channel-/
|
||||
sample-/song-/effect-management) and those of powerful synthesizers and
|
||||
samplers in a modern, user-friendly and easy to use graphical user-interface.
|
||||
|
||||
LMMS is still in heavy development, so with this version please don't expect a
|
||||
complete, ready and bugfree program!!
|
||||
|
||||
|
||||
|
||||
Requirements
|
||||
------------
|
||||
|
||||
The most important requirement is for sure a fast computer, so don't try to get
|
||||
LMMS working on a pentium I with 60 MHz... ;-) Therefore you should have at
|
||||
least 500 MHz, but for really enjoying LMMS less than 1 GHz makes no sense...
|
||||
|
||||
|
||||
Required libraries:
|
||||
|
||||
- multithreaded version of Qt 3.0 (at least 3.2 recommended) or higher with
|
||||
devel-files
|
||||
|
||||
Optional, but strongly recommended:
|
||||
- JACK with devel-files
|
||||
- libvorbis with devel-files
|
||||
- libalsa with devel-files
|
||||
- SDL_sound (tested with 0.1.5 & 1.0.1) with devel-files
|
||||
- SDL with devel-files
|
||||
- libsamplerate with devel-files
|
||||
- libsndfile with devel-files
|
||||
- WINE + WINE-devel-files
|
||||
- stk, libstk + libstk-dev
|
||||
- festival-devel-files and default-voice
|
||||
|
||||
For compiling you should have an up to date GCC with g++.
|
||||
|
||||
If you have problems with compiling or running LMMS, find any bug or have
|
||||
suggestions and so on, please feel free to e-mail me (for mail-address see
|
||||
below)!
|
||||
|
||||
|
||||
|
||||
Building
|
||||
--------
|
||||
|
||||
See INSTALL for information on how to build LMMS.
|
||||
|
||||
Please also take a look at
|
||||
|
||||
./configure --help
|
||||
|
||||
There you'll see a lot of options which partly might be interesting for you.
|
||||
For example if you want to build LMMS with VST-support, you have to run
|
||||
configure with --with-vst switch. Otherwise LMMS support won't be built!
|
||||
|
||||
|
||||
|
||||
Join LMMS-development
|
||||
----------------------
|
||||
|
||||
If you are interested in LMMS, it's programming, artwork, testing, writing
|
||||
demo-songs, (and improving this f**** README...) or something like that,
|
||||
you're welcome to participate on the development of LMMS!
|
||||
|
||||
The project-homepage of LMMS, mailingslists and a list of things you can do
|
||||
can be found at
|
||||
|
||||
http://lmms.sourceforge.net
|
||||
|
||||
|
||||
Details on development can be found at
|
||||
|
||||
http://lmms.sourceforge.net/development.php
|
||||
|
||||
or in the Wiki:
|
||||
|
||||
http://lmms.sourceforge.net/wiki/
|
||||
|
||||
Before coding a new big feature, please ALWAYS post your idea and suggestions
|
||||
about your feature and about the intended implementation to the
|
||||
LMMS-devel-mailinglist (lmms-devel@lists.sourceforge.net) and wait for replies!
|
||||
Maybe there're different ideas, improvements, hints or maybe your feature is
|
||||
not welcome/needed at the moment.
|
||||
57
README.md
@@ -1,57 +0,0 @@
|
||||
<div align="center">
|
||||
<h1>
|
||||
<img src="https://raw.githubusercontent.com/LMMS/artwork/master/Icon%20%26%20Mimetypes/lmms-64x64.svg" alt="LMMS Logo"><br>LMMS
|
||||
</h1>
|
||||
<p>Cross-platform music production software</p>
|
||||
<p>
|
||||
<a href="https://lmms.io/">Website</a>
|
||||
⦁︎
|
||||
<a href="https://github.com/LMMS/lmms/releases">Releases</a>
|
||||
⦁︎
|
||||
<a href="https://github.com/LMMS/lmms/wiki">Developer wiki</a>
|
||||
⦁︎
|
||||
<a href="https://lmms.io/documentation">User manual</a>
|
||||
⦁︎
|
||||
<a href="https://lmms.io/showcase/">Showcase</a>
|
||||
⦁︎
|
||||
<a href="https://lmms.io/lsp/">Sharing platform</a>
|
||||
</p>
|
||||
<p>
|
||||
<a href="https://github.com/LMMS/lmms/actions/workflows/build.yml"><img src="https://github.com/LMMS/lmms/actions/workflows/build.yml/badge.svg" alt="Build status"></a>
|
||||
<a href="https://lmms.io/download"><img src="https://img.shields.io/github/release/LMMS/lmms.svg?maxAge=3600" alt="Latest stable release"></a>
|
||||
<a href="https://github.com/LMMS/lmms/releases"><img src="https://img.shields.io/github/downloads/LMMS/lmms/total.svg?maxAge=3600" alt="Overall downloads on Github"></a>
|
||||
<a href="https://discord.gg/3sc5su7"><img src="https://img.shields.io/badge/chat-on%20discord-7289DA.svg" alt="Join the chat at Discord"></a>
|
||||
<a href="https://www.transifex.com/lmms/lmms/"><img src="https://img.shields.io/badge/localise-on_transifex-green.svg"></a>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
What is LMMS?
|
||||
--------------
|
||||
|
||||
LMMS is an open-source cross-platform digital audio workstation designed for music production. It includes an advanced Piano Roll, Beat Sequencer, Song Editor, and Mixer for composing, arranging, and mixing music. It comes with 15+ synthesizer plugins by default, along with VST2 and SoundFont2 support.
|
||||
|
||||
Features
|
||||
---------
|
||||
|
||||
* Song-Editor for arranging melodies, samples, patterns, and automation
|
||||
* Pattern-Editor for creating beats and patterns
|
||||
* An easy-to-use Piano-Roll for editing patterns and melodies
|
||||
* A Mixer with unlimited mixer channels and arbitrary number of effects
|
||||
* Many powerful instrument and effect-plugins out of the box
|
||||
* Full user-defined track-based automation and computer-controlled automation sources
|
||||
* Compatible with many standards such as SoundFont2, VST2 (instruments and effects), LADSPA, LV2, GUS Patches, and full MIDI support
|
||||
* MIDI file importing and exporting
|
||||
|
||||
Building
|
||||
---------
|
||||
|
||||
See [Compiling LMMS](https://github.com/LMMS/lmms/wiki/Compiling)
|
||||
|
||||
Join LMMS-development
|
||||
----------------------
|
||||
|
||||
If you are interested in LMMS, its programming, artwork, testing, writing demo songs, (and improving this README...) or something like that, you're welcome to participate in the development of LMMS!
|
||||
|
||||
Information about what you can do and how can be found in the [wiki](https://github.com/LMMS/lmms/wiki).
|
||||
|
||||
Before coding a new big feature, please _always_ [file an issue](https://github.com/LMMS/lmms/issues/new) for your idea and suggestions about your feature and about the intended implementation on GitHub, or ask in one of the tech channels on Discord and wait for replies! Maybe there are different ideas, improvements, or hints, or maybe your feature is not welcome/needed at the moment.
|
||||
54
TODO
Normal file
@@ -0,0 +1,54 @@
|
||||
- do not process effects when playing frozen patterns
|
||||
- select number of channels in export-project-dialog
|
||||
- MIDI over Ethernet support
|
||||
- try to make vestige-plugin-dlls relative
|
||||
- do song-editor-tempo-connection to vst-plugin inside remoteVSTPlugin
|
||||
- add/remove-steps button in bb-editor for adding/removing according number of steps to/from all patterns of visible beat/baseline
|
||||
- replace rest of wizard by simple directory-selection-dialog for working-dir when running the first time
|
||||
- correctly load steps/dots from FLP-files
|
||||
- convert FL-Plucked!-parameters to Vibed-parameters
|
||||
- in flp-import-filter: merge play-list-items if possible
|
||||
- integrated sample-browser in context-menu of sample-track/-tco
|
||||
- make note able of journalling
|
||||
- before calling undoStep/redoStep from journallingObject, save journalling-state-context and disabled journalling, restore afterwards
|
||||
- intelligent journal-entry-merging
|
||||
- undo/redo-support in note/track etc.
|
||||
- save tco-settings in trackContentWidget::saveSettings() etc. instead of track::...
|
||||
- restore stacking-order of windows when loading project
|
||||
- bristol-bindings?
|
||||
- resample sample-track-tcos when using hq-mode
|
||||
- add support for panes-interface (like blender) (instead of MDI etc.)
|
||||
- message to user when importing unsupported MIDI-file (track-count = 0)
|
||||
- AMS/OMS-bindings
|
||||
- remove binary-embed-system (Qt4-resource-system?)
|
||||
- recording-functionality
|
||||
- do not hang when saving while loading VST-plugin (because then we call dispatcher while the load-process is still going on)
|
||||
- tempo-recogn. and sync of beat-samples
|
||||
- separate GUI and data/sound-processing-code
|
||||
- make color-scheme switchable: LMMS / user
|
||||
- autosave every 30s (configurable!) and offer recovery at startup after crash
|
||||
- make piano-roll use rubberband instead of implementing a simple one on it's own
|
||||
- level-meters in output-graph and instrument-track
|
||||
- MIDI-program/MIDI-mapping/process program-/channel-change-events from MIDI-files
|
||||
- DSSI-support
|
||||
- use drawLineF() for drawing notes in pattern::paintEvent() in qt4-version
|
||||
- only redraw region given by paint-event in pattern, bbTCO, sampleTCO etc.
|
||||
- pre-listen when opening sample with QFileDialog
|
||||
- panning-editing in piano-roll
|
||||
- speed up painting of sampleTCO
|
||||
- panning env+lfo
|
||||
- rewrite export-project-dialog using layout-mechanism
|
||||
- make piano-roll use the global clipboard??
|
||||
- add more localizations:
|
||||
- Swedish
|
||||
- Norwegian
|
||||
- Greece
|
||||
- ...
|
||||
|
||||
|
||||
- effect-board -> live-fx from input
|
||||
- chord-editor?
|
||||
- WAVE/OGG/MP3-Import -> FFT-analysis -> write notes
|
||||
- classical note-edit-window -> also ability of printing and maybe later scanning & recognition of notes
|
||||
- add FLAC as export-format?
|
||||
|
||||
692
acinclude.m4
Normal file
@@ -0,0 +1,692 @@
|
||||
# Check for Qt compiler flags, linker flags, and binary packages
|
||||
AC_DEFUN([gw_CHECK_QT],
|
||||
[
|
||||
AC_REQUIRE([AC_PROG_CXX])
|
||||
AC_REQUIRE([AC_PATH_X])
|
||||
|
||||
AC_MSG_CHECKING([QTDIR])
|
||||
AC_ARG_WITH([qtdir], [ --with-qtdir=DIR Qt installation directory [default=$QTDIR]], QTDIR=$withval)
|
||||
# Check that QTDIR is defined or that --with-qtdir given
|
||||
if test x"$QTDIR" = x ; then
|
||||
# some usual Qt-locations
|
||||
QT_SEARCH="/usr /usr/lib/qt /usr/lib/qt3 /usr/lib/qt31 /usr/lib/qt32 /usr/lib/qt33 /usr/lib/qt-3.0 /usr/lib/qt-3.1 /usr/lib/qt-3.2 /usr/lib/qt-3.3 /usr/local/qt /usr/local/qt3 /usr/local/qt31 /usr/local/qt32 /usr/local/qt33 /usr/share/qt3 /usr/X11R6" # /usr/share/qt4 /usr/local/Trolltech/Qt-4.0.0 /usr/local/Trolltech/Qt-4.0.1 /usr/local/Trolltech/Qt-4.1.0 /usr/local/Trolltech/Qt-4.1.0"
|
||||
else
|
||||
QT_SEARCH=$QTDIR
|
||||
QTDIR=""
|
||||
fi
|
||||
for i in $QT_SEARCH ; do
|
||||
QT_INCLUDE_SEARCH="include include/qt include/qt3" # include/qt4/Qt include/Qt"
|
||||
for j in $QT_INCLUDE_SEARCH ; do
|
||||
if test -f $i/$j/qglobal.h -a x$QTDIR = x ; then
|
||||
QTDIR=$i
|
||||
QT_INCLUDES=$i/$j
|
||||
fi
|
||||
done
|
||||
done
|
||||
if test x"$QTDIR" = x ; then
|
||||
AC_MSG_ERROR([*** QTDIR must be defined, or --with-qtdir option given])
|
||||
fi
|
||||
AC_MSG_RESULT([$QTDIR])
|
||||
|
||||
# Change backslashes in QTDIR to forward slashes to prevent escaping
|
||||
# problems later on in the build process, mainly for Cygwin build
|
||||
# environment using MSVC as the compiler
|
||||
# TODO: Use sed instead of perl
|
||||
QTDIR=`echo $QTDIR | perl -p -e 's/\\\\/\\//g'`
|
||||
|
||||
AC_MSG_CHECKING([Qt includes])
|
||||
# Check where includes are located
|
||||
if test x"$QT_INCLUDES" = x ; then
|
||||
AC_MSG_ERROR([*** could not find Qt-includes! Make sure you have the Qt-devel-files installed!])
|
||||
fi
|
||||
AC_MSG_RESULT([$QT_INCLUDES])
|
||||
|
||||
# Figure out which version of Qt we are using
|
||||
AC_MSG_CHECKING([Qt version])
|
||||
QT_VER=`grep 'define.*QT_VERSION_STR\W' $QT_INCLUDES/qglobal.h | perl -p -e 's/\D//g'`
|
||||
case "${QT_VER}" in
|
||||
2*)
|
||||
AC_MSG_ERROR([*** Qt 2 is not supported by iTALC. Please upgrade to Qt3!])
|
||||
;;
|
||||
3*)
|
||||
QT_MAJOR="3"
|
||||
;;
|
||||
# 4*)
|
||||
# QT_MAJOR="4"
|
||||
# ;;
|
||||
*)
|
||||
AC_MSG_ERROR([*** Don't know how to handle this Qt major version])
|
||||
;;
|
||||
esac
|
||||
AC_MSG_RESULT([$QT_VER ($QT_MAJOR)])
|
||||
|
||||
# Search for available Qt translations
|
||||
AH_TEMPLATE(QT_TRANSLATIONS_DIR, [Define to Qt translations directory])
|
||||
AC_MSG_CHECKING([Qt translations])
|
||||
case "${QT_VER}" in
|
||||
3*)
|
||||
QT_TRANSLATIONS_SEARCH="/usr/share/qt3 /usr/local/qt3 /usr/local/qt31 /usr/local/qt32 /usr/local/qt33 /usr/local/qt"
|
||||
;;
|
||||
4*)
|
||||
QT_TRANSLATIONS_SEARCH="/usr/share/qt4 /usr/local/qt /usr/local/Trolltech/Qt-4.0.0 /usr/local/Trolltech/Qt-4.0.1 /usr/local/Trolltech/Qt-4.1.0 /usr/local/Trolltech/Qt-4.1.0"
|
||||
;;
|
||||
esac
|
||||
for i in $QT_TRANSLATIONS_SEARCH ; do
|
||||
if test -d $i/translations -a x$QT_TRANSLATIONS = x ; then
|
||||
QT_TRANSLATIONS=$i/translations
|
||||
fi
|
||||
done
|
||||
if test x"$QT_TRANSLATIONS" = x ; then
|
||||
AC_MSG_WARN([*** not found! You may want to install a Qt i18n package])
|
||||
else
|
||||
AC_DEFINE_UNQUOTED(QT_TRANSLATIONS_DIR, "$QT_TRANSLATIONS")
|
||||
fi
|
||||
AC_MSG_RESULT([$QT_TRANSLATIONS])
|
||||
|
||||
QTHOSTDIR=/usr
|
||||
|
||||
# Check that moc is in path
|
||||
AC_CHECK_PROG(MOC, moc, $QTDIR/bin/moc,,$QTDIR/bin/)
|
||||
if test x$MOC = x ; then
|
||||
AC_CHECK_PROG(MOC, moc-qt3, $QTDIR/bin/moc-qt3,,$QTDIR/bin/)
|
||||
if test x$MOC = x ; then
|
||||
AC_CHECK_PROG(MOC, moc-qt4, $QTHOSTDIR/bin/moc-qt4,,$QTHOSTDIR/bin/)
|
||||
if test x$MOC = x ; then
|
||||
AC_MSG_ERROR([*** not found! Make sure you have Qt-devel-tools installed!])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# uic is the Qt user interface compiler
|
||||
AC_CHECK_PROG(UIC, uic, $QTDIR/bin/uic,,$QTDIR/bin/)
|
||||
if test x$UIC = x ; then
|
||||
AC_MSG_WARN([*** not found! It's currently not needed but should be part of a proper Qt-devel-tools-installation!])
|
||||
fi
|
||||
|
||||
# lupdate is the Qt translation-update utility.
|
||||
AC_CHECK_PROG(LUPDATE, lupdate, $QTDIR/bin/lupdate,,$QTDIR/bin/)
|
||||
if test x$LUPDATE = x ; then
|
||||
AC_MSG_WARN([*** not found! It's not needed just for compiling but should be part of a proper Qt-devel-tools-installation!])
|
||||
fi
|
||||
|
||||
# lrelease is the Qt translation-release utility.
|
||||
AC_CHECK_PROG(LRELEASE, lrelease, $QTDIR/bin/lrelease,,$QTDIR/bin/)
|
||||
if test x$LRELEASE = x ; then
|
||||
AC_MSG_WARN([*** not found! It's not needed just for compiling but should be part of a proper Qt-devel-tools-installation!])
|
||||
fi
|
||||
|
||||
# Calculate Qt include path
|
||||
QT_CXXFLAGS="-I$QT_INCLUDES"
|
||||
if test "$QT_MAJOR" = "4" ; then
|
||||
QT_CXXFLAGS="$QT_CXXFLAGS -I$QTDIR/include/qt4 -I$QTDIR/include"
|
||||
fi
|
||||
|
||||
|
||||
QT_IS_EMBEDDED="no"
|
||||
# On unix, figure out if we're doing a static or dynamic link
|
||||
case "${host}" in
|
||||
*-cygwin)
|
||||
AC_DEFINE_UNQUOTED(WIN32, "", Defined if on Win32 platform)
|
||||
if test -f "$QTDIR/lib/qt.lib" ; then
|
||||
QT_LIB="qt.lib"
|
||||
QT_IS_STATIC="yes"
|
||||
QT_IS_MT="no"
|
||||
elif test -f "$QTDIR/lib/qt-mt.lib" ; then
|
||||
QT_LIB="qt-mt.lib"
|
||||
QT_IS_STATIC="yes"
|
||||
QT_IS_MT="yes"
|
||||
elif test -f "$QTDIR/lib/qt$QT_VER.lib" ; then
|
||||
QT_LIB="qt$QT_VER.lib"
|
||||
QT_IS_STATIC="no"
|
||||
QT_IS_MT="no"
|
||||
elif test -f "$QTDIR/lib/qt-mt$QT_VER.lib" ; then
|
||||
QT_LIB="qt-mt$QT_VER.lib"
|
||||
QT_IS_STATIC="no"
|
||||
QT_IS_MT="yes"
|
||||
fi
|
||||
;;
|
||||
|
||||
*mingw32)
|
||||
QT_IS_MT="yes"
|
||||
QT_LIB="-L$QTDIR/bin -lQtCore4 -lQtGui4 -lQtXml4 -lQt3Support4"
|
||||
;;
|
||||
*)
|
||||
QT_IS_STATIC=`ls $QTDIR/lib/*.a 2> /dev/null`
|
||||
if test "x$QT_IS_STATIC" = x; then
|
||||
QT_IS_STATIC="no"
|
||||
else
|
||||
QT_IS_STATIC="yes"
|
||||
fi
|
||||
if test x$QT_IS_STATIC = xno ; then
|
||||
QT_IS_DYNAMIC=`ls $QTDIR/lib/*.so 2> /dev/null`
|
||||
if test "x$QT_IS_DYNAMIC" = x; then
|
||||
QT_IS_DYNAMIC=`ls /usr/lib/libQt*so.4 2> /dev/null`
|
||||
if test "x$QT_IS_DYNAMIC" = x; then
|
||||
AC_MSG_ERROR([*** Couldn't find any Qt libraries])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if test "$QT_MAJOR" = "4" ; then
|
||||
QT_IS_MT="yes"
|
||||
QT_LIB="-lQtCore -lQtGui -lQtXml -lQt3Support"
|
||||
MOC="$MOC -DLADSPA_SUPPORT"
|
||||
else
|
||||
QT_CXXFLAGS="-DQT3 $QT_CXXFLAGS"
|
||||
if test "x`ls $QTDIR/lib/libqt-mt.* 2> /dev/null`" != x ; then
|
||||
QT_LIB="-lqt-mt"
|
||||
QT_IS_MT="yes"
|
||||
elif test "x`ls $QTDIR/lib/libqt.* 2> /dev/null`" != x ; then
|
||||
QT_LIB="-lqt"
|
||||
QT_IS_MT="no"
|
||||
elif test "x`ls $QTDIR/lib/libqte.* 2> /dev/null`" != x ; then
|
||||
QT_LIB="-lqte"
|
||||
QT_IS_MT="no"
|
||||
QT_IS_EMBEDDED="yes"
|
||||
elif test "x`ls $QTDIR/lib/libqte-mt.* 2> /dev/null`" != x ; then
|
||||
QT_LIB="-lqte-mt"
|
||||
QT_IS_MT="yes"
|
||||
QT_IS_EMBEDDED="yes"
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
AC_MSG_CHECKING([if Qt is static])
|
||||
AC_MSG_RESULT([$QT_IS_STATIC])
|
||||
AC_MSG_CHECKING([if Qt is multithreaded])
|
||||
if test "$QT_IS_MT" = "no"; then
|
||||
AC_MSG_ERROR([*** your Qt is not multithreaded. That's bad, because multithreading is required for compiling... Please install Qt-mt!])
|
||||
fi
|
||||
AC_MSG_RESULT([$QT_IS_MT])
|
||||
AC_MSG_CHECKING([if Qt is embedded])
|
||||
AC_MSG_RESULT([$QT_IS_EMBEDDED])
|
||||
|
||||
QT_GUILINK=""
|
||||
QASSISTANTCLIENT_LDADD="-lqassistantclient"
|
||||
QT_LIBS="$QT_LIB"
|
||||
x_libraries="$x_libraries -L/usr/X11R6/lib"
|
||||
|
||||
case "${host}" in
|
||||
*irix*)
|
||||
QT_LIBS="$QT_LIB"
|
||||
if test $QT_IS_STATIC = yes ; then
|
||||
QT_LIBS="$QT_LIBS -L$x_libraries -lXext -lX11 -lm -lSM -lICE"
|
||||
fi
|
||||
;;
|
||||
|
||||
*linux*)
|
||||
QT_LIBS="$QT_LIB"
|
||||
if test $QT_IS_STATIC = yes && test $QT_IS_EMBEDDED = no; then
|
||||
QT_LIBS="$QT_LIBS -L$x_libraries -lXext -lX11 -lm -lSM -lICE -ljpeg"
|
||||
fi
|
||||
;;
|
||||
|
||||
|
||||
*osf*)
|
||||
# Digital Unix (aka DGUX aka Tru64)
|
||||
QT_LIBS="$QT_LIB"
|
||||
if test $QT_IS_STATIC = yes ; then
|
||||
QT_LIBS="$QT_LIBS -L$x_libraries -lXext -lX11 -lm -lSM -lICE"
|
||||
fi
|
||||
;;
|
||||
|
||||
*solaris*)
|
||||
QT_LIBS="$QT_LIB"
|
||||
if test $QT_IS_STATIC = yes ; then
|
||||
QT_LIBS="$QT_LIBS -L$x_libraries -lXext -lX11 -lm -lSM -lICE -lresolv -lsocket -lnsl"
|
||||
fi
|
||||
;;
|
||||
|
||||
|
||||
*win*)
|
||||
# linker flag to suppress console when linking a GUI app on Win32
|
||||
QT_GUILINK="/subsystem:windows"
|
||||
|
||||
if test $QT_MAJOR = "3" ; then
|
||||
if test $QT_IS_MT = yes ; then
|
||||
QT_LIBS="/nodefaultlib:libcmt"
|
||||
else
|
||||
QT_LIBS="/nodefaultlib:libc"
|
||||
fi
|
||||
fi
|
||||
|
||||
if test $QT_IS_STATIC = yes ; then
|
||||
QT_LIBS="$QT_LIBS $QT_LIB kernel32.lib user32.lib gdi32.lib comdlg32.lib ole32.lib shell32.lib imm32.lib advapi32.lib wsock32.lib winspool.lib winmm.lib netapi32.lib"
|
||||
if test $QT_MAJOR = "3" ; then
|
||||
QT_LIBS="$QT_LIBS qtmain.lib"
|
||||
fi
|
||||
else
|
||||
QT_LIBS="$QT_LIBS $QT_LIB"
|
||||
if test $QT_MAJOR = "3" ; then
|
||||
QT_CXXFLAGS="$QT_CXXFLAGS -DQT_DLL"
|
||||
QT_LIBS="$QT_LIBS qtmain.lib qui.lib user32.lib netapi32.lib"
|
||||
fi
|
||||
fi
|
||||
QASSISTANTCLIENT_LDADD="qassistantclient.lib"
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
|
||||
if test x"$QT_IS_EMBEDDED" = "xyes" ; then
|
||||
QT_CXXFLAGS="-DQWS $QT_CXXFLAGS"
|
||||
fi
|
||||
|
||||
if test x"$QT_IS_MT" = "xyes" ; then
|
||||
QT_CXXFLAGS="$QT_CXXFLAGS -D_REENTRANT -DQT_THREAD_SUPPORT"
|
||||
QT_LIBS="$QT_LIBS"
|
||||
fi
|
||||
|
||||
QT_LDADD="-L$QTDIR/lib $QT_LIBS"
|
||||
|
||||
#if test x$QT_IS_STATIC = xyes ; then
|
||||
# OLDLIBS="$LIBS"
|
||||
# LIBS="$QT_LDADD"
|
||||
# AC_CHECK_LIB(Xft, XftFontOpen, QT_LDADD="$QT_LDADD -lXft")
|
||||
# LIBS="$LIBS"
|
||||
#fi
|
||||
|
||||
AC_MSG_CHECKING([QT_CXXFLAGS])
|
||||
AC_MSG_RESULT([$QT_CXXFLAGS])
|
||||
AC_MSG_CHECKING([QT_LDADD])
|
||||
AC_MSG_RESULT([$QT_LDADD])
|
||||
|
||||
AC_SUBST(QT_CXXFLAGS)
|
||||
AC_SUBST(QT_LDADD)
|
||||
AC_SUBST(QT_GUILINK)
|
||||
AC_SUBST(QASSISTANTCLIENT_LDADD)
|
||||
|
||||
])
|
||||
|
||||
|
||||
|
||||
dnl @synopsis AC_C_FIND_ENDIAN
|
||||
dnl
|
||||
dnl Determine endian-ness of target processor.
|
||||
dnl @version 1.1 Mar 03 2002
|
||||
dnl @author Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
dnl
|
||||
dnl Majority written from scratch to replace the standard autoconf macro
|
||||
dnl AC_C_BIGENDIAN. Only part remaining from the original it the invocation
|
||||
dnl of the AC_TRY_RUN macro.
|
||||
dnl
|
||||
dnl Permission to use, copy, modify, distribute, and sell this file for any
|
||||
dnl purpose is hereby granted without fee, provided that the above copyright
|
||||
dnl and this permission notice appear in all copies. No representations are
|
||||
dnl made about the suitability of this software for any purpose. It is
|
||||
dnl provided "as is" without express or implied warranty.
|
||||
|
||||
dnl Find endian-ness in the following way:
|
||||
dnl 1) Look in <endian.h>.
|
||||
dnl 2) If 1) fails, look in <sys/types.h> and <sys/param.h>.
|
||||
dnl 3) If 1) and 2) fails and not cross compiling run a test program.
|
||||
dnl 4) If 1) and 2) fails and cross compiling then guess based on target.
|
||||
|
||||
AC_DEFUN([AC_C_FIND_ENDIAN],
|
||||
[AC_CACHE_CHECK(processor byte ordering,
|
||||
ac_cv_c_byte_order,
|
||||
|
||||
# Initialize to unknown
|
||||
ac_cv_c_byte_order=unknown
|
||||
|
||||
if test x$ac_cv_header_endian_h = xyes ; then
|
||||
|
||||
# First try <endian.h> which should set BYTE_ORDER.
|
||||
|
||||
[AC_TRY_LINK([
|
||||
#include <endian.h>
|
||||
#if BYTE_ORDER != LITTLE_ENDIAN
|
||||
not big endian
|
||||
#endif
|
||||
], return 0 ;,
|
||||
ac_cv_c_byte_order=little
|
||||
)]
|
||||
|
||||
[AC_TRY_LINK([
|
||||
#include <endian.h>
|
||||
#if BYTE_ORDER != BIG_ENDIAN
|
||||
not big endian
|
||||
#endif
|
||||
], return 0 ;,
|
||||
ac_cv_c_byte_order=big
|
||||
)]
|
||||
|
||||
fi
|
||||
|
||||
if test $ac_cv_c_byte_order = unknown ; then
|
||||
|
||||
[AC_TRY_LINK([
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
|
||||
bogus endian macros
|
||||
#endif
|
||||
], return 0 ;,
|
||||
|
||||
[AC_TRY_LINK([
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
#if BYTE_ORDER != LITTLE_ENDIAN
|
||||
not big endian
|
||||
#endif
|
||||
], return 0 ;,
|
||||
ac_cv_c_byte_order=little
|
||||
)]
|
||||
|
||||
[AC_TRY_LINK([
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
#if BYTE_ORDER != LITTLE_ENDIAN
|
||||
not big endian
|
||||
#endif
|
||||
], return 0 ;,
|
||||
ac_cv_c_byte_order=little
|
||||
)]
|
||||
|
||||
)]
|
||||
|
||||
fi
|
||||
|
||||
if test $ac_cv_c_byte_order = unknown ; then
|
||||
if test $cross_compiling = yes ; then
|
||||
# This is the last resort. Try to guess the target processor endian-ness
|
||||
# by looking at the target CPU type.
|
||||
[
|
||||
case "$target_cpu" in
|
||||
alpha* | i?86* | mipsel* | ia64*)
|
||||
ac_cv_c_big_endian=0
|
||||
ac_cv_c_little_endian=1
|
||||
;;
|
||||
|
||||
m68* | mips* | powerpc* | hppa* | sparc*)
|
||||
ac_cv_c_big_endian=1
|
||||
ac_cv_c_little_endian=0
|
||||
;;
|
||||
|
||||
esac
|
||||
]
|
||||
else
|
||||
AC_TRY_RUN(
|
||||
[[
|
||||
int main (void)
|
||||
{ /* Are we little or big endian? From Harbison&Steele. */
|
||||
union
|
||||
{ long l ;
|
||||
char c [sizeof (long)] ;
|
||||
} u ;
|
||||
u.l = 1 ;
|
||||
return (u.c [sizeof (long) - 1] == 1);
|
||||
}
|
||||
]], , ac_cv_c_byte_order=big,
|
||||
ac_cv_c_byte_order=unknown
|
||||
)
|
||||
|
||||
AC_TRY_RUN(
|
||||
[[int main (void)
|
||||
{ /* Are we little or big endian? From Harbison&Steele. */
|
||||
union
|
||||
{ long l ;
|
||||
char c [sizeof (long)] ;
|
||||
} u ;
|
||||
u.l = 1 ;
|
||||
return (u.c [0] == 1);
|
||||
}]], , ac_cv_c_byte_order=little,
|
||||
ac_cv_c_byte_order=unknown
|
||||
)
|
||||
fi
|
||||
fi
|
||||
|
||||
)
|
||||
]
|
||||
|
||||
if test $ac_cv_c_byte_order = big ; then
|
||||
ac_cv_c_big_endian=1
|
||||
ac_cv_c_little_endian=0
|
||||
elif test $ac_cv_c_byte_order = little ; then
|
||||
ac_cv_c_big_endian=0
|
||||
ac_cv_c_little_endian=1
|
||||
else
|
||||
ac_cv_c_big_endian=0
|
||||
ac_cv_c_little_endian=0
|
||||
|
||||
AC_MSG_WARN([[*****************************************************************]])
|
||||
AC_MSG_WARN([[*** Not able to determine endian-ness of target processor. ]])
|
||||
AC_MSG_WARN([[*** The constants CPU_IS_BIG_ENDIAN and CPU_IS_LITTLE_ENDIAN in ]])
|
||||
AC_MSG_WARN([[*** src/config.h may need to be hand editied. ]])
|
||||
AC_MSG_WARN([[*****************************************************************]])
|
||||
fi
|
||||
|
||||
)# AC_C_FIND_ENDIAN
|
||||
|
||||
dnl @synopsis AC_C99_FUNC_LRINT
|
||||
dnl
|
||||
dnl Check whether C99's lrint function is available.
|
||||
dnl @version 1.3 Feb 12 2002
|
||||
dnl @author Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
dnl
|
||||
dnl Permission to use, copy, modify, distribute, and sell this file for any
|
||||
dnl purpose is hereby granted without fee, provided that the above copyright
|
||||
dnl and this permission notice appear in all copies. No representations are
|
||||
dnl made about the suitability of this software for any purpose. It is
|
||||
dnl provided "as is" without express or implied warranty.
|
||||
dnl
|
||||
AC_DEFUN([AC_C99_FUNC_LRINT],
|
||||
[AC_CACHE_CHECK(for lrint,
|
||||
ac_cv_c99_lrint,
|
||||
[
|
||||
lrint_save_CFLAGS=$CFLAGS
|
||||
CFLAGS="-O2 -lm"
|
||||
AC_TRY_LINK([
|
||||
#define _ISOC9X_SOURCE 1
|
||||
#define _ISOC99_SOURCE 1
|
||||
#define __USE_ISOC99 1
|
||||
#define __USE_ISOC9X 1
|
||||
|
||||
#include <math.h>
|
||||
], if (!lrint(3.14159)) lrint(2.7183);, ac_cv_c99_lrint=yes, ac_cv_c99_lrint=no)
|
||||
|
||||
CFLAGS=$lrint_save_CFLAGS
|
||||
|
||||
])
|
||||
|
||||
if test "$ac_cv_c99_lrint" = yes; then
|
||||
AC_DEFINE(HAVE_LRINT, 1,
|
||||
[Define if you have C99's lrint function.])
|
||||
fi
|
||||
])# AC_C99_FUNC_LRINT
|
||||
dnl @synopsis AC_C99_FUNC_LRINTF
|
||||
dnl
|
||||
dnl Check whether C99's lrintf function is available.
|
||||
dnl @version 1.3 Feb 12 2002
|
||||
dnl @author Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
dnl
|
||||
dnl Permission to use, copy, modify, distribute, and sell this file for any
|
||||
dnl purpose is hereby granted without fee, provided that the above copyright
|
||||
dnl and this permission notice appear in all copies. No representations are
|
||||
dnl made about the suitability of this software for any purpose. It is
|
||||
dnl provided "as is" without express or implied warranty.
|
||||
dnl
|
||||
AC_DEFUN([AC_C99_FUNC_LRINTF],
|
||||
[AC_CACHE_CHECK(for lrintf,
|
||||
ac_cv_c99_lrintf,
|
||||
[
|
||||
lrintf_save_CFLAGS=$CFLAGS
|
||||
CFLAGS="-O2 -lm"
|
||||
AC_TRY_LINK([
|
||||
#define _ISOC9X_SOURCE 1
|
||||
#define _ISOC99_SOURCE 1
|
||||
#define __USE_ISOC99 1
|
||||
#define __USE_ISOC9X 1
|
||||
|
||||
#include <math.h>
|
||||
], if (!lrintf(3.14159)) lrintf(2.7183);, ac_cv_c99_lrintf=yes, ac_cv_c99_lrintf=no)
|
||||
|
||||
CFLAGS=$lrintf_save_CFLAGS
|
||||
|
||||
])
|
||||
|
||||
if test "$ac_cv_c99_lrintf" = yes; then
|
||||
AC_DEFINE(HAVE_LRINTF, 1,
|
||||
[Define if you have C99's lrintf function.])
|
||||
fi
|
||||
])# AC_C99_FUNC_LRINTF
|
||||
dnl @synopsis AC_C99_FUNC_LLRINT
|
||||
dnl
|
||||
dnl Check whether C99's llrint function is available.
|
||||
dnl @version 1.1 Sep 30 2002
|
||||
dnl @author Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
dnl
|
||||
dnl Permission to use, copy, modify, distribute, and sell this file for any
|
||||
dnl purpose is hereby granted without fee, provided that the above copyright
|
||||
dnl and this permission notice appear in all copies. No representations are
|
||||
dnl made about the suitability of this software for any purpose. It is
|
||||
dnl provided "as is" without express or implied warranty.
|
||||
dnl
|
||||
AC_DEFUN([AC_C99_FUNC_LLRINT],
|
||||
[AC_CACHE_CHECK(for llrint,
|
||||
ac_cv_c99_llrint,
|
||||
[
|
||||
llrint_save_CFLAGS=$CFLAGS
|
||||
CFLAGS="-O2 -lm"
|
||||
AC_TRY_LINK([
|
||||
#define _ISOC9X_SOURCE 1
|
||||
#define _ISOC99_SOURCE 1
|
||||
#define __USE_ISOC99 1
|
||||
#define __USE_ISOC9X 1
|
||||
|
||||
#include <math.h>
|
||||
#include <stdint.h>
|
||||
], int64_t x ; x = llrint(3.14159) ;, ac_cv_c99_llrint=yes, ac_cv_c99_llrint=no)
|
||||
|
||||
CFLAGS=$llrint_save_CFLAGS
|
||||
|
||||
])
|
||||
|
||||
if test "$ac_cv_c99_llrint" = yes; then
|
||||
AC_DEFINE(HAVE_LLRINT, 1,
|
||||
[Define if you have C99's llrint function.])
|
||||
fi
|
||||
])# AC_C99_FUNC_LLRINT
|
||||
|
||||
|
||||
|
||||
dnl @synopsis AC_C_CLIP_MODE
|
||||
dnl
|
||||
dnl Determine the clipping mode when converting float to int.
|
||||
dnl @version 1.0 May 17 2003
|
||||
dnl @author Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
dnl
|
||||
dnl Permission to use, copy, modify, distribute, and sell this file for any
|
||||
dnl purpose is hereby granted without fee, provided that the above copyright
|
||||
dnl and this permission notice appear in all copies. No representations are
|
||||
dnl made about the suitability of this software for any purpose. It is
|
||||
dnl provided "as is" without express or implied warranty.
|
||||
|
||||
|
||||
|
||||
dnl Find the clipping mode in the following way:
|
||||
dnl 1) If we are not cross compiling test it.
|
||||
dnl 2) IF we are cross compiling, assume that clipping isn't done correctly.
|
||||
|
||||
AC_DEFUN([AC_C_CLIP_MODE],
|
||||
[AC_CACHE_CHECK(processor clipping capabilities,
|
||||
ac_cv_c_clip_type,
|
||||
|
||||
# Initialize to unknown
|
||||
ac_cv_c_clip_positive=unknown
|
||||
ac_cv_c_clip_negative=unknown
|
||||
|
||||
if test $ac_cv_c_clip_positive = unknown ; then
|
||||
AC_TRY_RUN(
|
||||
[[
|
||||
#define _ISOC9X_SOURCE 1
|
||||
#define _ISOC99_SOURCE 1
|
||||
#define __USE_ISOC99 1
|
||||
#define __USE_ISOC9X 1
|
||||
#include <math.h>
|
||||
int main (void)
|
||||
{ double fval ;
|
||||
int k, ival ;
|
||||
|
||||
fval = 1.0 * 0x7FFFFFFF ;
|
||||
for (k = 0 ; k < 100 ; k++)
|
||||
{ ival = (lrint (fval)) >> 24 ;
|
||||
if (ival != 127)
|
||||
return 1 ;
|
||||
|
||||
fval *= 1.2499999 ;
|
||||
} ;
|
||||
|
||||
return 0 ;
|
||||
}
|
||||
]],
|
||||
ac_cv_c_clip_positive=yes,
|
||||
ac_cv_c_clip_positive=no,
|
||||
ac_cv_c_clip_positive=unknown
|
||||
)
|
||||
|
||||
AC_TRY_RUN(
|
||||
[[
|
||||
#define _ISOC9X_SOURCE 1
|
||||
#define _ISOC99_SOURCE 1
|
||||
#define __USE_ISOC99 1
|
||||
#define __USE_ISOC9X 1
|
||||
#include <math.h>
|
||||
int main (void)
|
||||
{ double fval ;
|
||||
int k, ival ;
|
||||
|
||||
fval = -8.0 * 0x10000000 ;
|
||||
for (k = 0 ; k < 100 ; k++)
|
||||
{ ival = (lrint (fval)) >> 24 ;
|
||||
if (ival != -128)
|
||||
return 1 ;
|
||||
|
||||
fval *= 1.2499999 ;
|
||||
} ;
|
||||
|
||||
return 0 ;
|
||||
}
|
||||
]],
|
||||
ac_cv_c_clip_negative=yes,
|
||||
ac_cv_c_clip_negative=no,
|
||||
ac_cv_c_clip_negative=unknown
|
||||
)
|
||||
|
||||
fi
|
||||
|
||||
if test $ac_cv_c_clip_positive = yes ; then
|
||||
ac_cv_c_clip_positive=1
|
||||
else
|
||||
ac_cv_c_clip_positive=0
|
||||
fi
|
||||
|
||||
if test $ac_cv_c_clip_negative = yes ; then
|
||||
ac_cv_c_clip_negative=1
|
||||
else
|
||||
ac_cv_c_clip_negative=0
|
||||
fi
|
||||
|
||||
[[
|
||||
case "$ac_cv_c_clip_positive$ac_cv_c_clip_negative" in
|
||||
"00")
|
||||
ac_cv_c_clip_type="none"
|
||||
;;
|
||||
"10")
|
||||
ac_cv_c_clip_type="positive"
|
||||
;;
|
||||
"01")
|
||||
ac_cv_c_clip_type="negative"
|
||||
;;
|
||||
"11")
|
||||
ac_cv_c_clip_type="both"
|
||||
;;
|
||||
esac
|
||||
]]
|
||||
|
||||
)
|
||||
]
|
||||
|
||||
)# AC_C_CLIP_MODE
|
||||
|
||||
|
||||
|
||||
5
buildtools/Makefile.am
Normal file
@@ -0,0 +1,5 @@
|
||||
AUTOMAKE_OPTIONS = foreign 1.4
|
||||
|
||||
noinst_PROGRAMS= bin2res
|
||||
bin2res_SOURCES = bin2res.cpp
|
||||
|
||||
211
buildtools/bin2res.cpp
Normal file
@@ -0,0 +1,211 @@
|
||||
/*
|
||||
* bin2res.cpp - generate embedded resources from binary data (based on qembed)
|
||||
*
|
||||
* Copyright (c) 2005 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public
|
||||
* License along with this program (see COPYING); if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
|
||||
static void embedData( const char * _input, int _size, std::ostream & _output );
|
||||
static std::string convertFileNameToCIdentifier( const std::string & _s );
|
||||
|
||||
|
||||
struct embed
|
||||
{
|
||||
unsigned int size;
|
||||
std::string name;
|
||||
std::string cname;
|
||||
} ;
|
||||
|
||||
typedef std::vector<std::string> stringlist;
|
||||
|
||||
const int MAX_FILE_SIZE = 256*256*256; // = 16 MB
|
||||
|
||||
|
||||
int main( int argc, char * * argv )
|
||||
{
|
||||
if( argc < 2 )
|
||||
{
|
||||
std::cerr << "Usage:" << std::endl << "\t" << argv[0] <<
|
||||
" files" << std::endl;
|
||||
return( 1 );
|
||||
}
|
||||
|
||||
std::cout << "// Generated by bin2res" << std::endl;
|
||||
|
||||
std::vector<embed *> embedded_data;
|
||||
|
||||
std::cout << "#ifndef _EMBEDDED_RESOURCES_H" << std::endl;
|
||||
std::cout << "#define _EMBEDDED_RESOURCES_H" << std::endl;
|
||||
|
||||
stringlist files;
|
||||
for( int i = 1; i < argc; ++i )
|
||||
{
|
||||
files.push_back( argv[i] );
|
||||
}
|
||||
for( stringlist::iterator it = files.begin(); it != files.end(); ++it )
|
||||
{
|
||||
std::ifstream f( it->c_str() );
|
||||
if( f.fail() )
|
||||
{
|
||||
std::cerr << "Cannot open file " << *it <<
|
||||
", ignoring it" << std::endl;
|
||||
continue;
|
||||
}
|
||||
f.seekg( 0, std::ios::end );
|
||||
int fsize = f.tellg();
|
||||
f.seekg( 0 );
|
||||
if( fsize == 0 || fsize > MAX_FILE_SIZE )
|
||||
{
|
||||
std::cerr << "File " << *it << " has zero size or is "
|
||||
"too large to be processed with bin2res." <<
|
||||
std::endl;
|
||||
}
|
||||
char * data = new char[fsize];
|
||||
f.read( data, fsize );
|
||||
embed * e = new embed;
|
||||
e->size = fsize;
|
||||
if( it->rfind( '/' ) != std::string::npos )
|
||||
{
|
||||
e->name = std::string( it->c_str() +
|
||||
it->rfind( '/' ) + 1 );
|
||||
}
|
||||
else
|
||||
{
|
||||
e->name = *it;
|
||||
}
|
||||
e->cname = convertFileNameToCIdentifier( e->name );
|
||||
embedded_data.push_back( e );
|
||||
std::string s;
|
||||
std::cout << "const unsigned char " << e->cname <<
|
||||
"_data[] = {";
|
||||
embedData( data, fsize, std::cout );
|
||||
std::cout << std::endl << "};" << std::endl << std::endl;
|
||||
delete[] data;
|
||||
}
|
||||
|
||||
if( embedded_data.size() > 0 )
|
||||
{
|
||||
std::cout << "const unsigned char dummy_data[] ="
|
||||
"{ 0x00 };" << std::endl << std::endl;
|
||||
embed * dummy = new embed;
|
||||
dummy->size = 1;
|
||||
dummy->name = "dummy";
|
||||
dummy->cname = convertFileNameToCIdentifier( "dummy" );
|
||||
embedded_data.push_back( dummy );
|
||||
|
||||
std::cout << "#include <string.h>" << std::endl << std::endl;
|
||||
std::cout << "#include \"embed.h\"" << std::endl << std::endl;
|
||||
std::cout << "embed::descriptor embed_vec[] = {" << std::endl;
|
||||
/* << "{" << std::endl
|
||||
<< " int size;" << std::endl
|
||||
<< " const unsigned char * data;" <<
|
||||
std::endl
|
||||
<< " const char * name;" << std::endl
|
||||
<< "} embed_vec[] = {" << std::endl;*/
|
||||
while( embedded_data.size() > 0 )
|
||||
{
|
||||
embed * e = embedded_data[0];
|
||||
std::cout << " { " << e->size << ", " << e->cname <<
|
||||
"_data, " << "\"" << e->name <<
|
||||
"\" }," << std::endl;
|
||||
delete e;
|
||||
embedded_data.erase( embedded_data.begin() );
|
||||
}
|
||||
std::cout << " { 0, 0, 0 }" << std::endl << "};" << std::endl
|
||||
<< std::endl
|
||||
<< "const embed::descriptor & "
|
||||
"findEmbeddedData( const char * _name )"
|
||||
<< std::endl << "{" << std::endl
|
||||
<< " for( int i = 0; embed_vec[i].data; "
|
||||
"i++ )" << std::endl
|
||||
<< " {" << std::endl
|
||||
<< " if( strcmp( embed_vec[i].name, "
|
||||
"_name ) == 0 )" << std::endl
|
||||
<< " {" << std::endl
|
||||
<< " return( "
|
||||
"embed_vec[i] );" << std::endl
|
||||
<< " }" << std::endl
|
||||
<< " }" << std::endl
|
||||
/* << " printf( \"warning: embedded resource "
|
||||
"%s not found!\\n\", _name );"
|
||||
<< std::endl*/
|
||||
<< " return( findEmbeddedData( "
|
||||
"\"dummy\" ) );" << std::endl
|
||||
<< "}" << std::endl << std::endl;
|
||||
}
|
||||
std::cout << "#endif" << std::endl;
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
std::string convertFileNameToCIdentifier( const std::string & _s )
|
||||
{
|
||||
std::string r = _s;
|
||||
int len = r.length();
|
||||
if ( len > 0 && !isalpha( (char)r[0] ) )
|
||||
{
|
||||
r[0] = '_';
|
||||
}
|
||||
for ( int i = 1; i < len; i++ )
|
||||
{
|
||||
if ( !isalnum( (char)r[i] ) )
|
||||
{
|
||||
r[i] = '_';
|
||||
}
|
||||
}
|
||||
return( r );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void embedData( const char * _input, int _nbytes, std::ostream & _output )
|
||||
{
|
||||
static const char hexdigits[] = "0123456789abcdef";
|
||||
std::string s;
|
||||
for( int i = 0; i < _nbytes; i++ )
|
||||
{
|
||||
if( ( i%14 ) == 0 )
|
||||
{
|
||||
s += "\n ";
|
||||
_output << s;
|
||||
s = "";
|
||||
}
|
||||
unsigned int v = _input[i];
|
||||
s += "0x";
|
||||
s += hexdigits[(v >> 4) & 15];
|
||||
s += hexdigits[v & 15];
|
||||
if( i < _nbytes-1 )
|
||||
{
|
||||
s += ',';
|
||||
}
|
||||
}
|
||||
if ( s.length() )
|
||||
{
|
||||
_output << s;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,71 +0,0 @@
|
||||
#!/bin/bash
|
||||
aberr(){ printf "[\e[31mERROR\e[0m]: \e[1m%s\e[0m\n" "$*" >&2; }
|
||||
abinfo(){ printf "[\e[96mINFO\e[0m]: \e[1m%s\e[0m\n" "$*" >&2; }
|
||||
|
||||
function upload_to_tx() {
|
||||
if ! which tx > /dev/null; then
|
||||
aberr "You don't have Transifex client installed. \n Run \`pip install transifex-client\` to install it."
|
||||
exit 1
|
||||
fi
|
||||
abinfo "Uploading to transifex..."
|
||||
if ! tx push -s; then
|
||||
aberr "Problems occurred when uploading strings to Transifex."
|
||||
printf "\t Either there are syntax errors in source file or you don't have permission to update the source file."
|
||||
exit 1
|
||||
fi
|
||||
exit 0
|
||||
}
|
||||
|
||||
function validate() {
|
||||
ERR_LANG=""
|
||||
ERR_BUF=""
|
||||
for i in data/locale/*.ts; do
|
||||
if ! ERR_BUF=$(lconvert-qt5 -i "${i}" -o "/tmp/test.qm" -of qm 2>&1); then
|
||||
ERR_LANG+="\e[96m$(basename "${i}")\e[0m: \e[93m${ERR_BUF}\e[0m "
|
||||
printf "\e[31mx\e[0m"
|
||||
continue
|
||||
fi
|
||||
printf "\e[32m.\e[0m"
|
||||
done
|
||||
echo ""
|
||||
if [[ "x${ERR_LANG}" != "x" ]]; then
|
||||
aberr "The following files failed the validation: "
|
||||
echo -e "${ERR_LANG}"
|
||||
fi
|
||||
}
|
||||
|
||||
abinfo "Checking for your environment..."
|
||||
if ! which lupdate-qt5 > /dev/null; then
|
||||
aberr "You don't seem to have Qt i18n tools installed."
|
||||
printf "\tUsually this comes with your Qt installation, or you need to\n"
|
||||
printf "\tinstall extra packages like \`qt5-tools\` or similar.\n"
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
abinfo "Scanning directories..."
|
||||
|
||||
if test -d src/3rdparty/qt5-x11embed/3rdparty/ECM/; then
|
||||
# prevent from collecting strings in ECM
|
||||
rm -rf src/3rdparty/qt5-x11embed/3rdparty/ECM/
|
||||
fi
|
||||
|
||||
if ! lupdate-qt5 -I include/ src/ plugins/ -ts data/locale/en.ts; then
|
||||
aberr "There are some problems when collecting the strings."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
abinfo "Validating translations..."
|
||||
validate
|
||||
|
||||
abinfo "Translations successfully updated."
|
||||
printf "Do you want to upload translations to Transifex? [y/N]: "
|
||||
read -n 1 -r TX
|
||||
echo ""
|
||||
|
||||
if [[ "$TX" == "y" || "$TX" == "Y" ]]; then
|
||||
upload_to_tx
|
||||
fi
|
||||
|
||||
abinfo "No upload as required."
|
||||
|
||||
exit 0
|
||||
@@ -1,34 +0,0 @@
|
||||
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${PROJECT_DESCRIPTION}")
|
||||
SET(CPACK_PACKAGE_VENDOR "${PROJECT_AUTHOR}")
|
||||
SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_SOURCE_DIR}/README.md")
|
||||
SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE.txt")
|
||||
SET(CPACK_PACKAGE_VERSION_MAJOR "${VERSION_MAJOR}")
|
||||
SET(CPACK_PACKAGE_VERSION_MINOR "${VERSION_MINOR}")
|
||||
SET(CPACK_PACKAGE_VERSION_PATCH "${VERSION_RELEASE}")
|
||||
IF(VERSION_STAGE)
|
||||
SET(CPACK_PACKAGE_VERSION_PATCH "${CPACK_PACKAGE_VERSION_PATCH}-${VERSION_STAGE}")
|
||||
ENDIF()
|
||||
IF(VERSION_BUILD)
|
||||
SET(CPACK_PACKAGE_VERSION_PATCH "${CPACK_PACKAGE_VERSION_PATCH}-${VERSION_BUILD}")
|
||||
ENDIF()
|
||||
SET(CPACK_PACKAGE_INSTALL_DIRECTORY "${PROJECT_NAME_UCASE}")
|
||||
SET(CPACK_SOURCE_GENERATOR "TBZ2")
|
||||
SET(CPACK_SOURCE_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}-${VERSION}")
|
||||
SET(CPACK_PACKAGE_EXECUTABLES "${CMAKE_PROJECT_NAME}" "${PROJECT_NAME_UCASE} binary")
|
||||
|
||||
# Disable strip for Debug|RelWithDebInfo
|
||||
if(CMAKE_BUILD_TYPE MATCHES "Deb")
|
||||
unset(CPACK_STRIP_FILES)
|
||||
else()
|
||||
set(CPACK_STRIP_FILES TRUE)
|
||||
endif()
|
||||
|
||||
IF(LMMS_BUILD_WIN32)
|
||||
ADD_SUBDIRECTORY(nsis)
|
||||
ELSEIF(LMMS_BUILD_APPLE)
|
||||
ADD_SUBDIRECTORY(apple)
|
||||
ELSE()
|
||||
ADD_SUBDIRECTORY(linux)
|
||||
ENDIF()
|
||||
|
||||
INCLUDE(CPack)
|
||||
@@ -1,38 +0,0 @@
|
||||
IF(CMAKE_OSX_ARCHITECTURES)
|
||||
SET(DMG_ARCH "${CMAKE_OSX_ARCHITECTURES}")
|
||||
ELSEIF(IS_ARM64)
|
||||
# Target arch is host arch
|
||||
SET(DMG_ARCH "arm64")
|
||||
ELSE()
|
||||
# Fallback to Intel
|
||||
SET(DMG_ARCH "x86_64")
|
||||
ENDIF()
|
||||
|
||||
# Standard CPack options
|
||||
set(CPACK_GENERATOR "External" PARENT_SCOPE)
|
||||
set(CPACK_EXTERNAL_ENABLE_STAGING TRUE PARENT_SCOPE)
|
||||
set(CPACK_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}-${VERSION}-mac${APPLE_OS_VER}-${DMG_ARCH}")
|
||||
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}" PARENT_SCOPE)
|
||||
set(CPACK_PRE_BUILD_SCRIPTS "${CMAKE_CURRENT_SOURCE_DIR}/MacDeployQt.cmake" PARENT_SCOPE)
|
||||
# disable cpack's strip: causes missing symbols on macOS
|
||||
set(CPACK_STRIP_FILES_ORIG "${CPACK_STRIP_FILES}" PARENT_SCOPE)
|
||||
set(CPACK_STRIP_FILES FALSE PARENT_SCOPE)
|
||||
|
||||
# Custom vars to expose to Cpack
|
||||
# must be prefixed with "CPACK_" per https://stackoverflow.com/a/46526757/3196753)
|
||||
set(CPACK_CURRENT_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}" PARENT_SCOPE)
|
||||
set(CPACK_CURRENT_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}" PARENT_SCOPE)
|
||||
set(CPACK_BINARY_DIR "${CMAKE_BINARY_DIR}" PARENT_SCOPE)
|
||||
set(CPACK_SOURCE_DIR "${CMAKE_SOURCE_DIR}" PARENT_SCOPE)
|
||||
set(CPACK_QMAKE_EXECUTABLE "${QT_QMAKE_EXECUTABLE}" PARENT_SCOPE)
|
||||
set(CPACK_CARLA_LIBRARIES "${CARLA_LIBRARIES}" PARENT_SCOPE)
|
||||
set(CPACK_PROJECT_NAME "${PROJECT_NAME}" PARENT_SCOPE)
|
||||
set(CPACK_PROJECT_VERSION "${VERSION}" PARENT_SCOPE)
|
||||
set(CPACK_PROJECT_NAME_UCASE "${PROJECT_NAME_UCASE}" PARENT_SCOPE)
|
||||
set(CPACK_PROJECT_URL "${PROJECT_URL}" PARENT_SCOPE)
|
||||
set(CPACK_SUIL_MODULES "${Suil_MODULES}" PARENT_SCOPE)
|
||||
set(CPACK_SUIL_MODULES_PREFIX "${Suil_MODULES_PREFIX}" PARENT_SCOPE)
|
||||
|
||||
if(CMAKE_VERSION VERSION_LESS "3.19")
|
||||
message(WARNING "DMG creation requires at least CMake 3.19")
|
||||
endif()
|
||||
@@ -1,175 +0,0 @@
|
||||
# Create a macOS .dmg desktop installer using macdeployqt
|
||||
#
|
||||
# Copyright (c) 2025, Tres Finocchiaro, <tres.finocchiaro@gmail.com>
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||
|
||||
# Variables must be prefixed with "CPACK_" to be visible here
|
||||
set(lmms "${CPACK_PROJECT_NAME}")
|
||||
set(APP "${CPACK_TEMPORARY_INSTALL_DIRECTORY}/${CPACK_PROJECT_NAME_UCASE}.app")
|
||||
|
||||
# Toggle command echoing & verbosity
|
||||
# 0 = no output, 1 = error/warning, 2 = normal, 3 = debug
|
||||
if(DEFINED ENV{CPACK_DEBUG})
|
||||
set(CPACK_DEBUG "$ENV{CPACK_DEBUG}")
|
||||
endif()
|
||||
if(NOT CPACK_DEBUG)
|
||||
set(VERBOSITY 1)
|
||||
set(COMMAND_ECHO NONE)
|
||||
else()
|
||||
set(VERBOSITY 2)
|
||||
set(COMMAND_ECHO STDOUT)
|
||||
endif()
|
||||
|
||||
# Detect release|debug build
|
||||
if(NOT CPACK_STRIP_FILES_ORIG)
|
||||
# -use-debug-libs implies -no-strip
|
||||
if(CPACK_QMAKE_EXECUTABLE MATCHES "/homebrew/|/usr/local")
|
||||
message(STATUS "Homebrew does not provide debug qt libraries, replacing \"-use-debug-libs\" with \"-no-strip\" instead")
|
||||
set(USE_DEBUG_LIBS -no-strip)
|
||||
else()
|
||||
set(USE_DEBUG_LIBS -use-debug-libs)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Cleanup CPack "External" json, txt files, old DMG files
|
||||
file(GLOB cleanup "${CPACK_BINARY_DIR}/${lmms}-*.json"
|
||||
"${CPACK_BINARY_DIR}/${lmms}-*.dmg"
|
||||
"${CPACK_BINARY_DIR}/install_manifest.txt")
|
||||
list(SORT cleanup)
|
||||
file(REMOVE ${cleanup})
|
||||
|
||||
# Create bundle structure
|
||||
file(MAKE_DIRECTORY "${APP}/Contents/MacOS")
|
||||
file(MAKE_DIRECTORY "${APP}/Contents/Frameworks")
|
||||
file(MAKE_DIRECTORY "${APP}/Contents/Resources")
|
||||
|
||||
# Fix layout
|
||||
file(RENAME "${CPACK_TEMPORARY_INSTALL_DIRECTORY}/lib" "${APP}/Contents/lib")
|
||||
file(RENAME "${CPACK_TEMPORARY_INSTALL_DIRECTORY}/share" "${APP}/Contents/share")
|
||||
file(RENAME "${CPACK_TEMPORARY_INSTALL_DIRECTORY}/bin" "${APP}/Contents/bin")
|
||||
|
||||
# Move binaries into Contents/MacOS
|
||||
file(RENAME "${APP}/Contents/bin/${lmms}" "${APP}/Contents/MacOS/${lmms}")
|
||||
file(RENAME "${APP}/Contents/lib/${lmms}/RemoteZynAddSubFx" "${APP}/Contents/MacOS/RemoteZynAddSubFx")
|
||||
file(REMOVE_RECURSE "${APP}/Contents/bin")
|
||||
file(REMOVE_RECURSE "${APP}/Contents/share/man1")
|
||||
file(REMOVE_RECURSE "${APP}/Contents/include")
|
||||
|
||||
# Copy missing files
|
||||
# Convert https://lmms.io to io.lmms
|
||||
string(REPLACE "." ";" mime_parts "${CPACK_PROJECT_URL}")
|
||||
string(REPLACE ":" ";" mime_parts "${mime_parts}")
|
||||
string(REPLACE "/" "" mime_parts "${mime_parts}")
|
||||
list(REMOVE_AT mime_parts 0)
|
||||
list(REVERSE mime_parts)
|
||||
list(JOIN mime_parts "." MACOS_MIMETYPE_ID)
|
||||
configure_file("${CPACK_CURRENT_SOURCE_DIR}/lmms.plist.in" "${APP}/Contents/Info.plist" @ONLY)
|
||||
file(COPY "${CPACK_CURRENT_SOURCE_DIR}/project.icns" DESTINATION "${APP}/Contents/Resources")
|
||||
file(COPY "${CPACK_CURRENT_SOURCE_DIR}/icon.icns" DESTINATION "${APP}/Contents/Resources")
|
||||
file(RENAME "${APP}/Contents/Resources/icon.icns" "${APP}/Contents/Resources/${lmms}.icns")
|
||||
|
||||
# Copy Suil modules
|
||||
if(CPACK_SUIL_MODULES)
|
||||
set(SUIL_MODULES_TARGET "${APP}/Contents/Frameworks/${CPACK_SUIL_MODULES_PREFIX}")
|
||||
file(MAKE_DIRECTORY "${SUIL_MODULES_TARGET}")
|
||||
file(COPY ${CPACK_SUIL_MODULES} DESTINATION "${SUIL_MODULES_TARGET}")
|
||||
endif()
|
||||
|
||||
# Make all libraries writable for macdeployqt
|
||||
file(CHMOD_RECURSE "${APP}/Contents" PERMISSIONS
|
||||
OWNER_EXECUTE OWNER_WRITE OWNER_READ
|
||||
GROUP_EXECUTE GROUP_WRITE GROUP_READ
|
||||
WORLD_READ)
|
||||
|
||||
# Qt6: Fix @rpath bug https://github.com/orgs/Homebrew/discussions/2823
|
||||
include(CreateSymlink)
|
||||
get_filename_component(QTBIN "${CPACK_QMAKE_EXECUTABLE}" DIRECTORY)
|
||||
get_filename_component(QTDIR "${QTBIN}" DIRECTORY)
|
||||
create_symlink("${QTDIR}/lib" "${CPACK_TEMPORARY_INSTALL_DIRECTORY}/lib")
|
||||
|
||||
# Replace @rpath with @loader_path for Carla
|
||||
execute_process(COMMAND install_name_tool -change
|
||||
"@rpath/libcarlabase.dylib"
|
||||
"@loader_path/libcarlabase.dylib"
|
||||
"${APP}/Contents/lib/${lmms}/libcarlapatchbay.so"
|
||||
COMMAND_ECHO ${COMMAND_ECHO}
|
||||
COMMAND_ERROR_IS_FATAL ANY)
|
||||
execute_process(COMMAND install_name_tool -change
|
||||
"@rpath/libcarlabase.dylib"
|
||||
"@loader_path/libcarlabase.dylib"
|
||||
"${APP}/Contents/lib/${lmms}/libcarlarack.so"
|
||||
COMMAND_ECHO ${COMMAND_ECHO}
|
||||
COMMAND_ERROR_IS_FATAL ANY)
|
||||
|
||||
# Build list of executables to inform macdeployqt about
|
||||
# e.g. -executable=foo.dylib -executable=bar.dylib
|
||||
file(GLOB LIBS "${APP}/Contents/lib/${lmms}/*.so")
|
||||
|
||||
# Inform macdeployqt about LADSPA plugins; may depend on bundled fftw3f, etc.
|
||||
file(GLOB LADSPA "${APP}/Contents/lib/${lmms}/ladspa/*.so")
|
||||
|
||||
# Inform macdeployqt about remote plugins
|
||||
file(GLOB REMOTE_PLUGINS "${APP}/Contents/MacOS/*Remote*")
|
||||
|
||||
# Collect, sort and dedupe all libraries
|
||||
list(APPEND LIBS ${LADSPA})
|
||||
list(APPEND LIBS ${REMOTE_PLUGINS})
|
||||
list(APPEND LIBS ${CPACK_SUIL_MODULES})
|
||||
list(REMOVE_DUPLICATES LIBS)
|
||||
list(SORT LIBS)
|
||||
|
||||
# Construct macdeployqt parameters
|
||||
foreach(_lib IN LISTS LIBS)
|
||||
if(EXISTS "${_lib}")
|
||||
list(APPEND EXECUTABLES "-executable=${_lib}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
# Call macdeployqt
|
||||
get_filename_component(QTBIN "${CPACK_QMAKE_EXECUTABLE}" DIRECTORY)
|
||||
message(STATUS "Calling ${QTBIN}/macdeployqt ${APP} [... executables]")
|
||||
execute_process(COMMAND "${QTBIN}/macdeployqt" "${APP}" ${EXECUTABLES}
|
||||
-verbose=${VERBOSITY}
|
||||
${USE_DEBUG_LIBS}
|
||||
COMMAND_ECHO ${COMMAND_ECHO}
|
||||
COMMAND_ERROR_IS_FATAL ANY)
|
||||
|
||||
# Cleanup symlink
|
||||
file(REMOVE "${CPACK_TEMPORARY_INSTALL_DIRECTORY}/lib")
|
||||
|
||||
# Remove dummy carla libs, relink to a sane location (e.g. /Applications/Carla.app/...)
|
||||
# (must be done after calling macdeployqt)
|
||||
file(GLOB CARLALIBS "${APP}/Contents/lib/${lmms}/libcarla*")
|
||||
foreach(_carlalib IN LISTS CARLALIBS)
|
||||
foreach(_lib "${CPACK_CARLA_LIBRARIES}")
|
||||
set(_oldpath "../../Frameworks/lib${_lib}.dylib")
|
||||
set(_newpath "Carla.app/Contents/MacOS/lib${_lib}.dylib")
|
||||
execute_process(COMMAND install_name_tool -change
|
||||
"@loader_path/${_oldpath}"
|
||||
"@executable_path/../../../${_newpath}"
|
||||
"${_carlalib}"
|
||||
COMMAND_ECHO ${COMMAND_ECHO}
|
||||
COMMAND_ERROR_IS_FATAL ANY)
|
||||
file(REMOVE "${APP}/Contents/Frameworks/lib${_lib}.dylib")
|
||||
endforeach()
|
||||
endforeach()
|
||||
|
||||
# Call ad-hoc codesign manually (CMake offers this as well)
|
||||
execute_process(COMMAND codesign --force --deep --sign - "${APP}"
|
||||
COMMAND_ECHO ${COMMAND_ECHO}
|
||||
COMMAND_ERROR_IS_FATAL ANY)
|
||||
|
||||
# Create DMG
|
||||
# appdmg won't allow volume names > 27 char https://github.com/LinusU/node-alias/issues/7
|
||||
find_program(APPDMG_BIN appdmg REQUIRED)
|
||||
string(SUBSTRING "${CPACK_PROJECT_NAME_UCASE} ${CPACK_PROJECT_VERSION}" 0 27 APPDMG_VOLUME_NAME)
|
||||
# We'll configure this file twice (again in MacDeployQt.cmake once we know CPACK_TEMPORARY_INSTALL_DIRECTORY)
|
||||
configure_file("${CPACK_CURRENT_SOURCE_DIR}/appdmg.json.in" "${CPACK_CURRENT_BINARY_DIR}/appdmg.json" @ONLY)
|
||||
|
||||
execute_process(COMMAND "${APPDMG_BIN}"
|
||||
"${CPACK_CURRENT_BINARY_DIR}/appdmg.json"
|
||||
"${CPACK_BINARY_DIR}/${CPACK_PACKAGE_FILE_NAME}.dmg"
|
||||
COMMAND_ECHO ${COMMAND_ECHO}
|
||||
COMMAND_ERROR_IS_FATAL ANY)
|
||||
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"title": "@APPDMG_VOLUME_NAME@",
|
||||
"background": "@CPACK_SOURCE_DIR@/cmake/apple/background.png",
|
||||
"icon-size": 128,
|
||||
"contents": [
|
||||
{ "x": 139, "y": 200, "type": "file", "path": "@CPACK_TEMPORARY_INSTALL_DIRECTORY@/@CPACK_PROJECT_NAME_UCASE@.app" },
|
||||
{ "x": 568, "y": 200, "type": "link", "path": "/Applications" }
|
||||
]
|
||||
}
|
||||
|
Before Width: | Height: | Size: 50 KiB |
|
Before Width: | Height: | Size: 114 KiB |
@@ -1,153 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>@CPACK_PROJECT_NAME@</string>
|
||||
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string>@CPACK_PROJECT_NAME_UCASE@ @CPACK_PROJECT_VERSION@</string>
|
||||
|
||||
<!--
|
||||
#############################################################
|
||||
# Apple Creator Code Registered Application Signatures #
|
||||
#############################################################
|
||||
# Company: LMMS Foundation #
|
||||
# Registrant: tres.finocchiaro@gmail.com #
|
||||
# ASCII Code: LMMS #
|
||||
# HEX: 4C4D4D53 #
|
||||
#############################################################
|
||||
# Contact Apple Developer Support at cfreg@apple.com #
|
||||
# with any requested changes #
|
||||
#############################################################
|
||||
-->
|
||||
<key>CFBundleSignature</key>
|
||||
<string>@CPACK_PROJECT_NAME_UCASE@</string>
|
||||
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>@CPACK_PROJECT_NAME@</string>
|
||||
|
||||
<key>CFBundleVersion</key>
|
||||
<string>@CPACK_PROJECT_VERSION@</string>
|
||||
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>@VERSIONCPACK_PROJECT_VERSION@</string>
|
||||
|
||||
<key>CFBundleName</key>
|
||||
<string>@CPACK_PROJECT_NAME_UCASE@</string>
|
||||
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>@MACOS_MIMETYPE_ID@</string>
|
||||
|
||||
<key>CFBundleDocumentTypes</key>
|
||||
<array>
|
||||
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>mmpz</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>project</string>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>@CPACK_PROJECT_NAME_UCASE@ Project</string>
|
||||
<key>CFBundleTypeOSTypes</key>
|
||||
<array>
|
||||
<string>mmpz</string>
|
||||
</array>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Editor</string>
|
||||
<key>CFBundleTypeMIMETypes</key>
|
||||
<array>
|
||||
<string>application/x-@CPACK_PROJECT_NAME@-project</string>
|
||||
</array>
|
||||
</dict>
|
||||
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>mmp</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>project</string>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>@CPACK_PROJECT_NAME_UCASE@ Project (uncompressed)</string>
|
||||
<key>CFBundleTypeOSTypes</key>
|
||||
<array>
|
||||
<string>mmp</string>
|
||||
</array>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Editor</string>
|
||||
<key>CFBundleTypeMIMETypes</key>
|
||||
<array>
|
||||
<string>application/x-@CPACK_PROJECT_NAME@-project</string>
|
||||
</array>
|
||||
</dict>
|
||||
|
||||
</array>
|
||||
|
||||
<key>UTExportedTypeDeclarations</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>UTTypeIdentifier</key>
|
||||
<string>@MACOS_MIMETYPE_ID@.mmpz</string>
|
||||
<key>UTTypeReferenceURL</key>
|
||||
<string>@CPACK_PROJECT_URL@</string>
|
||||
<key>UTTypeDescription</key>
|
||||
<string>@CPACK_PROJECT_VERSIONPROJECT_NAME_UCASE@ Project</string>
|
||||
<key>UTTypeIconFile</key>
|
||||
<string>project</string>
|
||||
<key>UTTypeConformsTo</key>
|
||||
<array>
|
||||
<string>public.data</string>
|
||||
</array>
|
||||
<key>UTTypeTagSpecification</key>
|
||||
<dict>
|
||||
<key>public.filename-extension</key>
|
||||
<array>
|
||||
<string>mmpz</string>
|
||||
</array>
|
||||
</dict>
|
||||
</dict>
|
||||
|
||||
<dict>
|
||||
<key>UTTypeIdentifier</key>
|
||||
<string>@MACOS_MIMETYPE_ID@.mmp</string>
|
||||
<key>UTTypeReferenceURL</key>
|
||||
<string>@CPACK_PROJECT_URL@</string>
|
||||
<key>UTTypeDescription</key>
|
||||
<string>@CPACK_PROJECT_NAME_UCASE@ Project (uncompressed)</string>
|
||||
<key>UTTypeIconFile</key>
|
||||
<string>project</string>
|
||||
<key>UTTypeConformsTo</key>
|
||||
<array>
|
||||
<string>public.xml</string>
|
||||
<string>public.data</string>
|
||||
</array>
|
||||
<key>UTTypeTagSpecification</key>
|
||||
<dict>
|
||||
<key>public.filename-extension</key>
|
||||
<array>
|
||||
<string>mmp</string>
|
||||
</array>
|
||||
</dict>
|
||||
</dict>
|
||||
</array>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
<key>NSHighResolutionCapable</key>
|
||||
<string>True</string>
|
||||
<key>NSRequiresAquaSystemAppearance</key>
|
||||
<string>False</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1,52 +0,0 @@
|
||||
SET(PLUGIN_FILES "")
|
||||
IF(LMMS_BUILD_WIN32)
|
||||
INSTALL(FILES $<TARGET_FILE:Qt${QT_VERSION_MAJOR}::QWindowsIntegrationPlugin> DESTINATION platforms)
|
||||
INSTALL(FILES $<TARGET_FILE:Qt${QT_VERSION_MAJOR}::QSvgIconPlugin> DESTINATION iconengines)
|
||||
INSTALL(FILES $<TARGET_FILE:Qt${QT_VERSION_MAJOR}::QSvgPlugin> DESTINATION imageformats)
|
||||
INSTALL(FILES $<TARGET_FILE:Qt${QT_VERSION_MAJOR}::Svg> DESTINATION .)
|
||||
ENDIF()
|
||||
|
||||
IF(LMMS_BUILD_WIN32 OR LMMS_INSTALL_DEPENDENCIES)
|
||||
include(InstallTargetDependencies)
|
||||
|
||||
# Collect directories to search for DLLs
|
||||
GET_FILENAME_COMPONENT(QTBIN_DIR "${QT_QMAKE_EXECUTABLE}" PATH)
|
||||
set(LIB_DIRS "${QTBIN_DIR}")
|
||||
|
||||
GET_PROPERTY(PLUGINS_BUILT GLOBAL PROPERTY PLUGINS_BUILT)
|
||||
|
||||
IF(LMMS_BUILD_WIN32)
|
||||
SET(LMMS_DEP_DESTINATION ${BIN_DIR})
|
||||
SET(PLUGIN_DEP_DESTINATION ${BIN_DIR})
|
||||
ELSE()
|
||||
SET(LMMS_DEP_DESTINATION ${LIB_DIR})
|
||||
SET(PLUGIN_DEP_DESTINATION ${LIB_DIR})
|
||||
ENDIF()
|
||||
|
||||
INSTALL_TARGET_DEPENDENCIES(
|
||||
NAME "main_binary"
|
||||
TARGETS lmms
|
||||
DESTINATION "${LMMS_DEP_DESTINATION}"
|
||||
LIB_DIRS ${LIB_DIRS}
|
||||
)
|
||||
|
||||
INSTALL_TARGET_DEPENDENCIES(
|
||||
NAME "plugins"
|
||||
TARGETS ${PLUGINS_BUILT}
|
||||
DESTINATION ${PLUGIN_DEP_DESTINATION}
|
||||
LIB_DIRS ${LIB_DIRS} "${PLUGIN_DIR}" "${PLUGIN_DIR}/optional"
|
||||
SEARCH_PATHS "${PLUGIN_DIR}" "${PLUGIN_DIR}/optional"
|
||||
)
|
||||
ENDIF()
|
||||
|
||||
# Install STK rawwaves
|
||||
if(LMMS_HAVE_STK AND (LMMS_BUILD_WIN32 OR LMMS_BUILD_APPLE))
|
||||
if(STK_RAWWAVE_ROOT)
|
||||
file(GLOB RAWWAVES "${STK_RAWWAVE_ROOT}/*.raw")
|
||||
list(SORT RAWWAVES)
|
||||
install(FILES ${RAWWAVES} DESTINATION "${DATA_DIR}/stk/rawwaves")
|
||||
else()
|
||||
message(WARNING "Can't find STK rawwave root!")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
# List of DLLs considered to be system libraries.
|
||||
# This is needed when cross-compiling for Windows.
|
||||
ADVAPI32.dll
|
||||
COMCTL32.dll
|
||||
comdlg32.dll
|
||||
d3d11.dll
|
||||
dwmapi.dll
|
||||
dxgi.dll
|
||||
GDI32.dll
|
||||
IMM32.dll
|
||||
KERNEL32.dll
|
||||
MPR.DLL
|
||||
msvcrt.dll
|
||||
netapi32.dll
|
||||
ole32.dll
|
||||
OLEAUT32.dll
|
||||
OPENGL32.DLL
|
||||
SHELL32.dll
|
||||
USER32.dll
|
||||
userenv.dll
|
||||
UxTheme.dll
|
||||
VERSION.dll
|
||||
WINMM.DLL
|
||||
WS2_32.dll
|
||||
RPCRT4.dll
|
||||
dsound.dll
|
||||
SETUPAPI.dll
|
||||
@@ -1,51 +0,0 @@
|
||||
install(DIRECTORY icons/ DESTINATION "${DATA_DIR}/icons/hicolor")
|
||||
install(FILES lmms.desktop DESTINATION "${DATA_DIR}/applications")
|
||||
install(FILES lmms.xml DESTINATION "${DATA_DIR}/mime/packages")
|
||||
|
||||
# Preserve old CPack behavior
|
||||
if(WANT_CPACK_TARBALL)
|
||||
message(STATUS "Skipping AppImage creation")
|
||||
return()
|
||||
endif()
|
||||
|
||||
# Standard CPack options
|
||||
set(CPACK_GENERATOR "External" PARENT_SCOPE)
|
||||
set(CPACK_EXTERNAL_ENABLE_STAGING true PARENT_SCOPE)
|
||||
set(CPACK_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}-${VERSION}-linux-${CMAKE_SYSTEM_PROCESSOR}")
|
||||
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}" PARENT_SCOPE)
|
||||
set(CPACK_PRE_BUILD_SCRIPTS "${CMAKE_CURRENT_SOURCE_DIR}/LinuxDeploy.cmake" PARENT_SCOPE)
|
||||
|
||||
# Custom vars to expose to Cpack
|
||||
# must be prefixed with "CPACK_" per https://stackoverflow.com/a/46526757/3196753)
|
||||
set(CPACK_CURRENT_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}" PARENT_SCOPE)
|
||||
set(CPACK_CURRENT_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}" PARENT_SCOPE)
|
||||
set(CPACK_BINARY_DIR "${CMAKE_BINARY_DIR}" PARENT_SCOPE)
|
||||
set(CPACK_SOURCE_DIR "${CMAKE_SOURCE_DIR}" PARENT_SCOPE)
|
||||
set(CPACK_QMAKE_EXECUTABLE "${QT_QMAKE_EXECUTABLE}" PARENT_SCOPE)
|
||||
set(CPACK_CARLA_LIBRARIES "${CARLA_LIBRARIES}" PARENT_SCOPE)
|
||||
set(CPACK_WINE_32_LIBRARY_DIRS "${WINE_32_LIBRARY_DIRS}" PARENT_SCOPE)
|
||||
set(CPACK_WINE_64_LIBRARY_DIRS "${WINE_64_LIBRARY_DIRS}" PARENT_SCOPE)
|
||||
set(CPACK_PROJECT_NAME "${PROJECT_NAME}" PARENT_SCOPE)
|
||||
set(CPACK_PROJECT_NAME_UCASE "${PROJECT_NAME_UCASE}" PARENT_SCOPE)
|
||||
set(CPACK_PROJECT_VERSION "${VERSION}" PARENT_SCOPE)
|
||||
set(CPACK_CMAKE_COMMAND "${CMAKE_COMMAND}" PARENT_SCOPE)
|
||||
set(CPACK_SUIL_MODULES "${Suil_MODULES}" PARENT_SCOPE)
|
||||
set(CPACK_SUIL_MODULES_PREFIX "${Suil_MODULES_PREFIX}" PARENT_SCOPE)
|
||||
set(CPACK_STK_RAWWAVE_ROOT "${STK_RAWWAVE_ROOT}" PARENT_SCOPE)
|
||||
|
||||
# TODO: Canidate for DetectMachine.cmake
|
||||
if(IS_X86_64)
|
||||
set(CPACK_TARGET_ARCH x86_64 PARENT_SCOPE)
|
||||
elseif(IS_X86)
|
||||
set(CPACK_TARGET_ARCH i386 PARENT_SCOPE)
|
||||
elseif(IS_ARM64)
|
||||
set(CPACK_TARGET_ARCH aarch64 PARENT_SCOPE)
|
||||
elseif(IS_ARM32)
|
||||
set(CPACK_TARGET_ARCH armhf PARENT_SCOPE)
|
||||
else()
|
||||
set(CPACK_TARGET_ARCH unknown PARENT_SCOPE)
|
||||
endif()
|
||||
|
||||
if(CMAKE_VERSION VERSION_LESS "3.19")
|
||||
message(WARNING "AppImage creation requires at least CMake 3.19")
|
||||
endif()
|
||||
@@ -1,244 +0,0 @@
|
||||
# Create a Linux desktop installer using linuxdeploy
|
||||
# * Creates a relocatable LMMS.AppDir installation in build/_CPack_Packages using linuxdeploy
|
||||
# * If CPACK_TOOL=appimagetool or is not set, bundles AppDir into redistributable ".AppImage" file
|
||||
# * If CPACK_TOOL=makeself is provided, bundles into a redistributable ".run" file
|
||||
#
|
||||
# Copyright (c) 2025, Tres Finocchiaro, <tres.finocchiaro@gmail.com>
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||
|
||||
# Variables must be prefixed with "CPACK_" to be visible here
|
||||
set(lmms "${CPACK_PROJECT_NAME}")
|
||||
set(LMMS "${CPACK_PROJECT_NAME_UCASE}")
|
||||
set(ARCH "${CPACK_TARGET_ARCH}")
|
||||
set(APP "${CPACK_TEMPORARY_INSTALL_DIRECTORY}/${LMMS}.AppDir")
|
||||
|
||||
# Target AppImage file
|
||||
set(APPIMAGE_FILE "${CPACK_BINARY_DIR}/${CPACK_PACKAGE_FILE_NAME}.AppImage")
|
||||
set(APPIMAGE_BEFORE_RENAME "${CPACK_BINARY_DIR}/${LMMS}-${ARCH}.AppImage")
|
||||
|
||||
set(DESKTOP_FILE "${APP}/usr/share/applications/${lmms}.desktop")
|
||||
|
||||
# Determine which packaging tool to use
|
||||
if(NOT CPACK_TOOL)
|
||||
# Pick up environmental variable
|
||||
if(DEFINED ENV{CPACK_TOOL})
|
||||
set(CPACK_TOOL "$ENV{CPACK_TOOL}")
|
||||
else()
|
||||
set(CPACK_TOOL "appimagetool")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Toggle command echoing & verbosity
|
||||
# 0 = no output, 1 = error/warning, 2 = normal, 3 = debug
|
||||
if(DEFINED ENV{CPACK_DEBUG})
|
||||
set(CPACK_DEBUG "$ENV{CPACK_DEBUG}")
|
||||
endif()
|
||||
if(NOT CPACK_DEBUG)
|
||||
set(VERBOSITY 1)
|
||||
set(APPIMAGETOOL_VERBOSITY "")
|
||||
set(COMMAND_ECHO NONE)
|
||||
set(OUTPUT_QUIET OUTPUT_QUIET)
|
||||
else()
|
||||
set(VERBOSITY 2)
|
||||
set(APPIMAGETOOL_VERBOSITY "--verbose")
|
||||
set(COMMAND_ECHO STDOUT)
|
||||
unset(OUTPUT_QUIET)
|
||||
endif()
|
||||
|
||||
include(DownloadBinary)
|
||||
include(CreateSymlink)
|
||||
include(CopyDependency)
|
||||
|
||||
# Cleanup CPack "External" json, txt files, old AppImage files
|
||||
file(GLOB cleanup "${CPACK_BINARY_DIR}/${lmms}-*.json"
|
||||
"${CPACK_BINARY_DIR}/${lmms}-*.AppImage"
|
||||
"${CPACK_BINARY_DIR}/install_manifest.txt")
|
||||
list(SORT cleanup)
|
||||
file(REMOVE ${cleanup})
|
||||
|
||||
# Download and extract linuxdeploy
|
||||
download_binary(LINUXDEPLOY_BIN
|
||||
"https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-${ARCH}.AppImage"
|
||||
linuxdeploy-${ARCH}.AppImage
|
||||
FALSE)
|
||||
|
||||
# Guess the path to appimagetool
|
||||
set(APPIMAGETOOL_BIN "${CPACK_CURRENT_BINARY_DIR}/.linuxdeploy-${ARCH}.AppImage/squashfs-root/plugins/linuxdeploy-plugin-appimage/appimagetool-prefix/AppRun")
|
||||
|
||||
# Download linuxdeploy-plugin-qt
|
||||
download_binary(LINUXDEPLOY_PLUGIN_BIN
|
||||
"https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-${ARCH}.AppImage"
|
||||
linuxdeploy-plugin-qt-${ARCH}.AppImage
|
||||
FALSE)
|
||||
|
||||
message(STATUS "Creating AppDir ${APP}...")
|
||||
|
||||
file(REMOVE_RECURSE "${CPACK_TEMPORARY_INSTALL_DIRECTORY}/include")
|
||||
file(MAKE_DIRECTORY "${APP}/usr")
|
||||
|
||||
# Setup AppDir structure (/usr/bin, /usr/lib, /usr/share... etc)
|
||||
file(GLOB files "${CPACK_TEMPORARY_INSTALL_DIRECTORY}/*")
|
||||
list(SORT files)
|
||||
foreach(_file ${files})
|
||||
get_filename_component(_filename "${_file}" NAME)
|
||||
if(NOT _filename MATCHES ".AppDir")
|
||||
file(RENAME "${_file}" "${APP}/usr/${_filename}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
# Gather deps
|
||||
list(APPEND DEPLOY_DEPS
|
||||
--deploy-deps-only "${APP}/usr/lib/${lmms}/"
|
||||
--deploy-deps-only "${APP}/usr/lib/${lmms}/ladspa/"
|
||||
)
|
||||
|
||||
# If usr/bin/lmms is hard-linked to libjack, copy it to a new location
|
||||
# See https://github.com/LMMS/lmms/issues/7689
|
||||
copy_dependency("${APP}/usr/bin/lmms" "libjack.so" "${APP}/usr/lib/jack" JACK_LIB_RELOC)
|
||||
if(JACK_LIB_RELOC)
|
||||
list(APPEND DEPLOY_DEPS --deploy-deps-only "${JACK_LIB_RELOC}")
|
||||
endif()
|
||||
|
||||
if(CPACK_HAVE_VST_32)
|
||||
list(APPEND DEPLOY_DEPS --deploy-deps-only "${APP}/usr/lib/${lmms}/32/")
|
||||
endif()
|
||||
|
||||
# Copy Suil modules
|
||||
if(CPACK_SUIL_MODULES)
|
||||
set(SUIL_MODULES_TARGET "${APP}/usr/lib/suil-0/")
|
||||
file(MAKE_DIRECTORY "${SUIL_MODULES_TARGET}")
|
||||
file(COPY ${CPACK_SUIL_MODULES} DESTINATION "${SUIL_MODULES_TARGET}")
|
||||
list(APPEND DEPLOY_DEPS --deploy-deps-only "${APP}/usr/lib/suil-0/")
|
||||
endif()
|
||||
|
||||
# Copy stk/rawwaves
|
||||
if(CPACK_STK_RAWWAVE_ROOT)
|
||||
set(STK_RAWWAVE_TARGET "${APP}/usr/share/stk/rawwaves/")
|
||||
file(MAKE_DIRECTORY "${STK_RAWWAVE_TARGET}")
|
||||
file(GLOB RAWWAVES "${CPACK_STK_RAWWAVE_ROOT}/*.raw")
|
||||
file(COPY ${RAWWAVES} DESTINATION "${STK_RAWWAVE_TARGET}")
|
||||
endif()
|
||||
|
||||
# Ensure project's "qmake" executable is first on the PATH
|
||||
get_filename_component(QTBIN "${CPACK_QMAKE_EXECUTABLE}" DIRECTORY)
|
||||
set(ENV{PATH} "${QTBIN}:$ENV{PATH}")
|
||||
|
||||
# Promote finding our own libraries first
|
||||
set(ENV{LD_LIBRARY_PATH} "${APP}/usr/lib/${lmms}/:${APP}/usr/lib/${lmms}/optional:$ENV{LD_LIBRARY_PATH}")
|
||||
|
||||
# Workaround for finding libs from online installer
|
||||
# https://github.com/linuxdeploy/linuxdeploy-plugin-qt/issues/193
|
||||
set(ENV{LD_LIBRARY_PATH} "${QTBIN}/../lib:$ENV{LD_LIBRARY_PATH}")
|
||||
|
||||
# Skip slow searching of copyright files https://github.com/linuxdeploy/linuxdeploy/issues/278
|
||||
set(ENV{DISABLE_COPYRIGHT_FILES_DEPLOYMENT} 1)
|
||||
|
||||
# Patch desktop file
|
||||
file(APPEND "${DESKTOP_FILE}" "X-AppImage-Version=${CPACK_PROJECT_VERSION}\n")
|
||||
|
||||
# Custom scripts to run immediately before lmms is executed
|
||||
file(COPY "${CPACK_SOURCE_DIR}/cmake/linux/apprun-hooks" DESTINATION "${APP}")
|
||||
file(REMOVE "${APP}/apprun-hooks/README.md")
|
||||
|
||||
# Prefer a hard-copy of .DirIcon over appimagetool's symlinking
|
||||
# 256x256 default for Cinnamon Desktop https://forums.linuxmint.com/viewtopic.php?p=2585952
|
||||
file(COPY "${APP}/usr/share/icons/hicolor/256x256/apps/${lmms}.png" DESTINATION "${APP}")
|
||||
file(RENAME "${APP}/${lmms}.png" "${APP}/.DirIcon")
|
||||
file(COPY "${APP}/usr/share/icons/hicolor/256x256/apps/${lmms}.png" DESTINATION "${APP}")
|
||||
|
||||
# Inform linuxdeploy-plugin-qt about wayland plugin
|
||||
set(ENV{EXTRA_PLATFORM_PLUGINS} "libqwayland-generic.so")
|
||||
set(ENV{EXTRA_QT_MODULES} "waylandcompositor")
|
||||
|
||||
# Call linuxdeploy
|
||||
message(STATUS "Calling ${LINUXDEPLOY_BIN} --appdir \"${APP}\" ... [... libraries].")
|
||||
execute_process(COMMAND "${LINUXDEPLOY_BIN}"
|
||||
--appdir "${APP}"
|
||||
--desktop-file "${DESKTOP_FILE}"
|
||||
--plugin qt
|
||||
${DEPLOY_DEPS}
|
||||
--exclude-library "*libgallium*"
|
||||
--verbosity ${VERBOSITY}
|
||||
WORKING_DIRECTORY "${CPACK_CURRENT_BINARY_DIR}"
|
||||
${OUTPUT_QUIET}
|
||||
COMMAND_ECHO ${COMMAND_ECHO}
|
||||
COMMAND_ERROR_IS_FATAL ANY)
|
||||
|
||||
# Remove svg ambitiously placed by linuxdeploy
|
||||
file(REMOVE "${APP}/${lmms}.svg")
|
||||
|
||||
# Remove libraries that are normally system-provided
|
||||
file(GLOB EXCLUDE_LIBS
|
||||
"${APP}/usr/lib/libwine*"
|
||||
"${APP}/usr/lib/libcarla_native*"
|
||||
"${APP}/usr/lib/${lmms}/optional/libcarla*"
|
||||
"${APP}/usr/lib/libjack*")
|
||||
|
||||
list(SORT EXCLUDE_LIBS)
|
||||
foreach(_lib IN LISTS EXCLUDE_LIBS)
|
||||
if(EXISTS "${_lib}")
|
||||
file(REMOVE "${_lib}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
# cleanup empty directories
|
||||
file(REMOVE_RECURSE "${APP}/usr/lib/${lmms}/optional/")
|
||||
|
||||
if(CPACK_TOOL STREQUAL "appimagetool")
|
||||
# Create ".AppImage" file using appimagetool (default)
|
||||
|
||||
# appimage plugin needs ARCH set when running in extracted form from squashfs-root / CI
|
||||
set(ENV{ARCH} "${ARCH}")
|
||||
message(STATUS "Finishing the AppImage...")
|
||||
execute_process(COMMAND "${APPIMAGETOOL_BIN}" "${APP}" "${APPIMAGE_FILE}"
|
||||
${APPIMAGETOOL_VERBOSITY}
|
||||
${OUTPUT_QUIET}
|
||||
COMMAND_ECHO ${COMMAND_ECHO}
|
||||
COMMAND_ERROR_IS_FATAL ANY)
|
||||
|
||||
message(STATUS "AppImage created: ${APPIMAGE_FILE}")
|
||||
elseif(CPACK_TOOL STREQUAL "makeself")
|
||||
# Create self-extracting ".run" script using makeself
|
||||
find_program(MAKESELF_BIN makeself REQUIRED)
|
||||
|
||||
message(STATUS "Finishing the .run file using ${MAKESELF_BIN}...")
|
||||
string(REPLACE ".AppImage" ".run" RUN_FILE "${APPIMAGE_FILE}")
|
||||
configure_file(
|
||||
"${CPACK_SOURCE_DIR}/cmake/linux/makeself_setup.sh.in" "${APP}/setup.sh" @ONLY
|
||||
FILE_PERMISSIONS
|
||||
OWNER_EXECUTE OWNER_WRITE OWNER_READ
|
||||
GROUP_EXECUTE GROUP_WRITE GROUP_READ
|
||||
WORLD_READ)
|
||||
|
||||
if(OUTPUT_QUIET)
|
||||
set(MAKESELF_QUIET "--quiet")
|
||||
set(ERROR_QUIET ERROR_QUIET)
|
||||
endif()
|
||||
|
||||
# makeself.sh [args] archive_dir file_name label startup_script [script_args]
|
||||
file(REMOVE "${RUN_FILE}")
|
||||
execute_process(COMMAND "${MAKESELF_BIN}"
|
||||
--keep-umask
|
||||
--nox11
|
||||
${MAKESELF_QUIET}
|
||||
"${APP}"
|
||||
"${RUN_FILE}"
|
||||
"${LMMS} Installer"
|
||||
"./setup.sh"
|
||||
${OUTPUT_QUIET}
|
||||
COMMAND_ECHO ${COMMAND_ECHO}
|
||||
COMMAND_ERROR_IS_FATAL ANY)
|
||||
|
||||
# ensure the installer can be executed as a script file
|
||||
execute_process(COMMAND "${RUN_FILE}" --help
|
||||
${OUTPUT_QUIET}
|
||||
${ERROR_QUIET}
|
||||
COMMAND_ECHO ${COMMAND_ECHO}
|
||||
COMMAND_ERROR_IS_FATAL ANY)
|
||||
|
||||
message(STATUS "Installer created: ${RUN_FILE}")
|
||||
else()
|
||||
message(FATAL_ERROR "Packaging tool CPACK_TOOL=\"${CPACK_TOOL}\" is not yet supported")
|
||||
endif()
|
||||
@@ -1,11 +0,0 @@
|
||||
# AppRun Hooks
|
||||
|
||||
Scripts placed in this directory will automatically be bundled into linuxdeploy AppImages
|
||||
(e.g. `LMMS.AppDir/apprun-hooks`) and executed immediately before lmms.
|
||||
|
||||
Quoting:
|
||||
|
||||
> "Sometimes it's important to perform actions before running the actual app. Some plugins might have to set e.g.,
|
||||
> environment variables to work properly."
|
||||
|
||||
See also: https://github.com/linuxdeploy/linuxdeploy/wiki/Plugin-system#apprun-hooks
|
||||
@@ -1,43 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Workaround nuances with carla being an optional-yet-hard-linked plugin
|
||||
CARLA_LIB_NAME="libcarla_native-plugin.so"
|
||||
KNOWN_LOCATIONS="lib lib64"
|
||||
unset CARLA_LIB_FILE
|
||||
|
||||
# Check for carla at "known" locations
|
||||
if command -v carla > /dev/null 2>&1; then
|
||||
CARLA_PATH="$(command -v carla)"
|
||||
CARLA_PREFIX="${CARLA_PATH%/bin*}"
|
||||
|
||||
# Look for libcarla_native-plugin.so in adjacent lib directory
|
||||
for lib in $KNOWN_LOCATIONS; do
|
||||
if [ -e "$CARLA_PREFIX/$lib/carla/$CARLA_LIB_NAME" ]; then
|
||||
# Add directory to LD_LIBRARY_PATH so libcarlabase.so can find it
|
||||
CARLA_LIB_FILE="$CARLA_PREFIX/$lib/carla/$CARLA_LIB_NAME"
|
||||
export LD_LIBRARY_PATH="$CARLA_PREFIX/$lib/carla/:$LD_LIBRARY_PATH"
|
||||
echo "[${0##*/}] Carla appears to be installed on this system at $CARLA_PREFIX/$lib/carla so we'll use it." >&2
|
||||
break
|
||||
fi
|
||||
done
|
||||
else
|
||||
echo "[${0##*/}] Carla does not appear to be installed, we'll remove it from the plugin listing." >&2
|
||||
export "LMMS_EXCLUDE_PLUGINS=libcarla,${LMMS_EXCLUDE_PLUGINS}"
|
||||
fi
|
||||
|
||||
# Additional workarounds for library conflicts
|
||||
# libgobject has been versioned "2.0" for over 20 years, but the ABI is constantly changing
|
||||
KNOWN_CONFLICTS="libgobject-2.0.so.0"
|
||||
if [ -n "$CARLA_LIB_FILE" ]; then
|
||||
for conflict in $KNOWN_CONFLICTS; do
|
||||
# Only prepend LD_PRELOAD if we bundle the same version
|
||||
if [ -e "$APPDIR/usr/lib/$conflict" ]; then
|
||||
conflict_sys="$(ldd "$CARLA_LIB_FILE" | grep "$conflict" | awk '{print $3}')"
|
||||
if [ -e "$conflict_sys" ]; then
|
||||
# Add library to LD_PRELOAD so lmms can find it over its bundled version
|
||||
echo "[${0##*/}] Preferring the system's \"$conflict\" over the version bundled." >&2
|
||||
export LD_PRELOAD="$conflict_sys:$LD_PRELOAD"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
fi
|
||||
@@ -1,9 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Workaround crash when jack is missing by providing a dummy version
|
||||
if LC_ALL=C ldd "$APPDIR/usr/bin/lmms" |grep "libjack.so" |grep "not found" > /dev/null 2>&1; then
|
||||
echo "[${0##*/}] Jack does not appear to be installed. That's OK, we'll use a dummy version instead." >&2
|
||||
export LD_LIBRARY_PATH="$APPDIR/usr/lib/jack:$LD_LIBRARY_PATH"
|
||||
else
|
||||
echo "[${0##*/}] Jack appears to be installed on this system, so we'll use it." >&2
|
||||
fi
|
||||
@@ -1,8 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Workaround Unity desktop menubar integration
|
||||
# - Unity's menubar relocation breaks Qt's MDI window handling in Linux
|
||||
# - Unity was default in Ubuntu 11.04 - 18.04
|
||||
if [ "$XDG_CURRENT_DESKTOP" = "Unity" ]; then
|
||||
export QT_X11_NO_NATIVE_MENUBAR=1
|
||||
fi
|
||||
@@ -1,4 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Paths for plugin systems to pick-up
|
||||
export SUIL_MODULE_DIR="$APPDIR/usr/lib/suil-0/" # See also ${SUIL_MODULES_TARGET}
|
||||
@@ -1,7 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Workaround crash in VirtualBox when hardware rendering is enabled
|
||||
if lsmod |grep vboxguest > /dev/null 2>&1; then
|
||||
echo "[${0##*/}] VirtualBox detected. Forcing libgl software rendering." >&2
|
||||
export LIBGL_ALWAYS_SOFTWARE=1;
|
||||
fi
|
||||
@@ -1,10 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Configure QPlatform Abstraction (qpa) to prefer X-Protocol C-Bindings (xcb) over Wayland
|
||||
if [ -n "$QT_QPA_PLATFORM" ]; then
|
||||
echo "[${0##*/}] QT_QPA_PLATFORM=\"$QT_QPA_PLATFORM\" was provided, using." >&2
|
||||
else
|
||||
export QT_QPA_PLATFORM="xcb"
|
||||
echo "[${0##*/}] Defaulting to QT_QPA_PLATFORM=\"$QT_QPA_PLATFORM\" for compatibility purposes." >&2
|
||||
echo "[${0##*/}] To force wayland, set QT_QPA_PLATFORM=\"wayland\" or call using \"-platform wayland\"." >&2
|
||||
fi
|
||||
|
Before Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 8.5 KiB |
|
Before Width: | Height: | Size: 5.2 KiB |
|
Before Width: | Height: | Size: 549 B |
|
Before Width: | Height: | Size: 446 B |
|
Before Width: | Height: | Size: 934 B |
|
Before Width: | Height: | Size: 771 B |
|
Before Width: | Height: | Size: 799 B |
|
Before Width: | Height: | Size: 681 B |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 7.5 KiB |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 836 B |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 2.7 KiB |
@@ -1,142 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="64"
|
||||
height="64"
|
||||
id="svg4034"
|
||||
version="1.1"
|
||||
inkscape:version="0.92.3 (2405546, 2018-03-11)"
|
||||
inkscape:export-filename="64x64@2.png"
|
||||
inkscape:export-xdpi="192"
|
||||
inkscape:export-ydpi="192"
|
||||
sodipodi:docname="lmms.svg">
|
||||
<defs
|
||||
id="defs4036">
|
||||
<filter
|
||||
inkscape:collect="always"
|
||||
style="color-interpolation-filters:sRGB"
|
||||
id="filter4173"
|
||||
x="-0.011714286"
|
||||
width="1.0234286"
|
||||
y="-0.0123"
|
||||
height="1.0246">
|
||||
<feGaussianBlur
|
||||
inkscape:collect="always"
|
||||
stdDeviation="0.205"
|
||||
id="feGaussianBlur4175" />
|
||||
</filter>
|
||||
<linearGradient
|
||||
gradientTransform="translate(0,32)"
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4244-6"
|
||||
id="linearGradient866"
|
||||
x1="35"
|
||||
y1="-14"
|
||||
x2="35"
|
||||
y2="27"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<linearGradient
|
||||
id="linearGradient4244-6"
|
||||
inkscape:collect="always">
|
||||
<stop
|
||||
id="stop4428"
|
||||
offset="0"
|
||||
style="stop-color:#27ab5f;stop-opacity:1" />
|
||||
<stop
|
||||
id="stop4430"
|
||||
offset="1"
|
||||
style="stop-color:#249a56;stop-opacity:1" />
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="1.4142135"
|
||||
inkscape:cx="210.86487"
|
||||
inkscape:cy="3.375495"
|
||||
inkscape:current-layer="svg4034"
|
||||
showgrid="true"
|
||||
inkscape:grid-bbox="true"
|
||||
inkscape:document-units="px"
|
||||
inkscape:window-width="1366"
|
||||
inkscape:window-height="705"
|
||||
inkscape:window-x="253"
|
||||
inkscape:window-y="1072"
|
||||
inkscape:window-maximized="1"
|
||||
showguides="false"
|
||||
inkscape:guide-bbox="true"
|
||||
inkscape:snap-bbox="true"
|
||||
inkscape:object-nodes="true">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid4042" />
|
||||
<sodipodi:guide
|
||||
position="37,4"
|
||||
orientation="0,1"
|
||||
id="guide4951"
|
||||
inkscape:locked="false" />
|
||||
<sodipodi:guide
|
||||
position="38,60"
|
||||
orientation="0,1"
|
||||
id="guide4955"
|
||||
inkscape:locked="false" />
|
||||
<sodipodi:guide
|
||||
position="-19,32"
|
||||
orientation="0,1"
|
||||
id="guide4957"
|
||||
inkscape:locked="false" />
|
||||
</sodipodi:namedview>
|
||||
<metadata
|
||||
id="metadata4039">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<rect
|
||||
rx="4"
|
||||
y="4"
|
||||
x="4"
|
||||
height="56"
|
||||
width="56"
|
||||
id="rect5093"
|
||||
style="display:inline;opacity:0.98999999;fill:#34d07b;fill-opacity:1;stroke:none;stroke-opacity:1" />
|
||||
<rect
|
||||
rx="3"
|
||||
y="5"
|
||||
x="5"
|
||||
height="54"
|
||||
width="54"
|
||||
id="rect5095"
|
||||
style="display:inline;opacity:1;fill:url(#linearGradient866);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<path
|
||||
sodipodi:nodetypes="ccccccccccccccccc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path5085-3-6"
|
||||
d="M 32,13 11,25 v 24 l 7,4 7,-4 v -8 l -7,-4 v -8 l 14,-8 14,8 v 8 l -7,4 v 8 l 7,4 7,-4 V 25 Z"
|
||||
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;baseline-shift:baseline;text-anchor:start;white-space:normal;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:0.15;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.97797471;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;filter:url(#filter4173);color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
|
||||
<path
|
||||
sodipodi:nodetypes="ccccccccccccccccc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path5085-3"
|
||||
d="M 32,11 11,23 v 24 l 7,4 7,-4 v -8 l -7,-4 v -8 l 14,-8 14,8 v 8 l -7,4 v 8 l 7,4 7,-4 V 23 Z"
|
||||
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;baseline-shift:baseline;text-anchor:start;white-space:normal;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.97797471;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;filter:url(#filter5497);color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 6.0 KiB |
@@ -1,173 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="64"
|
||||
height="64"
|
||||
id="svg4034"
|
||||
version="1.1"
|
||||
inkscape:version="0.91 r13725"
|
||||
inkscape:export-filename="/home/umcaruje/d/Dropbox/lmms icons/project-256x256.png"
|
||||
inkscape:export-xdpi="360"
|
||||
inkscape:export-ydpi="360"
|
||||
sodipodi:docname="application-x-lmms-project.svg"
|
||||
enable-background="new">
|
||||
<defs
|
||||
id="defs4036">
|
||||
<linearGradient
|
||||
id="linearGradient4244-6"
|
||||
inkscape:collect="always">
|
||||
<stop
|
||||
id="stop4428"
|
||||
offset="0"
|
||||
style="stop-color:#27ab5f;stop-opacity:1" />
|
||||
<stop
|
||||
id="stop4430"
|
||||
offset="1"
|
||||
style="stop-color:#249a56;stop-opacity:1" />
|
||||
</linearGradient>
|
||||
<filter
|
||||
inkscape:collect="always"
|
||||
style="color-interpolation-filters:sRGB"
|
||||
id="filter4400"
|
||||
x="-0.024"
|
||||
width="1.048"
|
||||
y="-0.024"
|
||||
height="1.048">
|
||||
<feGaussianBlur
|
||||
inkscape:collect="always"
|
||||
stdDeviation="0.14999999"
|
||||
id="feGaussianBlur4402" />
|
||||
</filter>
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4244-6"
|
||||
id="linearGradient4432"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="9.8838835"
|
||||
y1="-9.8994951"
|
||||
x2="10.275496"
|
||||
y2="27.930717" />
|
||||
<filter
|
||||
inkscape:collect="always"
|
||||
style="color-interpolation-filters:sRGB"
|
||||
id="filter4442"
|
||||
x="-0.0116"
|
||||
width="1.0232"
|
||||
y="-0.012428571"
|
||||
height="1.0248571">
|
||||
<feGaussianBlur
|
||||
inkscape:collect="always"
|
||||
stdDeviation="0.145"
|
||||
id="feGaussianBlur4444" />
|
||||
</filter>
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="5.6568542"
|
||||
inkscape:cx="4.2102935"
|
||||
inkscape:cy="18.651114"
|
||||
inkscape:current-layer="g4263"
|
||||
showgrid="false"
|
||||
inkscape:grid-bbox="true"
|
||||
inkscape:document-units="px"
|
||||
inkscape:window-width="1366"
|
||||
inkscape:window-height="740"
|
||||
inkscape:window-x="339"
|
||||
inkscape:window-y="1080"
|
||||
inkscape:window-maximized="1"
|
||||
showguides="false"
|
||||
inkscape:guide-bbox="true"
|
||||
inkscape:snap-bbox="true"
|
||||
inkscape:object-nodes="true">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid4042" />
|
||||
<sodipodi:guide
|
||||
position="37,4"
|
||||
orientation="0,1"
|
||||
id="guide4951" />
|
||||
<sodipodi:guide
|
||||
position="38,60"
|
||||
orientation="0,1"
|
||||
id="guide4955" />
|
||||
<sodipodi:guide
|
||||
position="-19,32"
|
||||
orientation="0,1"
|
||||
id="guide4957" />
|
||||
</sodipodi:namedview>
|
||||
<metadata
|
||||
id="metadata4039">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="g4263"
|
||||
inkscape:label="mimetype"
|
||||
style="display:inline">
|
||||
<g
|
||||
id="g4189">
|
||||
<path
|
||||
sodipodi:nodetypes="ssssssccccs"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path4273"
|
||||
d="m 10,-30 c -1.108,0 -2,0.892 -2,2 l 0,56 c 0,1.108 0.892,2 2,2 l 44,0 c 1.108,0 2,-0.892 2,-2 l 0,-43 c 0,-1 -1,-2 -1,-2 L 43,-29 c 0,0 -1,-1 -2,-1 z"
|
||||
style="display:inline;opacity:1;fill:#34d07b;fill-opacity:1;stroke:none;stroke-opacity:1"
|
||||
transform="translate(0,32)" />
|
||||
<path
|
||||
sodipodi:nodetypes="sssssscccs"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path4275"
|
||||
d="m 10,-29 c -0.554,0 -1,0.446 -1,1 l 0,56 c 0,0.554 0.446,1 1,1 l 44,0 c 0.554,0 1,-0.446 1,-1 l 0,-43 -13,-1 -1,-13 z"
|
||||
style="display:inline;opacity:1;fill:url(#linearGradient4432);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
transform="translate(0,32)" />
|
||||
<path
|
||||
sodipodi:nodetypes="ccccccc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path4339-5"
|
||||
d="m 40,-29 0,11.999999 c 0,2 1,3 3,3 l 11.999999,0 0,-1 L 41,-29 Z"
|
||||
style="display:inline;opacity:0.12999998;fill:#222222;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter4400)"
|
||||
transform="translate(0,32)" />
|
||||
<path
|
||||
sodipodi:nodetypes="ccccccc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path4339"
|
||||
d="m 41,-29 0,12 c 0,1.03125 0.9375,2 2,2 l 12,0 0,-1 -13,-13 z"
|
||||
style="display:inline;fill:#34d07b;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
transform="translate(0,32)" />
|
||||
<path
|
||||
sodipodi:nodetypes="ccccccccccccccccc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path4436"
|
||||
d="m 32,22 -15,8 0,17.5 5,2.5 4.999999,-2.5 0,-6 L 22,39 l 0,-6 10,-5.5 10,5.5 0,6 -4.999999,2.5 0,6 L 42,50 47,47.5 47,30 Z"
|
||||
style="display:inline;color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;baseline-shift:baseline;text-anchor:start;white-space:normal;clip-rule:nonzero;overflow:visible;visibility:visible;opacity:0.15;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.97797471;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;filter:url(#filter4442);color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
|
||||
<path
|
||||
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;baseline-shift:baseline;text-anchor:start;white-space:normal;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.97797471;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;filter:url(#filter5497);color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||
d="m 32,20 -15,8 0,17.5 5,2.5 4.999999,-2.5 0,-6 L 22,37 l 0,-6 10,-5.5 10,5.5 0,6 -4.999999,2.5 0,6 L 42,48 47,45.5 47,28 Z"
|
||||
id="path4265"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccccccccccccccccc" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 7.8 KiB |
@@ -1,4 +0,0 @@
|
||||
?package(lmms):needs="X11" section="Apps/Sound" \
|
||||
title="LMMS" hints="Audio" command="/usr/bin/lmms" \
|
||||
longtitle="LMMS" \
|
||||
icon="/usr/share/icons/hicolor/scalable/apps/lmms.svg"
|
||||
@@ -1,17 +0,0 @@
|
||||
[Desktop Entry]
|
||||
Name=LMMS
|
||||
GenericName=Music production suite
|
||||
GenericName[ca]=Programari de producció musical
|
||||
GenericName[de]=Software zur Musik-Produktion
|
||||
GenericName[fr]=Suite de production musicale
|
||||
GenericName[pl]=Narzędzia do produkcji muzyki
|
||||
Comment=Music sequencer and synthesizer
|
||||
Comment[ca]=Producció fàcil de música per a tothom!
|
||||
Comment[fr]=Séquenceur et synthétiseur de musique
|
||||
Comment[pl]=Prosta produkcja muzyki dla każdego!
|
||||
Icon=lmms
|
||||
Exec=lmms %f
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Categories=Qt;AudioVideo;Audio;Midi;
|
||||
MimeType=application/x-lmms-project;
|
||||
@@ -1,10 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
|
||||
<mime-type type="application/x-lmms-project">
|
||||
<sub-class-of type="application/xml"/>
|
||||
<comment>LMMS project</comment>
|
||||
<comment xml:lang="ca">Projecte LMMS</comment>
|
||||
<glob pattern="*.mmpz"/>
|
||||
<glob pattern="*.mmp"/>
|
||||
</mime-type>
|
||||
</mime-info>
|
||||
@@ -1,35 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Halt on first error
|
||||
set -e
|
||||
|
||||
DESTDIR="/opt/@CPACK_PROJECT_NAME@"
|
||||
BASHCOMPLETIONS="/usr/share/bash-completion/completions"
|
||||
if [ "$(id -u)" != "0" ]; then
|
||||
# Prepend "$HOME" so we can install to a writable location
|
||||
DESTDIR="${HOME}${DESTDIR}"
|
||||
BASHCOMPLETIONS="${HOME}/.local/share/bash-completion/completions"
|
||||
echo "Installing as a regular user to ${DESTDIR}/..."
|
||||
else
|
||||
echo "Installing as elevated user to ${DESTDIR}/..."
|
||||
fi
|
||||
|
||||
# Deploy @CPACK_PROJECT_NAME_UCASE@
|
||||
mkdir -p "${DESTDIR}"
|
||||
unalias cp &> /dev/null || true
|
||||
cp -rf ./* "${DESTDIR}"
|
||||
rm -f "${DESTDIR}/setup.sh"
|
||||
mv "${DESTDIR}/AppRun" "${DESTDIR}/@CPACK_PROJECT_NAME@"
|
||||
|
||||
# Install bash completions
|
||||
mkdir -p "${BASHCOMPLETIONS}"
|
||||
ln -sf "${DESTDIR}/usr/share/@CPACK_PROJECT_NAME@/bash-completion/completions/@CPACK_PROJECT_NAME@" "${BASHCOMPLETIONS}/@CPACK_PROJECT_NAME@"
|
||||
|
||||
# Test @CPACK_PROJECT_NAME_UCASE@
|
||||
echo "Installation complete... Testing \"@CPACK_PROJECT_NAME@\"..."
|
||||
"${DESTDIR}/@CPACK_PROJECT_NAME@" --allowroot --version &> /dev/null
|
||||
|
||||
# TODO: Register file associations, desktop icon, etc
|
||||
|
||||
echo "@CPACK_PROJECT_NAME_UCASE@ was installed successfully to ${DESTDIR}. To run:"
|
||||
echo " ${DESTDIR}/@CPACK_PROJECT_NAME@"
|
||||
@@ -1,78 +0,0 @@
|
||||
# Copyright (c) 2024, Tres Finocchiaro, <tres.finocchiaro@gmail.com>
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||
#
|
||||
# Description:
|
||||
# Fail-safe bash-completion installation support
|
||||
# - Installs to ${CMAKE_INSTALL_PREFIX}/share/bash-completion/completions
|
||||
# - Attempts to calculate and install to system-wide location
|
||||
# - See also https://github.com/scop/bash-completion
|
||||
#
|
||||
# Usage:
|
||||
# INCLUDE(BashCompletion)
|
||||
# BASHCOMP_INSTALL(foo)
|
||||
# ... where "foo" is a shell script adjacent to the CMakeLists.txt
|
||||
|
||||
# Honor manual override if provided
|
||||
if(NOT BASHCOMP_PKG_PATH)
|
||||
# First, use pkg-config, which is the most reliable
|
||||
find_package(PkgConfig QUIET)
|
||||
if(PKGCONFIG_FOUND)
|
||||
PKG_CHECK_MODULES(BASH_COMPLETION bash-completion)
|
||||
PKG_GET_VARIABLE(BASHCOMP_PKG_PATH bash-completion completionsdir)
|
||||
else()
|
||||
# Second, use cmake (preferred but less common)
|
||||
find_package(bash-completion QUIET)
|
||||
if(BASH_COMPLETION_FOUND)
|
||||
set(BASHCOMP_PKG_PATH "${BASH_COMPLETION_COMPLETIONSDIR}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Third, use a hard-coded fallback value
|
||||
if("${BASHCOMP_PKG_PATH}" STREQUAL "")
|
||||
set(BASHCOMP_PKG_PATH "/usr/share/bash-completion/completions")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Always provide a fallback for non-root INSTALL()
|
||||
# * "lmms" subfolder ensures we don't pollute /usr/local/share/ on default "make install"
|
||||
set(BASHCOMP_USER_PATH "share/${PROJECT_NAME}/bash-completion/completions")
|
||||
|
||||
macro(BASHCOMP_INSTALL SCRIPT_NAME)
|
||||
# Note: When running from CPack, message(...) will be suppressed unless WARNING
|
||||
if(WIN32)
|
||||
message(STATUS "Bash completion is not supported on this platform.")
|
||||
else()
|
||||
# Install a copy of bash completion to the default install prefix
|
||||
# See also: https://github.com/LMMS/lmms/pull/7252/files#r1815749125
|
||||
install(FILES "${SCRIPT_NAME}" DESTINATION "${BASHCOMP_USER_PATH}")
|
||||
|
||||
# Next, blindly attempt a system-wide install, ignoring failure
|
||||
# See also: https://stackoverflow.com/q/58448332
|
||||
# * CPack doesn't use CMAKE_INSTALL_PREFIX, so the original will be missing when packaging
|
||||
# and this step will be skipped
|
||||
# * For non-root installs (e.g. ../target), this will silently fail
|
||||
set(BASHCOMP_ORIG "${CMAKE_INSTALL_PREFIX}/${BASHCOMP_USER_PATH}/${CMAKE_PROJECT_NAME}")
|
||||
set(BASHCOMP_LINK "${BASHCOMP_PKG_PATH}/${CMAKE_PROJECT_NAME}")
|
||||
|
||||
if(BASHCOMP_PKG_PATH)
|
||||
# TODO: CMake 3.21 Use "file(COPY_FILE ...)"
|
||||
install(CODE "
|
||||
if(EXISTS \"${BASHCOMP_ORIG}\")
|
||||
file(REMOVE \"${BASHCOMP_LINK}\")
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink
|
||||
\"${BASHCOMP_ORIG}\"
|
||||
\"${BASHCOMP_LINK}\"
|
||||
ERROR_QUIET
|
||||
RESULT_VARIABLE result)
|
||||
if(result EQUAL 0)
|
||||
message(STATUS \"Bash completion-support has been installed to ${BASHCOMP_LINK}\")
|
||||
endif()
|
||||
endif()
|
||||
")
|
||||
endif()
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
|
||||
|
||||
@@ -1,93 +0,0 @@
|
||||
# BuildPlugin.cmake - Copyright (c) 2008 Tobias Doerffel
|
||||
#
|
||||
# description: build LMMS-plugin
|
||||
# usage: BUILD_PLUGIN(<PLUGIN_NAME> <PLUGIN_SOURCES> MOCFILES <HEADERS_FOR_MOC> EMBEDDED_RESOURCES <LIST_OF_FILES_TO_EMBED> LINK <SHARED|MODULE>)
|
||||
|
||||
INCLUDE(GenQrc)
|
||||
|
||||
MACRO(BUILD_PLUGIN PLUGIN_NAME)
|
||||
CMAKE_PARSE_ARGUMENTS(PLUGIN "" "LINK;EXPORT_BASE_NAME" "MOCFILES;EMBEDDED_RESOURCES" ${ARGN})
|
||||
SET(PLUGIN_SOURCES ${PLUGIN_UNPARSED_ARGUMENTS})
|
||||
|
||||
INCLUDE_DIRECTORIES("${CMAKE_CURRENT_BINARY_DIR}" "${CMAKE_BINARY_DIR}" "${CMAKE_SOURCE_DIR}/include")
|
||||
|
||||
ADD_DEFINITIONS(-DPLUGIN_NAME=${PLUGIN_NAME})
|
||||
|
||||
LIST(LENGTH PLUGIN_EMBEDDED_RESOURCES ER_LEN)
|
||||
IF(ER_LEN)
|
||||
# Expand and sort arguments to avoid locale dependent sorting in
|
||||
# shell
|
||||
SET(NEW_ARGS)
|
||||
FOREACH(ARG ${PLUGIN_EMBEDDED_RESOURCES})
|
||||
FILE(GLOB EXPANDED "${ARG}")
|
||||
LIST(SORT EXPANDED)
|
||||
FOREACH(ITEM ${EXPANDED})
|
||||
LIST(APPEND NEW_ARGS "${ITEM}")
|
||||
ENDFOREACH()
|
||||
ENDFOREACH()
|
||||
SET(PLUGIN_EMBEDDED_RESOURCES ${NEW_ARGS})
|
||||
|
||||
ADD_GEN_QRC(RCC_OUT "${PLUGIN_NAME}.qrc" PREFIX artwork/${PLUGIN_NAME} ${PLUGIN_EMBEDDED_RESOURCES})
|
||||
ENDIF(ER_LEN)
|
||||
|
||||
cmake_language(CALL QT${QT_VERSION_MAJOR}_WRAP_CPP plugin_MOC_out ${PLUGIN_MOCFILES})
|
||||
|
||||
FOREACH(f ${PLUGIN_SOURCES})
|
||||
ADD_FILE_DEPENDENCIES(${f} ${RCC_OUT})
|
||||
ENDFOREACH(f)
|
||||
|
||||
IF(LMMS_BUILD_APPLE)
|
||||
LINK_DIRECTORIES("${CMAKE_BINARY_DIR}")
|
||||
LINK_LIBRARIES(${QT_LIBRARIES})
|
||||
ENDIF(LMMS_BUILD_APPLE)
|
||||
IF(LMMS_BUILD_WIN32)
|
||||
LINK_DIRECTORIES("${CMAKE_BINARY_DIR}" "${CMAKE_SOURCE_DIR}")
|
||||
LINK_LIBRARIES(${QT_LIBRARIES})
|
||||
ENDIF(LMMS_BUILD_WIN32)
|
||||
|
||||
IF (NOT PLUGIN_LINK)
|
||||
SET(PLUGIN_LINK "MODULE")
|
||||
ENDIF()
|
||||
|
||||
ADD_LIBRARY(${PLUGIN_NAME} ${PLUGIN_LINK} ${PLUGIN_SOURCES} ${plugin_MOC_out} ${RCC_OUT})
|
||||
|
||||
target_link_libraries("${PLUGIN_NAME}" lmms Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::Xml)
|
||||
|
||||
INSTALL(TARGETS ${PLUGIN_NAME}
|
||||
LIBRARY DESTINATION "${PLUGIN_DIR}"
|
||||
RUNTIME DESTINATION "${PLUGIN_DIR}"
|
||||
)
|
||||
|
||||
IF(LMMS_BUILD_APPLE)
|
||||
IF ("${PLUGIN_LINK}" STREQUAL "SHARED")
|
||||
TARGET_LINK_OPTIONS(${PLUGIN_NAME} PRIVATE -undefined dynamic_lookup)
|
||||
ENDIF()
|
||||
ENDIF(LMMS_BUILD_APPLE)
|
||||
IF(LMMS_BUILD_WIN32)
|
||||
add_custom_command(
|
||||
TARGET "${PLUGIN_NAME}"
|
||||
POST_BUILD
|
||||
COMMAND "${STRIP_COMMAND}" "$<TARGET_FILE:${PLUGIN_NAME}>"
|
||||
VERBATIM
|
||||
COMMAND_EXPAND_LISTS
|
||||
)
|
||||
SET_TARGET_PROPERTIES(${PLUGIN_NAME} PROPERTIES PREFIX "")
|
||||
ENDIF()
|
||||
|
||||
SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${RCC_OUT} ${plugin_MOC_out}")
|
||||
|
||||
IF(NOT PLUGIN_EXPORT_BASE_NAME)
|
||||
SET(PLUGIN_EXPORT_BASE_NAME "PLUGIN")
|
||||
ENDIF()
|
||||
|
||||
GENERATE_EXPORT_HEADER(${PLUGIN_NAME}
|
||||
BASE_NAME ${PLUGIN_EXPORT_BASE_NAME}
|
||||
)
|
||||
TARGET_INCLUDE_DIRECTORIES(${PLUGIN_NAME}
|
||||
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>
|
||||
)
|
||||
|
||||
SET_PROPERTY(GLOBAL APPEND PROPERTY PLUGINS_BUILT ${PLUGIN_NAME})
|
||||
GET_PROPERTY(PLUGINS_BUILT GLOBAL PROPERTY PLUGINS_BUILT)
|
||||
ENDMACRO(BUILD_PLUGIN)
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
1. Redistributions of source code must retain the copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
3. The name of the author may not be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
@@ -1,33 +0,0 @@
|
||||
|
||||
macro(CHECK_CXX_PREPROCESSOR VAR DIRECTIVE)
|
||||
string(RANDOM DEFINED_KEY)
|
||||
string(RANDOM UNDEFINED_KEY)
|
||||
|
||||
set(TMP_FILENAME "${CMAKE_CURRENT_BINARY_DIR}/CxxTmp/src.cpp")
|
||||
SET(SRC "
|
||||
#if ${DIRECTIVE}
|
||||
#error ${DEFINED_KEY}
|
||||
#else
|
||||
#error ${UNDEFINED_KEY}
|
||||
#endif
|
||||
")
|
||||
file(WRITE ${TMP_FILENAME} "${SRC}")
|
||||
try_compile(RESULT_VAR
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${TMP_FILENAME}
|
||||
OUTPUT_VARIABLE OUTPUT_VAR
|
||||
)
|
||||
|
||||
if(OUTPUT_VAR MATCHES ${DEFINED_KEY})
|
||||
set(${VAR} ON)
|
||||
elseif(OUTPUT_VAR MATCHES ${UNDEFINED_KEY})
|
||||
set(${VAR} OFF)
|
||||
else()
|
||||
message(FATAL_ERROR "Can't determine if \"${DIRECTIVE}\" is true.")
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
|
||||
macro(CHECK_CXX_DEFINE VAR DEFINE)
|
||||
CHECK_CXX_PREPROCESSOR(${VAR} "defined(${DEFINE})")
|
||||
endmacro()
|
||||
@@ -1,213 +0,0 @@
|
||||
# Utility for validating and, if needed, cloning all submodules
|
||||
#
|
||||
# Looks for a .gitmodules in the root project folder
|
||||
# Loops over all modules looking well-known configure/build scripts
|
||||
#
|
||||
# Usage:
|
||||
# INCLUDE(CheckSubmodules)
|
||||
#
|
||||
# Options:
|
||||
# SET(PLUGIN_LIST "ZynAddSubFx;...") # skips submodules for plugins not explicitly listed
|
||||
#
|
||||
# Or via command line:
|
||||
# cmake -PLUGIN_LIST=foo;bar
|
||||
#
|
||||
# Copyright (c) 2019, Tres Finocchiaro, <tres.finocchiaro@gmail.com>
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||
|
||||
# Files which confirm a successful clone
|
||||
SET(VALID_CRUMBS "CMakeLists.txt;Makefile;Makefile.in;Makefile.am;configure.ac;configure.py;autogen.sh;.gitignore;LICENSE;Home.md;license.txt")
|
||||
|
||||
OPTION(NO_SHALLOW_CLONE "Disable shallow cloning of submodules" OFF)
|
||||
|
||||
# Try and use the specified shallow clone on submodules, if supported
|
||||
SET(DEPTH_VALUE 100)
|
||||
|
||||
# Number of times git commands will retry before failing
|
||||
SET(MAX_ATTEMPTS 2)
|
||||
|
||||
MESSAGE("\nChecking submodules...")
|
||||
IF(NOT EXISTS "${CMAKE_SOURCE_DIR}/.gitmodules")
|
||||
MESSAGE("Skipping the check because .gitmodules not detected."
|
||||
"Please make sure you have all submodules in the source tree!"
|
||||
)
|
||||
RETURN()
|
||||
ENDIF()
|
||||
FILE(READ "${CMAKE_SOURCE_DIR}/.gitmodules" SUBMODULE_DATA)
|
||||
|
||||
# Force English locale
|
||||
SET(LC_ALL_BACKUP "$ENV{LC_ALL}")
|
||||
SET(LANG_BACKUP "$ENV{LANG}")
|
||||
SET(ENV{LC_ALL} "C")
|
||||
SET(ENV{LANG} "en_US")
|
||||
|
||||
# Submodule list pairs, unparsed (WARNING: Assumes alphanumeric paths)
|
||||
STRING(REGEX MATCHALL "path = [-0-9A-Za-z/]+" SUBMODULE_LIST_RAW ${SUBMODULE_DATA})
|
||||
STRING(REGEX MATCHALL "url = [.:%-0-9A-Za-z/]+" SUBMODULE_URL_RAW ${SUBMODULE_DATA})
|
||||
|
||||
# Submodule list pairs, parsed
|
||||
SET(SUBMODULE_LIST "")
|
||||
SET(SUBMODULE_URL "")
|
||||
|
||||
FOREACH(_path ${SUBMODULE_LIST_RAW})
|
||||
# Parse SUBMODULE_PATH
|
||||
STRING(REPLACE "path = " "" SUBMODULE_PATH "${_path}")
|
||||
|
||||
# Grab index for matching SUBMODULE_URL
|
||||
LIST(FIND SUBMODULE_LIST_RAW "${_path}" SUBMODULE_INDEX)
|
||||
LIST(GET SUBMODULE_URL_RAW ${SUBMODULE_INDEX} _url)
|
||||
|
||||
# Parse SUBMODULE_URL
|
||||
STRING(REPLACE "url = " "" SUBMODULE_URL "${_url}")
|
||||
|
||||
SET(SKIP false)
|
||||
|
||||
# Loop over skipped plugins, add to SKIP_SUBMODULES (e.g. -DPLUGIN_LIST=foo;bar)
|
||||
IF(${SUBMODULE_PATH} MATCHES "^plugins/")
|
||||
SET(REMOVE_PLUGIN true)
|
||||
FOREACH(_plugin ${PLUGIN_LIST})
|
||||
IF(_plugin STREQUAL "")
|
||||
CONTINUE()
|
||||
ENDIF()
|
||||
IF(${SUBMODULE_PATH} MATCHES "${_plugin}")
|
||||
SET(REMOVE_PLUGIN false)
|
||||
ENDIF()
|
||||
ENDFOREACH()
|
||||
|
||||
IF(REMOVE_PLUGIN)
|
||||
LIST(APPEND SKIP_SUBMODULES "${SUBMODULE_PATH}")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
# Finally, loop and mark "SKIP" on match
|
||||
IF(SKIP_SUBMODULES)
|
||||
FOREACH(_skip ${SKIP_SUBMODULES})
|
||||
IF("${SUBMODULE_PATH}" MATCHES "${_skip}")
|
||||
MESSAGE("-- Skipping ${SUBMODULE_PATH} matches \"${_skip}\" (absent in PLUGIN_LIST)")
|
||||
SET(SKIP true)
|
||||
BREAK()
|
||||
ENDIF()
|
||||
ENDFOREACH()
|
||||
ENDIF()
|
||||
|
||||
IF(NOT SKIP)
|
||||
LIST(APPEND SUBMODULE_LIST "${SUBMODULE_PATH}")
|
||||
LIST(APPEND SUBMODULE_URL "${SUBMODULE_URL}")
|
||||
ENDIF()
|
||||
ENDFOREACH()
|
||||
|
||||
# Once called, status is stored in GIT_RESULT respectively.
|
||||
# Note: Git likes to write to stderr. Don't assume stderr is error; Check GIT_RESULT instead.
|
||||
MACRO(GIT_SUBMODULE SUBMODULE_PATH FORCE_DEINIT FORCE_REMOTE NO_DEPTH)
|
||||
FIND_PACKAGE(Git REQUIRED)
|
||||
# Handle missing commits
|
||||
SET(FORCE_REMOTE_FLAG "${FORCE_REMOTE}")
|
||||
SET(NO_DEPTH_FLAG "${NO_DEPTH}")
|
||||
IF(FORCE_REMOTE_FLAG)
|
||||
MESSAGE("-- Adding remote submodulefix to ${SUBMODULE_PATH}")
|
||||
EXECUTE_PROCESS(
|
||||
COMMAND "${GIT_EXECUTABLE}" remote rm submodulefix
|
||||
COMMAND "${GIT_EXECUTABLE}" remote add submodulefix ${FORCE_REMOTE}
|
||||
COMMAND "${GIT_EXECUTABLE}" fetch submodulefix
|
||||
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/${SUBMODULE_PATH}"
|
||||
OUTPUT_QUIET ERROR_QUIET
|
||||
)
|
||||
# Recurse
|
||||
GIT_SUBMODULE(${SUBMODULE_PATH} false false ${NO_DEPTH_FLAG})
|
||||
ELSEIF(${FORCE_DEINIT})
|
||||
MESSAGE("-- Resetting ${SUBMODULE_PATH}")
|
||||
EXECUTE_PROCESS(
|
||||
COMMAND "${GIT_EXECUTABLE}" submodule deinit -f "${CMAKE_SOURCE_DIR}/${SUBMODULE_PATH}"
|
||||
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
|
||||
OUTPUT_QUIET
|
||||
)
|
||||
MESSAGE("-- Deleting ${CMAKE_SOURCE_DIR}/.git/${SUBMODULE_PATH}")
|
||||
FILE(REMOVE_RECURSE "${CMAKE_SOURCE_DIR}/.git/modules/${SUBMODULE_PATH}")
|
||||
# Recurse without depth
|
||||
GIT_SUBMODULE(${SUBMODULE_PATH} false false true)
|
||||
ELSE()
|
||||
# Try to use the depth switch
|
||||
IF(NO_SHALLOW_CLONE OR GIT_VERSION_STRING VERSION_LESS "1.8.4" OR NO_DEPTH_FLAG)
|
||||
# Shallow submodules were introduced in 1.8.4
|
||||
MESSAGE("-- Fetching ${SUBMODULE_PATH}")
|
||||
SET(DEPTH_CMD "")
|
||||
SET(DEPTH_VAL "")
|
||||
ELSE()
|
||||
MESSAGE("-- Fetching ${SUBMODULE_PATH} @ --depth ${DEPTH_VALUE}")
|
||||
SET(DEPTH_CMD "--depth")
|
||||
SET(DEPTH_VAL "${DEPTH_VALUE}")
|
||||
ENDIF()
|
||||
|
||||
EXECUTE_PROCESS(
|
||||
COMMAND "${GIT_EXECUTABLE}" submodule update --init --recursive ${DEPTH_CMD} ${DEPTH_VAL} "${CMAKE_SOURCE_DIR}/${SUBMODULE_PATH}"
|
||||
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
|
||||
RESULT_VARIABLE GIT_RESULT
|
||||
OUTPUT_VARIABLE GIT_STDOUT
|
||||
ERROR_VARIABLE GIT_STDERR
|
||||
)
|
||||
|
||||
SET(GIT_MESSAGE "${GIT_STDOUT}${GIT_STDERR}")
|
||||
MESSAGE("${GIT_MESSAGE}")
|
||||
ENDIF()
|
||||
ENDMACRO()
|
||||
|
||||
SET(MISSING_COMMIT_PHRASES "no such remote ref;reference is not a tree;unadvertised object")
|
||||
SET(RETRY_PHRASES "Failed to recurse;cannot create directory;already exists;${MISSING_COMMIT_PHRASES}")
|
||||
|
||||
# Attempt to do lazy clone
|
||||
FOREACH(_submodule ${SUBMODULE_LIST})
|
||||
STRING(REPLACE "/" ";" PATH_PARTS "${_submodule}")
|
||||
LIST(REVERSE PATH_PARTS)
|
||||
LIST(GET PATH_PARTS 0 SUBMODULE_NAME)
|
||||
|
||||
MESSAGE("-- Checking ${SUBMODULE_NAME}...")
|
||||
SET(CRUMB_FOUND false)
|
||||
FOREACH(_crumb ${VALID_CRUMBS})
|
||||
IF(EXISTS "${CMAKE_SOURCE_DIR}/${_submodule}/${_crumb}")
|
||||
SET(CRUMB_FOUND true)
|
||||
MESSAGE("-- Found ${_submodule}/${_crumb}")
|
||||
BREAK()
|
||||
ENDIF()
|
||||
ENDFOREACH()
|
||||
IF(NOT CRUMB_FOUND)
|
||||
GIT_SUBMODULE("${_submodule}" false false false)
|
||||
|
||||
SET(COUNTED 0)
|
||||
# Handle edge-cases where submodule didn't clone properly or re-uses a non-empty directory
|
||||
WHILE(NOT GIT_RESULT EQUAL 0 AND COUNTED LESS MAX_ATTEMPTS)
|
||||
MATH(EXPR COUNTED "${COUNTED}+1")
|
||||
SET(MISSING_COMMIT false)
|
||||
FOREACH(_phrase ${MISSING_COMMIT_PHRASES})
|
||||
IF("${GIT_MESSAGE}" MATCHES "${_phrase}")
|
||||
SET(MISSING_COMMIT true)
|
||||
BREAK()
|
||||
ENDIF()
|
||||
ENDFOREACH()
|
||||
FOREACH(_phrase ${RETRY_PHRASES})
|
||||
IF(${MISSING_COMMIT} AND COUNTED LESS 2)
|
||||
LIST(FIND SUBMODULE_LIST ${_submodule} SUBMODULE_INDEX)
|
||||
LIST(GET SUBMODULE_URL_LIST ${SUBMODULE_INDEX} SUBMODULE_URL)
|
||||
MESSAGE("-- Retrying ${_submodule} using 'remote add submodulefix' (attempt ${COUNTED} of ${MAX_ATTEMPTS})...")
|
||||
|
||||
GIT_SUBMODULE("${_submodule}" false "${SUBMODULE_URL}" false)
|
||||
BREAK()
|
||||
ELSEIF("${GIT_MESSAGE}" MATCHES "${_phrase}")
|
||||
MESSAGE("-- Retrying ${_submodule} using 'deinit' (attempt ${COUNTED} of ${MAX_ATTEMPTS})...")
|
||||
GIT_SUBMODULE("${_submodule}" true false false)
|
||||
BREAK()
|
||||
ENDIF()
|
||||
ENDFOREACH()
|
||||
ENDWHILE()
|
||||
|
||||
IF(NOT GIT_RESULT EQUAL 0)
|
||||
MESSAGE(FATAL_ERROR "${GIT_EXECUTABLE} exited with status of ${GIT_RESULT}")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
ENDFOREACH()
|
||||
MESSAGE("-- Done validating submodules.\n")
|
||||
|
||||
# Reset locale
|
||||
SET(ENV{LC_ALL} "${LC_ALL_BACKUP}")
|
||||
SET(ENV{LANG} "${LANG_BACKUP}")
|
||||
@@ -1,39 +0,0 @@
|
||||
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;
|
||||
}
|
||||
")
|
||||
|
||||
# Handle non-Intel platforms
|
||||
IF(LMMS_HOST_X86_64 OR LMMS_HOST_X86)
|
||||
SET(MPLATFORM "-m${BITNESS}")
|
||||
ELSEIF(BITNESS EQUAL 64)
|
||||
SET(MPLATFORM "")
|
||||
ELSE()
|
||||
# Skip 32-bit for non-Intel
|
||||
SET(${RESULT} False PARENT_SCOPE)
|
||||
RETURN()
|
||||
ENDIF()
|
||||
|
||||
EXECUTE_PROCESS(COMMAND ${WINEGCC_EXECUTABLE} "${MPLATFORM}"
|
||||
"${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()
|
||||
@@ -1,40 +0,0 @@
|
||||
option(USE_COMPILE_CACHE "Use a compiler cache for compilation" OFF)
|
||||
|
||||
# Compatibility for old option name
|
||||
if(USE_CCACHE)
|
||||
set(USE_COMPILE_CACHE ON)
|
||||
endif()
|
||||
|
||||
if(NOT USE_COMPILE_CACHE)
|
||||
return()
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_CXX_COMPILER_ID MATCHES "(GNU|AppleClang|Clang|MSVC)")
|
||||
message(WARNING "Compiler cache only available with MSVC or GNU")
|
||||
return()
|
||||
endif()
|
||||
|
||||
set(CACHE_TOOL_NAME ccache)
|
||||
find_program(CACHE_TOOL "${CACHE_TOOL_NAME}")
|
||||
if(NOT CACHE_TOOL)
|
||||
message(WARNING "USE_COMPILE_CACHE enabled, but no ${CACHE_TOOL_NAME} found")
|
||||
return()
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
# ccache doesn't support debug information in the PDB format. Setting the
|
||||
# debug information format requires CMP0141, introduced with CMake 3.25, to
|
||||
# be set to NEW prior to the initial `project` command.
|
||||
if(CMAKE_VERSION VERSION_LESS "3.25")
|
||||
message(WARNING "Use of compiler cache with MSVC requires at least CMake 3.25")
|
||||
return()
|
||||
endif()
|
||||
|
||||
set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "$<$<CONFIG:Debug,RelWithDebInfo>:Embedded>")
|
||||
endif()
|
||||
|
||||
message(STATUS "Using ${CACHE_TOOL} for compiler caching")
|
||||
|
||||
# TODO CMake 3.21: Use CMAKE_<LANG>_<COMPILER|LINKER>_LAUNCHER variables instead
|
||||
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CACHE_TOOL}")
|
||||
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK "${CACHE_TOOL}")
|
||||
@@ -1,76 +0,0 @@
|
||||
# Copy source_lib's dependency matching 'name_match' into specified location
|
||||
# Sets variable named in relocated_lib to the destination
|
||||
macro(copy_dependency source_lib name_match destination relocated_lib)
|
||||
if(NOT COMMAND_ECHO OR "${COMMAND_ECHO}" STREQUAL "NONE")
|
||||
set(_command_echo NONE)
|
||||
else()
|
||||
set(_command_echo "${COMMAND_ECHO}")
|
||||
endif()
|
||||
|
||||
execute_process(COMMAND file -b --mime-type "${source_lib}" OUTPUT_VARIABLE file_type)
|
||||
|
||||
set(_is_linux_lib false)
|
||||
set(_is_mac_lib false)
|
||||
|
||||
if("${file_type}" MATCHES "application/x-pie-executable")
|
||||
# Linux ELF binary
|
||||
set(_is_linux_lib true)
|
||||
list(APPEND _lib_command ldd)
|
||||
elseif("${file_type}" MATCHES "application/x-mach-binary")
|
||||
# macOS Mach-O binary
|
||||
set(_is_mac_lib true)
|
||||
list(APPEND _lib_command otool -L)
|
||||
else()
|
||||
message(FATAL_ERROR "Copying dependencies for ${file_type} are not yet supported")
|
||||
endif()
|
||||
|
||||
execute_process(COMMAND ${_lib_command}
|
||||
"${source_lib}"
|
||||
OUTPUT_VARIABLE raw_output
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
COMMAND_ECHO ${_command_echo}
|
||||
COMMAND_ERROR_IS_FATAL ANY)
|
||||
|
||||
# escape periods to avoid double-escaping
|
||||
string(REPLACE "." "\\." name_match "${name_match}")
|
||||
|
||||
# cli output --> list
|
||||
string(REPLACE "\n" ";" raw_list "${raw_output}")
|
||||
|
||||
foreach(line ${raw_list})
|
||||
if(line MATCHES "${name_match}")
|
||||
if(_is_linux_lib)
|
||||
# Assumes format "libname.so.0 => /lib/location/libname.so.0 (0x00007f48d0b0e000)"
|
||||
string(REGEX MATCH "=> ([^\\(]+)" dummy_var "${line}")
|
||||
# Trim leading/trailing whitespace and add to our list
|
||||
string(STRIP "${CMAKE_MATCH_1}" lib)
|
||||
elseif(_is_mac_lib)
|
||||
# Assumes format "@loader_path/../Frameworks/libname-0.0.dylib (compatibility version 0.0.0, current version 0.24.26)"
|
||||
string(REGEX MATCH "^[ \t]+(.*) \\(" dummy_var "${line}")
|
||||
string(STRIP "${CMAKE_MATCH_1}" lib)
|
||||
get_filename_component(loader_path ${source_lib} DIRECTORY)
|
||||
string(REPLACE "@loader_path" "${loader_path}" resolved_lib "${lib}")
|
||||
string(REPLACE "@rpath" "${loader_path}" resolved_lib "${lib}")
|
||||
# Special handling for '@executable_path'
|
||||
if(line MATCHES "@executable_path")
|
||||
# Find the position of '/Contents/'
|
||||
string(FIND "${APP_PATH}" "/Contents/" APP_CONTENTS_POS)
|
||||
# Extract the base path up to '/Contents/'
|
||||
string(SUBSTRING "${loader_path}" 0 "${APP_CONTENTS_POS}" app_base_path)
|
||||
string(REPLACE "@executable_path" "${app_base_path}/Contents/MacOS" resolved_lib "${lib}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Resolve any possible symlinks
|
||||
file(REAL_PATH "${lib}" libreal)
|
||||
get_filename_component(symname "${lib}" NAME)
|
||||
get_filename_component(realname "${libreal}" NAME)
|
||||
file(MAKE_DIRECTORY "${destination}")
|
||||
# Copy, but with original symlink name
|
||||
file(COPY "${libreal}" DESTINATION "${destination}")
|
||||
file(RENAME "${destination}/${realname}" "${destination}/${symname}")
|
||||
set("${relocated_lib}" "${destination}/${symname}")
|
||||
break()
|
||||
endif()
|
||||
endforeach()
|
||||
endmacro()
|
||||
@@ -1,34 +0,0 @@
|
||||
# Offer relative symlink support via "cmake -E create_symlink"
|
||||
# For verbose, set COMMAND_ECHO to STDOUT in calling script
|
||||
macro(create_symlink filepath sympath)
|
||||
if(CMAKE_COMMAND)
|
||||
set(_cmake_command "${CMAKE_COMMAND}")
|
||||
elseif(CPACK_CMAKE_COMMAND)
|
||||
set(_cmake_command "${CPACK_CMAKE_COMMAND}")
|
||||
else()
|
||||
message(FATAL_ERROR "Sorry, can't resolve variable CMAKE_COMMAND")
|
||||
endif()
|
||||
|
||||
if(NOT IS_ABSOLUTE "${sympath}")
|
||||
message(FATAL_ERROR "Sorry, this command only works with absolute paths")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED COMMAND_ECHO)
|
||||
set(_command_echo NONE)
|
||||
else()
|
||||
set(_command_echo "${COMMAND_ECHO}")
|
||||
endif()
|
||||
|
||||
# Calculate the relative path
|
||||
file(RELATIVE_PATH reldir "${sympath}/../" "${filepath}")
|
||||
get_filename_component(symname "${sympath}" NAME)
|
||||
|
||||
# Calculate the working directory
|
||||
get_filename_component(sympath_parent "${sympath}" DIRECTORY)
|
||||
|
||||
# Create the symbolic link
|
||||
execute_process(COMMAND "${_cmake_command}" -E create_symlink "${reldir}" "${symname}"
|
||||
WORKING_DIRECTORY "${sympath_parent}"
|
||||
COMMAND_ECHO ${_command_echo}
|
||||
COMMAND_ERROR_IS_FATAL ANY)
|
||||
endmacro()
|
||||
@@ -1,21 +0,0 @@
|
||||
function(CreateTempFilePath)
|
||||
set(options CONFIG_SUFFIX)
|
||||
set(oneValueArgs OUTPUT_VAR TAG)
|
||||
set(multiValueArgs CONTENT)
|
||||
cmake_parse_arguments(TEMP "${options}" "${oneValueArgs}"
|
||||
"${multiValueArgs}" ${ARGN} )
|
||||
|
||||
# Use hash to create a unique identifier
|
||||
# for this file.
|
||||
string(SHA1 hashed_content "${TEMP_CONTENT}")
|
||||
|
||||
set(file_name "${CMAKE_BINARY_DIR}/${TEMP_TAG}_${hashed_content}")
|
||||
set(${TEMP_OUTPUT_VAR} "${file_name}" PARENT_SCOPE)
|
||||
if(TEMP_CONFIG_SUFFIX)
|
||||
set(file_name "${file_name}_$<CONFIG>")
|
||||
endif()
|
||||
|
||||
file(GENERATE OUTPUT "${file_name}"
|
||||
CONTENT "${TEMP_CONTENT}")
|
||||
|
||||
endfunction()
|
||||
@@ -1,31 +0,0 @@
|
||||
# This functions forwards a variable to
|
||||
# the install stage.
|
||||
# Parameters:
|
||||
# CONTENT: Variable content.
|
||||
# NAME: Variable name.
|
||||
# Options:
|
||||
# GENERATOR_EXPRESSION: Support generator expression for CONTENT.
|
||||
function(DEFINE_INSTALL_VAR)
|
||||
set(options GENERATOR_EXPRESSION)
|
||||
set(oneValueArgs NAME )
|
||||
set(multiValueArgs CONTENT)
|
||||
cmake_parse_arguments(VAR "${options}" "${oneValueArgs}"
|
||||
"${multiValueArgs}" ${ARGN} )
|
||||
|
||||
# install(CODE) does not support generator expression in ver<3.14
|
||||
if(VAR_GENERATOR_EXPRESSION AND ${CMAKE_VERSION} VERSION_LESS "3.14.0")
|
||||
include(CreateTempFile)
|
||||
if(CMAKE_CONFIGURATION_TYPES) # in case of multi-config generators like MSVC generators
|
||||
CreateTempFilePath(OUTPUT_VAR file_path TAG "${VAR_NAME}" CONTENT "${VAR_CONTENT}" CONFIG_SUFFIX)
|
||||
install(CODE "file(READ \"${file_path}_\${CMAKE_INSTALL_CONFIG_NAME}\" \"${VAR_NAME}\")")
|
||||
else()
|
||||
CreateTempFilePath(OUTPUT_VAR file_path TAG "${VAR_NAME}" CONTENT "${VAR_CONTENT}")
|
||||
install(CODE "file(READ \"${file_path}\" \"${VAR_NAME}\")")
|
||||
endif()
|
||||
else()
|
||||
if(VAR_GENERATOR_EXPRESSION)
|
||||
cmake_policy(SET CMP0087 NEW) # install(CODE) and install(SCRIPT) support generator expressions.
|
||||
endif()
|
||||
install(CODE "set(\"${VAR_NAME}\" \"${VAR_CONTENT}\")")
|
||||
endif()
|
||||
endfunction()
|
||||