Parcourir la source

Add release windows build

tags/v1.8.0
Xerbo il y a 4 ans
Parent
révision
eb61a550c1
5 fichiers modifiés avec 44 ajouts et 4 suppressions
  1. +1
    -1
      .github/workflows/win_debug.yml
  2. +30
    -0
      .github/workflows/win_release.yml
  3. +2
    -0
      README.md
  4. +6
    -1
      build_windows.sh
  5. +5
    -2
      src/main.c

+ 1
- 1
.github/workflows/win_debug.yml Voir le fichier

@@ -21,7 +21,7 @@ jobs:
- name: Run build script
shell: bash
working-directory: ${{runner.workspace}}
run: cd $GITHUB_WORKSPACE && ./build_windows.sh
run: cd $GITHUB_WORKSPACE && ./build_windows.sh $BUILD_TYPE

- name: Upload compilied binary
uses: actions/upload-artifact@v2


+ 30
- 0
.github/workflows/win_release.yml Voir le fichier

@@ -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

+ 2
- 0
README.md Voir le fichier

@@ -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 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



+ 6
- 1
build_windows.sh Voir le fichier

@@ -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
cp $TEMP_PATH/bin/*.dll ../

buildtype="Debug"
if [[ "$1" == "Release" ]]; then
buildtype="Release"
fi

# Build aptdec
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 package

+ 5
- 2
src/main.c Voir le fichier

@@ -47,7 +47,7 @@ static int initsnd(char *filename);
int getsample(float *sample, int nb);
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");

// Check if there are actually any input files
@@ -97,7 +97,10 @@ int main(int argc, char **argv) {

// Actually decode the files
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;


Chargement…
Annuler
Enregistrer