Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix linux build and startup #400

Open
wants to merge 94 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
39bbc0b
fix: updated MacOS build files generated by Projucer
jmechnich Oct 13, 2021
496a389
fix: compilation fails on MacOS 11.3 with JUCE 6.0.8
jmechnich Oct 13, 2021
3211836
README.md: updated macOS build instructions
jmechnich Oct 13, 2021
f452347
Merge pull request #368 from jmechnich/fix-macos
RomanKubiak Oct 13, 2021
27f3ed5
Avoid some JUCE assertions.
Jun 19, 2021
9050927
Don't set the title of owner's editor if that is nullptr.
Jun 19, 2021
e608f0f
Fix crashes when a Lua chunk does not contain a function of the same …
Jun 19, 2021
354b38a
Allow UTF-8 characters in lua defiened JUCE Strings.
Jun 19, 2021
09a5370
Output the panel path name on the console.
Jun 19, 2021
abbcc0a
Fix assertion during Drag and Drop
Jun 25, 2021
8ace134
Whitespace fixes (mostly line endings)
Jun 25, 2021
0e2f51b
Fix deletion of the MIDI snapshot thread.
Jun 25, 2021
fc25af2
convert CtrlrLuaMethodEditor::menuItemSelected to swtich () {}
Jul 17, 2021
2f33e73
Fix spelling of saveAndCompileAllMethods
Jul 17, 2021
6059eed
Add missing breaks
Jul 17, 2021
f106f40
Use enum and switch for lua method context menu
Jul 23, 2021
5a86460
Use enum for submenu ids in CtrlrLuaMethodEditor
Jul 23, 2021
f11c29f
Fix a coding issue with JUCE
Sep 8, 2021
cc9fc13
Implement NotificationType values in Lua
Sep 8, 2021
1534dde
Convert a single Lua method to a file.
Nov 17, 2021
517f46d
Add a function to allow break into a C++ debugger from lua.
Dec 30, 2021
06b06fe
Added new libraries: libusb-1.0 lua-bitop-1.0.2 luabind luausb from D…
Jun 22, 2021
9a8a53c
Update build system
May 1, 2021
4e9584e
Update doxygen-config
May 2, 2021
20711fa
Create flawfinder-analysis.yml
keinstein Sep 5, 2021
57cd432
Create codeql-analysis.yml
keinstein Sep 5, 2021
471dddf
Configure luausb for Ctrlr
Dec 30, 2021
0de982b
Fix building against Lua 5.1
Dec 30, 2021
4c6b765
Fix build on Linux
Jan 1, 2022
3935936
Fix build system for Linux
Jan 2, 2022
303ad39
Fix use after free in CtrlrPanelCanvasLayer::CtrlrPanelCanvasLayer
Jan 2, 2022
940cf91
fix use after free in CtrlrLinux::getDefaultPanel
Jan 2, 2022
bd17f54
Update documentation
Jan 2, 2022
4c483f3
Print VST3 build dependency
Jan 2, 2022
d1f07f7
Add arch_detection.cpp makefile helper
Jan 2, 2022
7762a0f
fix crash mentioned in https://github.com/RomanKubiak/ctrlr/issues/29…
Jan 16, 2022
f8eeccd
configure luabind during build.sh
Jan 2, 2022
3357d8b
Ignore Cmake generated files.
Jan 16, 2022
0ea8126
final codeql and disable it (not enough diskspace)
Jan 16, 2022
cca0266
Add new build-Configuration: Release-sanitized for using Address Sant…
Jan 23, 2022
d0a24ac
Backport https://github.com/juce-framework/JUCE/commit/06db7f074e595f…
Jan 23, 2022
99ba30a
Fix building when luabind is not configured yet.
Jan 24, 2022
3cf1b76
Fix building when luabind is not configured yet.
Jan 24, 2022
40794fc
Remove unused luabind doc Makefile
Jan 29, 2022
396827c
Collect snippets only, if they have been changed.
Jan 29, 2022
b5dbfee
Backport Copy/Paste fixes from upstream
Jan 29, 2022
c4c0022
Merge commit 'b5dbfee3915a77edc90fa74cc5ca57a2f8e63be3' into fix_linu…
Jan 29, 2022
a2e52a6
Add virtual destructor to CtrlrNative().
Jan 29, 2022
8a804c8
Merge pull request #1 from keinstein/fix_linux_build_and_startup
damiensellier Feb 6, 2022
485edc2
replace unconditional (C-style) cast by type-safe casts
keinstein Feb 19, 2022
6de6629
start adding kiosk mode for touch based devices
RomanKubiak May 2, 2021
b081322
Mac build fixes
Jun 24, 2022
c6d4924
Build system fixes
keinstein Dec 21, 2022
a4399ff
First experiments with external libraries
keinstein Dec 21, 2022
98e6300
rename libusb
keinstein Dec 23, 2022
b5e348f
Upgrade libusb to 1.0.26
keinstein Dec 23, 2022
e51e390
Use external lua
keinstein Jan 24, 2023
e47b8be
Search for lua bitop.
keinstein Jan 24, 2023
58c88cf
check for luabind
keinstein Jan 24, 2023
c59fc3f
use external luausb
keinstein Jan 24, 2023
21a1180
move debug variable to top of the file
keinstein Jan 24, 2023
59bf6a6
debian build
keinstein Jan 29, 2023
d350391
install dependencies before starting build
keinstein Jan 29, 2023
5f4c1e1
debuild is part of devscripts
keinstein Jan 29, 2023
167979a
inspect directories
keinstein Jan 29, 2023
ba1bce9
Add rudimentary debian build information
keinstein Jan 29, 2023
820c25f
install debhelper-compat
keinstein Jan 29, 2023
b2ae73f
add dependencies to debian
keinstein Jan 29, 2023
500a565
remove garbage
keinstein Jan 29, 2023
4ac7d9d
lower cmake dependencies
keinstein Jan 29, 2023
666486c
add FindLuabind.cmake
keinstein Jan 29, 2023
ade193f
depend on libxrandr-dev
keinstein Jan 29, 2023
f0fb025
depend on libxinerama-dev
keinstein Jan 29, 2023
2aed97c
depend on libxcursor-dev
keinstein Jan 29, 2023
98058a0
depend on libudev-dev
keinstein Jan 29, 2023
806db0d
add many dependencies
keinstein Jan 29, 2023
b71228e
inspect build system
keinstein Jan 29, 2023
2f79d3d
inspect build system
keinstein Jan 29, 2023
fc2f8fb
inspect build system
keinstein Jan 29, 2023
6e1a420
inspect build system
keinstein Jan 29, 2023
337d87b
Nullify LIB_SFRAME if sframe is not found
keinstein Jan 29, 2023
711bc1e
github actions: save ubuntu package as artifact
keinstein Jan 29, 2023
9c7db6f
fix artifact
keinstein Jan 29, 2023
74e6a95
move artifact dir into subdir
keinstein Jan 29, 2023
f8e3d24
Try to make a snapshot release
keinstein Jan 30, 2023
f236b4e
github action for windows, MacOS and Linux
keinstein Jan 30, 2023
0120918
fix build matrix
keinstein Jan 30, 2023
83d6676
start with empty matrix
keinstein Jan 30, 2023
0990283
nochmal getestet
keinstein Jan 30, 2023
521a93e
eingerückt
keinstein Jan 30, 2023
8c3a2cf
remove a comma
keinstein Jan 30, 2023
ef7e967
fix indentation
keinstein Jan 30, 2023
f5f6fc6
comment out array variables
keinstein Jan 30, 2023
dc172f0
Update direct-build.yml
keinstein Jan 30, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
77 changes: 77 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ codeql ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ codeql ]
#schedule:
# - cron: '26 14 * * 4'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'cpp' ]
# language: [ 'cpp', 'java', 'python' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed

