From b367a9d895581723a1b327f480cbbf0b3d220910 Mon Sep 17 00:00:00 2001 From: apoorv569 Date: Tue, 15 Feb 2022 22:54:44 +0530 Subject: [PATCH] Add experimental Windows build. --- README.org | 17 ++++++++++++----- assets/icons/icon-hive_32x32.ico | Bin 0 -> 4286 bytes meson.build | 12 ++++++++++++ src/GUI/Dialogs/Settings.cpp | 7 ++++--- src/GUI/Resources.rc | 6 ++++++ src/Utility/Serialize.cpp | 3 ++- 6 files changed, 36 insertions(+), 9 deletions(-) create mode 100644 assets/icons/icon-hive_32x32.ico create mode 100644 src/GUI/Resources.rc diff --git a/README.org b/README.org index 8b06e46..b710dfd 100644 --- a/README.org +++ b/README.org @@ -47,20 +47,27 @@ SampleHive let's you manage your audio samples in a nice and simple way, just ad :END: On Arch based distributions, -#+begin_example -sudo pacman -S wxgtk3 wxsvg sqlite taglib yaml-cpp libsndfile spdlog -#+end_example +#+begin_src +sudo pacman -S wxgtk3 sqlite taglib yaml-cpp libsndfile spdlog +#+end_src 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 -#+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. *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? :PROPERTIES: :CUSTOM_ID: how-to-build-samplehive diff --git a/assets/icons/icon-hive_32x32.ico b/assets/icons/icon-hive_32x32.ico new file mode 100644 index 0000000000000000000000000000000000000000..98186f9b10082caee84de9e8ffb3f4ccc120aa3a GIT binary patch literal 4286 zcmc&%Yitx{6rG9*i5fBf@P~82T!d-$O6jIPBp^Sphn?LlwgST5@oygCpEXxg&BpDRAQplRV zF+YfxR&h8ScS?$O-nFn3&UG=kHpJj=i$UBJgWMj2wmk-YXAJ)KV~}K}UlhgBm+rp) zBT-gYRn|1cZ5;+GI)O>=0gm?pcNZXi1gM_?`avLY81TH@l9WAqFQFD(Ke8Z@)`gT) z(iT05@^^spcLCc@;;<{lVJ{#bAlz=i|0Ph>a~`tSpP+gL^MNm``hI6)bKit*z=W+p zDSemi046dA(!se05I?ju@RA0>BY-d33DV$a;(p8Za8MMbLR8ehN?U)zxXmzQ{1%G` zbFg&)_T5y6lm>ba)!+~?`B)Na&Es*pe}1m`Wo2bIOR6_kF?Wkm{5CMQEfsXkTv!XP z2iL(x8n6#EuE7^T=or;u`w>Wrnjj7C{Wk}y&D|8fD+S%RR`gcKi`QR7(FS1jIxEJk zw|I;v4yD^IFR&LY_oZs^Ibk0KYEF66}1NOj__hUPcS)N;SZCQsX?#gh z7HQKO;tgk#n0Ct2C`dDdeaqZA2hN4-TD*y3#X0hjhNAgL@X%|(gA~JF2bd4np=hI3 zgNdXUdw}~;`;_{x>qpi-Nx9q8*whR6$f}yC-`9)jF_`$(U!`UiX(kaq=fJsePV9Ha zm{j|s;qp#39$4Ck`Nx;M>t+-~~Ka9_FrG$Emb7Q{^U;YOw72PPB)oBcAhRI>rO3M%IL(>CPFP=q} z?7_{a`5BOOyWK<5`1Cv&OWG$JPkfKYO#EJJUU1Ds!e<;FR3-AiVyVGbC& z;5Q6i0<#wEMfSirsuTN#edFG1K&pE(PBmMe#x`@;^{=Z}wkDtc0T%w5RQ@S^o*P^{ z6Q63yeZ|_2AbhTOVRJv+YS3_broiqG!x0F>84SZ!6^1($MrCyvB1fp6XU?DG^FevX z*Mf#EI0q$9L{U0Dit?FJ*qWlSKNW@ZnJC=PMj_5x1X1z)2cNuG%=*vFRsV1+t(&d> zO&7`M%QExlW69&`47?CY7?EXwlY zoaWCkd~Ie$$JM6pis1^Vi) z^8B&A+LM>(4{6YlslknY{xTQhbk+R_`FCA@_8*?DnfYgXZ0*1FvlVmObJ~A}b{wTy zsQmB#D_aiKvpMfS721E2&I_`|y4-b=svmGRExD%sx4&hVx&OA??YCZT-E7a(9)jLK ztj4tb32snt6HuVs1D3{gXNH93f3}djAF@ zg8*S5#Q+#)6d)-SAT9{M)7s}!(M{hJ1rb3Qz(Icw%#8H;Zn}ozpZj #include #include +#include cSettings::cSettings(wxWindow *window) : wxDialog(window, wxID_ANY, "cSettings", wxDefaultPosition, @@ -364,7 +365,7 @@ void cSettings::OnChangeFontSize(wxSpinEvent& event) int font_size = m_pFontSize->GetValue(); 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); @@ -381,7 +382,7 @@ void cSettings::LoadDefaultConfig() { 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(); int system_font_size = sys_font.GetPointSize(); @@ -450,7 +451,7 @@ void cSettings::SetCustomFont() { 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(); int system_font_size = sys_font.GetPointSize(); diff --git a/src/GUI/Resources.rc b/src/GUI/Resources.rc new file mode 100644 index 0000000..bc627c7 --- /dev/null +++ b/src/GUI/Resources.rc @@ -0,0 +1,6 @@ +#define wxUSE_RC_MANIFEST 1 +#define wxUSE_DPI_AWARE_MANIFEST 2 + +#include + +ApplicationIcon ICON "../../assets/icons/icon-hive_32x32.ico" \ No newline at end of file diff --git a/src/Utility/Serialize.cpp b/src/Utility/Serialize.cpp index 0852d2f..251ab39 100644 --- a/src/Utility/Serialize.cpp +++ b/src/Utility/Serialize.cpp @@ -27,6 +27,7 @@ #include #include +#include #include #include @@ -37,7 +38,7 @@ namespace SampleHive { { std::ifstream ifstrm(static_cast(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(); int system_font_size = font.GetPointSize();