Re: How does one attach a manifest file to a D executable on Windows?
On Sunday, 2 June 2024 at 21:46:41 UTC, solidstate1991 wrote: Well, it turns out I used the windres found in mingw instead of `rc.exe` since the latter cannot be found anywhere on my PC, even after reinstalling stuff. I need to hunt it down somehow. rc.exe comes with the Windows SDK - it gets installed in one of the subfolders of "C:\Program Files (x86)\Windows Kits\10\bin" (on my machine it's in "10.0.22000.0\x64").
Re: How does one attach a manifest file to a D executable on Windows?
On Sunday, 2 June 2024 at 19:11:10 UTC, solidstate1991 wrote: Added a few more line to my `resources.rc` file, it seems like the issue is the resource file not being touched at all. I've put `dflags "resources.res" platform="windows"` in my `dub.sdl` file, it doesn't even care if there's a typo in the resource file's path. Well, it turns out I used the windres found in mingw instead of `rc.exe` since the latter cannot be found anywhere on my PC, even after reinstalling stuff. I need to hunt it down somehow.
Re: How does one attach a manifest file to a D executable on Windows?
On Saturday, 25 May 2024 at 19:51:25 UTC, John Chapman wrote: Not tested but from memory I do this: 1) Copy that first XML snippet from the page you linked, save to a file called example.exe.manifest 2) Create a resource script file called resources.rc, with this at the top: 1 24 "example.exe.manifest" 3) Compile it with rc.exe 4) Include the resulting resources.res on your DMD command line You might also need to call InitCommonControls or InitCommonControlsEx before creating any windows. Added a few more line to my `resources.rc` file, it seems like the issue is the resource file not being touched at all. I've put `dflags "resources.res" platform="windows"` in my `dub.sdl` file, it doesn't even care if there's a typo in the resource file's path.
Re: Socket and spawn()
On Sunday, 2 June 2024 at 17:46:09 UTC, bauss wrote: If anything you should use a thread pool that each handles a set of sockets, instead of each thread being a single socket. Yup, thread pool it is. I'm still fleshing out the data structure which manages the incoming work presented to the pool, but here's what I have so far: https://sources.vsta.org:7100/dlang/file?name=tiny/rotor.d&ci=tip Andy
Re: Socket and spawn()
On Friday, 31 May 2024 at 16:07:23 UTC, Andy Valencia wrote: I'm coding a server which takes TCP connections. I end up in the main thread with .accept() which hands me a Socket. I'd like to hand this off to a spawn()'ed thread to do the actual work. Aliases to mutable thread-local data not allowed. Is there some standard way to get something which _isn't_ in TLS? Or do I have to drop back to file descriptors and do my own socket handling? TIA, Andy I just want to point out that you should not spawn a thread for each accepted socket. That is very bad and expensive. You should instead make it non-blocking and use something like select to handle it. If anything you should use a thread pool that each handles a set of sockets, instead of each thread being a single socket.
Re: How does one attach a manifest file to a D executable on Windows?
On Saturday, 25 May 2024 at 19:51:25 UTC, John Chapman wrote: Not tested but from memory I do this: 1) Copy that first XML snippet from the page you linked, save to a file called example.exe.manifest 2) Create a resource script file called resources.rc, with this at the top: 1 24 "example.exe.manifest" 3) Compile it with rc.exe 4) Include the resulting resources.res on your DMD command line You might also need to call InitCommonControls or InitCommonControlsEx before creating any windows. Did just that too, didn't change anything.