Add experimental Windows build.
This commit is contained in:
parent
db7a476a1d
commit
b367a9d895
17
README.org
17
README.org
|
|
@ -47,20 +47,27 @@ SampleHive let's you manage your audio samples in a nice and simple way, just ad
|
||||||
:END:
|
:END:
|
||||||
On Arch based distributions,
|
On Arch based distributions,
|
||||||
|
|
||||||
#+begin_example
|
#+begin_src
|
||||||
sudo pacman -S wxgtk3 wxsvg sqlite taglib yaml-cpp libsndfile spdlog
|
sudo pacman -S wxgtk3 sqlite taglib yaml-cpp libsndfile spdlog
|
||||||
#+end_example
|
#+end_src
|
||||||
|
|
||||||
On Debian, Ubuntu and distributions based the on two,
|
On Debian, Ubuntu and distributions based the on two,
|
||||||
|
|
||||||
#+begin_example
|
#+begin_src
|
||||||
sudo apt install libwxbase3.0-dev libwxgtk-media3.0-gtk3-dev libwxgtk3.0-gtk3-dev wx3.0-headers libsqlite3-dev libyaml-cpp-dev libtagc0-dev libtag1-dev libtagc0 libexif-dev libpango1.0-dev libsndfile1-dev libspdlog-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-bad1.0-dev
|
sudo apt install libwxbase3.0-dev libwxgtk-media3.0-gtk3-dev libwxgtk3.0-gtk3-dev wx3.0-headers libsqlite3-dev libyaml-cpp-dev libtagc0-dev libtag1-dev libtagc0 libexif-dev libpango1.0-dev libsndfile1-dev libspdlog-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-bad1.0-dev
|
||||||
#+end_example
|
#+end_src
|
||||||
|
|
||||||
You might also need to install =git=, =cmake=, =meson= and =g++= as well, if you don't already have them installed in order to build SampleHive.
|
You might also need to install =git=, =cmake=, =meson= and =g++= as well, if you don't already have them installed in order to build SampleHive.
|
||||||
|
|
||||||
*NOTE:* On Debian and Debian based distributions you also have to install =libwxgtk-media3.0-dev=
|
*NOTE:* On Debian and Debian based distributions you also have to install =libwxgtk-media3.0-dev=
|
||||||
|
|
||||||
|
*Experimental Windows Build*:
|
||||||
|
If you want to try out =SampleHive= on =Windows=, you can use the [[https://www.msys2.org/][MSYS2]] environment and [[https://odsn.net/projects/mingw/][MinGW]] compiler for =Windows=. After setting up =MSYS2= and =MinGW= install the following dependencies using the package manager =pacman=.
|
||||||
|
|
||||||
|
#+begin_src
|
||||||
|
pacman -S mingw-w64-x86_64-wxmsw3.1 mingw-w64-x86_64-sqlite mingw-w64-x86_64-taglib mingw-w64-x86_64-yaml-cpp mingw-w64-x86_64-libsndfile mingw-w64-x86_64-spdlog mingw-w64-x86_64-meson mingw-w64-x86_64-cmake git
|
||||||
|
#+end_src
|
||||||
|
|
||||||
** How to build SampleHive?
|
** How to build SampleHive?
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:CUSTOM_ID: how-to-build-samplehive
|
:CUSTOM_ID: how-to-build-samplehive
|
||||||
|
|
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 4.2 KiB |
12
meson.build
12
meson.build
|
|
@ -120,6 +120,10 @@ wx_opts.add_cmake_defines({'CMAKE_POSITION_INDEPENDENT_CODE': 'ON',
|
||||||
'wxUSE_LIBSDL': 'OFF',
|
'wxUSE_LIBSDL': 'OFF',
|
||||||
'wxUSE_MEDIACTRL': 'ON'})
|
'wxUSE_MEDIACTRL': 'ON'})
|
||||||
|
|
||||||
|
if host_sys == 'windows'
|
||||||
|
wx_opts.set_override_option('b_lto', 'false')
|
||||||
|
endif
|
||||||
|
|
||||||
taglib_opts = cmake.subproject_options()
|
taglib_opts = cmake.subproject_options()
|
||||||
taglib_opts.add_cmake_defines({'CMAKE_POSITION_INDEPENDENT_CODE': 'ON',
|
taglib_opts.add_cmake_defines({'CMAKE_POSITION_INDEPENDENT_CODE': 'ON',
|
||||||
'CMAKE_INSTALL_PREFIX': prefix,
|
'CMAKE_INSTALL_PREFIX': prefix,
|
||||||
|
|
@ -200,6 +204,14 @@ if not wx.found()
|
||||||
wx_core = wx_subproject.dependency('wxcore')
|
wx_core = wx_subproject.dependency('wxcore')
|
||||||
wx_base = wx_subproject.dependency('wxbase')
|
wx_base = wx_subproject.dependency('wxbase')
|
||||||
wx = [wx_media, wx_core, wx_base]
|
wx = [wx_media, wx_core, wx_base]
|
||||||
|
|
||||||
|
if host_sys == 'windows'
|
||||||
|
win = import('windows')
|
||||||
|
wx_inc = wx_subproject.include_directories('wxbase')
|
||||||
|
rc_file = win.compile_resources('src/GUI/Resources.rc', include_directories: wx_inc)
|
||||||
|
|
||||||
|
src += rc_file
|
||||||
|
endif
|
||||||
else
|
else
|
||||||
wxconfig = find_program(['wx-config', 'wx-config-gtk3', 'wx-config-3.1'])
|
wxconfig = find_program(['wx-config', 'wx-config-gtk3', 'wx-config-3.1'])
|
||||||
wx_modules = ['media', 'std']
|
wx_modules = ['media', 'std']
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@
|
||||||
#include <wx/defs.h>
|
#include <wx/defs.h>
|
||||||
#include <wx/gdicmn.h>
|
#include <wx/gdicmn.h>
|
||||||
#include <wx/stringimpl.h>
|
#include <wx/stringimpl.h>
|
||||||
|
#include <wx/settings.h>
|
||||||
|
|
||||||
cSettings::cSettings(wxWindow *window)
|
cSettings::cSettings(wxWindow *window)
|
||||||
: wxDialog(window, wxID_ANY, "cSettings", wxDefaultPosition,
|
: wxDialog(window, wxID_ANY, "cSettings", wxDefaultPosition,
|
||||||
|
|
@ -364,7 +365,7 @@ void cSettings::OnChangeFontSize(wxSpinEvent& event)
|
||||||
int font_size = m_pFontSize->GetValue();
|
int font_size = m_pFontSize->GetValue();
|
||||||
|
|
||||||
if (m_pFontType->GetStringSelection() == "System default")
|
if (m_pFontType->GetStringSelection() == "System default")
|
||||||
m_Font = wxSystemSettings::GetFont(wxSYS_SYSTEM_FONT);
|
m_Font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
|
||||||
|
|
||||||
m_Font.SetPointSize(font_size);
|
m_Font.SetPointSize(font_size);
|
||||||
|
|
||||||
|
|
@ -381,7 +382,7 @@ void cSettings::LoadDefaultConfig()
|
||||||
{
|
{
|
||||||
SampleHive::cSerializer serializer;
|
SampleHive::cSerializer serializer;
|
||||||
|
|
||||||
wxFont sys_font = wxSystemSettings::GetFont(wxSYS_SYSTEM_FONT);
|
wxFont sys_font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
|
||||||
wxString system_font = sys_font.GetFaceName();
|
wxString system_font = sys_font.GetFaceName();
|
||||||
int system_font_size = sys_font.GetPointSize();
|
int system_font_size = sys_font.GetPointSize();
|
||||||
|
|
||||||
|
|
@ -450,7 +451,7 @@ void cSettings::SetCustomFont()
|
||||||
{
|
{
|
||||||
SampleHive::cSerializer serializer;
|
SampleHive::cSerializer serializer;
|
||||||
|
|
||||||
wxFont sys_font = wxSystemSettings::GetFont(wxSYS_SYSTEM_FONT);
|
wxFont sys_font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
|
||||||
std::string system_font = sys_font.GetFaceName().ToStdString();
|
std::string system_font = sys_font.GetFaceName().ToStdString();
|
||||||
int system_font_size = sys_font.GetPointSize();
|
int system_font_size = sys_font.GetPointSize();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
#define wxUSE_RC_MANIFEST 1
|
||||||
|
#define wxUSE_DPI_AWARE_MANIFEST 2
|
||||||
|
|
||||||
|
#include <wx/msw/wx.rc>
|
||||||
|
|
||||||
|
ApplicationIcon ICON "../../assets/icons/icon-hive_32x32.ico"
|
||||||
|
|
@ -27,6 +27,7 @@
|
||||||
|
|
||||||
#include <wx/colour.h>
|
#include <wx/colour.h>
|
||||||
#include <wx/filename.h>
|
#include <wx/filename.h>
|
||||||
|
#include <wx/settings.h>
|
||||||
|
|
||||||
#include <yaml-cpp/emittermanip.h>
|
#include <yaml-cpp/emittermanip.h>
|
||||||
#include <yaml-cpp/node/parse.h>
|
#include <yaml-cpp/node/parse.h>
|
||||||
|
|
@ -37,7 +38,7 @@ namespace SampleHive {
|
||||||
{
|
{
|
||||||
std::ifstream ifstrm(static_cast<std::string>(CONFIG_FILEPATH));
|
std::ifstream ifstrm(static_cast<std::string>(CONFIG_FILEPATH));
|
||||||
|
|
||||||
wxFont font = wxSystemSettings::GetFont(wxSYS_SYSTEM_FONT);
|
wxFont font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
|
||||||
std::string system_font_face = font.GetFaceName().ToStdString();
|
std::string system_font_face = font.GetFaceName().ToStdString();
|
||||||
int system_font_size = font.GetPointSize();
|
int system_font_size = font.GetPointSize();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue