Back to the talks Previous by track: Literate Documentation with Emacs and Org Mode Next by track: Bringing joy to Scheme programming Track: Development

Windows into Freedom

Corwin Brust (He/Him) - Core-win Brew-st, IRC: corwin, corwin@bru.st

Help wanted: main talk does not have captions

This talk does not have captions yet. Would you like to help caption this talk? You may be able to start with these autogenerated captions.

(If you want to work on this and you think it might take you a while, you can reserve this task by editing the page and adding volunteer="your-name date" or by e-mailing emacsconf-submit@gnu.org.)

Format: 58-min talk; Q&A: BigBlueButton conference room
Status: Q&A to be extracted from the room recordings

Talk

Duration: 57:48 minutes

Q&A

Listen to just the audio:

Description

  • A Brief History of the windows port

    When (and why?) was the windows port added? Was that contentious? How about now? (5m)

  • Acquire Binaries

    There are lots of ways for Windows users to get pre-compiled Emacs binaries. I'll mention some and get into the particulars of Emacs as found on GNU FTP. (2m)

  • Build Sources

    I'll talk about how building for Windows differs from building for other platforms, where to find documentation, important configuration options to consider, requirements for the build machine. After that I'll show build commands and good and not-so-good outputs, ultimately covering the complete process, both using the latest release tarball (from GNU FTP) as well as for building the main development branch from emacs.git (hosted on GNU Savannah). (20m)

  • Make an Installer

    I'll show how to use the NSIS script contained within admin/nt/dist-build in the Emacs source tree to create an executable self-installer of Emacs for Windows. (2m)

  • Share

    I'll describe the requirements of the GNU Public License as related to sharing binary versions of Emacs, and talk about what I do to comply, command by command. (1m)

  • Automate

    I'll introduce scripting I use to automate publishing binaries tracking a given Emacs branch, and a couple other related tools, thus recapping most topics. (10m)

Discussion

  • I can't imagine cross-compiling Emacs for Windows on Linux is easy, but sounds "fun".

Transcript (unedited)

Oh, wow, how exciting. Well, maybe I should share something then. Um, well, thank you very much and welcome to uh Welcome to my talk i'm a little distracted here I had a friend who came over and just brought me a whole bunch of peanut butter cups homemade peanut butter cups Maybe i'll show those off. Uh later Okay, what okay here, uh, put it right there All good stuff Okay, so i'm going to uh get over to my planned uh stuff i'm sharing here hopefully Uh, and and we'll jump jump right in because i'm gonna need as much time as I can possibly have today thanks so much for uh joining me for emacs conference and for especially for um all of you who who participated, you know in the discussions contributing talks and um, you know, uh, you know, including running the copy the the and it's just so much fun to be here, um I guess while i'm standing here and and saying stuff that's that i'm gonna have to transcribe because I didn't uh prepare a recorded version Uh, I had a lot of trouble trimming this down so I can solve that problem by just talking a lot at the beginning about other stuff, um So in addition to the thanks I just want to say thanks also to the Folks on the development list that helped me kind of come up to speed on this. I won't make a big list here. But um And and for all that i've learned from my previous conferences It's just I can't stress enough what a great opportunity volunteering for uh free software related things are Uh as a way to get involved people will just totally teach you how to be helpful and i'm loving it Sasha can you please maximize? Hold on I can preview the stream, but it's not super easy right now I got all my screens kind of dedicated to other stuff so should I pause for a second before I get into the slides because there's There they'll be hard to see if i'm not full screen Yeah, yeah, okay, well i'll keep ad-libbing then because I just have a million, uh things I can say, um Uh, so, uh, let me just quickly talk, uh things that aren't in here. Um, I'm going to mention the mysis2.org and the that project which provides a port of the GNU Of uh glibc and a lot of GNU and other free software um, so Uh, I don't pushing a room to uh a dvd room to stefan All right, so i'm gonna take mumble out of my uh, pardon me folks just gonna take mumble out of my speakers here Okay Okay, in fact we'll take the speakers out of play entirely and i'll just switch to some headphones All right, so Gorman you're good to go Perfect. What an amazing amount of time. All right. So thanks a lot. Uh today i've got a jam-packed talk Um, i've i've done my best to make To make this not too overwhelming, but overall we're going to try to try to actually build Um emacs while we're talking today and we might actually build several emacs Uh, so let's take a look at that real quick Um, so over here we have a screen where I am Just once a minute looking. Uh Indirectly at whether there have been any pushes, uh upstream to either the emacs 29 or emacs 30 branches so i've Arranged for us to sort of keep an eye on that Um while we talk and you know, maybe that's that's one thing that we'll do and then additionally we'll probably Fire up a shell. This is the mysis 2 environment that I talked about before And we'll probably create some directories and things But before we get into all that let's let's give some some context. I've been doing my best to try to Uh, make sure all this information is on the emacs wiki as well So, uh, sorry, as I said, I got a little caught off guard. So i'm moving my foot pedals To the float back to the floor here And I should be able to advance slides here. All right, so um I kind of provided some special definitions for things i'm going to kind of level set with those the uh Um when I say a binary release i'm talking about some some i'm talking about emacs for windows as Just ready to run out of its folder or in whatever similar form The when I say a build i'm talking about kind of a process of doing that Um when emacs.get of course, that's the upstream hosted by gnu savannah The emacs release is a tarball created from that the sources For um emacs are going to be one of those two things Um very specifically so i'm not going to talk about patches patching there's some implications there perhaps we'll get into it uh So a snapshot is when I build from anything other than a release source uh a tarball um, just if I if I say that i'm talking specifically about the uh, the xz Version of the file as as a technical point Um, so that may come up. All right, nothing else I think up my sleeve. Um the Uh as as a key data point it's worth understanding that there's a file called configure ac It's going to be processed, uh as part of autoconf. We we initially access that when we run Um autogen as you'll see in a little bit um The but before but um, so the autogen script will generally consider this. Uh, so in a release build Um, this has been thought about kind of for us as part of um making the tarball um the configure dot a ac um Yeah, I think I pretty much covered covered this so Um those those that kind of partially built status that's a might be another phrase that you hear me use so this Slide unpacks that a little more Um So it can be a little confusing to understand what exactly? the you know, what is it, you know, how stable is emacs depending on what I have so that I got a It's kind of a set of rules of thumb here right first I want the highest, uh, you know dot Uh dot release value that I can get assuming that that's higher than one If it's if it were to only be one, let's say my choices were 29.1 and 30.1 I would take 30.1 um because that's that's weird, but um What you'll normally see is you might see a 28.2 You might see a 29.1 So here I think 28.2 has got the most most most stable um set, uh the uh, or set of release binaries the 29.1 will will have a little more features, but will tend to be more stable than Any lower point releases for 29 Uh, certainly than any release candidates for 29, which might even have new features Um, but are mostly going to just be patches so they're going to become the most stable thing here and especially if they they have a You know if this this is not Uh, if this were to be 29.2 release candidate one as well looking forward to seeing um the 30.0.50 um And and in between this this pre-test here, we're talking about kind of developer land. Um, so Um, the expectation is that you know what you're doing that applies to windows users Uh just as much if you are building anything in the snapshot range any of that is going to be in this 30.0.50 currently that'll change when the when the 30 30 an emacs 30 release tags, uh, or release branches come Okay, so Let's talk about the local um, there's not much to know about what I have going on except that I have my my paths mess messed with so Um, if if that that were to come up if you're wondering how why does this? Uh in in sys command work that's that's probably the way place where you notice it Uh, I am using windows 10. I haven't tried windows 11 Uh as mentioned my sys2 is critical to all this There's one script in particular that will error out if you try to do anything other than use my sys's My sys's shell and in fact my sys owns Or provides three shells and of them that script is designed to work with a specific one of them as we'll come to I don't talk about installing the dependencies, but just as as kind of some kind of help. Um, You can search using this formula and install Using this formula good luck with those, you know grep commands And sys is the tool for building the self-installing self-extracting installer or uh executable self-installer Um, the script for that is provided along with the emac source Um, and i've provided a helpful link to the main page for the project download link on the left. It is not It's kind of scare where the way that this link appears, but I have clicked it and it's working for me Automation does uh, we'll we have some time we'll be looking at this at a minimum I wanted to mention that what I do on my local what you're seeing in the crawler, I hope uh represents a uh A simple sleep loop, uh, and we'll we'll look into that if we have time Um, I do have a little but I do use like a cron job and so on to clean up some hosting that I pay for Um where i've got where I where I kind of self-host some uh snapshots more stuff than I feel comfortable uploading to uh, to gnu The um You know, I never said, uh, my name is corwin bruce for the last couple of years i've been the volunteer making Uh making the snapshots the quote-unquote official binaries, uh for windows of the um Of of emacs for windows. So that's that's all the different versions. Uh help is always welcome with that I'd be very happy to teach you in more depth. This video is You know kind of my drop dead file. Uh, I don't have specific plans. Uh, if somebody's like hey get out of the way This is the one thing I think I can do Um, hey, that's real relatable Okay, um, so I haven't tried uh, the I haven't tried a lot of fun things that I won't talk about um, the uh, the rest of this talk is going to get into the nitty-gritty as I said, um If we can't convince emacs to start building over on that screen, we'll be opening it up here on the center stage um Uh, this begins and there's there's there's there's great insight here too on the wiki, uh With picking an ftp source for any official release That is for a stable product. Please visit Um ftp.gnu.org Otherwise, you'll want to switch that ftp dot at the beginning to alpha dot and take a pre-test Uh, or any snapshot or otherwise then they're not published there The uh next uh, you know i'm gonna you have some examples in here that assume that you're doing a release build that you're doing 29.1, but um, i'm glancing out of the the right side of my face at the Chat on the optance anybody in there wants to direct me at a particular Um, we can make some other we can build something Else if you want to see a snapshot build more mention that um the examples that you're going to see here That I will without other direction cut and paste um Are all based on a release bill so Um, and so, uh, we'll use the uh, I mentioned that there are several shells provided by mysis2 To the min-gw64 Shell is the one that we mostly need Um, I tested all of this as well with the min-gw32 shell um So that that should work and and see mix binaries that that work for me Uh I as I mentioned, I don't get into the details of installing all your prerequisites I found that doing it in a headfirst manner wasn't uh, Wasn't difficult and I also found that there's a number of tutorials. I didn't want to pick one to link here Um there uh Here are uh, okay, so Our general formula for building emacs irrespective of windows looks like Does the configure script exist if not run autogen? from a windows build standpoint This is if i'm not running a release that release build call the autogen script Right and this would be in the directory where we want to pack this i'll demonstrate within three minutes if uh If one if nobody's pushed upstream to emacs um so, uh the configure, uh, and configure options are uh Uh the configure, you know if the configure sorry if the configure script exists then Uh doesn't doesn't exist. So the only reason so in my process I will always execute that step because I clean everything after every build, um in all my contexts um, however, if you were you know had a Checkout of emacs dot get and you are building it at several releases Then maybe you've got a configure script and then you'll want to know um the you know Whether you have to bootstrap and the typical complexities, but otherwise you might be able to skip that in in the abstract um Is that right or is it is Make uh, so and if the make file doesn't exist make install. I know i'm Looking at that and i'm questioning whether it's correct. Sorry about that Um in any case, uh, so autogen configure make install is our recipe autogen Creates the configure script configure creates the make file the make file Um in the case of windows, I almost always want the install Uh and to specify some location where the installed emacs will land this is where all of the recipes for packaging emacs go and if I were You know using this as a movie to upgrade I personally would do that by by specifying an install path quote unquote on top of Uh a main installation. I don't do that. I update shortcuts manually based on what specifically I want to try Uh in an effort to to to notice, uh interesting patches and confirm they work on windows Which mostly they do there's not a lot of code in my experience that is Windows specific and very very little around the build process All right Huge rabbit hole zone and I still have a minute before I have to kick off the first part of our demo so Let's let's keep keep diving in um The those specific part windows specific parts beside the dot exe extension that we're going to find slammed onto all of our familiar Uh executables. We're also going to have emacs client w Which is a wrapper that hides? um how hard it is to get Uh to take it How bad the abstraction is between the window management layer and the gooey? And then all the different parts on windows essentially it wants to create a shell window if we just double click emacs.exe So emacs client w Uh and run emacs are going to solve that problem um Wrapping emacs and emacs client respectively And Just uh All right, so let's let's go ahead and do something i'll i'm going to take away the ticker here for a minute And what you're not seeing is off stage. I am Killing that so we don't get builds in parallel Um So, um So at this point i'm going to open up a shell and i'm going to start talking just a little bit about My local build environment, which we haven't gotten into in fact just to make that even easier let's um Let's just take a look at it a little bit probably the easiest spot Is Here All right, so here we have the familiar windows my computer interface I have the g drive and the h drive four terabyte drives um dedicated to my um, really overblown emacs build process Um, this just lets me be super lazy. There's no reason you need any massive amount of storage to do any of this Um inside here and now i'll actually switch you back to the other screen um We'll we'll find Oops Sorry about that It didn't take the time to label that one Label that one Um, so here you can see the primary output that That i'm looking at through this automated process I come along I look at the bug reports or maybe i'm just restarting my computer and choosing what emacs version at random and then in that case, I look at this modified date and I say um my config that I You know that i'm playing with right now is all set for emacs 30 Or i'm testing them both and i'm relaunching both of these right So for me that starts by diving into the install folder going into the bin folder Which looks exactly the way my automation leaves it. I then come in to run the run emacs And I create a shortcut um To it so I'm a keyboard person. So that's usually done like this And then I just know that the context menu is going to come up in the right place so i'll come up and um Possibly change the change the shortcut, right? If I don't mess with it Um So here's where i'll add my minus q if that's kind of where my world is at or it kind of depends on what i'm doing With these which varies week to week Um, so restarting my emacs, uh involves doing the same thing going to my desktop And where you'll find a number of emac shortcuts and Um updating the shortcut in the same manner Actually, maybe we'll just let's go back there and just show it. So if we look at for example my erc You can see it's going to be pointing at one of these clones, and then it's gonna Maybe tell me that I want it wants to be full screen. No, not currently and then it might uh, Have some stuff in there about auto loading a config and what connections i'm going to some commands i've defined to start connections So All right, and sorry I got a phone call I was checking it wasn't in an order the organ the other organizers giving me the hook So, um, all right, so that's that's probably enough on the local system. Let's get back to To to building emacs and now it hopefully makes a certain amount of sense when I say we're gonna wander over to the h drive and recreate the structure that both My process sort of assumes and the scripts you'll find in the admin nt Uh build disk folder in source Used to assume those scripts are in need of some love and in just a little bit i'll be mentioning a build uh a uh A a particular bug that you might want to pay attention to if you're interested in making a self installer all right, so um We're going to create Uh an emacs build directory And we've got a handy git clone stage git clone command stage for ourself that would work um Do not currently see anybody lobbying for that. So instead we will run the rather faster Uh w get command On savannah, which is not pasted in here. Nice. Let's see if I can freehand it not gonna do it uh Um Beg your pardon i'm grabbing a url from the internet Uh, okay. Yeah, I can't I can't honestly I can't freehand it whatever Sorry, I uh I didn't have that bookmarked and all handy like I thought I did Um, so we'll just say ftp.gnu .org Uh, what is it pub emacs emacs-29.1 Uh Hmm I Didn't Really think i'd have this command sitting around it makes me want to scrap the whole demo i'm not gonna lie Okay, how am I doing your time? Um, I think at least 15 minutes. Um, but in the command that you were freehanding should the pub be gnu instead Oh, thanks I'm, sorry There we go, thank you. All right, and then we'll And i'm not sure I provided commands for this either But it is trivially easy to do and while that happens we'll get to move on a few slides Um The configure script i'm not talking about in a lot of detail But I do want to mention that the gnu binaries are provided with native Uh compilation enabled that's the feature that uses gcc lib gcc get on windows if available that looks gcc get will be used Um, but when but if if emacs has that feature then it will take by compile native code and asynchronously Compile that as needed uh with the ahead of time feature We're going to do as much of that ahead of time and for folks that are consuming the windows binary The thinking goes that they might not have mysys too. They might not have Gcc jet they might be Happy that they're enabled In a you know a lot of time run emacs on their local environments At all You know in a maybe a lockdown at a corporate context so aside that There's your first glimpse at the configure Program that we're going to run in a moment. In fact, i'm going to go as far as Putting it on the clipboard um Really just looking at this the aot flag It's the one i'd call attention to but it's worth understanding that windows doesn't provide a dbus capability So windows native program isn't gonna be able to depend on dbus. We're gonna We're gonna explicitly ask that that be left out. I think that's actually optional. It's documentation I think the configure program is smart enough to know that we don't want dbus on windows Um, otherwise we tend to compile with things. Um, there there's missing documentation. We could say the uh, all of the libraries are treated in the way I mentioned in that Jpeg support will be available as long as Jpeg is is available in our environment and configure script certainly notices that Um, the new provided binaries are provided with minus o2 and that's also my default personally on windows. Um, However, and i'm going to skip this since I mentioned it um mentioned uh, and uh Um So I guess i'll say um, you can um say with the It's worth knowing that you if you're not one reason that that you're building might be because you want to turn off native Compilation for whatever reason if you have load juices you get it, but don't want emacs to use it Uh, especially as that default looks like it could be changing with emacs 30 um the uh the debug configuration, um, this is this is the uh, kind of Uh, what what i'm currently using this on commentary. Uh, i've seen on the emacs development list Um All right, let's check on our checkout and see if we can't get a build running Um, this is a release build so I won't be starting with Uh, so we'll start by hopping into its directory And we um we have Uh But not Okay, so that tells us we're gonna run Our configure program But we don't need to run uh config ic So So let's get that going and uh Hopefully that's showing through just enough to be fun not too much to be distracting Um the uh the unoptimized Um, please report issues if your emacs is crashing, uh to the emacs development list not to me personally Um, although you are of course welcome to copy me Um, if you especially i'm subscribed to that list so I get all the mail so I don't mind being copied uh, and as well if you think it's uh You know related to packaging that actually makes sense Or windows related even and uh, it can be tested with an extra snapchat that should be uploaded to the gnu alpha side I could look at that if I have time Okay That is with the configure script to make file for Emacs is really really complicated if time permits which i'm, you know now confident it will not We will look at a makefile that I tried writing that orchestrates this whole process that i'm talking about Um as uh, let's see, so the build uh build process I run my builds with Uh explicitly specifying the max cpu, uh with minus j But minus b1 to get the full build, uh full login to your recipes. That is probably the magic thing that um shouldn't to understand with uh Or that uh that that uh that i'm glad that I know, uh as i'm trying to write my automations um Uh the um So I call that out here the binary, uh releases Okay. So in this section, we're going to start to get into what are all those files And there's a bug report related to that that I didn't get into here. So Um, that's kind of to the point about the less said about this the better That's my explanation for stepping through some of these slides. Uh, of course Share them all um Hopefully by the time that this video is published I mentioned it. Um, I may have mentioned already freshly installed but uh fully installed uh this the the key distinction here is that uh emacs is Distributed in the binary form for windows with some dll files that actually come from the mysis 2 Project there's an implication there to gcc that I definitely want to get to it talking about Um, so freshly installed means We haven't copied those binaries from the mysis 2 uh installation into the emacs uh installation uh, and then When we re-archive that local emacs installation, that's how we're going to create the full zip So hopefully that actually is a pretty good summary of what all those files are Um, but there are readme files on the ftp. They do a pretty good job If you can dig enough to find one and my apologies for uh tardiness getting a new version on that posted um the emacs Uh, so those dependencies, uh are listed within the emacs itself and as we'll just talk about in a moment There's a way uh that we can use we can access that When we collect them in order to meet the gcc requirement that is essentially to include Um include the sources for the for those binaries the things that were compiled against um The uh, so so here we go, we're we're into the build process Let's just take a look and see if configure it got done it sure did and now we can see a table of Hopefully good, but good and bad news um in potential um where we're learning that we're using the pdumper strategy and any number of other things that we might be Messing with as our motivation for for building ourselves on emacs again, this table represents uh what you'll what What what it looks like for me when i'm building for the gnu distributed binaries All right, so um Kind of moving moving as quickly as I can here I'm at 40 after I believe that's the five minute mark so Um having just succeeded in in configuring emacs. I don't think we're going to build it. Uh I don't think we're going to actually get to running make install Um, but I have it sitting here on my keyboard or clipboard assuming that we will right? No Oh, wow I think i've managed to confuse this. All right, so for me that looks simply like uh make v equals one Uh install, uh prefix equals uh And we can at least get it kicked off And that that command is just uh Just is no no different than I showed on the slide where I where I gave it Uh, I wasn't planning to stop and explain it. I was just planning to paste it in so So so again recapping the rest of the process here and maybe actually making it if you can believe it or not through the rest of these slides, um We to to create the full set of binaries. We're going to need a no dependent no depth archive. That's without the mysys2 To uh deal provided dlls just the things that we compile as part of making emacs um The uh, the build depth zip script is uh provided with the source distribution is your tool for uh meeting the gpl requirements ride source as mentioned before Um, there is a second bug that I did, uh include some more information on in my notes already um that uh That gets into the details of this other feature I alluded to Um, i'll just skip into that um we can with with uh With a an appropriate version of that which you may need a patch uh to To have you can list out the dependencies And and that version as well can consider the dependencies of the emacs binary versus the hard-coded list You might find depending on when you look at this file in the source tree The different um so I also have a hack here that uh works around the absolute requirement to run this with the mysys2 And not the mingw64 64 Script Um Once we've made that zip file that contain that's that's our installed emacs without the dlls provided by mysys2 We'll then unpack the dependencies that were created by that python script. We just talked about from the emacs source tree So at that point once those are unpacked we can now make what's called the full Installer or sometimes I might call it the unqualified installer because it's just going to be called emacs29.1.zip Um and that uh that file which which creates the archive That that that file is exactly the same plus the Uh, the dependencies that we unzipped in the bin folder of the installed emacs the Executable self-installer, which I would love to have more time to talk about I gave a few pointers here on the hard part of running it most importantly If i've installed in any kind of funny looking name, I end up renaming it to like emacs-29.1 Or emacs-29. or 30.0.50 or whatever and I just rename that installed Emacs folder and then I go to the root of wherever I created that the parent directory above it And that's where I make my copy of the emacs nsi um the the nsis script and uh That's also where I And then uh, then from that parent directory I execute uh making sys uh here I as mentioned um I I can get away with this because I have it on my path and it's my recollection I think I tested this and couldn't reproduce the problem. So I didn't document it here, but i've had some problems with running this when uh When nsis wasn't on my path The uh, the the final step here And the last the gpl requirement is to include all the sources Except when i'm doing a release build I always do this Um, and that's the new practice when making snapchat binaries is to go ahead and include the sources Even though we might have the specific revision number Um, our thinking is we want absolute clarity that that somebody Uh can say okay this binary did this thing from the source for it i'm gonna go take that into my own open source yeah, maybe they would the jerks them into my own open source project and um Off, you know off they go, uh, and that needs to be possible um so, um Beyond that the rest of this is is really detailed that you find covered in the gnu maintainers manual Um, this is the the current set of windows binaries that um, it's busily working on creating a like for like a Mirror to behind the scenes here is called a 29.1 underscore two um, and I have a lot of Automation available on this site. So at this point i'm just I think i'm only minute 40 seconds over i'm gonna invite my Co-organizers back onto the call or any volunteers that want to jump in and anybody if there's people on the bbb I'd be happy to take questions if there aren't um, I have a screen full of The automation stuff ready to go as a kind of a second ring in my circus today So if you're still with me, thanks a lot for joining me, and I really enjoyed this talk Uh, if this is where we're going to close it out. I don't know where we're at for schedule today Um, thanks a lot for a great talk corwin Um in terms of like schedule, yeah, you went over a little bit for the official like, um schedule or time of your talk, but I think We actually have maybe like six or seven more minutes. Um here on stream For um questions and such if folks have questions or if you want to like quickly maybe show one or two more things um But I think the hard stuff is about like Maybe 10 minutes ish for now and then we'll have to rush over to um for the closing remarks, so Well, that sounds awesome Okay, so i'm looking at the the dev chat, uh, I see a comment on cross compiling the emacs But i'm sorry, i'm looking at irc primarily, but uh, feel free to jump in if you're on bbb with me or Uh, uh, if if you put something on the pad i'm sure I will see it between the two of us Uh over here Okay, so cross compiling emacs for serenity. I haven't tried really any cross compiling. I think that would be very interesting I would most likely focus on Doing exactly what I do on a gnu system completely ditching um So I guess with my my remaining time rather than walking through code Um for my automation which can be another talk if in fact there's an interest in that um I want to I guess say a couple words about the non-free operating system That i'm using here. I did my best to use no non-free software other than the Uh the operating system That is the context for this talk in preparing this talk for you I personally have a lot more Uh time and energy I have to say invested in proprietary tools for doing a lot of the things that That go into this so I really respect the work of people that pull that off. Um I'm, sorry, I didn't get my pre-recorded stuff. Uh kind of in order for everybody, but I just want to stress like Uh, it is all absolutely possible and just hats off to everybody that that used uh entirely free software to get their Get their recordings done in time um, and what you did see Unless it was provided by the operating system in my presentation today was all Uh free software with the debatable exception of nsys which styles itself as open source maybe for uh marketing reasons Uh in any case, uh, certainly we can get out of the source Thanks for the note corinne, it's good to know that uh Building or uh, yeah doing the build of emacs for windows on windows can be done using only free software Yeah, absolutely Probably the right closing note, right? um, I just uh, thanks again to the organizers for bearing with me and like every time I was like you guys i'm Terrible at this. They're just like no you're doing fine. Keep going. You did a great job live last time You can do it live, you know and and saying all the right things to just uh, encourage me to come back This year and everywhere Well, as I said before we were very lucky to have you and the rest of the team of course as well and um goes without saying but all the speakers and all the audience the participants as well, so Um So, uh, are we we're still live over here that you know, you know me i'm the mike hog that I am I can't resist um throwing throwing up another screen here and uh, In fact, let's go ahead and go back to our to our crawler, right? And i'll bring back our build if it finishes and maybe we'll show making the installer as well, um But I have the cpu count turned down a little bit here Note I didn't specify minus j here um, so Over here is my automation, uh in case you do want to take a look I can at least provide the orientation of what you're looking at scrape log is probably my first thing. I want to show off um, it's not beautiful, but this works, uh, pretty well for me to Get a sense if something might have changed in terms of how many warnings or errors are happening When I build emacs, so I have this awful automation going on and I frequently want to answer the question You know, what's the change rate in uh warnings or what have you? So this kind of gives me a count of that um so from there, uh Crude ci is the script. We're we're watching run in the other pane um, you can see it's uh Just starting to do its thing again And uh The make file I mentioned this is a top-down rewrite of everything else that i've done it has some bugs right now um the uh the Build distribution is the main script that I use for my personal builds This is what is run by the crude ci script Uh, it has a fun tie-in to this Uh web interface here Um where we can you don't need the port number when you go to it. That's just if i'm going to post um the Uh Blah blah blah blah this this script is really long and complicated and probably needs some diving into but you can see that Um, one of the complexities I have to deal with is that i'm going to need a something in the format of an emacs dash version for strategic um nsys reasons so uh It takes care of kind of every complexity and stuff that I mentioned today in some respects Um, as does the make file build release is um another fairly useful Incarnation of this this is just focused on the release process and this does work for example to create the the You know like I like well I could Like uh for like files as far as I can tell so what are currently posted for emacs 29.1 and the release candidate um So i'll probably use that next time and if it's still like for like i'll probably post the ones that came from this um Uh building a tree sitter I make some dlls there if you're looking for hints on how to get going or just simply A huge long list of git repositories that make grammars you can use That is here as well um, finally I mentioned I have a Um, I have a a website where I publish my own personal snapshots that I make That folder full of install directories, but all of the usual GNU style binary distributables including the source code and the source code for the dependencies um the uh So this program is another one of those Complicated find commands and therefore potentially the most useful thing in here to take to you Um, and here i'm deleting binaries older than 17 years uh everything except the uh No deps file and the sources of it. You'll find on my website Currently those indefinitely i'll probably roll out 120 days or something um for those eventually Oh, uh, I can talk about this one even um the uh The So here you'll see the two branches that i'm tracking the job of this script Is this runs on the website? I call it with a like a remote rsync uh type Uh, or an ssh remote ssh command um And right after the rsync r syncing up any new emacs that I built and uh, it's Uh, its job is to update my fancy directory indexing so let's look at corwin's website Here's my emacs 29 folder We have about two more minutes corwin Yeah, it'll take that entire two minutes to uh, load this directory because I am Because I have not yet ever pruned any of these dang binaries So every version of uh emacs 29 that i've ever made for myself is probably here nice Uh, I strongly recommend that you bookmark this folder if you're using these for something and you always want the latest Um, so here this particular, uh latest 29 emacs 29 latest or simply replace the 29 with 30 to get those uh alas No, no such luck for tree setter but if we look at that Live this long without making a typo now look at me Okay Oh So here, um You know, we can see the iconification and so on even in the tree sitter folder this is all i'm talking about about the fanciness that's set up by that other script that i'm showing over here and run after each time I run the upload it just Looks to see if anything's new and add some lines to the dot htaccess file Um I'm, particularly proud of this one. I'm not going to lie. Um, linking out to each each project that we're using letting us know the commit version and then For the dlls quick link out to the log and the signature file for this dll um I find that a lot just a lot More readable than uh Listing them all out individually and i'd love to do something like that on the new site So i'm I think we've got to be out of time by now. I've just got to say hey, thanks again for having me Uh for those that uh watch the talk either live or after the conference uh appreciate everyone's support to get me to the point where i'm able to Uh to do this this this cool volunteer task Uh, which is fun and easy to do and reach out to me if you're interested in helping with it Well, awesome, thanks a lot for the awesome talk corbin and uh, of course as a fellow core core organizer For our for all that you do, um in and around emacs conf and of course for uh, can we max as well? It's much appreciated Big big words from coming from you my friend Um, thanks for the kind words Cheers my pleasure. All right, and with that I think we're gonna uh wrap up the dev track here and we'll be With you again shortly in a few minutes on the gen stream the gen track for the closing remarks for today Um only for today because we're gonna be back tomorrow again as well So don't go anywhere and uh, see you on the gen track in a bit So Oh my god, I did it we got done within the time you're my hero um, and thank you so much for just keeping me honest there and uh Like helping me keep my eye on the time and such You have to look at the recording and see whether you feel like doing it again I'm sorry. I had my sound screwed up and i'm sorry if I talked over somebody I couldn't hear anything on mumble until this very moment Oh, uh because he used your webcam for it, um, like as a like a virtual webcam thingy It was low res especially when things are changing as you were scrolling around So we'll see what kind of recording we can recover from it and then you can decide whether you maybe want to clean it up with like screenshots and I recorded on this end too. We shouldn't have that problem with my recording. Thank you. Thank you. Thank you I think we're still live on the dev stream Someone could uh, thanks. Oh, yes Because uh, i'll set it to rebroadcast Yeah, I I love doing that for the closing remarks that's a fine tradition Or it's a tradition now because i'm pretty sure this means we've done it twice I Once heard that, you know, uh as a fan Meaning like a fannish is a term of endearment for a science fiction fan to another we say we're we're fans or things We do our fannish and a fannish tradition then is if you do it three times, it's tradition But um, we're on a budget here. So Nope All right, I think we should um head over to mumble and talk on mumble Um and decide and see like which big blue button room we're going to be in for closing Okay, so we're clear on bbb here Yep, I think so

