Skip to content

Support building Windows version on Appveyor#437

Merged
DaveMielke merged 1 commit intobrltty:masterfrom
LeonarddeR:appveyor
Oct 20, 2023
Merged

Support building Windows version on Appveyor#437
DaveMielke merged 1 commit intobrltty:masterfrom
LeonarddeR:appveyor

Conversation

@LeonarddeR
Copy link
Copy Markdown
Contributor

@LeonarddeR LeonarddeR commented Oct 20, 2023

As I have been struggling for ages to get a working windows build of BRLTTY for myself, I figured building the Windows version with Continuous Integration would be most helpful.
Appveyor has baked in support for msys1, so that seemed like a good starting point, and indeed, it works like a charm.
The bundled configuration for Appveyor builds BRLTTY and uses Python 3.11 for the Python bindings. The resulting zip and installer executable are uploaded as artifacts and can be fetched from the build after building.

i have also added Unicode false to the nsis script. This is the default behavior in the version of nsis that is used by the build system by default, but Appveyor has a newer version that has Unicode set to true by default. When we change Unicode to true, we get errors with nsistrings.txt parsing.

Note that you need to setup Appveyor for this to work, which is pretty trivial:

  1. Go to https://www.appveyor.com/
  2. Sign in with Github
  3. Create a new project from Github
  4. Login with your Github credentials
  5. Install the Appveyor app for the BRLTTY organization for the brltty repo.

When setup is finished, pushing a next commit to master or triggering the build from the appveyor dashboard should work. It should also work for pull requests out of the box.

note that this can be expanded in many ways, i.e:

  1. Building for both versions of LibUSB
  2. Building for several versions of Python
  3. Building for Linux

@DaveMielke
Copy link
Copy Markdown
Member

DaveMielke commented Oct 20, 2023 via email

@DaveMielke DaveMielke merged commit 8321536 into brltty:master Oct 20, 2023
@LeonarddeR
Copy link
Copy Markdown
Contributor Author

Should the .yml file be at the top-level or in Windows/?

By default, it should be in the top level directory. You can also move it to the Windows directory, but that requires changing the configuration in Appveyors gui, i.e. opening project settings and on the general tab, appveyor.yml Custom configuration .yml file name, enter the new path. However, if you ever wish to add appveyor for linux builds as well, you'd have to undo this.

What's a simple description of what Appveyor does?

To keep it very simple, when Appveyor is setup and you commit something to the master branch, Appveyor spins up a Windows virtual machine and runs the instructions from appveyor.yml to build your code. In the end, when the build finishes, it can publish build artifacts, such as in the case of BRLTTY, the zip and exe files resulting from the Windows build.

See here for an example run. You can retrieve the build artifacts when going to the Artifacts link.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants