Giter VIP home page Giter VIP logo

Comments (30)

uhlin avatar uhlin commented on July 28, 2024 1

Cool. I will upload an official fix at https://www.nifty-networks.net/swirc/windows.html. For some reason _get_pgmptr() returns an empty string on your system, but only in Swirc (because we tested with a small C program).

from swirc.

uhlin avatar uhlin commented on July 28, 2024

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'.

from swirc.

uhlin avatar uhlin commented on July 28, 2024

Because the name check was there in the previous version too...

from swirc.

uhlin avatar uhlin commented on July 28, 2024

Perhaps I can remove the check completely or make it less strict. But try using 'ren'.

from swirc.

cpkio avatar cpkio commented on July 28, 2024

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?

from swirc.

uhlin avatar uhlin commented on July 28, 2024

Not sure yet.

The code is here:

if (_get_pgmptr(&pgm) == 0) {

str = sw_strdup(pgm);

if ((cp = strstr(str, "\\swirc.exe")) == NULL) {

from swirc.

uhlin avatar uhlin commented on July 28, 2024

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.

from swirc.

uhlin avatar uhlin commented on July 28, 2024

Maybe it returns something like c:/path/to/swirc/swirc.exe instead of c:\path\to\swirc\swirc.exe thus strstr() returns NULL.

from swirc.

uhlin avatar uhlin commented on July 28, 2024

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.

from swirc.

cpkio avatar cpkio commented on July 28, 2024

if it's possible to rename a file to '\swirc.exe' under Windows

It is not possible, \ is a path separator character in Windows systems.

from swirc.

uhlin avatar uhlin commented on July 28, 2024

Yeah, thought so :\

from swirc.

cpkio avatar cpkio commented on July 28, 2024

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

from swirc.

uhlin avatar uhlin commented on July 28, 2024

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?

from swirc.

cpkio avatar cpkio commented on July 28, 2024

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?

from swirc.

uhlin avatar uhlin commented on July 28, 2024

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...

from swirc.

uhlin avatar uhlin commented on July 28, 2024

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.
pgmptr.zip

from swirc.

cpkio avatar cpkio commented on July 28, 2024
i:\_tools_\_internet_\Swirc\pgmptr.exe
Type <RETURN> to exit

from swirc.

uhlin avatar uhlin commented on July 28, 2024

Ok, hmm, it looks correct/like expected. Can you send me swirc.exe in i:\_tools_\_internet_\Swirc\? I think you need to zip it in order to attach it here.

from swirc.

uhlin avatar uhlin commented on July 28, 2024

I can recommend 7-zip for Windows. But you are probably an advanced user so you know already. :)

from swirc.

uhlin avatar uhlin commented on July 28, 2024

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.

from swirc.

uhlin avatar uhlin commented on July 28, 2024

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.

from swirc.

cpkio avatar cpkio commented on July 28, 2024

My system should not substitute extensions case, AFAIK… dir in CMD and ls in Powershell show same case. BTW, I have systemwide UTF-8 support enabled in Windows and have non-english locale, maybe that matters in conjunction with libintl

What version of swirc.exe you need, 3.3.6? here

from swirc.

uhlin avatar uhlin commented on July 28, 2024

Yeah, 3.3.6

from swirc.

uhlin avatar uhlin commented on July 28, 2024

Nothing with libintl, the failing part is the strstr() call

from swirc.

uhlin avatar uhlin commented on July 28, 2024

It doesn't find the substring \swirc.exe (case-sensitive) in the string returned by _get_pgmptr().

from swirc.

uhlin avatar uhlin commented on July 28, 2024

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.

from swirc.

uhlin avatar uhlin commented on July 28, 2024

I created a new installer with the strcasestr() change. Can you try it and see if it works?
It's here:
https://www.nifty-networks.net/swirc/tmp/Swirc-3.3.6.msi

from swirc.

cpkio avatar cpkio commented on July 28, 2024

Still does not work.

from swirc.

uhlin avatar uhlin commented on July 28, 2024

Ok, I think I know the problem now.
https://www.nifty-networks.net/swirc/tmp/asdf/Swirc-3.3.6.msi
That one works, right?

from swirc.

cpkio avatar cpkio commented on July 28, 2024

Yes, it does run.

from swirc.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.