steps:
- name: Install xmllint
run: sudo apt-get install -y libasound2-dev libjack-jackd2-dev binutils-dev libiberty-dev zlib1g-dev libx11-dev libusb-1.0-0-dev liblua5.1-dev liblua5.1-bitop-dev libboost-dev cmake libasound2-dev ladspa-sdk libcurl4-openssl-dev libfreetype6-dev libx11-dev libxcomposite-dev libxcursor-dev libxcursor-dev libxext-dev libxinerama-dev libxrandr-dev libxrender-dev libwebkit2gtk-4.0-dev libglu1-mesa-dev mesa-common-dev

- name: Checkout repository
uses: actions/checkout@v2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
# - name: Autobuild
# uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

- run: |
sed -ie '/^VST3\? : / s/^/# /' Builds/LinuxMakefile/Makefile
grep VST Builds/LinuxMakefile/Makefile
if g++ Builds/LinuxMakefile/make_helpers/arch_detection.cpp ; then echo "häh?" ; else echo ok; fi
( cd Builds/LinuxMakefile && ./build.sh Release printlinkcommand Standalone )

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
51 changes: 51 additions & 0 deletions .github/workflows/debuild.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Debuild

on:
push:
pull_request:

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release

jobs:
build:
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
# You can convert this to a matrix build if you need cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: install build-essential
run: |
sudo apt-get update
sudo apt-get install -y build-essential devscripts debhelper-compat cmake liblua5.1-bitop-dev libluabind-dev liblua5.1-dev libusb-1.0-0-dev libxrandr-dev libxinerama-dev libxcursor-dev libudev-dev libcurlpp-dev libasound2-dev libwebkit2gtk-4.0-dev libgtk-3-dev binutils-dev libiberty-dev

