Giter VIP home page Giter VIP logo

Comments (3)

laanwj avatar laanwj commented on June 1, 2024

At least the CI tests pass on Windows now. Shouldn't be too hard to build an .exe.

from sundog.

laanwj avatar laanwj commented on June 1, 2024

These steps seem sufficient to build a Windows binary with github actions, with MSVC:

  windows:
    runs-on: windows-latest
    steps:
    - uses: actions/checkout@v3
    - uses: actions/setup-python@v4
      with:
        python-version: '3.x'
    - name: Prepare MSVC
      uses: bus1/cabuild/action/msdevshell@v1
      with:
        architecture: x64
    - run: pip install meson ninja
    - run: |
        mkdir subprojects
        meson wrap install sdl2
    - run: meson setup  --buildtype release -Dgame_cheats=true -Ddebug_ui=true builddir/
    - run: ninja -C builddir
    - run: meson test -C builddir/ -v
    - uses: actions/upload-artifact@v3
      if: failure()
      with:
        name: Windows_Meson_Testlog
        path: builddir/meson-logs/testlog.txt
    - uses: actions/upload-artifact@v3
      with:
        name: Windows_Executable
        path: builddir/src/sundog.exe

Then you can download the artifact and run sundog.exe <disk_image> (or copy sundog.st to the directory of the exe).

  • If you get an error about missing DLLs, make sure you have the appropriate VC redistributable installed (and double-check you're building in release mode, not debug mode).
  • If you get an error about not being able to initialize GL driver, your WGL driver doesn't have native support for OpenGL ES 2/3. You'll need to copy the ANGLE DLLs (libEGL.dll libGLESv2.dll and d3dcompiler_XX.dll)) to the current directory before running. You can build them yourself or copy them from a Google Chrome/Chromium distribution.

from sundog.

laanwj avatar laanwj commented on June 1, 2024

Some notes on building a binary release

  • Instead of building and statically linking SDL, link against and ship the official release DLLs. This makes sure we don't inherit bugs from bleeding-edge SDL, and speeds up the build.

  • I can't find any (trustable) download of just the ANGLE DLLs, that could be used to create a release. Here's a github action that builds it, might be useful for buliding a release: https://github.com/xiaozhuai/angle_builds
    However it's broken right now, due to a missing option while downloading the windows SDL: https://github.com/xiaozhuai/angle_builds/pull/2
    Another possibility may be to build it using vcpkg install angle:x64-windows.

from sundog.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.