Skip to content

Commit

Permalink
Build action.
Browse files Browse the repository at this point in the history
  • Loading branch information
ncruces committed Oct 23, 2023
1 parent 548d27e commit 76f858e
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 3 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,16 @@ on:
jobs:

build:
runs-on: ubuntu-latest
runs-on: windows-latest

steps:
- name: Placeholder
run: true
- uses: actions/checkout@v4

- name: Build artifact
run: ./build.sh
shell: bash

- name: Upload artifact
uses: actions/upload-artifact@v3
with:
path: dcraw-windows.zip
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
build*/
libjpeg-turbo*/
20 changes: 20 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

set -Eeuo pipefail

JVER=3.0.1
if [ ! -d "libjpeg-turbo-$JVER" ]; then
url="https://downloads.sourceforge.net/project/libjpeg-turbo/$JVER/libjpeg-turbo-$JVER-gcc64.exe"
mkdir "libjpeg-turbo-$JVER"
pushd "libjpeg-turbo-$JVER"
curl -sL "$url" > archive.7z
7z x archive.7z
popd
fi

gcc -O3 -o dcraw.exe dcraw.c -lws2_32 -DNO_JASPER -DNO_LCMS \
-I"libjpeg-turbo-$JVER/include" "libjpeg-turbo-$JVER/lib/libjpeg.dll.a"

cp "libjpeg-turbo-$JVER/bin/libjpeg-62.dll" .

7z a -mx9 dcraw-windows.zip dcraw.exe libjpeg-62.dll

0 comments on commit 76f858e

Please sign in to comment.