Browse Source

Continue audacity building; Only 1 step needed for win64

Signed-off-by: falkTX <falktx@falktx.com>
pull/10/head
falkTX 4 years ago
parent
commit
25347ab5b6
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
8 changed files with 186 additions and 54 deletions
  1. +23
    -21
      bootstrap-audacity.sh
  2. +24
    -33
      build-audacity.sh
  3. +0
    -0
      patches/audacity/02_build-fix-pt2.patch
  4. +27
    -0
      patches/audacity/03_build-fix-pt3.patch
  5. +64
    -0
      patches/audacity/04_build-fix-pt4.patch
  6. +26
    -0
      patches/audacity/05_build-fix-pt5.patch
  7. BIN
      patches/audacity/ImageCache.png
  8. +22
    -0
      patches/audacity/ImageCache.url.txt

+ 23
- 21
bootstrap-audacity.sh View File

@@ -32,42 +32,44 @@ source setup/versions.sh
# ---------------------------------------------------------------------------------------------------------------------
# wxwidgets

# wxwidgets_args+=" -DwxWidgets_USE_REL_AND_DBG=no"
# wxwidgets_args+=" -Daudacity_use_pch=no"

# override PawPaw default
wxwidgets_args="-DBUILD_SHARED_LIBS=ON"

# win32
wxwidgets_args+=" -DwxUSE_ACCESSIBILITY=YES"
wxwidgets_args+=" -DwxBUILD_PRECOMP=YES"

# common flags
wxwidgets_args+=" -DwxBUILD_CXX_STANDARD=14"
wxwidgets_args+=" -DwxBUILD_MONOLITHIC=ON"
wxwidgets_args+=" -DwxBUILD_OPTIMISE=ON"
wxwidgets_args+=" -DwxBUILD_SHARED=ON"
wxwidgets_args+=" -DwxUSE_EXPAT=builtin"
wxwidgets_args+=" -DwxUSE_LIBJPEG=builtin"
wxwidgets_args+=" -DwxUSE_LIBPNG=builtin"
wxwidgets_args+=" -DwxUSE_LIBTIFF=builtin"
wxwidgets_args+=" -DwxUSE_REGEX=builtin"
wxwidgets_args+=" -DwxUSE_ZLIB=builtin"
# wxwidgets_args+=" -D"

# custom wxwidgets flags
# wxwidgets_args+=" -DwxBUILD_MONOLITHIC=ON"
# wxwidgets_args+=" -DwxBUILD_PRECOMP=OFF"
# wxwidgets_args+=" -DwxBUILD_OPTIMISE=ON"
wxwidgets_args+=" -DwxBUILD_SHARED=ON"
# win32 only
wxwidgets_args+=" -DwxUSE_WINSOCK2=yes"
# these match upstream cmake setup
if [ "${MACOS}" -eq 1 ]; then
wxwidgets_args+=" -DwxUSE_ACCESSIBILITY=YES"
wxwidgets_args+=" -DwxBUILD_PRECOMP=NO"
elif [ "${WIN32}" -eq 1 ]; then
wxwidgets_args+=" -DwxUSE_ACCESSIBILITY=YES"
wxwidgets_args+=" -DwxBUILD_PRECOMP=YES"
else
wxwidgets_args+=" -DwxUSE_ACCESSIBILITY=NO"
wxwidgets_args+=" -DwxBUILD_PRECOMP=YES"
fi

# needed for mingw
if [ "${WIN32}" -eq 1 ]; then
wxwidgets_args+=" -DwxUSE_WINSOCK2=yes"
win32_target=_WIN32_WINNT_WIN7
export EXTRA_CXXFLAGS="-DWINVER=${win32_target} -D_WIN32_WINNT=${win32_target} -D_WIN32_IE=${win32_target}"
fi

# set(wxSOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
# set(wxBINARY_DIR ${CMAKE_BINARY_DIR})
# set(wxOUTPUT_DIR ${wxBINARY_DIR}/lib)
# needed?
# set(wxVERSION 3.1.3)
# set(wxCOPYRIGHT "1992-2019 wxWidgets")

win32_target=_WIN32_WINNT_WIN7
export EXTRA_CXXFLAGS="-DWINVER=${win32_target} -D_WIN32_WINNT=${win32_target} -D_WIN32_IE=${win32_target}"

download wxWidgets "audacity-fixes-3.1.3" "https://github.com/audacity/wxWidgets.git" "" "git"
build_cmake wxWidgets "audacity-fixes-3.1.3" "${wxwidgets_args}"



