Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compiled execs not working w10 ltsc2021x64 #52

Open
valiant8086 opened this issue Jun 13, 2024 · 8 comments
Open

compiled execs not working w10 ltsc2021x64 #52

valiant8086 opened this issue Jun 13, 2024 · 8 comments

Comments

@valiant8086
Copy link
Contributor

Maybe this is expected, but I can't remember any mention of it. When I compile anything on Windows10 x64 the .exe I get won't do anything notable. I think a window opens and closes after about 3 seconds.

//function start
void main () //start our main function
{
show_window("testing");
tts_voice v; v.speak_wait("is it broke?");
wait(2000);
}

Expected result. It should show the game window, NVDA should speak the title, SAPI should say "Is it broke?" then after that, beyond a 2 second pause it should close out.

Actual result: NVDA doesn't say anything for about 2 seconds and then it repeats the explorer window when I just ran the exe.

Works fine if I run the nvgt.

@samtupy
Copy link
Owner

samtupy commented Jun 13, 2024

Hi,
This is most likely because you did not copy C:/nvgt/lib to the location containing your compiled executable.
While you don't need every file in this folder for every game, you are using the tts_voice object which uses the bass library to play sound.
The application is failing most likely because it cannot find bass.dll.
It is actually possible to add an error check into your application if you want by using a property called SOUND_AVAILABLE, of course before any sound or tts voice objects are initialized.
If you are wondering why we need bass to speak SAPI text, this is because we trim the audio data after we receive it from SAPI which is why NVGT's SAPI object is so responsive. It comes with the drawback that it does require a sound system implementation to play audio, in this case we currently use bass.
Hopefully this solves your issue, sorry about the trouble!

@valiant8086
Copy link
Contributor Author

Yup, that did it. I had to copy everything. At first I copied bass, nvdaControllerClient64, and SAAPI64. When that didn't work I copied bass_fx, and when that didn't work I copied the entire thing and now it's working. If not already we might want to detail what things are required for which. I'll double check the docs but I think that's not mentioned anywhere. Seems like I read somewhere something about being able to get all that bundled into the exe, or perhaps that was something upcoming?

@valiant8086
Copy link
Contributor Author

Alrighty no it's not mentioned anywhere. I see the tutorials section is a bit incomplete. I may attempt to fill that out some. There's surely a lot of work to do there.

@valiant8086
Copy link
Contributor Author

Can someone give me a brief overview of what all the dll files do? I just learned that Polk is for screen reader support on Windows? So that's a start. Also bass is an audio engine I assume bass_fx lets it implement sound effects like reverb and such. I know what nvda controller client does. The rest not so sure.

@samtupy
Copy link
Owner

samtupy commented Jun 14, 2024

Sure:

  • bass.dll is required for the sound object and the tts_voice object, though will not be later once we switch from bass to the miniaudio library.
  • bassmix.dll is just as important as bass.dll and allows things like nvgt's mixer class to exist, where we can combine many bass channels into one.
  • bass_fx.dll is a bit less important and is used as you surmised for reverb, filters, etc.
  • git2.dll is the libgit2 library which allows people to programmatically access git repositories (can be good for adding version control to your online game's map world for example). You don't usually need it.
  • git2nvgt.dll is the plugin for nvgt itself that wraps git2. So if your script does not include the line #pragma plugin git2nvgt, then you don't need either of the git2 dlls.
  • GPUUtilities.dll is used for the GPU acceleration of ray tracing used for geometric reverb in steam audio. It should always be completely optional.
  • nvgt_curl.dll is another plugin that wraps the libcurl library. It used to be the only way to do http requests, but it's now being phased out in favor of more portable options. It's only required if your script includes the line #pragma plugin nvgt_curl
  • nvgt_sqlite.dll is similarly a plugin and is only needed if #pragma plugin nvgt_sqlite is defined.
  • phonon.dll is steam audio, that's the HRTF and geometric reverb and cool things like that. You should only need it if you create a sound_environment class or set sound_global_hrtf=true in your script.
  • systemd_notify.dll is a tiny plugin you should rarely ever need, you can read about it in the github repository.
  • TrueAudioNext.dll is more optional GPU acceleration for steam audio, I think one of the dlls is for AMD and another for Intel or something.

Hopefully that helps!

valiant8086 added a commit to valiant8086/nvgt that referenced this issue Jun 15, 2024
New file under the user manual section called "compiling your project for distribution". I've been doing a little research and generally trying to understand this well enough to write up on it. I think I may have made some mistakes. I did leave out the Linux and Mac OS specific tidbits since I'm too unfamiliar with those right now, so I'm hoping someone can either comment on the pr or the underlying issue samtupy#52  with what I need to know to finish it out or just commit their own contributions to my fork. I have it configured to let those who can push to the main repo to push to this one also if necessary.

Things to work on:
* Linux and Mac OS file extensions. I dunno what they will be so those areas where it is mentioned are not finished.
* Linux and Mac OS locations for the lib folder. I don't know where the default install location for Nvgt is on those platforms or where the lib folder actually is. If there's no actual default on the Linux side then the literature could reflect this, something like "go to the location where you installed Nvgt and find the Lib folder".
* Linux and Mac OS instructions for compiling. I don't know exactly how it is done there so any help filling that in would be appreciated.
* verify if it is expected that I cannot get my compiled game to produce sound via the normal sound object e.g. sound voSound1; sound voSound2; if the phonon library is not present. I can test this more or create a separate issue but I'm not totally sure whether I found something unexpected.
@peter1384
Copy link

also, @samtupy just got a question. In nvgt's directory, we have a nvgt.exe which surely everyone would know what it is for like bgt.exe, but what is nvgtw.exe in there? Thanks.

@samtupy
Copy link
Owner

samtupy commented Jun 15, 2024

Hi,
in windows, applications must either be compiled with the console subsystem or the windowed subsystem. One works in the command line and one works well in desktop user interfaces. Sadly there is no truly comfortable way to use both subsystems in one executable, thus nvgtw.exe containing the windowed subsystem version. You can see another example of this with python, which contains the exact same thing (python.exe and pythonw.exe) for the same reason.

@peter1384
Copy link

ok, Understood. Thanks!

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

No branches or pull requests

3 participants