1919 run : |
2020 sudo apt-get update
2121 sudo apt-get install -y \
22- liballegro4-dev \
22+ liballegro5-dev \
23+ liballegro-acodec5-dev \
24+ liballegro-audio5-dev \
25+ liballegro-font5-dev \
26+ liballegro-image5-dev \
27+ liballegro-color5-dev \
28+ liballegro-primitives5-dev \
2329 autoconf \
2430 automake \
2531 build-essential \
@@ -94,7 +100,13 @@ jobs:
94100 run : |
95101 apt-get update
96102 apt-get install -y \
97- liballegro4-dev \
103+ liballegro5-dev \
104+ liballegro-acodec5-dev \
105+ liballegro-audio5-dev \
106+ liballegro-font5-dev \
107+ liballegro-image5-dev \
108+ liballegro-color5-dev \
109+ liballegro-primitives5-dev \
98110 autoconf \
99111 automake \
100112 build-essential \
@@ -168,8 +180,7 @@ jobs:
168180 - name : Install dependencies
169181 run : |
170182 dnf install -y \
171- allegro-devel \
172- allegro-tools \
183+ allegro5-devel \
173184 autoconf \
174185 automake \
175186 make \
@@ -247,7 +258,7 @@ jobs:
247258 run : |
248259 pacman -Syu --noconfirm
249260 pacman -S --noconfirm \
250- allegro4 \
261+ allegro \
251262 autoconf \
252263 automake \
253264 make \
@@ -312,268 +323,9 @@ jobs:
312323 - name : Clean
313324 run : make clean
314325
315- build-freebsd :
316- runs-on : ubuntu-latest
317-
318- steps :
319- - name : Checkout code
320- uses : actions/checkout@v5
321-
322- - name : Build on FreeBSD
323- uses : vmactions/freebsd-vm@v1
324- with :
325- usesh : true
326- prepare : |
327- pkg install -y allegro autoconf automake gmake pkgconf
328- run : |
329- autoconf
330- ./configure --prefix=$HOME/lw5
331- gmake
332- gmake install
333- gmake package_source
334-
335- # Check binary exists and is executable
336- if [ ! -x "$HOME/lw5/bin/liquidwar" ]; then
337- echo "ERROR: $HOME/lw5/bin/liquidwar is not executable"
338- exit 1
339- fi
340- echo "SUCCESS: liquidwar binary is executable"
341-
342- # Check version starts with 5
343- VERSION_OUTPUT=$($HOME/lw5/bin/liquidwar --version)
344- echo "Version output: $VERSION_OUTPUT"
345-
346- if echo "$VERSION_OUTPUT" | head -n1 | grep -q '^5'; then
347- echo "SUCCESS: Version starts with 5"
348- else
349- echo "ERROR: Version does not start with 5"
350- echo "Got: $VERSION_OUTPUT"
351- exit 1
352- fi
353-
354- # Test liquidwar-mapgen binary
355- if [ -x "$HOME/lw5/bin/liquidwar-mapgen" ]; then
356- echo "liquidwar-mapgen is executable"
357- $HOME/lw5/bin/liquidwar-mapgen --version || true
358- else
359- echo "WARNING: liquidwar-mapgen not found or not executable"
360- fi
361-
362- build-windows :
363- runs-on : windows-latest
364- defaults :
365- run :
366- shell : msys2 {0}
367-
368- steps :
369- - name : Checkout code
370- uses : actions/checkout@v5
371-
372- - name : Setup MSYS2 with MinGW32
373- uses : msys2/setup-msys2@v2
374- with :
375- msystem : MINGW32
376- update : true
377- install : >-
378- mingw-w64-i686-toolchain
379- mingw-w64-i686-cmake
380- autoconf
381- automake
382- make
383- dos2unix
384- wget
385- unzip
386-
387- - name : Build and install Allegro 4.4
388- run : |
389- # Download Allegro 4.4.3.1 source
390- wget https://github.com/liballeg/allegro5/releases/download/4.4.3.1/allegro-4.4.3.1.zip
391- unzip allegro-4.4.3.1.zip
392- cd allegro
393-
394- # List files to debug
395- ls -la
396-
397- # Build Allegro 4 for MinGW using cmake
398- mkdir build
399- cd build
400- cmake .. \
401- -G "MSYS Makefiles" \
402- -DCMAKE_INSTALL_PREFIX=/mingw32 \
403- -DCMAKE_BUILD_TYPE=Release \
404- -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
405- -DWANT_DOCS=OFF \
406- -DWANT_TESTS=OFF \
407- -DWANT_EXAMPLES=OFF \
408- -DWANT_TOOLS=ON
409- make -j2
410- make install
411-
412- # Debug: Search for Allegro DLL files
413- echo "Searching Allegro DLL files in /mingw32:"
414- find /mingw32 -name "alleg*.dll" -ls 2>/dev/null || echo "No alleg*.dll in /mingw32"
415-
416- # Verify installation
417- echo "Checking for dat tool:"
418- ls -la /mingw32/bin/dat* || echo "dat not found in /mingw32/bin"
419-
420- cd ../..
421-
422- - name : Build Liquid War with Makefile.mgw
423- run : |
424- # Ensure /mingw32/bin is in PATH for Allegro
425- export PATH="/mingw32/bin:$PATH"
426-
427- # Check if dat tool exists
428- echo "Checking for required tools:"
429- which dat || echo "WARNING: dat not found"
430- ls -la /mingw32/bin/dat* || ( echo "dat not in /mingw32/bin" && exit 1)
431-
432- # Debug: Check what Allegro libraries are available
433- echo "Libraries in /mingw32/lib:"
434- ls -la /mingw32/lib/liballeg* || ( echo "No Allegro libraries" && exit 1)
435-
436- # Build using MinGW Makefile
437- make -f Makefile.mgw
438-
439- - name : Check Windows binary created
440- run : |
441- cp /mingw32/bin/alleg44.dll .
442- if [ -f "lwwin.exe" ] && [ -f "lwwinsrv.exe" ] && [ -f "lwwinmap.exe" ] && [ -f "alleg44.dll" ] ; then
443- echo "SUCCESS: Windows .exe files created"
444- ls -lh lwwin*.exe
445- else
446- echo "ERROR: Windows .exe files not found"
447- exit 1
448- fi
449-
450- - name : Upload Windows binaries
451- uses : actions/upload-artifact@v4
452- with :
453- name : liquidwar-windows-binaries
454- path : |
455- lwwin*.exe
456- alleg44.dll
457- retention-days : 61
458-
459- build-dos :
460- runs-on : ubuntu-latest
461-
462- steps :
463- - name : Checkout code
464- uses : actions/checkout@v5
465-
466- - name : Install DJGPP cross-compiler
467- run : |
468- sudo apt-get update
469- sudo apt-get install -y wget bzip2 make gcc g++ unzip flex
470-
471- # Download and setup DJGPP cross-compiler
472- cd /tmp
473- wget https://github.com/andrewwutw/build-djgpp/releases/download/v3.4/djgpp-linux64-gcc1220.tar.bz2
474- sudo tar xjf djgpp-linux64-gcc1220.tar.bz2 -C /usr/local
475- export PATH="/usr/local/djgpp/bin:$PATH"
476-
477- echo "DJGPP cross-compiler installed:"
478- i586-pc-msdosdjgpp-gcc --version
479-
480- - name : Setup Allegro 4.2.3.1 for DOS
481- run : |
482- export PATH="/usr/local/djgpp/bin:$PATH"
483- export DJGPP_PREFIX=i586-pc-msdosdjgpp
484-
485- # Download Allegro 4.2.3.1 source for headers
486- wget https://github.com/liballeg/allegro5/releases/download/v4-2-3-1/all4231.zip
487- unzip all4231.zip
488-
489- # Use Allegro's actual build system
490- cd allegro
491-
492- # Set up cross-compilation environment variables (as per docs/build/djgpp.txt)
493- export CROSSCOMPILE=1
494- export DJDIR=/usr/local/djgpp
495- export NATIVEPATH=$PATH
496- export PATH=/usr/local/djgpp/bin:$PATH
497-
498- # Configure for DJGPP
499- echo "Configuring Allegro for DJGPP..."
500- bash fix.sh djgpp
501-
502- # Build using Allegro's Makefile with cross-compiler
503- # Must override CC since makefile.dj defaults to 'gcc'
504- # Only build the library, not utilities like setup.exe
505- # Add -fgnu89-inline to handle extern __inline__ in headers correctly
506- # Try without ALLEGRO_USE_C=1 to let assembly files compile
507- echo "Building Allegro with DJGPP cross-compiler..."
508- make lib \
509- CC=${DJGPP_PREFIX}-gcc \
510- CROSSCOMPILE=1 \
511- TARGET_OPTS="-O2 -funroll-loops -ffast-math -fgnu89-inline"
512-
513- echo "Allegro build complete. Checking library..."
514- ls -lh lib/djgpp/liballeg.a || ( echo "ERROR: Allegro library not created" && exit 1 )
515- cd ..
516-
517- - name : Download CWSDPMI for DOS runtime
518- run : |
519- # CWSDPMI is the DOS Protected Mode Interface server needed to run DJGPP programs
520- # Try multiple mirrors
521- wget http://www.delorie.com/pub/djgpp/current/v2misc/csdpmi7b.zip -O csdpmi7b.zip || \
522- wget https://www.mirrorservice.org/sites/ftp.delorie.com/pub/djgpp/current/v2misc/csdpmi7b.zip -O csdpmi7b.zip || \
523- ( echo "ERROR: Failed to download CWSDPMI" && exit 1 )
524-
525- unzip csdpmi7b.zip
526-
527- # Find and copy to root directory
528- find . -iname "cwsdpmi.exe" -exec cp {} ./cwsdpmi.exe \;
529-
530- echo "CWSDPMI location:"
531- ls -la cwsdpmi.exe || ( echo "ERROR: cwsdpmi.exe not found after extraction" && exit 1 )
532-
533- - name : Build Liquid War for DOS
534- run : |
535- export PATH="/usr/local/djgpp/bin:$PATH"
536-
537- # Debug: Show Allegro library location
538- echo "Current directory: $PWD"
539- echo "Allegro library path: $PWD/allegro/lib/djgpp"
540- ls -lh $PWD/allegro/lib/djgpp/liballeg.a || echo "Allegro library not found!"
541-
542- # Build using DJGPP cross-compiler with explicit Allegro paths
543- # Need -fgnu89-inline to match Allegro's build for extern __inline__ functions
544- echo "Building with LDFLAGS=-L$PWD/allegro/lib/djgpp"
545- make -f Makefile.dj \
546- CC=i586-pc-msdosdjgpp-gcc \
547- C_FLAGS="-O2 -fomit-frame-pointer -Wall -Werror -I./src/ -I$PWD/allegro/include -DALLEGRO_STATICLINK -fgnu89-inline" \
548- LDFLAGS="-L$PWD/allegro/lib/djgpp" || ( echo "Build failed" && exit 1 )
549-
550- echo "Checking if executable was created:"
551- ls -lh src/*.exe 2>/dev/null || ls -lh lwdos*.exe 2>/dev/null || ls -lh *.exe 2>/dev/null || echo "No .exe found"
552- find . -name "*.exe" -type f
553-
554- - name : Check DOS executable created
555- run : |
556- if [ -f "lwdos.exe" ] ; then
557- echo "SUCCESS: DOS executable created"
558- ls -lh *.exe src/*.exe 2>/dev/null || true
559- else
560- echo "ERROR: No DOS executable found"
561- find . -name "*.exe"
562- exit 1
563- fi
564-
565- - name : Upload DOS binaries
566- uses : actions/upload-artifact@v4
567- with :
568- name : liquidwar-dos-binaries
569- path : |
570- lwdos*.exe
571- cwsdpmi.exe
572- retention-days : 61
573-
574326 build-source :
575327 runs-on : ubuntu-latest
576- needs : [build-fedora, build-ubuntu, build-debian, build-arch, build-freebsd, build-windows, build-dos ]
328+ needs : [build-fedora, build-ubuntu, build-debian, build-arch]
577329
578330 steps :
579331 - name : Checkout code
@@ -583,7 +335,13 @@ jobs:
583335 run : |
584336 sudo apt-get update
585337 sudo apt-get install -y \
586- liballegro4-dev \
338+ liballegro5-dev \
339+ liballegro-acodec5-dev \
340+ liballegro-audio5-dev \
341+ liballegro-font5-dev \
342+ liballegro-image5-dev \
343+ liballegro-color5-dev \
344+ liballegro-primitives5-dev \
587345 autoconf \
588346 automake \
589347 build-essential
0 commit comments