- name: inspect
run: |
dpkg -L binutils-dev

- name: Build Debian Package
run: debuild

- name: move artifacts
run: |
mkdir -p artifacts
mv ../ctrlr*.* artifacts

- name: Save debian packages
uses: actions/upload-artifact@v3
with:
name: ctrlr-ubuntu
path: artifacts/*

- name: Update latest release
uses: pyTooling/Actions/releaser@main
with:
tag: ${{ github.ref_name }}-snapshot
rm: true
token: ${{ secrets.GITHUB_TOKEN }}
files: artifacts/*

155 changes: 155 additions & 0 deletions .github/workflows/direct-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
name: Direct Build

on:
push:
pull_request:

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release

jobs:
build:
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
# You can convert this to a matrix build if you need cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
name: ${ { matrix.name } }
runs-on: ${ { matrix.os } }
strategy:
fail-fast: false
matrix:
include:
- name: "Windows Latest MSVC"
artifact: "Windows-MSVC.tar.xz"
os: windows-latest
build_type: "Release"
cc: "cl"
cxx: "cl"
environment_script: "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvars64.bat"
- name: "Windows Latest MinGW"
artifact: "Windows-MinGW.tar.xz"
os: windows-latest
build_type: "Release"
cc: "gcc"
cxx: "g++"
- name: "Ubuntu Latest GCC"
artifact: "Linux.tar.xz"
os: ubuntu-latest
build_type: "Release"
cc: "gcc"
cxx: "g++"
- name: "macOS Latest Clang"
artifact: "macOS.tar.xz"
os: macos-latest
build_type: "Release"
cc: "clang"
cxx: "clang++"

steps:
- uses: actions/checkout@v3

#-uses: actions/cache@v3 <===== YOU DO NOT NEED THIS!

# Install latest CMake and Ninja.
- uses: lukka/get-cmake@latest
# Or pin to a specific CMake version:
# lukka/[email protected]

# Restore from cache the previously built ports. If a "cache miss" occurs,
# then vcpkg is bootstrapped. Since a the vcpkg.json is being used later on
# to install the packages when `run-cmake` runs, no packages are installed at
# this time.
- name: Restore artifacts, or setup vcpkg (do not install any package)
uses: lukka/run-vcpkg@v10 # Always specify the specific _version_ of the
# action you need, `v10` in this case to stay up
# to date with fixes on the v10 branch.
#with:
# This is the default location of the directory containing vcpkg sources.
# Change it to the right location if needed.
# vcpkgDirectory: '${{ github.workspace }}/vcpkg'

# If not using a submodule for vcpkg sources, this specifies which commit
# id must be checkout from a Git repo. It must not set if using a submodule
# for vcpkg.
# vcpkgGitCommitId: '${{ matrix.vcpkgCommitId }}'

# This is the glob expression used to locate the vpkg.json and add its
# hash to the cache key. Change it to match a single manifest file you want
# to use.
# vcpkgJsonGlob: '**/vcpkg.json'

# This is needed to run `vcpkg install` command (after vcpkg is built) in
# the directory where vcpkg.json has been located. Default is false,
# It is highly suggested to let `run-cmake` to run vcpkg (i.e. `false`)
# (i.e. let CMake run `vcpkg install`) using the vcpkg.cmake toolchain.
# runVcpkgInstall: true