+ 24
- 33
build-audacity.sh View File

@@ -28,64 +28,55 @@ source setup/versions.sh

# ---------------------------------------------------------------------------------------------------------------------

# audacity_repo="https://github.com/jackaudio/jack2.git"
# audacity_prefix="${PAWPAW_PREFIX}-audacity"

# common flags
audacity_args=""
audacity_args+=" -DwxWidgets_USE_REL_AND_DBG=no"
audacity_args+=" -Daudacity_use_pch=no"
audacity_args+=" -DwxWidgets_EXCLUDE_COMMON_LIBRARIES=YES"
audacity_args+=" -DwxWidgets_FIND_COMPONENTS=mono" # FIXME needs forcing
audacity_args+=" -DwxWidgets_USE_REL_AND_DBG=NO"

audacity_args+=" -Daudacity_use_pch=no"
audacity_args+=" -Daudacity_use_libflac=system"
audacity_args+=" -Daudacity_use_libogg=system"
audacity_args+=" -Daudacity_use_libsndfile=system"
audacity_args+=" -Daudacity_use_libvorbis=system"
audacity_args+=" -Daudacity_use_wxwidgets=system"

# TODO
# TODO build these locally
audacity_args+=" -Daudacity_use_expat=local"
audacity_args+=" -Daudacity_use_lame=local"
audacity_args+=" -Daudacity_use_libsoxr=local"
audacity_args+=" -Daudacity_use_portaudio-v19=local"
audacity_args+=" -Daudacity_use_sqlite=local"
audacity_args+=" -Daudacity_use_libid3tag=local"
audacity_args+=" -Daudacity_use_libmad=local"
audacity_args+=" -Daudacity_use_libnyquist=local"
audacity_args+=" -Daudacity_use_libsbsms=local"
audacity_args+=" -Daudacity_use_libsoxr=local"
audacity_args+=" -Daudacity_use_libvamp=local"
audacity_args+=" -Daudacity_use_lv2=local"
audacity_args+=" -Daudacity_use_portaudio-v19=local"
audacity_args+=" -Daudacity_use_portmidi=local"
audacity_args+=" -Daudacity_use_portmixer=local"
audacity_args+=" -Daudacity_use_portsmf=local"
audacity_args+=" -Daudacity_use_libsbsms=local"
audacity_args+=" -Daudacity_use_soundtouch=local"
audacity_args+=" -Daudacity_use_sqlite=local"
audacity_args+=" -Daudacity_use_twolame=local"

# optional
# audacity_args+=" -Daudacity_use_ffmpeg=local"

# FIXME
audacity_args+=" -Daudacity_use_ffmpeg=loaded"
audacity_args+=" -Daudacity_use_pa_jack=off"

# audacity_args+=" -DwxWidgets_ROOT_DIR=${PAWPAW_PREFIX}"

# audacity_args+=" -DwxWidgets_FOUND=BOOL:TRUE"
# audacity_args+=" -DwxWidgets_INCLUDE_DIRS_NO_SYSTEM"

# audacity_args+=" -DwxWidgets_INCLUDE_DIRS=${PAWPAW_PREFIX}/include;${PAWPAW_PREFIX}/lib/gcc_x64_dll/mswu"
# audacity_args+=" -DwxWidgets_LIBRARIES='winmm comctl32 uuid oleacc uxtheme rpcrt4 shlwapi version wsock32'"
# audacity_args+=" -DwxWidgets_LIBRARY_DIRS=${PAWPAW_PREFIX}/lib/gcc_x64_dll"
# audacity_args+=" -Dtoolkit=mswu"
# audacity_args+=" -D"
# audacity_args+=" -D"

audacity_args+=" -DwxWidgets_FIND_STYLE=win32" # must be forced in the cmake file
audacity_args+=" -DwxWidgets_ROOT_DIR=${PAWPAW_PREFIX}"
audacity_args+=" -DwxWidgets_LIB_DIR=${PAWPAW_PREFIX}/lib/gcc_x64_dll"
audacity_args+=" -DwxWidgets_CONFIGURATION=mswu"
audacity_args+=" -DWX_ROOT_DIR=${PAWPAW_PREFIX}"
if [ "${WIN32}" -eq 1 ]; then
audacity_args+=" -DwxWidgets_FIND_STYLE=win32" # FIXME needs forcing
audacity_args+=" -DwxWidgets_ROOT_DIR=${PAWPAW_PREFIX}"
audacity_args+=" -DwxWidgets_LIB_DIR=${PAWPAW_PREFIX}/lib/gcc_x64_dll"
audacity_args+=" -DwxWidgets_CONFIGURATION=mswu"
audacity_args+=" -DWX_ROOT_DIR=${PAWPAW_PREFIX}"
win32_target=_WIN32_WINNT_WIN7
export EXTRA_CXXFLAGS="-DWINVER=${win32_target} -D_WIN32_WINNT=${win32_target} -D_WIN32_IE=${win32_target}"
export EXTRA_LDFLAGS="-lpthread -lz" # FIXME not working!
fi

win32_target=_WIN32_WINNT_WIN7
export EXTRA_CXXFLAGS="-DWINVER=${win32_target} -D_WIN32_WINNT=${win32_target} -D_WIN32_IE=${win32_target} -std=gnu++14"
# -DwxUSE_UNICODE_WINDOWS_H=1"
# TODO
# 1. linker flags end up with -lLIB_m-NOTFOUND
# 2. win32 build requires copying std mingw mutex workarounds

download audacity "e93fdd16c50d9d4630bc64595990e2ee0f96bc17" "https://github.com/KXStudio/audacity.git" "" "git"
build_cmake audacity "e93fdd16c50d9d4630bc64595990e2ee0f96bc17" "${audacity_args}"


patches/audacity/01_build-fix-pt2.patch → patches/audacity/02_build-fix-pt2.patch View File


+ 27
- 0
patches/audacity/03_build-fix-pt3.patch View File

@@ -0,0 +1,27 @@
diff --git a/src/widgets/FileDialog/win/FileDialogPrivate.cpp b/src/widgets/FileDialog/win/FileDialogPrivate.cpp
index 255c287..43bd18b 100644
--- a/src/widgets/FileDialog/win/FileDialogPrivate.cpp
+++ b/src/widgets/FileDialog/win/FileDialogPrivate.cpp
@@ -78,10 +78,6 @@ static wxRect gs_rectDialog(0, 0, 428, 266);
// implementation
// ============================================================================
-IMPLEMENT_CLASS(FileDialog, wxFileDialogBase)
-
-// ----------------------------------------------------------------------------
-
namespace
{
diff --git a/src/widgets/FileDialog/win/FileDialogPrivate.h b/src/widgets/FileDialog/win/FileDialogPrivate.h
index dfc95d9..ce732eb 100644
--- a/src/widgets/FileDialog/win/FileDialogPrivate.h
+++ b/src/widgets/FileDialog/win/FileDialogPrivate.h
@@ -116,7 +116,6 @@ private:
int mModalCount;
} mDisabler;
- DECLARE_DYNAMIC_CLASS(FileDialog)
DECLARE_NO_COPY_CLASS(FileDialog)
};

+ 64
- 0
patches/audacity/04_build-fix-pt4.patch View File

@@ -0,0 +1,64 @@
diff --git a/cmake-proxies/cmake-modules/CopyLibs.cmake b/cmake-proxies/cmake-modules/CopyLibs.cmake
index ddb5d9a..eb00020 100644
--- a/cmake-proxies/cmake-modules/CopyLibs.cmake
+++ b/cmake-proxies/cmake-modules/CopyLibs.cmake
@@ -95,7 +95,8 @@ function( gather_libs src )
set( postcmds ${postcmds} PARENT_SCOPE )
endfunction()
-gather_libs( "${SRC}" )
+set( libs "${WXWIN}/wxmsw313u_gcc_x64_custom.dll" )
+set( postcmds "" )
list( REMOVE_DUPLICATES libs )
diff --git a/cmake-proxies/cmake-modules/FindwxWidgets.cmake b/cmake-proxies/cmake-modules/FindwxWidgets.cmake
index cb2f6f6..b5c88a6 100644
--- a/cmake-proxies/cmake-modules/FindwxWidgets.cmake
+++ b/cmake-proxies/cmake-modules/FindwxWidgets.cmake
@@ -217,15 +217,7 @@ endif()
if(wxWidgets_FIND_STYLE STREQUAL "win32")
# Useful common wx libs needed by almost all components.
set(wxWidgets_COMMON_LIBRARIES png tiff jpeg zlib regex expat)
-
- # DEPRECATED: Use find_package(wxWidgets COMPONENTS mono) instead.
- if(NOT wxWidgets_FIND_COMPONENTS)
- if(wxWidgets_USE_MONOLITHIC)
- set(wxWidgets_FIND_COMPONENTS mono)
- else()
- set(wxWidgets_FIND_COMPONENTS core base) # this is default
- endif()
- endif()
+ set(wxWidgets_FIND_COMPONENTS mono)
# Add the common (usually required libs) unless
# wxWidgets_EXCLUDE_COMMON_LIBRARIES has been set.
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 79e8f3c..e4c0f62 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1120,14 +1120,16 @@ if( CMAKE_SYSTEM_NAME MATCHES "Windows" )
POST_BUILD
)
- # Copy the VC runtime libraries as well
- add_custom_command(
- TARGET
- ${TARGET}
- COMMAND
- ${CMAKE_COMMAND} -E copy ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} ${_DEST}
- POST_BUILD
- )
+ if(MSVC)
+ # Copy the VC runtime libraries as well
+ add_custom_command(
+ TARGET
+ ${TARGET}
+ COMMAND
+ ${CMAKE_COMMAND} -E copy ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} ${_DEST}
+ POST_BUILD
+ )
+ endif(MSVC)
elseif( CMAKE_SYSTEM_NAME MATCHES "Darwin" )
# Bug 2400 workaround
#

+ 26
- 0
patches/audacity/05_build-fix-pt5.patch View File

@@ -0,0 +1,26 @@
diff --git a/modules/CMakeLists.txt b/modules/CMakeLists.txt
index 5c55ff6..b142b70 100644
--- a/modules/CMakeLists.txt
+++ b/modules/CMakeLists.txt
@@ -8,7 +8,7 @@ endif()
add_subdirectory( mod-script-pipe )
-if( NOT CMAKE_SYSTEM_NAME MATCHES "Darwin" )
+if( NOT CMAKE_SYSTEM_NAME MATCHES "Darwin|Windows" )
if( NOT "${CMAKE_GENERATOR}" MATCHES "Visual Studio*")
install( DIRECTORY "${_DEST}/modules"
DESTINATION "${_PKGLIB}" )
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index e4c0f62..8e31f03 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1324,7 +1324,7 @@ if( NOT "${CMAKE_GENERATOR}" MATCHES "Xcode|Visual Studio*" )
install( TARGETS ${TARGET}
DESTINATION "."
RESOURCE DESTINATION "${_APPDIR}/Resources" )
- else()
+ elseif(NOT CMAKE_SYSTEM_NAME MATCHES "Windows")
install( TARGETS ${TARGET} RUNTIME )
install( DIRECTORY "${_DEST}/${_LIBDIR}/"
DESTINATION "${_LIBDIR}"

BIN
patches/audacity/ImageCache.png View File

Before After
Width: 440  |  Height: 836  |  Size: 39KB

+ 22
- 0
patches/audacity/ImageCache.url.txt View File

@@ -0,0 +1,22 @@
20:36 * falktx is thinking of using "DarkCity" as name in the end
20:37 < falktx> obvious needs a working dark theme
20:38 * LAM604 uploaded an image: (176KiB) < https://matrix.org/_matrix/media/r0/download/matrix.org/YnpZTRzWKqUTgeMYvgrQVnEr/2021-04-09_23.16.40.318.png >
20:38 < LAM604> like this?
20:42 * LAM604 uploaded an image: (39KiB) < https://matrix.org/_matrix/media/r0/download/matrix.org/maJzHBKfsVTyENGXnwtwBywz/ImageCache.png >
20:42 < LAM604> here's the theme file
20:43 < falktx> LAM604: oh that looks quite cool. how do you do this?
20:44 < LAM604> I took the svg posted by someone in the Audacity forum a couple of years ago
20:44 < LAM604> and i modified with colors took from https://yeun.github.io/open-color/
20:45 < falktx> LAM604: but is that a mockup or real screenshot?
20:45 < LAM604> I have a bash script that create skins or gtk from a terminal theme, it's just sed :P
20:45 < LAM604> this is a real screenshot
20:47 < LAM604> If you take taht ImageCache.png file and you put in ~/.audacity-data/Theme/ you can use it
20:47 < LAM604> * If you take that ImageCache.png file and you put in ~/.audacity-data/Theme/ you can use it
20:49 < falktx> LAM604: what license is this under?
20:50 < LAM604> Idk :P I modified the svg with my colors, maybe I have to check if the svg has a license?
20:50 < falktx> well yes
21:00 < LAM604> This is the original post, i cant' find any info on the license. https://forum.audacityteam.org/viewtopic.php?t=101347
21:03 < falktx> LAM604: thanks. that is something. I can reference that post. do you give permission to reuse and redistribute your version?
21:04 < LAM604> Sure :D

https://forum.audacityteam.org/viewtopic.php?t=101347

Loading…
Cancel
Save