Renaming DLLs
Renaming DLLs
It's a shame that Windows DLL files don't start with 32 or 64 depending on whether they are 32-bit or 64-bit, e.g. 32SDL2.DLL. That would make it easier to ship a single package with both 32-bit and 64-bit executables. Currently, to have a 'runnable' file in the root (top level) directory, you need a batch file to check if ProgramFiles(x86) is defined, then run the executable in the matching directory.
Re: Random off-topic stuff
Well, it is possible to rename it, but then the EXE won't find it...Norbert wrote:It's a shame that Windows DLL files don't start with 32 or 64 depending on whether they are 32-bit or 64-bit, e.g. 32SDL2.DLL. That would make it easier to ship a single package with both 32-bit and 64-bit executables. Currently, to have a 'runnable' file in the root (top level) directory, you need a batch file to check if ProgramFiles(x86) is defined, then run the executable in the matching directory.
And the DLL name in the EXE comes from libSDL2.dll.a, which is a binary file.
Not from the *.h text-file that could be easily edited...
There are tools to make *.a from *.dll, but they don't really want to cooperate.
Spoiler: show
Spoiler: show
Unless you fully recompile it from scratch... I guess that would not really worth the hassle?
Or you could just, you know, hex-edit the name in the referencing EXE/DLL without changing its length.
Like "libpng16-16.d32" and "libpng16-16.d64" or something.
Um, yeah. This could be the simplest solution. Then you don't need the stuff in the spoilers.
And it "only" took me one hour to find it. Ouch.
What are you trying to do, by the way?
Re: Random off-topic stuff
Sometimes really smart people do unnecessarily complicated things.David wrote:Um, yeah. This could be the simplest solution. Then you don't need the stuff in the spoilers.
And it "only" took me one hour to find it. Ouch.
For my new leapop level editor I wanted to create a single Windows ZIP for both 32-bit and 64-bit.David wrote:What are you trying to do, by the way?
In the end I decided to just create separate ZIP files. They'll be released soon.
Re: Renaming DLLs
Moved posts to a new topic.
I guess a 32-bit executable will run on 64-bit Windows as well.Norbert wrote:For my new leapop level editor I wanted to create a single Windows ZIP for both 32-bit and 64-bit.
Re: Renaming DLLs
In theory, but Moscow Tracer seemed to have problems.David wrote:I guess a 32-bit executable will run on 64-bit Windows as well.
Plus, it's 2017. (current year argument)
Re: Renaming DLLs
I suppose it should be possible to manually load the DLL at runtime using LoadLibrary()?Norbert wrote:It's a shame that Windows DLL files don't start with 32 or 64 depending on whether they are 32-bit or 64-bit, e.g. 32SDL2.DLL. That would make it easier to ship a single package with both 32-bit and 64-bit executables. Currently, to have a 'runnable' file in the root (top level) directory, you need a batch file to check if ProgramFiles(x86) is defined, then run the executable in the matching directory.
Then, the DLL filename can be determined at runtime.
It's probably not the preferred way to do this for SDL2, though... I think you would then have to import all the SDL2 function pointers manually, too