- name: Run CMake consuming CMakePresets.json and vcpkg.json by mean of vcpkg.
uses: lukka/run-cmake@v10
with:
# This is the default path to the CMakeLists.txt along side the
# CMakePresets.json. Change if you need have CMakeLists.txt and CMakePresets.json
# located elsewhere.
# cmakeListsTxtPath: '${{ github.workspace }}/CMakeLists.txt'

# This is the name of the CMakePresets.json's configuration to use to generate
# the project files. This configuration leverages the vcpkg.cmake toolchain file to
# run vcpkg and install all dependencies specified in vcpkg.json.
configurePreset: 'ninja-multi-vcpkg'

# Additional arguments can be appended to the cmake command.
# This is useful to reduce the number of CMake's Presets since you can reuse
# an existing preset with different variables.
#configurePresetAdditionalArgs: ['-DENABLE_YOUR_FEATURE=1']

# This is the name of the CMakePresets.json's configuration to build the project.
buildPreset: 'ninja-multi-vcpkg'

# Additional arguments can be appended when building, for example to specify the
# configuration to build.
# This is useful to reduce the number of CMake's Presets you need in CMakePresets.json.
#buildPresetAdditionalArgs: ['--config Release']

# This is the name of the CMakePresets.json's configuration to test the project with.
testPreset: 'ninja-multi-vcpkg'

# Additional arguments can be appended when testing, for example to specify the config
# to test.
# This is useful to reduce the number of CMake's Presets you need in CMakePresets.json.
#testPresetAdditionalArgs: ['--config Release']

#env:
# VCPKG_DEFAULT_TRIPLET: ${{ matrix.triplet }} # [OPTIONAL] Define the vcpkg's triplet
# you want to enforce, otherwise the default one for the hosting system will be
# automatically choosen (x64 is the default on all platforms, e.g. x64-osx).
# - name: install build-essential
# run: |
# sudo apt-get update
# sudo apt-get install -y build-essential devscripts debhelper-compat cmake liblua5.1-bitop-dev libluabind-dev liblua5.1-dev libusb-1.0-0-dev libxrandr-dev libxinerama-dev libxcursor-dev libudev-dev libcurlpp-dev libasound2-dev libwebkit2gtk-4.0-dev libgtk-3-dev binutils-dev libiberty-dev

# - name: inspect
# run: |
# dpkg -L binutils-dev

# - name: Build Debian Package
# run: debuild

# - name: move artifacts
# run: |
# mkdir -p artifacts
# mv ../ctrlr*.* artifacts

# - name: Save debian packages
# uses: actions/upload-artifact@v3
# with:
# name: ctrlr-ubuntu
# path: artifacts/*

# - name: Update latest release
# uses: pyTooling/Actions/releaser@main
# with:
# tag: ${{ github.ref_name }}-snapshot
# rm: true
# token: ${{ secrets.GITHUB_TOKEN }}
# files: artifacts/*

38 changes: 38 additions & 0 deletions .github/workflows/flawfinder-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: flawfinder

on:
push:
branches: [ master ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
schedule:
- cron: '18 14 * * 3'

jobs:
flawfinder:
name: Flawfinder
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: flawfinder_scan
uses: david-a-wheeler/flawfinder@8e4a779ad59dbfaee5da586aa9210853b701959c
with:
arguments: '--sarif ./'
output: 'flawfinder_results.sarif'

- name: Upload analysis results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v1
with:
sarif_file: ${{github.workspace}}/flawfinder_results.sarif
20 changes: 14 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
Source/Core/CtrlrRevision.h
Source/Misc/boost/**
!Source/Misc/boost/boost.zip
Source/Core/CtrlrRevision.h
Source/Misc/boost/**
!Source/Misc/boost/boost.zip

Builds/*/*/*
Builds/*/*/*
!Builds/LinuxMakefile/Makefile
!Builds/LinuxMakefile/build.sh
!Builds/LinuxMakefile/pchbuild.mk
!Builds/LinuxMakefile/make_helpers/*
!Builds/LinuxMakefile/make_helpers/**

CMakeFiles
CMakeCache.txt
Cmakefiles
CMakeFiles
CMakeCache.txt
*.cmake
!cmake/*
Loading