-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
Renamed executable
error, unable to run
#12
Comments
Ok. Strange. Are you sure that the name hasn't been changed? The name should be 'swirc.exe' in all lower case, including the file extension 'exe'. Try to rename it from the Windows command prompt using the command 'ren' or 'rename'. Type 'ren /?' to see the command syntax. For example if the name is currently 'swirc.EXE' try 'ren swirc.EXE swirc.exe'. |
Because the name check was there in the previous version too... |
Perhaps I can remove the check completely or make it less strict. But try using 'ren'. |
The file name is correct. The MSI package does not work after installation, which is strange, I didnt rename anything. Moreover, the same package works fine in another Windows installation (21H2 if I remember correctly). What can be the reason of this behavior beyond file name itself? |
Maybe _get_pgmptr() returns something unexpected or its behavior has changed. But if 3.3.5 works it's strange because that code is in 3.3.5 too. |
Maybe it returns something like c:/path/to/swirc/swirc.exe instead of c:\path\to\swirc\swirc.exe thus strstr() returns NULL. |
Don't know if it's possible to rename a file to '\swirc.exe' under Windows, I currently don't have access to my Windows laptop, but you could try that and see if it works. |
It is not possible, |
Yeah, thought so :\ |
btw Windows is not case-sensitive, you can type executable name in capitals and it will run. I cannot guarantee OS returns filename as it is in file system, it can uppercase it maybe. if you changed building toolchain it may affect this too |
Yes, but strstr() is case-sensitive. Perhaps I should replace it with strcasestr(). But it would've been good to know what _get_pgmptr() stores/outputs on your system. I suspect it's something with the path separators. But does 3.3.5 work fine? |
The last working version for me seems to be 3.3.3… If there ever will be out-of-the-box-portable versions I will try to play around more. I see you've added libintl/libidn, maybe the mess around with filenames? |
Yeah, 3.3.3 didn't have that code... I will fix this when I have access to my Windows computer. Thanks for reporting. But it would've been nice to see what the output of _get_pgmptr() is on your system. I can compile a small program that does it, but not right now, no Windows environment currently... |
I compiled a small program that shows the output of _get_pgmptr(), if you can put the exe in the same dir as swirc and run it and tell me the output of it, would've been good. I attach both the c source and the exe. |
|
Ok, hmm, it looks correct/like expected. Can you send me swirc.exe in |
I can recommend 7-zip for Windows. But you are probably an advanced user so you know already. :) |
I really suspect that the actual name of swirc.exe isn't really swirc.exe, maybe it's swirc.EXE, after I saw the output of pgmptr. This can be fixed easily. |
That's the only possibility. I will close this with a small fix if you don't respond (maybe it's night there). And I will build a new .msi which I will upload at https://www.nifty-networks.net/swirc/windows.html including the fix. |
My system should not substitute extensions case, AFAIK… What version of |
Yeah, 3.3.6 |
Nothing with libintl, the failing part is the strstr() call |
It doesn't find the substring |
I currently don't have access to my Windows environment again. But I will test to use strcasestr() instead. I leave the issue open... Thanks again for reporting. |
I created a new installer with the strcasestr() change. Can you try it and see if it works? |
Still does not work. |
Ok, I think I know the problem now. |
Yes, it does run. |
Cool. I will upload an official fix at |
After updating I cannot run it anymore, getting
Renamed executable
dialog window.Windows 10 x64 1803
The text was updated successfully, but these errors were encountered: