Browse Source

Start audacity experiments

Signed-off-by: falkTX <falktx@falktx.com>
pull/10/head
falkTX 4 years ago
parent
commit
e3d83ad589
4 changed files with 140 additions and 0 deletions
  1. +38
    -0
      bootstrap-audacity.sh
  2. +53
    -0
      build-audacity.sh
  3. +25
    -0
      patches/audacity/01_build-fix-pt1.patch
  4. +24
    -0
      patches/wxWidgets/01_use-get-errno.patch

+ 38
- 0
bootstrap-audacity.sh View File

@@ -0,0 +1,38 @@
#!/bin/bash

set -e

cd $(dirname ${0})
PAWPAW_ROOT="${PWD}"

# ---------------------------------------------------------------------------------------------------------------------
# check target

target="${1}"

if [ -z "${target}" ]; then
echo "usage: ${0} <target>"
exit 1
fi

# ---------------------------------------------------------------------------------------------------------------------
# run bootstrap dependencies

./bootstrap-common.sh "${target}"
./bootstrap-plugins.sh "${target}"

# ---------------------------------------------------------------------------------------------------------------------
# source setup code

source setup/check_target.sh
source setup/env.sh
source setup/functions.sh
source setup/versions.sh

# ---------------------------------------------------------------------------------------------------------------------
# wxwidgets

download wxWidgets "audacity-fixes-3.1.3" "https://github.com/audacity/wxWidgets.git" "" "git"
build_cmake wxWidgets "audacity-fixes-3.1.3"

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

+ 53
- 0
build-audacity.sh View File

@@ -0,0 +1,53 @@
#!/bin/bash

set -e

cd $(dirname ${0})
PAWPAW_ROOT="${PWD}"

JACK2_VERSION=${JACK2_VERSION:=git}
JACK_ROUTER_VERSION=${JACK_ROUTER_VERSION:=6c2e532bb05d2ba59ef210bef2fe270d588c2fdf}
QJACKCTL_VERSION=${QJACKCTL_VERSION:=0.9.2}

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

target="${1}"

if [ -z "${target}" ]; then
echo "usage: ${0} <target>"
exit 1
fi

# ---------------------------------------------------------------------------------------------------------------------
# run bootstrap dependency

# ./bootstrap-audacity.sh "${target}"

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

source setup/check_target.sh
source setup/env.sh
source setup/functions.sh
source setup/versions.sh

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

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

audacity_args="-DCMAKE_BUILD_TYPE=Release -DwxWidgets_USE_REL_AND_DBG=no -Daudacity_use_pch=no"

audacity_args+=" -Daudacity_use_wxwidgets=local"

# audacity_args+=" -DwxWidgets_ROOT_DIR=${PAWPAW_PREFIX}"
# audacity_args+=" -DwxWidgets_LIB_DIR=${PAWPAW_PREFIX}/lib/mswu"
# audacity_args+=" -DwxWidgets_CONFIGURATION=mswu"

# audacity_args+=" -DwxWidgets_FOUND=BOOL:TRUE"
# audacity_args+=" -DwxWidgets_INCLUDE_DIRS=${PAWPAW_PREFIX}/include"
# audacity_args+=" -DwxWidgets_LIBRARIES=${PAWPAW_PREFIX}/lib/mswu"

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

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

+ 25
- 0
patches/audacity/01_build-fix-pt1.patch View File

@@ -0,0 +1,25 @@
diff --git a/lib-src/portmixer/src/px_win_endpoint.c b/lib-src/portmixer/src/px_win_endpoint.c
index 34c7f30..d742667 100644
--- a/lib-src/portmixer/src/px_win_endpoint.c
+++ b/lib-src/portmixer/src/px_win_endpoint.c
@@ -75,8 +75,6 @@ DEFINE_GUID(CLSID_MMDeviceEnumerator, 0xBCDE0395, 0xE52F, 0x467C,
0x8E, 0x3D, 0xC4, 0x57, 0x92, 0x91, 0x69, 0x2E);
DEFINE_GUID(IID_IMMDeviceEnumerator, 0xA95664D2, 0x9614, 0x4F35,
0xA7, 0x46, 0xDE, 0x8D, 0xB6, 0x36, 0x17, 0xE6);
-DEFINE_GUID(IID_IAudioEndpointVolume, 0x5CDF2C82, 0x841E, 0x4546,
- 0x97, 0x22, 0x0C, 0xF7, 0x40, 0x78, 0x22, 0x9A);
#define DRV_RESERVED 0x0800
#define DRV_QUERYFUNCTIONINSTANCEID (DRV_RESERVED + 17)
diff --git a/lib-src/portsmf/allegro.h b/lib-src/portsmf/allegro.h
index d528c73..ad03353 100644
--- a/lib-src/portsmf/allegro.h
+++ b/lib-src/portsmf/allegro.h
@@ -49,6 +49,7 @@
#ifndef ALLEGRO_H
#define ALLEGRO_H
#include <assert.h>
+#include <string.h>
#include <istream>
#include <ostream>

+ 24
- 0
patches/wxWidgets/01_use-get-errno.patch View File

@@ -0,0 +1,24 @@
diff --git a/src/common/filefn.cpp b/src/common/filefn.cpp
index a18d4f4..83562ab 100644
--- a/src/common/filefn.cpp
+++ b/src/common/filefn.cpp
@@ -1138,14 +1138,15 @@ wxRenameFile(const wxString& file1, const wxString& file2, bool overwrite)
// For explanation, see: (warning...based mostly on observed behavior)
// http://bugzilla.audacityteam.org/show_bug.cgi?id=1266
// https://github.com/audacity/audacity/pull/94
- unsigned long doserrno = 0;
for (int i = 0; i < 2000; i++)
{
if ( wxRename (file1, file2) == 0 )
return true;
- unsigned long doserrno;
- _get_doserrno(&doserrno);
- if (doserrno != ERROR_ACCESS_DENIED && (doserrno != ERROR_ALREADY_EXISTS || exists))
+ // https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/get-doserrno?view=msvc-160
+ // We recommend _get_errno instead of _get_doserrno for portable error codes
+ int wxerrno;
+ _get_errno(&wxerrno);
+ if (wxerrno != EACCES && (wxerrno != EEXIST || exists))
break;
wxMilliSleep(1);
}

Loading…
Cancel
Save