Q&A transcript (unedited)

Oh, wow, how exciting. Well, maybe I should share something then. Um, well, thank you very much and welcome to, uh, uh, welcome to my talk. I'm a little distracted here. I had a friend who came over and just brought me a whole bunch of peanut butter cups, homemade peanut butter cups. Maybe I'll show those off, uh, later. What? Okay. Here, uh, put it right there. Okay. So I'm going to, uh, get over to my plan, uh, stuff I'm sharing here, hopefully. Uh, and, and we'll jump, jump right in because I'm going to need as much time as I can possibly have today. Thanks so much for, uh, joining me for Emacs conference and for, especially for, um, all of you who, who, who participated, you know, in the discussions, contributing talks and, um, you know, uh, you know, including running the, the, the, and it's just so much fun to be here. Um, I guess while I'm standing here and, and saying stuff that's, that I'm going to have to transcribe, cause I didn't, uh, prepare a recorded version. Uh, I had a lot of trouble trimming this down so I can solve that problem by just talking a lot at the beginning, uh, about other stuff. Um, so in addition to the thanks, I just want to say thanks also to the folks on the development list that helped me kind of come up to speed on this. I won't make a big list here, but, um, and, and, and for all that I've learned from my previous conferences, it's just, I can't stress enough what a great opportunity volunteering for, uh, free software related things are, uh, as a way to get involved. People will just totally teach you how to be helpful and I'm loving it. I can preview the stream, but it's not super easy right now. I got all my screens kind of dedicated to other stuff. So should I pause for a second before I get into the slides? Cause that's, they're, they'll be hard to see if I'm not full screen. Yeah, that would be nice. Okay. Well, I'll keep ad libbing then cause I just have a million, uh, things I can say. Um, uh, so, uh, let me just quickly talk, uh, things that aren't in here. Um, I'm going to mention the mysis2.org and the, that project, which provides a port of, uh, the GNU, uh, uh, glibc and a lot of GNU and, uh, uh, their free software. Um, so, uh, I don't... All right, I'm switching a room to, uh, a DVD room to Stefan. All right. So I'm going to take mumble out of my, uh, pardon me, folks. It's going to take mumble out of my speakers here. Okay. We'll take the speakers out of play entirely and I'll just switch to some headphones. All right. So... Perfect. What an amazing amount of time. All right. So thanks a lot. Uh, today I've got a jam packed talk. Um, I've, I've done my best to make, to make this not too overwhelming, but overall we're going to try to try to actually build, um, Emacs while we're talking today. And we might actually build several Emacs. Uh, so let's take a look at that real quick. Um, so over here we have a screen where I am just once a minute looking, uh, uh, indirectly at whether there have been any pushes, uh, upstream to either the Emacs 29 or Emacs 30 branches. So I've arranged for us to sort of keep an eye on that, um, while we talk. And, you know, maybe that's, that's one thing that we'll do. And then additionally, we'll probably fire up a shell. This is the MySys2 environment that I talked about before, and we'll probably create some directories and things. But before we get into all that, let's, let's give some, some context. Uh, I've been doing my best to try to, uh, make sure all this information is on the Emacs wiki as well. So, uh, sorry, as I said, I got a little caught off guard. So I'm moving my foot pedals to the floor, back to the floor here. And I should be able to advance slides here. All right. So, um, I kind of provided some special definitions for things. I'm going to kind of level set with those. The, uh, um, when I say a binary release, I'm talking about some, some, uh, I'm talking about Emacs for Windows as, uh, just ready to run out of its folder or in whatever similar form. The, when I say a build, I'm talking about kind of a process of doing that. Um, when Emacs.get, of course, that's the upstream hosted by GNU Savannah. The Emacs release is, is a tarball created from that. The sources for, um, Emacs are going to be one of those two things, um, very specifically. So I'm not going to talk about patches patching. There's some implications there. Perhaps we'll get into it. Uh, so a snapshot is when I build from anything other than a release source, uh, a tarball. Um, just if I, if I say that I'm talking specifically about the, uh, the XZ version of the file as, as a technical point. Um, so that may come up. All right. Nothing else I think up my sleeve. Um, the, uh, as, as a key data point, it's worth understanding that there's a file called configure AC. It's going to be processed, uh, as part of auto-conf. We, we initially access that when we run, um, auto-gen as you'll see in a little bit. Um, the, but before, but, uh, so the auto-gen script will generally consider this, uh, so in a release build, um, this has been thought about kind of for us as part of, um, making the tarball. Um, the configure.ac, um, yeah, I think I pretty much covered, covered this. So, um, those, those that kind of partially built status, that's a, might be another phrase that you hear me use. So this slide unpacks that a little more. Um, so it can be a little confusing to understand what exactly the, you know, what is it, you know, how stable is Emacs depending on what I have. So the, I got a kind of set of rules of thumb here, right? First I want the highest, uh, you know, dot, uh, dot release value that I can get, assuming that that's higher than one. If it's, if it were to only be one, let's say, if it were to only be one, let's say my choices were 29.1 and 30.1, I would take 30.1. Um, cause that's, that's weird. But, um, what you'll normally see is you might see a 28.2, you might see a 29.1. So here I think 28.2 is got the most, most, most stable, um, set, uh, the, uh, or set of release binaries. The 29.1 will, will have a little more features, but will tend to be more stable than, uh, any, uh, lower point releases for 29, uh, certainly than any release candidates for 29, which might even have new features, um, but are mostly going to just be packages. So they're going to become the most stable thing here. And especially if they, they, they have a, you know, if this, this is not, uh, if this were to be 29.2 release candidate one as well, looking forward to seeing, um, the, uh, 30.50. Um, and, and in between this, this pretest here, we're talking about kind of developer land. Um, so, um, the expectation is that, you know, what you're doing that applies to windows users, uh, just as much if you are building anything in the snapshot range, any of that is going to be in this 30.0.50. Currently that'll change when the, uh, when the 30, 30, uh, an Emacs 30 release tags, uh, or release branches come. Okay. So let's talk about the local. Um, there's not much to know about what I have going on, except that I have my, my paths mess messed with. So, um, if, if that, that were to come up, if you're wondering how, why does this, uh, and insist command work, that's probably the place where you'd notice it. Uh, I am using windows 10. I haven't tried windows 11, uh, as mentioned, mysis2 is critical to all this. There's one script in particular that will error out if you try to do anything other than use mysis's, mysis's shell. And in fact, mysis owns or provides three shells and of them, that script is designed to work with a specific one of them as, as we'll come to. Uh, I don't talk about installing the dependencies, but just as, as kind of some kind of help, um, you can search using this formula and install, uh, using this formula. Good luck with those, you know, grep commands. And this is the tool for building the self-installing self-extracting installer or, uh, executable self-installer. Um, the script for that is provided along with the Emacs source. Um, and I've provided a helpful link to the main page for the project download link on the left. It is not, um, it's kind of scare where the way that this link appears, but I have clicked it and it's working for me. Automation does, uh, we'll, we have some time we'll be looking at this at a minimum. I wanted to mention that what I do on my local, what you're seeing in the crawler, I hope, uh, represents a, uh, a simple sleep loop. Uh, and we'll, we'll look into that if we have time. Um, I do have a little bit, I do use like a cron job and so on to clean up some hosting that, that I pay for, um, where I've got, where I, where I kind of self host some, uh, snapshots, more stuff than I feel comfortable uploading to, uh, to GNU. The, um, you know, I never said, uh, my name is Corwin Brust. For the last couple of years, I've been the volunteer making, uh, um, making the snapshots, the quote unquote, official binaries, uh, for windows of the, um, of, of Emacs for windows. So that's, that's all the different versions. Uh, help is always welcome with that. I'd be very happy to teach you in more depth. This video is, you know, kind of my drop dead file. Uh, I don't have specific plans. Uh, if somebody's like, Hey, get out of the way, this is the one thing I think I can do. Um, Hey, that's real relatable. Okay. Um, so I haven't tried, uh, the, I haven't tried a lot of fun things that I won't talk about. Um, the, uh, the rest of this talk is going to get into the nitty gritty. As I said, um, if we can't convince Emacs to start building over on that screen, we'll be opening it up here on the center stage. Um, uh, this begins and there's, there's, there's, there's great insight here too, on the wiki, uh, with picking an FTP source for any official release that is for a stable product, please visit, um, ftp.gnu.org. Otherwise you'll want to switch that FTP dot at the beginning to alpha dot and take a pretest, uh, or any snapshot or otherwise, then publish there the, uh, next, uh, you know, I'm gonna, you have some examples in here that assume that you're doing a release bill that you're doing $29 one, but, um, I am glancing out of the, the right side of my face at the chat on the opt-ins. Anybody in there wants to direct me at a particular, um, we can make some other, we can build something else. If you want to see a snapshot build more mentioned that, um, the examples that you're going to see here that I will, without other direction, cut and paste, um, are all, uh, based on the release bill. So, um, so, uh, we'll use the, uh, I mentioned that there are several shells provided by MySys2. The MinGW64 shell is the one that we mostly need. Um, I tested all of this as well with the MinGW32 shell. Um, so that, that should work and, and see mix binaries that, that, that work for me. Uh, I, as I mentioned, I don't get into the details of installing all your prerequisites. I found that doing it in a headfirst manner wasn't, uh, wasn't difficult. And I also found that there's a number of tutorials. I didn't want to pick one to link here. Um, there, uh, here, uh, okay. So our general formula for building Emacs, irrespective of Windows, looks like, does the configure script exist if not run autogen? From a Windows build standpoint, this is, if I'm not running a release, release build, call the autogen script. Right. And this would be in the directory where we want to pack this. I'll demonstrate within three minutes if, uh, if one, if nobody's pushed upstream to Emacs. Um, so, uh, the configure, uh, and, uh, configure options are, uh, uh, the, the configure, you know, if the configure, sorry, the configure script exists, then, uh, it doesn't, doesn't exist. So the only reason, so in my process, I will always execute that step because I clean everything after every build, um, in all my contexts. Um, however, if you were, you know, had a, a checkout of emacs.get and you are building it at several releases, then maybe you've got a configure script and then you all want to know, um, the, you know, whether you have to bootstrap and the typical complexities, but otherwise you might be able to skip that in, in, in the abstract. Um, is that right? Or is it, is it the make, uh, so, and if they make file doesn't exist, make install. I know I'm looking at that in question whether it's correct. Sorry about that. Um, in any case, uh, so auto-gen configure make install is our recipe. Auto-gen creates the configure script, configure creates the make file, the make file. Um, in the case of windows, I almost always want the install, uh, and to specify some location where the installed emacs will land. This is where all of the recipes for packaging emacs go. And if I were, uh, you know, using this as a movie to upgrade, I personally would do that by, by specifying an install path, quote unquote, on top of, uh, a main installation. I don't do that. I update shortcuts mainly based on what specifically I want to try, uh, in an effort to, to, to, to notice, uh, interesting patches and confirm they work on windows, which mostly they do. There's not a lot of code in my experience that is, uh, windows specific and very, very little around the build process. All right. Huge rabbit hole zone. And I still have a minute before I have to, uh, kick off the first part of our demo. So let's, let's keep, keep diving in, um, the, those specific part windows specific parts beside the dot exe extension that we're going to find slammed onto all of our familiar, uh, executables. We're also going to have emacs client W, which is a wrapper that hides, um, how hard it is to get, uh, to, to, to get it, how bad the abstraction is between the window management layer and the GUI, and then all the different parts on windows. Essentially, it wants to create a shell window. If we just double click emacs dot exe. So emacs client W, uh, and run emacs, they're going to solve that problem. Um, uh, wrapping emacs and emacs client respectively. And, um, just, uh, all right. So let's, let's go ahead and do something. I'll, I'm going to take away the ticker here for a minute. And what you're not seeing is off stage. I am killing that so we don't get built in parallel. Um, so, um, so at this point I'm going to open up a shell and I'm going to start talking just a little bit about my local build environment, which we haven't gotten into. In fact, just to make that even easier, let's, um, let's just take a look at it a little bit. Probably the easiest spot is here. All right. So here we have the familiar windows, my computer interface. I have the G drive and the H drive, four terabyte drives, um, dedicated to my, um, really overblown emacs build process. Um, this just lets me be super lazy. There's no reason you need any massive amount of storage to do any of this. Um, inside here, and now I'll actually switch you back to the other screen. Um, we'll, we'll find, oops, sorry about that. I didn't take the time to label that one. Um, so here you can see the primary output that I'm looking at through this automated process. I come along, I look at the bug reports, or maybe I'm just restarting my computer and choosing what emacs version at random. And then in that case, I look at this modified date and I say, um, my config that I, you know, that I'm playing with right now is all set for emacs 30, or I'm testing the both and I'm relaunching both of these. Right. So for me, that starts by diving into the install folder, going into the bin folder, which looks exactly the way my automation leaves it. I then come in to run the run emacs and I create a shortcut, um, to it. So I'm a keyboard person. So that's usually done like this. And then I just know that the context menu is going to come up in the right place. So I'll come up and, um, possibly change the, change the shortcut, right. If I don't mess with it. Um, so here's where I'll add my minus Q, if that's kind of where my world was at, or it kind of depends on what I'm doing with these, which varies week to week. Um, so restarting my emacs, uh, involves doing the same thing, going to my desktop and where you'll find a number of emac shortcuts and, um, updating the shortcut in the same manner joint actually, maybe we'll just, let's go back there and just show it. So if we look at, for example, my ERC, you can see, it's going to be pointing at one of these clones and then it's going to maybe tell me that I want, it wants to be full screen. Nope, not currently. And then it might, uh, have some stuff in there about auto-loading at config and what connections I'm going to, some commands I've defined to start connections. All right. And sorry, I got a phone call. I was checking. It wasn't in an org, the org, not the other organizers giving me the hook. So, um, all right. So that's, that's probably enough on the local system. Let's get back to the, to, to building emacs. And now it hopefully makes a certain amount of sense when I say we're going to wander over to the H drive and, and, and, and, hopefully makes a certain amount of sense when I say we're going to wander over to the H drive and recreate the structure that, um, both my process sort of assumes and the scripts you'll find in the admin NT, uh, build disk folder in source used to assume. Those scripts are in need of some love. And in just a little bit, I'll be mentioning a build, uh, a, uh, a, a, a particular bug that you might want to pay attention to if you're interested in making a self-installer. All right. So, um, we're going to create, uh, an emacs build directory. And we've got a handy git clone stage, git clone command stage for ourself. That would work. Um, do not currently see anybody lobbying for that. So instead we will run the rather faster uh, W get command on Savannah, which is not pasted in here. Nice. Let's see if I can freehand it. Not going to do it. Uh, okay. I beg your pardon. I'm grabbing a URL from the internet. Uh, okay. Yeah, I can, I can honestly, I can freehand it, whatever. Okay. Sorry. I, uh, I didn't have that bookmarked in all handy. Like I thought I did. Um, so we'll just say ftp.gnu.org slash, uh, what is it? Pub emacs, emacs-29.1, uh, .org.gnu.org.exe. I really think I'd have this command sitting around. It makes me want to scrap the whole demo. I'm not going to lie. Okay. How am I doing? Um, I think at least 15 minutes. Um, but in the command that you were freehanding, should the pub be GNU instead? Oh, thanks. I'm sorry. There we go. Thank you. All right. And then we'll, and I'm not sure I provided commands for this either, but it is trivially easy to do. And while that happens, we'll get to move on a few slides. Um, the configure script I'm not talking about in a lot of detail, but I do want to mention that the GNU binaries are provided with native, uh, compilation enabled. That's the feature that uses gcc lib gcc get on windows. If available, that lib gcc get will be used. Um, but when, but, uh, if, if, uh, emacs has that feature, then it will take by compile, uh, native code and, uh, asynchronously compile that as needed, uh, with the ahead of time feature. We're going to do as much of that ahead of time. And for folks that are consuming the windows binary, the thinking goes that they might not have my assist too. They might not have lib gcc jet. They might be happy that they're enabled in a, you know, a lot of time running emacs on their local environments at all, you know, in a, maybe a lockdown, uh, corporate context. So aside that, um, there's your first glimpse at the configure, um, program that we're going to run in a moment. In fact, I'm going to go as far as putting it on the clipboard. Um, really just looking at this, the AOT flag is the one I'd call attention to, but it's worth understanding that windows doesn't provide a D bus capability. So windows native program isn't going to be able to depend on D bus. We're going to, we're going to explicitly ask that that be left out. I think that's actually optional and it's documentation. I think the configure program is smart enough to know that we don't want D bus on windows. Um, otherwise we tend to compile with things. Um, there there's missing documentation. We could say the, uh, all of the libraries are treated in the way I mentioned in that, um, JPEG support will be available as long as the JPEG is, is available in our environment and configure script certainly notices that, um, the GNU provided binaries are provided with minus O2. And that's also my default personally on windows. Um, however, and I'm going to skip this since I mentioned it, um, mentioned, uh, and, uh, um, so I guess I'll say, um, you can, um, say with the, it's worth knowing that you, if you're not one reason that, that you're building might be because you want to turn off native compilation for whatever reason. If you have low juices, you get, get, but don't want Emacs to use it. Uh, especially as that default looks like it could be changing with Emacs 30. Um, the, uh, the debug configuration, um, this is, this is the, uh, kind of, uh, what, what I'm currently using this on commentary, uh, I've seen on the next development list. Let's check on our checkout and see if we can't get a build running. Um, this is a release build, so I won't be starting with, uh, so we'll start by hopping into its directory and we, um, we have, uh, but not. Okay. So that tells us we're going to run our configure program, but we don't need to run a config IC. So, so let's get that going and, uh, hopefully that's showing through just enough to be fun, not too much to be distracting. Um, the, uh, the unoptimized, uh, uh, um, please report issues. If your Emacs is crashing, uh, to the Emacs development list, not to me personally. Um, although you are of course, welcome to copy me. Um, if you especially I'm subscribed to that list, so I get all the mail. So I don't mind being copied. Uh, and, uh, as well, if you think it's, uh, you know, related to packaging, that actually makes sense or windows related to even, and, uh, it can be tested with an extra snapshot that should be uploaded to the canoe alpha side. I could look at that if I have time. There's with the configure script to make file for Emacs is really, really complicated. If time permits, which I'm now confident it will not, we will look at, uh, make file that I tried writing that, uh, orchestrates this whole process that I'm talking about. Um, as, uh, let's see. So the build, uh, build process, I run my builds with, uh, explosively specifying the max CPU, uh, with minus J, but minus B one to get the full build, uh, full log into your recipes. That is probably the magic thing. Matt, um, shouldn't to understand what, uh, or that, uh, that, that, uh, that I'm glad that I know, uh, as I'm trying to write my automations, uh, the, um, so I call that out here, the binary, uh, releases. Um, okay. So in this section, we're going to start to get into what are all those files. And there's a bug report related to that, but I didn't get into here. So, um, that's kind of to the point about the less said about this, the better, uh, that's my explanation for stepping through some of these slides. Uh, of course we'll share them all, uh, uh, hopefully by the time that this video is published. Oh, I mentioned, um, I may have mentioned already freshly installed, but, uh, fully installed. Uh, the, the, the key distinction here is that, uh, Emacs is distributed in the binary form for Windows with some DLL files that actually come from the mysys2 project. There's an implication there to there's an implication there to GCC that I definitely want to get to it talking about. Um, so freshly installed means we haven't copied those binaries from the mysys2, uh, installation into the Emacs, uh, installation. Uh, and then, uh, when we re-archived that local Emacs installation, that's how we're going to create the full zip. So hopefully that actually is a pretty good summary of what all those files are. Um, but there are readme files, uh, on the FTP that do a pretty good job, um, if you can dig enough to find one and my apologies for, uh, tardiness getting a new version on that posted. Um, the Emacs, uh, so those dependencies, uh, are listed within Emacs itself. And as we'll just talk about in a moment, there's a way, uh, that we can use, we can access that when we collect them in order to meet, uh, the GCC requirement that is essentially to include, um, include the sources for the, for those binaries, the things that were compiled against. Um, the, uh, so, so here we go, we're, we're into the build process. Let's just take a look and see if configure it got done. It sure did. And now we can see a table of, of hopefully good, but good and bad news, um, and potential, um, where we're learning that we're using the pdumper strategy and any number of other things that we might be messing with as our motivation for, for building ourselves on Emacs. Um, again, this table represents, uh, what you'll, what, what, what it looks like for me when I'm building for the GNU distributed binaries. All right. So, um, kind of moving, moving as quickly as I can here. I'm at 40 after, I believe that's the five minute mark. So, um, having just succeeded in, in configuring Emacs, I don't think we're going to build it. Uh, uh, I don't think we're going to actually get to running make install. Um, but I have it sitting here on my keyboard or clipboard, assuming that we will, right? No. Oh, wow. I think I've managed to confuse this. All right. So for me, that looks simply like, uh, make, uh, V equals one install, uh, prefix equals, uh, and we can at least get it kicked off. And that can, that command is just, uh, just is no, no different than I showed on the slide where I, where I gave it, uh, wasn't planning to stop and explain it. I was just planning to paste it. So, so, so again, recapping the rest of the process here and maybe actually making it, if you can believe it or not, through the rest of these slides, um, we, to, to, to create the full set of binaries, we're going to need a no dependent, no depths archive. That's without the mysys2, uh, deal provided DLLs, just the things that we compile as part of making Emacs. Um, the, uh, the build depths zip script is provided with the source distribution is your tool for, uh, meeting the GPL requirements, right? Source as mentioned before, um, there is a second bug that I did, uh, include some more information on in my notes already. Um, that, uh, that gets into the details of this other feature I alluded to. Um, I'll just skip into that. Um, we, we can, with, with, uh, with a, an appropriate version of that, which you may need a patch, uh, to, to have, you can list out the dependencies and, and that version as well. Can consider the dependencies of the Emacs binary versus the hard-coded list you might find, depending on when you look at this file in the source tree. The diff, um, so I also have a hack here that, uh, works around the absolute requirement to run this with the mysys2 and not the minGW64 script. Um, once we've made that zip file that contain that's, that's our installed Emacs without the DLLs provided by mysys2, we'll then unpack the dependencies that were created by that Python script we just talked about from the Emacs source tree. At that point, once those are unpacked, we can now make what's called the full installer, or sometimes I might call it the unqualified installer, because it's just going to be called Emacs29.1.zip. Um, and that, uh, that file, which, which creates the, the, the, the, the, which creates the archive, uh, that, uh, that, that, that file is exactly the same, plus the, uh, the dependencies that we unzipped in the bin folder of the installed Emacs. The, uh, executable self-installer, which I would love to have more time to talk about. I gave a few pointers here on the hard part of running it. Most importantly, if I've installed in any kind of funny looking name, I end up renaming it to like Emacs-29.1 or Emacs-29. or 30.0.50 or whatever. And I just renamed that installed Emacs folder. And then I go to the root of wherever I created that, the parent directory above it. And that's where I make my copy of the Emacs NSI, um, the, the NSIS script. And, uh, that's also where I, and then, um, then from that parent directory, I execute, uh, making sys, uh, here. I, as mentioned, um, I, I can get away with this because I have it on my path and it's my recollection. I think I tested this and couldn't reproduce the problem. So I didn't document it here, but I've had some problems with running this when, uh, when NSIS wasn't on my path. The, uh, the, the, the final step here and the last, the GPL requirement is to include all the sources, except when I'm doing a release build, I always do this. Um, and that's the new practice when making Snapchat binaries is to go ahead and include the sources, even though we might have the specific revision number, um, our thinking is we want absolute clarity, um, that, that somebody, uh, can say, okay, this binary did this thing, send me the source for it. I'm going to go take that into my own open source, or yeah, maybe they would, the jerks, um, into my own open source project. And, um, you know, off they go, uh, and that needs to be possible. Um, so, um, beyond that, the rest of this is, is really detailed that you find covered in the GNU maintainers manual. Um, this is the, the current set of Windows binaries that, um, it's busily working on creating a like for like a mirror to behind the scenes here is called a 29.1 underscore two. Um, and I have a lot of automation, uh, available on this site. So at this point, I'm just, I think I'm only a minute, 40 seconds over. I'm gonna invite my, uh, co-organizers back onto the call or any volunteers that want to jump in and anybody, if there's people on the BBB, I'd be happy to take questions. If there aren't, um, I have a screen full of, uh, the automation stuff ready to go as a kind of a second ring in my circus today. So if you're still with me, thanks a lot for joining me. And I really enjoyed this talk. Uh, if this is where we're going to close it out, I don't know where we're at for schedule today. Thanks a lot for a great talk, Corwin. Um, in terms of like schedule, yeah, you went over a little bit for the official, like, um, schedule or time of your talk, but I think, uh, we actually have maybe like six or seven more minutes, um, here on stream for, um, questions and such, if folks have questions, or if you want to like quickly maybe show one or two more things. Um, but I think the hard stuff is about like maybe 10 minutes ish for now. And then we'll have to rush over to, um, uh, for the closing remarks. So, well, that sounds awesome. Okay. So I'm looking at the, the dev chat. Uh, I see a comment on cross-compiling the emacs, but I'm sorry, I'm looking at IRC primarily, but, uh, feel free to jump in if you're on, uh, BBB with me, or, uh, uh, if, if you put something on the pad, I'm sure, uh, we'll see it between the two of us, uh, over here. Okay. So cross-compiling emacs for Serenity. I haven't tried really any cross-compiling. I think that would be very interesting. I would most likely focus on doing exactly what I do on a GNU system, completely ditching. Um, so I guess with my, my remaining time, rather than walking through code, um, for my automation, which can be another talk, if in fact there's an interest in that, um, I want to, I guess, say a couple of words about the non-free operating system that I'm using here. I did my best to use no non-free software other than the, uh, the operating system that is the context for this talk in preparing this talk for you. I personally have a lot more, uh, time and energy, I have to say, invested in proprietary tools for doing a lot of the things that, that go into this. So I really respect the work of people that pull that off. Um, I'm sorry I didn't get my pre-recorded stuff, uh, kind of in order for everybody, but I just want to stress, like, uh, it is all absolutely possible and just hats off to everybody that, that used, uh, entirely free software to get their, get their recordings done in time. Um, and what you did see, unless it was provided by the operating system in my presentation today, was all, uh, free software with the debatable exception of NSYS, which styles itself as open source, maybe for, uh, marketing reasons. Okay, uh, in any case, uh, certainly we can get all that source. Thanks for the note, Corin. It's good to know that, uh, building or, uh, yeah, doing the build of Emacs for Windows on Windows can be done, uh, using only free software. Yeah, absolutely. Probably the right closing note, right? Um, I just, uh, thanks again to the organizers for bearing with me. And like, every time I was like, you guys, I'm terrible at this. They're just like, no, you're doing fine. Keep going. You did a great job live last time. You can do it live, you know, and, and saying all the right things to just, uh, encourage me to come back, uh, this year and every year. Well, as I said before, we were very lucky to have you and the rest of the team, of course, as well. And, um, goes without saying, but all the speakers and the audience, the participants as well. So, um, so, uh, are we, we're still live over here that, you know, you know, me, I'm the Mike Hogg that I am. I can't resist, um, throwing, throwing up another screen here. And, uh, in fact, let's go ahead and go back to our, to our crawler, right? And I'll bring back our build if it finishes and maybe we'll show making the installer as well. Um, uh, but I have the CPU account turned down a little bit here. Uh, note, I didn't specify minus J here. Um, so, uh, over here is my automation. Uh, in case you do want to take a look, I can at least provide the orientation of what you're looking at. Scrape log is probably my first thing I want to show off. Um, it's not beautiful, but this works, uh, pretty well for me to get a sense of something might have changed in terms of how many warnings or errors are happening when I build Emacs. So I have this whole automation going on and I frequently want to answer the question, you know, what's the change rate in, uh, warnings or what have you. So this kind of gives me a count of that. Um, so from there, uh, accrued CI is the script we're watching run in the other pane. Um, we can see it's, uh, just starting to do its thing again. And, uh, the make file I mentioned, this is a top-down rewrite of everything else that I've done. It has some bugs right now. Um, the, uh, the build distribution is the main script that I use for my personal builds. This is what is run by the crude CI script. Uh, it has a fun tie-in to this, uh, web interface here, um, where we can, you don't need the port number when you go to it. That's just if I'm going to post. Um, the, uh, blah, blah, blah, blah, blah. This, this script is really long and complicated and probably needs some diving into, but you can see that, um, one of the complexities I have to deal with is that I'm going to need something in the format of an emacs-version for strategic, um, nsys reasons. So, uh, it takes care of kind of every complexity that I mentioned today in some respects, um, as does the make file. Build release is, um, another fairly useful incarnation of this. This is just focused on the release process, and this does work, uh, for example, to create the, the, the, you know, like, like, well, I could like, uh, for like files as far as I can tell. So what are currently posted for emacs 29.1 and the release candidate. Um, so I'll probably use that next time. And if it's still like, for like, I'll probably post the ones that came from this. Um, uh, building, uh, TreeSitter, I make some DLLs there. If you're looking for hints on how to get going or just simply, uh, a huge long list of Git repositories that make grammars, you can use that is here as well. Um, finally, I mentioned I have a, um, I have a website where I publish my own personal snapshots that I make, uh, that folder full of install directories, but all of the usual GNU style binary distributables, including the source code and the source code for the dependencies. Um, the, uh, so this program is another one of those complicated find commands and therefore potentially the most useful thing in here to take to you. Um, and here I'm deleting, uh, binaries older than 17 years. Uh, everything except the, uh, node apps file and the sources of it you'll find on my website. Currently those indefinitely, I'll probably roll out 120 days or something, um, for those eventually. Oh, uh, I can talk about this one even. Um, the, uh, so here you'll see the two branches that I'm tracking. The job of this script is, uh, this runs on the website. I call it with a, like a remote rsync, uh, type, uh, or an SSA remote, uh, SSH command. Um, and right after the rsync, rsyncing up any new Emacs that I built. And, uh, it's, uh, it's job is to update my fancy directory indexing. So let's look at Corwin's website. Here's my Emacs 29 folder. We have about two more minutes, Corwin. Yeah. It'll take that entire two minutes to, uh, load this directory because I am, because I have not yet ever pruned any of these dang binaries. So every version of, uh, Emacs 29 that I've ever made for myself is probably here. Nice. Uh, I strongly recommend that you bookmark this folder if you're using these for something and you always want the latest. Um, so here, this particular, uh, latest 29, Emacs 29 latest, or simply replace the 29 with 30 to get those. Uh, alas, no, no such luck for TreeSetter. But if we look at, uh, that, live this long without making a typo. Now look at me. Uh-oh. Oh. So here, um, you know, we can see the icon application and so on, even in the TreeSetter folder. This is all I'm talking about, about the fanciness that's set up by that other script that I'm showing over here and run after each time I run the upload. It just looks to see if anything's new and add some lines to the .htaccess file. Um, I'm particularly proud of this one. I'm not going to lie. Um, linking out to each, each, uh, project that we're using, letting us know the commit version, and then, uh, for the DLLs, quick link out to the log and the signature file for this DLL. Um, I find that a lot, just a lot more readable than, uh, listing them all out individually. And I'd love to do something like that on the GNU site. So I'm, I think we've got to be out of time by now. I've just got to say, hey, thanks again for having me, uh, for those that, uh, watch the talk either live or after the conference. Uh, appreciate everyone's support to get me to the point where I will be able to, uh, to do this, this, this cool volunteer task, uh, which is fun and easy to do and reach out to me if you're interested in helping with it. Well, awesome. Thanks a lot for the awesome talk, Corbyn. And, uh, of course, as a fellow core, uh, core organizer, uh, for all, for all that you do, um, in and around Emacs Conf and of course for, uh, GNU Emacs as well, it's much appreciated. Big, big words from coming from you, my friend. Um, thanks for the kind words. Cheers. My pleasure. All right. And with that, I think we're gonna, uh, wrap up the dev, uh, track here and, uh, we'll be with you again shortly in a few minutes on the gen stream, the gen track for the closing remarks for today, um, only for today, because we're going to be back tomorrow again as well. So don't go anywhere and, uh, see you on the gen track in a bit. Oh my God, I did it. We got done within the time. You're my hero. Um, and thank you so much for just keeping me honest there and, uh, like helping me keep my eye on the time and such. You have to look at the recording and see whether you feel like doing it again. I'm sorry. I had my sound screwed up and I'm sorry if I talked over somebody, I couldn't hear anything on mumble until this very moment. Oh, uh, because he's your webcam for it. Um, like as a, like a virtual webcam thingy, it was low res, especially when things are changing as you're scrolling around. So we'll see what kind of recording we can recover from it. And then you can decide whether you maybe want to clean it up with like screenshots. I recorded on this end too. We shouldn't have that problem with my recording. Thank you. Thank you. Thank you. I think we're still live on the dev stream. Someone could, uh, take that off. Oh, yes. Because, uh, I'll, I'll set it to rebroadcast. Yeah. I love doing that for the closing remarks. That's a fine tradition or it's a tradition now. Cause I'm pretty sure this means we've done it twice. I once heard that, you know, uh, as a fan-ish meaning like a fan-ish is a term of endearment for a science fiction fan to another. We say we're, we're fans or things we do are fan-ish and a fan-ish tradition then is if you do it three times, it's tradition, but we're on a budget here. So, all right. I think we should, um, head over to mumble and talk on mumble. Um, and just decide and see like which big blue button room we're going to be in for closing. Okay. So we're clear on BBB here? Yep. I think so.

Questions or comments? Please e-mail corwin@bru.st

Back to the talks Previous by track: Literate Documentation with Emacs and Org Mode Next by track: Bringing joy to Scheme programming Track: Development