Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 0 additions & 100 deletions .circleci/config.yml

This file was deleted.

53 changes: 7 additions & 46 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,53 +4,14 @@ on:
branches:
- master

env:
IMAGE_NAME: europe-north1-docker.pkg.dev/clementine-data/mingw-w64

jobs:
build:
runs-on: ubuntu-18.04
container:
image: ubuntu:eoan
runs-on: ubuntu-24.04
steps:
- name: Accept EULAs
env:
DEBIAN_FRONTEND: interactive
run: echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | debconf-set-selections
- name: Install dependencies
run: >
apt-get update && apt-get install -y -q
autoconf
bison
cmake
flex
gettext
git-core
intltool
libglib2.0-dev
libtool
mingw-w64
nsis
pkg-config
protobuf-compiler
python
python-dev
stow
sudo
texinfo
unzip
wget
wine-stable
yasm
- name: Configure Mingw for POSIX threads
run: update-alternatives --set i686-w64-mingw32-gcc /usr/bin/i686-w64-mingw32-gcc-posix
- name: Configure Mingw for POSIX threads
run: update-alternatives --set i686-w64-mingw32-g++ /usr/bin/i686-w64-mingw32-g++-posix
- name: Checkout
uses: actions/checkout@v2
with:
path: deps
- name: Fix source path
run: mv deps /src
- name: Create target directory
run: mkdir -p /target/stow
- name: Build dependencies
working-directory: /src/windows
run: make
uses: actions/checkout@v6
- name: Docker build
run: docker build -f windows.Dockerfile -t ${{ env.IMAGE_NAME }}:${{ github.sha }} .
19 changes: 6 additions & 13 deletions downloader/downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import hashlib
import os
import sys
import urllib
import urllib.request, urllib.parse, urllib.error

DOWNLOAD_URL = 'https://storage.googleapis.com/clementine-data.appspot.com/Build%20dependencies/'

Expand Down Expand Up @@ -72,19 +72,12 @@
def Md5File(path):
"""Returns the MD5 checksum of a file, or None if it doesn't exist."""

file_hash = hashlib.md5()
try:
with open(path) as fh:
while True:
chunk = fh.read(4096)
if len(chunk) == 0:
break
file_hash.update(chunk)
with open(path, 'rb') as fh:
return hashlib.file_digest(fh, "md5").hexdigest()
except IOError:
return None

return file_hash.hexdigest()


def DownloadFiles(flags):
# Create the output directory if it doesn't exist.
Expand All @@ -103,8 +96,8 @@ def DownloadFiles(flags):
if actual_md5_checksum != md5_checksum:
url = DOWNLOAD_URL + name

print 'Downloading %s...' % name
urllib.urlretrieve(url, path)
print('Downloading %s...' % name)
urllib.request.urlretrieve(url, path)
actual_md5_checksum = Md5File(path)

# If the checksum still didn't match the download must have failed.
Expand All @@ -113,7 +106,7 @@ def DownloadFiles(flags):
'Download failed - checksums do not match (got %s, expected %s)' %
(actual_md5_checksum, md5_checksum))

print 'All files are up-to-date'
print('All files are up-to-date')


def Main(argv):
Expand Down
4 changes: 2 additions & 2 deletions makefile.common
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ all:
$(MAKE) clementine-deps

clean:
realstow=`python -c "import os.path; print os.path.realpath('$(stow)')"`; \
realstow=`python3 -c "import os.path; print os.path.realpath('$(stow)')"`; \
for path in $(stow)/*; do \
directory=`basename $$path`; \
stow -d $$realstow -D $$directory; \
Expand All @@ -148,7 +148,7 @@ clean:
-rm .done-*

all-downloads:
python $(src)/downloader/downloader.py --output "$(downloads)"
python3 $(src)/downloader/downloader.py --output "$(downloads)"

boost: .done-boost
cdio: .done-cdio
Expand Down
20 changes: 17 additions & 3 deletions windows.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
FROM ubuntu:eoan
FROM ubuntu:noble

RUN echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | debconf-set-selections

RUN apt-get update && apt-get install -y -q \
autoconf \
bison \
bzip2 \
cmake \
flex \
gettext \
Expand All @@ -16,15 +17,28 @@ RUN apt-get update && apt-get install -y -q \
nsis \
pkg-config \
protobuf-compiler \
python \
python3 \
python3-dev \
stow \
sudo \
texinfo \
unzip \
wget \
wine-stable \
xz-utils \
yasm

RUN update-alternatives --set i686-w64-mingw32-gcc /usr/bin/i686-w64-mingw32-gcc-posix
RUN update-alternatives --set i686-w64-mingw32-g++ /usr/bin/i686-w64-mingw32-g++-posix
COPY target /target

RUN mkdir -p /src
RUN mkdir -p /target/stow

COPY . /src
WORKDIR /src/windows

# Separate this step to cache it before any build failures.
RUN make all-downloads

RUN make

Loading