Remove Docker container as it hasn't been used in quite a while.
parent
fc6f30b6da
commit
97ce4cce97
37
README.md
37
README.md
|
@ -78,26 +78,20 @@ The ```wav``` directory contains test files of modulated audio that you can use
|
|||
|
||||
## Building for Windows
|
||||
|
||||
### Building using Docker
|
||||
|
||||
The Windows build process has been automated using a Docker container, see the freedv-gui Docker [README](docker/README_docker.md).
|
||||
|
||||
### Building LLVM MinGW (EXPERIMENTAL)
|
||||
|
||||
It is now possible to use the LLVM version of MinGW to build FreeDV. This allows
|
||||
Windows releases are built using the LLVM version of MinGW. This allows
|
||||
one to build FreeDV for ARM as well as for Intel Windows systems, including support
|
||||
for 2020 mode (on systems fast enough to acceptably decode it).
|
||||
|
||||
#### Prerequisites
|
||||
### Prerequisites
|
||||
|
||||
* CMake >= 3.25.0
|
||||
* Linux (tested on Ubuntu 22.04)
|
||||
* *NOTE: This does not currently work on macOS due to CMake using incorrect library suffixes.*
|
||||
* NSIS for generating the installer (for example, `sudo apt install nsis` on Ubuntu)
|
||||
|
||||
#### Instructions
|
||||
### Instructions
|
||||
|
||||
1. Download LLVM MinGW at https://github.com/mstorsjo/llvm-mingw/releases/tag/20220906.
|
||||
1. Download LLVM MinGW at https://github.com/mstorsjo/llvm-mingw/releases/.
|
||||
2. Decompress into your preferred location. For example: `tar xvf llvm-mingw-20220906-ucrt-ubuntu-18.04-x86_64.tar.xz` (The exact filename here will depend on the file downloaded in step (1). Note that for best results, you should use a build containing "ucrt" in the file name corresponding to the platform which you're building the Windows binary from.)
|
||||
3. Add LLVM MinGW to your PATH: `export PATH=/path/to/llvm-mingw-20220906-ucrt-ubuntu-18.04-x86_64/bin:$PATH`. (The folder containing the LLVM tools is typically named the same as the file downloaded in step (2) minus the extension.)
|
||||
4. Create a build folder inside freedv-gui: `mkdir build_windows`
|
||||
|
@ -106,32 +100,11 @@ for 2020 mode (on systems fast enough to acceptably decode it).
|
|||
6. Build FreeDV as normal: `make` (You can also add `-j[num]` to the end of this command to use multiple cores and shorten the build time.)
|
||||
7. Create FreeDV installer: `make package`
|
||||
|
||||
#### Known Issues
|
||||
### Known Issues
|
||||
|
||||
* NSIS-related issues:
|
||||
* ARM installers will not properly register in Windows despite installing properly. You can still run the application manually by navigating to C:\Program Files\FreeDV \[version\]\ using File Explorer and double-clicking on `freedv.exe`.
|
||||
|
||||
### Testing Windows Build
|
||||
|
||||
Conveniently, it is possible to run Windows executables using Wine on Fedora:
|
||||
|
||||
Testing LPCNet:
|
||||
```
|
||||
$ cd ~/freedv-gui/LPCNet/build_win/src
|
||||
$ WINEPATH=$HOME/freedv-gui/codec2/build_win/src';'$HOME/freedv-gui/build_win/_CPack_Packages/win64/NSIS/FreeDV-1.4.0-devel-win64/bin/ wine lpcnet_enc.exe --infile all.wav --outfile all.bit
|
||||
$ WINEPATH=$HOME/freedv-gui/codec2/build_win/src';'$HOME/freedv-gui/build_win/_CPack_Packages/win64/NSIS/FreeDV-1.4.0-devel-win64/bin/ wine lpcnet_dec.exe --infile all.bin --outfile all_out.raw
|
||||
$ cat all_out.raw | aplay -f S16_LE -r 16000
|
||||
|
||||
```
|
||||
|
||||
Testing FreeDV API:
|
||||
|
||||
```
|
||||
$ cd freedv-gui/codec2/build_win/src
|
||||
$ WINEPATH=$HOME/freedv-gui/LPCNet/build_win/src';'$HOME/freedv-gui/build_win/_CPack_Packages/win64/NSIS/FreeDV-1.4.0-devel-win64/bin/ wine freedv_rx 2020 ~/freedv-gui/wav/all_2020.wav out.raw
|
||||
$ play -t .s16 -r 16000 -b 16 out.raw
|
||||
```
|
||||
|
||||
## Building and installing on macOS
|
||||
|
||||
Using MacPorts, most of the appropriate dependencies can be installed by:
|
||||
|
|
|
@ -1,60 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
# build_windows.sh
|
||||
#
|
||||
# Script that cross compiles freedv-gui for Windows on Fedora
|
||||
# Linux. Git pulls codec2 and LPCNet repos so they are available for
|
||||
# parallel development.
|
||||
|
||||
# override this at the command line for a 32 bit build
|
||||
# $ CMAKE=mingw32-cmake ./build_windows.sh
|
||||
: ${CMAKE=mingw64-cmake}
|
||||
|
||||
UT_ENABLE=${UT_ENABLE:-0}
|
||||
|
||||
if [ $CMAKE = "mingw64-cmake" ]; then
|
||||
BUILD_DIR=build_win64
|
||||
MINGW_TRIPLE=x86_64-w64-mingw32
|
||||
else
|
||||
BUILD_DIR=build_win32
|
||||
MINGW_TRIPLE=i686-w64-mingw32
|
||||
fi
|
||||
export FREEDVGUIDIR=${PWD}
|
||||
export CODEC2DIR=$FREEDVGUIDIR/codec2
|
||||
export LPCNETDIR=$FREEDVGUIDIR/LPCNet
|
||||
|
||||
CODEC2_BRANCH=1.2.0
|
||||
LPCNET_BRANCH=v0.5
|
||||
|
||||
# OK, build and test LPCNet
|
||||
cd $FREEDVGUIDIR
|
||||
git clone https://github.com/drowe67/LPCNet.git
|
||||
cd $LPCNETDIR && git switch master && git pull && git checkout $LPCNET_BRANCH
|
||||
mkdir -p $BUILD_DIR && cd $BUILD_DIR && rm -Rf *
|
||||
$CMAKE ..
|
||||
make
|
||||
|
||||
# Build codec2 with LPCNet and test FreeDV 2020 support
|
||||
# First build and install vanilla codec2 as we need -lcodec2 to build LPCNet
|
||||
cd $FREEDVGUIDIR
|
||||
if [ ! -d codec2 ]; then
|
||||
git clone https://github.com/drowe67/codec2.git
|
||||
fi
|
||||
cd codec2 && git switch main && git pull && git checkout $CODEC2_BRANCH
|
||||
mkdir -p $BUILD_DIR && cd $BUILD_DIR && rm -Rf * && $CMAKE -DLPCNET_BUILD_DIR=$LPCNETDIR/$BUILD_DIR .. && make VERBOSE=1
|
||||
|
||||
cd $FREEDVGUIDIR
|
||||
if [ -d .git ]; then
|
||||
git pull
|
||||
fi
|
||||
mkdir -p $BUILD_DIR && cd $BUILD_DIR
|
||||
if [ $CLEAN -eq 1 ]; then rm -Rf *; fi
|
||||
|
||||
if [ $BOOTSTRAP_WX -eq 1 ]; then
|
||||
# build freedv-gui
|
||||
$CMAKE -DBOOTSTRAP_WXWIDGETS=1 -DCMAKE_BUILD_TYPE=Debug -DCODEC2_BUILD_DIR=$CODEC2DIR/$BUILD_DIR -DLPCNET_BUILD_DIR=$LPCNETDIR/$BUILD_DIR ..
|
||||
make VERBOSE=1 -j4
|
||||
else
|
||||
# build freedv-gui
|
||||
$CMAKE -DCMAKE_BUILD_TYPE=Debug -DUNITTEST=$UT_ENABLE -DCODEC2_BUILD_DIR=$CODEC2DIR/$BUILD_DIR -DLPCNET_BUILD_DIR=$LPCNETDIR/$BUILD_DIR ..
|
||||
make VERBOSE=1 -j4
|
||||
fi
|
|
@ -1,32 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
# build_windows_old.sh
|
||||
#
|
||||
# Script that cross compiles freedv-gui for Windows on Fedora
|
||||
# Linux. Git pulls older versions of freedv-gui for test/debug purposes,
|
||||
# then constructs a zip file for testing. Zips files are convenient
|
||||
# when testing several versions, as everything is self contained.
|
||||
#
|
||||
# usage: ./build_old.sh githash
|
||||
|
||||
export FREEDVGUIDIR=${PWD}
|
||||
export CODEC2DIR=$FREEDVGUIDIR/codec2
|
||||
export LPCNETDIR=$FREEDVGUIDIR/LPCNet
|
||||
#git checkout $1
|
||||
#mkdir -p build_win && cd build_win && rm -Rf *
|
||||
#make VERBOSE=1
|
||||
git checkout dr-debug-vac-3
|
||||
#git checkout $1
|
||||
cd $FREEDVGUIDIR/build_win
|
||||
rm -Rf *
|
||||
# old cmake line
|
||||
mingw64-cmake -DCMAKE_BUILD_TYPE=Debug -DCODEC2_BUILD_DIR=$CODEC2DIR/build_win -DLPCNET_BUILD_DIR=$LPCNETDIR/build_win ..
|
||||
make
|
||||
make package
|
||||
cd $FREEDVGUIDIR
|
||||
export zipdir=freedv-gui-$1
|
||||
mkdir -p $zipdir
|
||||
cp -f `find build_win/_CPack_Packages -name *.dll` $zipdir
|
||||
cp -f `find codec2/build_win/ -name *.dll` $zipdir
|
||||
cp -f `find LPCNet/build_win/ -name *.dll` $zipdir
|
||||
cp build_win/src/freedv.exe $zipdir
|
||||
zip -r $zipdir'.zip' $zipdir
|
|
@ -1,37 +0,0 @@
|
|||
# Building freedv-gui for Windows using Docker on Ubuntu 18
|
||||
|
||||
## Docker installation
|
||||
```
|
||||
sudo apt install docker docker-compose
|
||||
sudo systemctl start docker
|
||||
sudo systemctl enable docker
|
||||
sudo systemctl status docker
|
||||
sudo usermod -aG docker $USER
|
||||
<log out and log in to update groups>
|
||||
groups
|
||||
<you should see docker as one of your groups>
|
||||
docker info
|
||||
docker container run hello-world
|
||||
```
|
||||
|
||||
## Building the docker images
|
||||
Building is only required once, or if you modify the docker scripts
|
||||
|
||||
```
|
||||
cd $FREEDV_GUI/docker
|
||||
docker-compose -f docker-compose-win.yml build
|
||||
```
|
||||
|
||||
## Running the docker image to build Windows installers
|
||||
|
||||
```
|
||||
cd $FREEDV_GUI/docker
|
||||
./freedv_build_windows.sh 64
|
||||
./freedv_build_windows.sh 32
|
||||
```
|
||||
|
||||
See `build_log.txt` for a record of the build. More options are available with:
|
||||
|
||||
```
|
||||
./freedv_build_windows.sh -h
|
||||
```
|
|
@ -1,22 +0,0 @@
|
|||
version: "3"
|
||||
|
||||
services:
|
||||
fdv_win_fed_37_s:
|
||||
environment:
|
||||
- FDV_GIT_REPO
|
||||
- FDV_GIT_BRANCH
|
||||
- FDV_CLEAN
|
||||
- FDV_CMAKE
|
||||
- FDV_BOOTSTRAP_WX
|
||||
build:
|
||||
context: fdv_win_fedora
|
||||
args:
|
||||
- FED_REL=37
|
||||
|
||||
image: fdv_win_fed37_i
|
||||
container_name: 'fdv_win_fed37_c'
|
||||
volumes:
|
||||
- win_fed37_v:/home/build/
|
||||
|
||||
volumes:
|
||||
win_fed37_v:
|
|
@ -1,25 +0,0 @@
|
|||
ARG FED_REL=37
|
||||
|
||||
FROM fedora:${FED_REL}
|
||||
|
||||
# Build & Test Linux: cmake build-essential git libspeexdsp-dev libsamplerate0-dev octave-common octave gnuplot sox ca-cacert octave-signal
|
||||
# Build OpenOCD: automake libtool libusb-1.0-0-dev wget which?
|
||||
# Build & Test STM32: libc6-i386 p7zip-full python3-numpy bc
|
||||
# tar: bzip2
|
||||
# arm-none-eabi-gdb: ncurses-compat-libs
|
||||
|
||||
RUN dnf -y install --setopt=install_weak_deps=False @development-tools cmake git speexdsp-devel libsamplerate-devel octave octave-signal gnuplot sox python3-numpy automake libtool libusb1-devel wget bc glibc.i686 which bzip2 gcc gcc-c++ diffutils && useradd -m build
|
||||
|
||||
# specific for windows mingw build
|
||||
RUN dnf install -y dnf-plugins-core
|
||||
RUN dnf -y copr enable hobbes1069/mingw
|
||||
RUN dnf install -y mingw{32,64}-filesystem mingw{32,64}-binutils mingw{32,64}-gcc mingw{32,64}-crt mingw{32,64}-headers mingw32-nsis mingw{32,64}-libusbx-static
|
||||
RUN dnf install -y mingw{32,64}-speex mingw{32,64}-wxWidgets3 mingw{32,64}-portaudio mingw{32,64}-libsndfile mingw{32,64}-libsamplerate.noarch svn
|
||||
|
||||
|
||||
# finally, this is the build script.
|
||||
COPY entrypoint.sh /
|
||||
|
||||
USER build
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
|
@ -1,43 +0,0 @@
|
|||
#!/bin/bash -x
|
||||
|
||||
BUILDROOT=/home/build
|
||||
mkdir -p $BUILDROOT
|
||||
cd $BUILDROOT
|
||||
|
||||
# variables are passed into this Docker process ------------------
|
||||
|
||||
# note the codec2 and LPCNet repos are hard coded in build_windows.sh
|
||||
GIT_REPO=${FDV_GIT_REPO:-https://github.com/drowe67/freedv-gui.git}
|
||||
GIT_BRANCH=${FDV_GIT_BRANCH:-master}
|
||||
|
||||
# override with "mingw32-cmake" for a 32 bit build
|
||||
CMAKE=${FDV_CMAKE:-mingw64-cmake}
|
||||
|
||||
CLEAN=${FDV_CLEAN:-1}
|
||||
BOOTSTRAP_WX=${FDV_BOOTSTRAP_WX:-0}
|
||||
|
||||
echo "FDV_GIT_REPO=$GIT_REPO"
|
||||
echo "FDV_GIT_BRANCH=$GIT_BRANCH"
|
||||
echo "FDV_CLEAN=$CLEAN"
|
||||
echo "FDV_CMAKE=$CMAKE"
|
||||
|
||||
if [ $CLEAN -eq 1 ]; then
|
||||
# start with a fresh clone
|
||||
rm -Rf freedv-gui;
|
||||
git clone $GIT_REPO
|
||||
cd freedv-gui
|
||||
else
|
||||
cd freedv-gui
|
||||
git pull
|
||||
fi
|
||||
git checkout $GIT_BRANCH
|
||||
|
||||
echo "--------------------- starting build_windows.sh ---------------------"
|
||||
CMAKE=$CMAKE BOOTSTRAP_WX=$BOOTSTRAP_WX ./build_windows.sh
|
||||
|
||||
if [ $CMAKE = "mingw64-cmake" ]; then
|
||||
cd build_win64
|
||||
else
|
||||
cd build_win32
|
||||
fi
|
||||
make package
|
|
@ -1,105 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
FDV_CURRENT_BRANCH=`git rev-parse --abbrev-ref HEAD 2>/dev/null`
|
||||
FDV_CURRENT_BRANCH=${FDV_CURRENT_BRANCH:=master}
|
||||
FDV_CURRENT_REPO=`git remote get-url origin 2>/dev/null`
|
||||
FDV_CURRENT_REPO=${FDV_CURRENT_REPO:=https://github.com/drowe67/freedv-gui.git}
|
||||
|
||||
function print_help {
|
||||
echo
|
||||
echo "Build freedv-gui for Windows using Docker"
|
||||
echo
|
||||
echo " usage ./freedv_build_windows.sh [-d] [--noclean] [--build] [--repo GitRepo] [--branch GitBranch] 32|64"
|
||||
echo
|
||||
echo " -d debug mode; trace script execution"
|
||||
echo " --noclean start from a previous build (git pull && make), which is faster for small changes."
|
||||
echo " The default is a clean build from a fresh git clone (slow but safer)"
|
||||
echo " --build Update docker image first (run if you have modified the docker scripts in fdv_win_fedora)"
|
||||
echo " --rebuild Completely recreate docker image first (e.g. run if you have new rpm packages)"
|
||||
echo " --repo GitRepo (default $FDV_CURRENT_REPO)"
|
||||
echo " --branch GitBranch (default $FDV_CURRENT_BRANCH)"
|
||||
echo " --bootstrap-wx Builds wxWidgets from source (may take significantly longer to complete)"
|
||||
echo
|
||||
exit
|
||||
}
|
||||
|
||||
# defaults - these variables are passed to the docker container
|
||||
FDV_CLEAN=1
|
||||
FDV_BUILD=0
|
||||
FDV_REBUILD=0
|
||||
FDV_GIT_REPO=$FDV_CURRENT_REPO
|
||||
FDV_GIT_BRANCH=$FDV_CURRENT_BRANCH
|
||||
FDV_BOOTSTRAP_WX=0
|
||||
|
||||
POSITIONAL=()
|
||||
while [[ $# -gt 0 ]]; do
|
||||
key="$1"
|
||||
case $key in
|
||||
-d)
|
||||
set -x
|
||||
shift
|
||||
;;
|
||||
--noclean)
|
||||
FDV_CLEAN=0
|
||||
shift
|
||||
;;
|
||||
--build)
|
||||
FDV_BUILD=1
|
||||
shift
|
||||
;;
|
||||
--rebuild)
|
||||
FDV_REBUILD=1
|
||||
shift
|
||||
;;
|
||||
--repo)
|
||||
FDV_GIT_REPO="$2"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
--branch)
|
||||
FDV_GIT_BRANCH="$2"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
--bootstrap-wx)
|
||||
FDV_BOOTSTRAP_WX=1
|
||||
shift
|
||||
;;
|
||||
-h|--help)
|
||||
print_help
|
||||
;;
|
||||
*)
|
||||
POSITIONAL+=("$1") # save it in an array for later
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
set -- "${POSITIONAL[@]}" # restore positional parameters
|
||||
|
||||
FDV_CMAKE=mingw64-cmake
|
||||
if [ $# -eq 1 ]; then
|
||||
if [ $1 -eq 32 ]; then
|
||||
FDV_CMAKE=mingw32-cmake
|
||||
fi
|
||||
else
|
||||
print_help
|
||||
fi
|
||||
|
||||
# create log file
|
||||
log=build_log.txt
|
||||
echo > $log
|
||||
|
||||
if [ $FDV_BUILD -eq 1 ]; then
|
||||
docker-compose -f docker-compose-win.yml build >> $log
|
||||
fi
|
||||
|
||||
if [ $FDV_REBUILD -eq 1 ]; then
|
||||
docker-compose -f docker-compose-win.yml rm -f >> $log
|
||||
docker-compose -f docker-compose-win.yml build --no-cache >> $log
|
||||
fi
|
||||
|
||||
FDV_CLEAN=$FDV_CLEAN FDV_BOOTSTRAP_WX=$FDV_BOOTSTRAP_WX FDV_CMAKE=$FDV_CMAKE FDV_GIT_REPO=$FDV_GIT_REPO FDV_GIT_BRANCH=$FDV_GIT_BRANCH \
|
||||
docker-compose -f docker-compose-win.yml up --remove-orphans >> $log
|
||||
package_docker_path=$(cat $log | sed -n "s/.*package: \(.*exe\) .*/\1/p")
|
||||
echo $package_docker_path
|
||||
docker cp fdv_win_fed37_c:$package_docker_path .
|
Loading…
Reference in New Issue