Ricardo Wurmus <[email protected]> writes:
> Nicolas Goaziou <[email protected]> writes: > >> "GtkModule.so" should be located in the same directory as the executable >> "stepmania". This is the case in our package: both are located in >> "…stepmania-5.1.0-b2/share/stepmania/". >> >> However, our package definition also creates a symlink to the >> "stepmania" executable in the "bin/" directory. Since the symlink is >> launched, and not the executable, the working directory seems to be off. >> >> As another data point, the one place in the code base that actually >> makes use of "GtkModule.so" is "LoadingWindow/LoadingWindow_Gtk.cpp" >> file: >> >> --8<---------------cut here---------------start------------->8--- >> std::string LoadingWindow_Gtk::Init() >> { >> ASSERT( Handle == nullptr ); >> >> Handle = dlopen( (RageFileManagerUtil::sDirOfExecutable + "/" + >> "GtkModule.so").c_str(), RTLD_NOW ); >> --8<---------------cut here---------------end--------------->8--- >> >> I'm not sure about how to proceed from there. Maybe use `wrap-program' >> around the "stepmania" symlink. If so, what to wrap? Another option is >> to patch the "LoadingWindow_Gtk.cpp" file like: >> >> --8<---------------cut here---------------start------------->8--- >> Handle = dlopen( (RageFileManagerUtil::sDirOfExecutable + "/" + >> "../share/stepmania/GtkModule.so").c_str(), RTLD_NOW ); >> --8<---------------cut here---------------end--------------->8--- >> >> I'd favor the second option, but I cannot test the results since >> I cannot reproduce the problem. > > I implemented something similar in commit > 45aba232abe50b6642abfaa06030985c7febbe07. > > There still are problems, though. The program expects a directory > “Songs” to exist in the current working directory. It then fails with > this error: > > Error: No NoteSkins found > > This seems to work fine only when when “stepmania” is executed from > within the “share/stepmania” directory. I suspect that this is the same > kind of problem. This is now fixed with commit 4774677228. -- Ricardo
