Skip to content

Commit

Permalink
2.4.0.20210725
Browse files Browse the repository at this point in the history
  • Loading branch information
takuya-takeuchi committed Jul 24, 2021
1 parent 7aba1ec commit 81db7d9
Show file tree
Hide file tree
Showing 272 changed files with 13,850 additions and 892 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -318,4 +318,5 @@ src/OpenJpegDotNet.Native/build*

nuget/*.nupkg

work
work
AppCertReport.xml
22 changes: 19 additions & 3 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,22 @@ build:win:
- pwsh BuildWindows.ps1
tags:
- windows
- cuda
artifacts:
paths:
- nuget/artifacts

build:uwp:
stage: build
before_script:
- chcp 65001
- git submodule update --init --recursive
- "Get-ChildItem env:"
script:
- cd nuget
- git clean -fxd .
- pwsh BuildUniversalWindowsPlatform.ps1
tags:
- windows
artifacts:
paths:
- nuget/artifacts
Expand All @@ -28,9 +43,9 @@ build:ubuntu:
script:
- cd nuget
- pwsh BuildUbuntu18.ps1
- pwsh BuildAndroid.ps1
tags:
- linux
- cuda
artifacts:
paths:
- nuget/artifacts
Expand All @@ -43,6 +58,7 @@ build:osx:
script:
- cd nuget
- pwsh BuildOSX.ps1
- pwsh BuildIOS.ps1
tags:
- osx
artifacts:
Expand All @@ -60,6 +76,7 @@ package:
- windows
dependencies:
- build:win
- build:uwp
- build:ubuntu
- build:osx
artifacts:
Expand Down Expand Up @@ -88,7 +105,6 @@ test:ubuntu:
- pwsh TestPackageUbuntu18.ps1
tags:
- linux
- cuda
dependencies:
- package
artifacts:
Expand Down
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[submodule "src/openjpeg"]
path = src/openjpeg
url = https://github.com/uclouvain/openjpeg
ignore = dirty
ignore = dirty
14 changes: 12 additions & 2 deletions OpenJpegDotNet.sln
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,27 @@ EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{2892CB9C-FDFA-48B9-B330-9A4FA3AAA475}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2892CB9C-FDFA-48B9-B330-9A4FA3AAA475}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2892CB9C-FDFA-48B9-B330-9A4FA3AAA475}.Debug|x64.ActiveCfg = Debug|Any CPU
{2892CB9C-FDFA-48B9-B330-9A4FA3AAA475}.Debug|x64.Build.0 = Debug|Any CPU
{2892CB9C-FDFA-48B9-B330-9A4FA3AAA475}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2892CB9C-FDFA-48B9-B330-9A4FA3AAA475}.Release|Any CPU.Build.0 = Release|Any CPU
{282805A8-0D69-48F1-91BC-471F88B331BB}.Debug|Any CPU.ActiveCfg = Debug|x64
{282805A8-0D69-48F1-91BC-471F88B331BB}.Debug|Any CPU.Build.0 = Debug|x64
{2892CB9C-FDFA-48B9-B330-9A4FA3AAA475}.Release|x64.ActiveCfg = Release|Any CPU
{2892CB9C-FDFA-48B9-B330-9A4FA3AAA475}.Release|x64.Build.0 = Release|Any CPU
{282805A8-0D69-48F1-91BC-471F88B331BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{282805A8-0D69-48F1-91BC-471F88B331BB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{282805A8-0D69-48F1-91BC-471F88B331BB}.Debug|x64.ActiveCfg = Debug|Any CPU
{282805A8-0D69-48F1-91BC-471F88B331BB}.Debug|x64.Build.0 = Debug|Any CPU
{282805A8-0D69-48F1-91BC-471F88B331BB}.Release|Any CPU.ActiveCfg = Release|x64
{282805A8-0D69-48F1-91BC-471F88B331BB}.Release|Any CPU.Build.0 = Release|x64
{282805A8-0D69-48F1-91BC-471F88B331BB}.Release|x64.ActiveCfg = Release|x64
{282805A8-0D69-48F1-91BC-471F88B331BB}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
# ![Alt text](nuget/jpeg48.png "OpenJpegDotNet") OpenJpegDotNet [![GitHub license](https://img.shields.io/github/license/mashape/apistatus.svg)]()

OpenJpeg wrapper written in C++ and C# for Windows, MacOS and Linux
OpenJpeg wrapper written in C++ and C# for Windows, MacOS, Linux, iOS and Android

#### OpenJpegDotNet

|Package|OS|x86|x64|ARM|ARM64|Nuget|
|---|---|---|---|---|---|---|
|OpenJpegDotNet|Windows|||-|-|[![NuGet version](https://img.shields.io/nuget/v/OpenJpegDotNet.svg)](https://www.nuget.org/packages/OpenJpegDotNet)|
||Linux|-||-|-|[![NuGet version](https://img.shields.io/nuget/v/OpenJpegDotNet.svg)](https://www.nuget.org/packages/OpenJpegDotNet)|
||Linux|-||||[![NuGet version](https://img.shields.io/nuget/v/OpenJpegDotNet.svg)](https://www.nuget.org/packages/OpenJpegDotNet)|
||OSX|-||-|-|[![NuGet version](https://img.shields.io/nuget/v/OpenJpegDotNet.svg)](https://www.nuget.org/packages/OpenJpegDotNet)|
|OpenJpegDotNet (Xamarin)|UWP|||||[![NuGet version](https://img.shields.io/nuget/v/OpenJpegDotNet.Xamarin.svg)](https://www.nuget.org/packages/OpenJpegDotNet.Xamarin)|
||Android|||||[![NuGet version](https://img.shields.io/nuget/v/OpenJpegDotNet.Xamarin.svg)](https://www.nuget.org/packages/OpenJpegDotNet.Xamarin)|
||iOS|-||-||[![NuGet version](https://img.shields.io/nuget/v/OpenJpegDotNet.Xamarin.svg)](https://www.nuget.org/packages/OpenJpegDotNet.Xamarin)|

## How to use?

Expand Down
7 changes: 7 additions & 0 deletions docker/BuildRuntime.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ foreach($dockerfile in $baseDockerfiles)
$dockerfileDirectory = Resolve-Path ((Get-ChildItem $relativePath).Directory.FullName) -Relative
$basetag = "openjpegdotnet" + $dockerfileDirectory.Trim('.').Replace('\', '/')

# for cross compile by qemu
if ($basetag.Contains("/arm/arm"))
{
Write-Host "Start 'docker run --rm --privileged multiarch/qemu-user-static --reset -p yes" -ForegroundColor Blue
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
}

Write-Host "Start 'docker build -t $basetag $dockerfileDirectory'" -ForegroundColor Green
docker build --force-rm=true -t $basetag $dockerfileDirectory

Expand Down
2 changes: 2 additions & 0 deletions docker/base/ubuntu/18/arm/arm/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
FROM arm32v7/ubuntu:bionic
LABEL maintainer "Takuya Takeuchi <takuya.takeuchi.dev@gmail.com>"
2 changes: 2 additions & 0 deletions docker/base/ubuntu/18/arm/arm64/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
FROM arm64v8/ubuntu:bionic
LABEL maintainer "Takuya Takeuchi <takuya.takeuchi.dev@gmail.com>"
2 changes: 2 additions & 0 deletions docker/base/ubuntu/18/cpu/x64/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
FROM ubuntu:18.04
LABEL maintainer "Takuya Takeuchi <takuya.takeuchi.dev@gmail.com>"
21 changes: 21 additions & 0 deletions docker/build/ubuntu/16/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
ARG IMAGE_NAME
FROM ${IMAGE_NAME}:latest
LABEL maintainer "Takuya Takeuchi <takuya.takeuchi.dev@gmail.com>"

# install gosu to execute process by non-root user
RUN apt-get update && apt-get install -y --no-install-recommends \
gosu

# to use add-apt-repository
RUN apt-get update && apt-get install -y --no-install-recommends \
software-properties-common

RUN add-apt-repository ppa:git-core/ppa \
&& apt-get update && apt-get install -y --no-install-recommends \
git \
&& apt-get clean && rm -rf /var/lib/apt/lists/*

# copy build script and run
COPY runBuild.sh /runBuild.sh
RUN chmod 744 /runBuild.sh
ENTRYPOINT ["./runBuild.sh"]
25 changes: 25 additions & 0 deletions docker/build/ubuntu/16/runBuild.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash

Source=$1
TARGET=$2
ARCH=$3
PLATFORM=$4
DDNROOT=/opt/data/OpenJpegDotNet

if [ $# -eq 5 ]; then
OPTION=$5
fi

CONFIG=Release

# create non-root user
NON_ROOT_USER=user
USER_ID=${LOCAL_UID:-9001}
GROUP_ID=${LOCAL_GID:-9001}
echo "Starting with UID : $USER_ID, GID: $GROUP_ID"
useradd -u $USER_ID -o -m $NON_ROOT_USER
groupmod -g $GROUP_ID $NON_ROOT_USER
export HOME=/home/$NON_ROOT_USER

cd ${DDNROOT}/src/${Source}
exec /usr/sbin/gosu $NON_ROOT_USER pwsh Build.ps1 ${CONFIG} ${TARGET} ${ARCH} ${PLATFORM} ${OPTION}
94 changes: 94 additions & 0 deletions docker/devel/ubuntu/16/android/28.0.3-r20-jdk8/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
FROM ubuntu:16.04
LABEL maintainer "Takuya Takeuchi <takuya.takeuchi.dev@gmail.com>"

# ENVS
ENV ANDROID_HOME /opt/android-sdk-linux
ENV PATH ${PATH}:${ANDROID_HOME}/tools/bin:${ANDROID_HOME}/platform-tools:${PATH}:${ANDROID_HOME}/tools
ENV ANDROID_NDK /opt/android-ndk-linux
ENV ANDROID_NDK_HOME /opt/android-ndk-linux
ENV ANDROID_NDK_VERSION r20
# https://developer.android.com/studio/index.html
ENV ANDROID_SDK_URL https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip
ENV ANDROID_SDK_VERSION 28
ENV ANDROID_SDK_VERSION_BUILDTOOLS 28.0.3
ENV ANDROID_NDK_URL https://dl.google.com/android/repository/android-ndk-${ANDROID_NDK_VERSION}-linux-x86_64.zip
ENV OPENJDK_MAJOR_VERSION 8

# install package to build
RUN apt-get update && apt-get install -y \
build-essential \
libx11-dev \
libgtk2.0-dev \
pkg-config \
openjdk-8-jdk \
ca-certificates-java

# install openjdk8
ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64
RUN export JAVA_HOME

# install android sdk and ndk
RUN cd /opt && mkdir -p /opt/android-sdk-linux && mkdir -p ~/.android && touch ~/.android/repositories.cfg

RUN apt-get update && apt-get install -y --no-install-recommends \
unzip \
wget \
apt-transport-https

RUN cd /opt/android-sdk-linux \
&& wget -q --output-document=sdk-tools.zip ${ANDROID_SDK_URL} \
&& unzip sdk-tools.zip \
&& rm -f sdk-tools.zip
# ENV SDKMANAGER_OPTS "--add-modules java.se.ee"
RUN echo y | sdkmanager "build-tools;${ANDROID_SDK_VERSION_BUILDTOOLS}" "platforms;android-${ANDROID_SDK_VERSION}" \
&& echo y | sdkmanager "extras;android;m2repository" "extras;google;m2repository" "extras;google;google_play_services" \
&& echo y | sdkmanager "cmake;3.6.4111459"
RUN cd /opt \
&& wget -q --output-document=android-ndk.zip ${ANDROID_NDK_URL} \
&& unzip android-ndk.zip \
&& rm -f android-ndk.zip \
&& mv android-ndk-${ANDROID_NDK_VERSION} android-ndk-linux

# install latest cmake
ENV CMAKE_VERSION 3.14.5
ENV CMAKE_FILE cmake-${CMAKE_VERSION}-Linux-x86_64.tar.gz
ENV CMAKE_URL https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_FILE}
ENV CMAKE_URL_FILE ${CMAKE_FILE}
RUN wget ${CMAKE_URL} \
&& tar -xzf ${CMAKE_FILE} \
&& rm ${CMAKE_FILE} \
&& mv ${CMAKE_FILE%.tar.gz} /opt/cmake \
&& ln -s /opt/cmake/bin/* /usr/bin

# install latest ninja
ENV NINJA_VERSION 1.9.0
ENV NINJA_FILE ninja-linux.zip
ENV NINJA_URL https://github.com/ninja-build/ninja/releases/download/v${NINJA_VERSION}/${NINJA_FILE}
RUN wget https://github.com/ninja-build/ninja/releases/download/v${NINJA_VERSION}/ninja-linux.zip \
&& unzip ${NINJA_FILE} \
&& rm ${NINJA_FILE} \
&& mkdir -p /opt/ninja \
&& mv ninja /opt/ninja \
&& ln -s /opt/ninja/* /usr/bin

# Register Microsoft key and feed
RUN apt-get update && apt-get install -y \
wget \
apt-transport-https
RUN wget -q https://packages.microsoft.com/config/ubuntu/16.04/packages-microsoft-prod.deb
RUN dpkg -i packages-microsoft-prod.deb && rm packages-microsoft-prod.deb
RUN apt-get update && apt-get install -y \
powershell \
&& apt-get clean && rm -rf /var/lib/apt/lists/*

# install vulkan sdk
RUN apt-get update && apt install -y wget apt-transport-https

ENV VULKAN_SDK_VERSION 1.2.162.0
WORKDIR /usr/share/vulkan
RUN wget https://sdk.lunarg.com/sdk/download/${VULKAN_SDK_VERSION}/linux/vulkansdk-linux-x86_64-${VULKAN_SDK_VERSION}.tar.gz?Human=true -O vulkansdk-linux-x86_64-${VULKAN_SDK_VERSION}.tar.gz
RUN tar -xf vulkansdk-linux-x86_64-${VULKAN_SDK_VERSION}.tar.gz
RUN rm vulkansdk-linux-x86_64-${VULKAN_SDK_VERSION}.tar.gz
ENV VULKAN_SDK /usr/share/vulkan/${VULKAN_SDK_VERSION}/x86_64

WORKDIR /
42 changes: 42 additions & 0 deletions docker/devel/ubuntu/18/arm/arm/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
FROM ubuntu:18.04
LABEL maintainer "Takuya Takeuchi <takuya.takeuchi.dev@gmail.com>"

# install package to build
RUN apt-get update && apt-get install -y \
build-essential \
tar \
wget

# install latest cmake
ENV CMAKE_FILE cmake-3.19.4-Linux-x86_64.tar.gz
ENV CMAKE_URL https://github.com/Kitware/CMake/releases/download/v3.19.4/${CMAKE_FILE}
ENV CMAKE_URL_FILE ${CMAKE_FILE}
RUN wget ${CMAKE_URL} \
&& tar -xzf ${CMAKE_FILE} \
&& rm ${CMAKE_FILE} \
&& mv ${CMAKE_FILE%.tar.gz} /opt/cmake \
&& ln -s /opt/cmake/bin/* /usr/bin

# set compiler
ENV CMAKE_C_COMPILER=/usr/bin/gcc
ENV CMAKE_CXX_COMPILER=/usr/bin/g++

# Register Microsoft key and feed
RUN apt-get update && apt-get install -y \
apt-transport-https
RUN wget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb
RUN dpkg -i packages-microsoft-prod.deb && rm packages-microsoft-prod.deb
RUN apt-get update && apt-get install -y \
powershell

# Support python build
RUN apt-get update && apt-get install -y \
python3-distutils \
python3-dev \
&& apt-get clean && rm -rf /var/lib/apt/lists/*

# install compiler for arm
RUN apt-get update && apt-get install -y \
g++-arm-linux-gnueabihf \
g++-aarch64-linux-gnu \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
42 changes: 42 additions & 0 deletions docker/devel/ubuntu/18/arm/arm64/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
FROM ubuntu:18.04
LABEL maintainer "Takuya Takeuchi <takuya.takeuchi.dev@gmail.com>"

# install package to build
RUN apt-get update && apt-get install -y \
build-essential \
tar \
wget

# install latest cmake
ENV CMAKE_FILE cmake-3.19.4-Linux-x86_64.tar.gz
ENV CMAKE_URL https://github.com/Kitware/CMake/releases/download/v3.19.4/${CMAKE_FILE}
ENV CMAKE_URL_FILE ${CMAKE_FILE}
RUN wget ${CMAKE_URL} \
&& tar -xzf ${CMAKE_FILE} \
&& rm ${CMAKE_FILE} \
&& mv ${CMAKE_FILE%.tar.gz} /opt/cmake \
&& ln -s /opt/cmake/bin/* /usr/bin

# set compiler
ENV CMAKE_C_COMPILER=/usr/bin/gcc
ENV CMAKE_CXX_COMPILER=/usr/bin/g++

# Register Microsoft key and feed
RUN apt-get update && apt-get install -y \
apt-transport-https
RUN wget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb
RUN dpkg -i packages-microsoft-prod.deb && rm packages-microsoft-prod.deb
RUN apt-get update && apt-get install -y \
powershell

# Support python build
RUN apt-get update && apt-get install -y \
python3-distutils \
python3-dev \
&& apt-get clean && rm -rf /var/lib/apt/lists/*

# install compiler for arm
RUN apt-get update && apt-get install -y \
g++-arm-linux-gnueabihf \
g++-aarch64-linux-gnu \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
Loading

0 comments on commit 81db7d9

Please sign in to comment.