Skip to content

Instantly share code, notes, and snippets.

@ePirat ePirat/INSTALL.md
Last active Feb 15, 2019

Embed
What would you like to do?
Cross-compile libaacs for Windows (64bit)

Cross-compile libaacs for Windows (64bit)

For this guide the ubuntu:yakkety Docker image was used.

Install the cross-compile toolchain

apt-get install mingw-w64-tools gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 wget gettext bison flex

Build dependencies

Now we need to build the libaacs dependencies first, those are, as time of writing:

In this guide I assume we created a folder libaacs:

mkdir /libaacs && cd /libaacs

Of course you can choose any location you want.

libgpg-error

  1. Download the source:
    wget https://www.gnupg.org/ftp/gcrypt/libgpg-error/libgpg-error-1.25.tar.bz2
  2. Extract the source:
    tar xvfj libgpg-error-1.25.tar.bz2
  3. Configure:
    cd libgpg-error-1.25/
    ./configure --host=x86_64-w64-mingw32 --prefix=/libaacs/build-64/
    
  4. Build it:
    make
    make install
    cd ..
    

libgcrypt

  1. Download the source:
    wget https://www.gnupg.org/ftp/gcrypt/libgcrypt/libgcrypt-1.7.3.tar.bz2
  2. Extract the source:
    tar xvfj libgcrypt-1.7.3.tar.bz2
  3. Configure it:
    cd libgcrypt-1.7.3/
    ./configure --host=x86_64-w64-mingw32 --with-gpg-error-prefix=/libaacs/build-64 --prefix=/libaacs/build-64
    
  4. Build it:
    make
    make install
    cd ..
    

Build libaacs

Now that we have built the dependencies, we can continue building libbluray.

  1. First we need to download the source:
    wget ftp://ftp.videolan.org/pub/videolan/libaacs/0.8.1/libaacs-0.8.1.tar.bz2
  2. Extract it:
    tar xvfj libaacs-0.8.1.tar.bz2
  3. Configure:
    cd libaacs-0.8.1/
    ./configure --host=x86_64-w64-mingw32 --with-gpg-error-prefix=/libaacs/build-64 --with-libgcrypt-prefix=/libaacs/build-64 --prefix=/libaacs/build-64
    
  4. Build it:
    make
    make install
    cd ..
    

You will find the build results in /libaacs/build-64/bin

@zhxq

This comment has been minimized.

Copy link

commented Aug 31, 2018

The latest version of libaacs is libaacs-0.9, so you can use the latest version of libaacs when compiling. The older version of dependencies are still usable for libaacs-0.9. Windows Subsystem for Linux (WSL) can also be used to cross compile libaacs (I did this using my WSL).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.