@@ -21,7 +21,7 @@ jobs: | |||||
- name: Run build script | - name: Run build script | ||||
shell: bash | shell: bash | ||||
working-directory: ${{runner.workspace}} | working-directory: ${{runner.workspace}} | ||||
run: cd $GITHUB_WORKSPACE && ./build_windows.sh | |||||
run: cd $GITHUB_WORKSPACE && ./build_windows.sh $BUILD_TYPE | |||||
- name: Upload compilied binary | - name: Upload compilied binary | ||||
uses: actions/upload-artifact@v2 | uses: actions/upload-artifact@v2 | ||||
@@ -0,0 +1,30 @@ | |||||
name: x86 Win Release | |||||
on: | |||||
push: | |||||
branches: | |||||
- master | |||||
env: | |||||
BUILD_TYPE: Debug | |||||
jobs: | |||||
build: | |||||
runs-on: ubuntu-latest | |||||
steps: | |||||
- uses: actions/checkout@v2 | |||||
- name: Install dependencies | |||||
# The user does not run as root | |||||
run: sudo apt install wget cmake make mingw-w64 git unzip libsndfile-dev | |||||
- name: Run build script | |||||
shell: bash | |||||
working-directory: ${{runner.workspace}} | |||||
run: cd $GITHUB_WORKSPACE && ./build_windows.sh $BUILD_TYPE | |||||
- name: Upload compilied binary | |||||
uses: actions/upload-artifact@v2 | |||||
with: | |||||
name: Debug build | |||||
path: ${{runner.workspace}}/aptdec/winbuild/aptdec-1.7.0.zip |
@@ -4,6 +4,8 @@ Copyright (c) 2004-2009 Thierry Leconte (F4DWV), Xerbo (xerbo@protonmail.com) 20 | |||||
![x86 Release](https://github.com/Xerbo/aptdec/workflows/x86%20Release/badge.svg?branch=master) | ![x86 Release](https://github.com/Xerbo/aptdec/workflows/x86%20Release/badge.svg?branch=master) | ||||
![x86 Debug](https://github.com/Xerbo/aptdec/workflows/x86%20Debug/badge.svg?branch=devel) | ![x86 Debug](https://github.com/Xerbo/aptdec/workflows/x86%20Debug/badge.svg?branch=devel) | ||||
![x86 Win Release](https://github.com/Xerbo/aptdec/workflows/x86%20Win%20Release/badge.svg?branch=master) | |||||
![x86 Win Debug](https://github.com/Xerbo/aptdec/workflows/x86%20Win%20Debug/badge.svg?branch=devel) | |||||
## Introduction | ## Introduction | ||||
@@ -40,8 +40,13 @@ cp "libsndfile-1.0.29-win64/lib/sndfile.lib" $TEMP_PATH/lib/sndfile.lib | |||||
# Copy DLL's into root for CPack | # Copy DLL's into root for CPack | ||||
cp $TEMP_PATH/bin/*.dll ../ | cp $TEMP_PATH/bin/*.dll ../ | ||||
buildtype="Debug" | |||||
if [[ "$1" == "Release" ]]; then | |||||
buildtype="Release" | |||||
fi | |||||
# Build aptdec | # Build aptdec | ||||
mkdir -p winbuild && cd winbuild | mkdir -p winbuild && cd winbuild | ||||
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchain-mingw32.cmake -DCMAKE_INSTALL_PREFIX=$TEMP_PATH .. | |||||
cmake -DCMAKE_BUILD_TYPE=$buildtype -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchain-mingw32.cmake -DCMAKE_INSTALL_PREFIX=$TEMP_PATH .. | |||||
make -j 4 | make -j 4 | ||||
make package | make package |
@@ -47,7 +47,7 @@ static int initsnd(char *filename); | |||||
int getsample(float *sample, int nb); | int getsample(float *sample, int nb); | ||||
static int processAudio(char *filename, options_t *opts); | static int processAudio(char *filename, options_t *opts); | ||||
int main(int argc, char **argv) { | |||||
int main(int argc, const char **argv) { | |||||
//fprintf(stderr, VERSION"\n"); | //fprintf(stderr, VERSION"\n"); | ||||
// Check if there are actually any input files | // Check if there are actually any input files | ||||
@@ -97,7 +97,10 @@ int main(int argc, char **argv) { | |||||
// Actually decode the files | // Actually decode the files | ||||
for (int i = 0; i < argc; i++) { | for (int i = 0; i < argc; i++) { | ||||
processAudio(argv[i], &opts); | |||||
// Convert from a `const char *` to a normal `char *` | |||||
char *filename = NULL; | |||||
memcpy(filename, argv[i], strlen(argv[i])); | |||||
processAudio(filename, &opts); | |||||
} | } | ||||
return 0; | return 0; | ||||