Haruno19/starfetch

Can't work on Windows10.

scillidan opened this issue · 16 comments

I got the ‘starfetch.exe’, but it seems unable to run.
image

Hi!
starfetch is designed to work with MacOS and Linux (or other unix-based systems).
I don't know your specific setup, but starfetch expects to find resource files in /usr/local/opt/starfetch/res/ or /usr/local/starfetch/res/. Unless you have those folder it won't run.
And even with them, starfetch isn't tested in Windows, so I have no clue how it will work (or not work).

I could try to make it work if you provide some more context

Thanks for your reply. According to your reminder, I try used Cygwin toinstall and run it.
It still doesn't work. And there is no feedback any information.
image
I don't know whether the information provided is useful. So I open the Debug Log (GUI) on Cmder, there show:

ConEmuC build 210912 x64. (c) 2009-2020, ConEmu.Maximus5@gmail.com
ConEmuC64: Debugger successfully attached to PID=10136
{10136.10916} CREATE_PROCESS_DEBUG_EVENT
{10136.10916} LOAD_DLL_DEBUG_EVENT at 0x00007FFA359F0000, ntdll.dll
        C:\Windows\System32\ntdll.dll
{10136.20140} CREATE_THREAD_DEBUG_EVENT
{10136.20212} CREATE_THREAD_DEBUG_EVENT
{10136.19968} CREATE_THREAD_DEBUG_EVENT
{10136.21540} CREATE_THREAD_DEBUG_EVENT
{10136.4392} CREATE_THREAD_DEBUG_EVENT
{10136.12256} CREATE_THREAD_DEBUG_EVENT
{10136.21028} CREATE_THREAD_DEBUG_EVENT
{10136.18180} CREATE_THREAD_DEBUG_EVENT
{10136.22436} CREATE_THREAD_DEBUG_EVENT
{10136.12016} CREATE_THREAD_DEBUG_EVENT
{10136.13132} CREATE_THREAD_DEBUG_EVENT
{10136.7388} CREATE_THREAD_DEBUG_EVENT
{10136.10916} LOAD_DLL_DEBUG_EVENT at 0x00007FFA356D0000, kernel32.dll
        C:\Windows\System32\kernel32.dll
{10136.10916} LOAD_DLL_DEBUG_EVENT at 0x00007FFA33540000, KernelBase.dll
        C:\Windows\System32\KernelBase.dll
{10136.10916} LOAD_DLL_DEBUG_EVENT at 0x00007FFA33BE0000, shlwapi.dll
        C:\Windows\System32\shlwapi.dll
{10136.10916} LOAD_DLL_DEBUG_EVENT at 0x00007FFA35580000, msvcrt.dll
        C:\Windows\System32\msvcrt.dll
{10136.10916} LOAD_DLL_DEBUG_EVENT at 0x00007FFA20FF0000, comctl32.dll
        C:\Windows\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.19041.1110_none_60b5254171f9507e\comctl32.dll
{10136.10916} LOAD_DLL_DEBUG_EVENT at 0x00007FFA34470000, user32.dll
        C:\Windows\System32\user32.dll
{10136.10916} LOAD_DLL_DEBUG_EVENT at 0x00007FFA339D0000, win32u.dll
        C:\Windows\System32\win32u.dll
{10136.10916} LOAD_DLL_DEBUG_EVENT at 0x00007FFA349F0000, gdi32.dll
        C:\Windows\System32\gdi32.dll
{10136.10916} LOAD_DLL_DEBUG_EVENT at 0x00007FFA33100000, gdi32full.dll
        C:\Windows\System32\gdi32full.dll
{10136.10916} LOAD_DLL_DEBUG_EVENT at 0x00007FFA352B0000, comdlg32.dll
        C:\Windows\System32\comdlg32.dll
{10136.10916} LOAD_DLL_DEBUG_EVENT at 0x00007FFA33210000, msvcp_win.dll
        C:\Windows\System32\msvcp_win.dll
{10136.10916} LOAD_DLL_DEBUG_EVENT at 0x00007FFA34EA0000, combase.dll
        C:\Windows\System32\combase.dll
{10136.10916} LOAD_DLL_DEBUG_EVENT at 0x00007FFA33440000, ucrtbase.dll
        C:\Windows\System32\ucrtbase.dll
{10136.10916} LOAD_DLL_DEBUG_EVENT at 0x00007FFA34760000, rpcrt4.dll
        C:\Windows\System32\rpcrt4.dll
{10136.10916} LOAD_DLL_DEBUG_EVENT at 0x00007FFA35900000, SHCore.dll
        C:\Windows\System32\SHCore.dll
{10136.10916} LOAD_DLL_DEBUG_EVENT at 0x00007FFA33C40000, shell32.dll
        C:\Windows\System32\shell32.dll
{10136.10916} LOAD_DLL_DEBUG_EVENT at 0x00007FFA2CD90000, version.dll
        C:\Windows\System32\version.dll
{10136.10916} LOAD_DLL_DEBUG_EVENT at 0x00007FFA354D0000, advapi32.dll
        C:\Windows\System32\advapi32.dll
{10136.10916} LOAD_DLL_DEBUG_EVENT at 0x00007FFA26340000, winmm.dll
        C:\Windows\System32\winmm.dll
{10136.10916} LOAD_DLL_DEBUG_EVENT at 0x00007FFA35790000, sechost.dll
        C:\Windows\System32\sechost.dll
{10136.10916} LOAD_DLL_DEBUG_EVENT at 0x00007FFA34620000, ole32.dll
        C:\Windows\System32\ole32.dll
{10136.10916} LOAD_DLL_DEBUG_EVENT at 0x00007FFA34890000, oleaut32.dll
        C:\Windows\System32\oleaut32.dll
{10136.10916} LOAD_DLL_DEBUG_EVENT at 0x00007FFA1CDB0000, netapi32.dll
        C:\Windows\System32\netapi32.dll
{10136.10916} LOAD_DLL_DEBUG_EVENT at 0x00007FFA325E0000, netutils.dll
        C:\Windows\System32\netutils.dll
{10136.10916} LOAD_DLL_DEBUG_EVENT at 0x00007FFA2C680000, samcli.dll
        C:\Windows\System32\samcli.dll
{10136.10916} LOAD_DLL_DEBUG_EVENT at 0x00007FFA35270000, imm32.dll
        C:\Windows\System32\imm32.dll
{10136.10916} LOAD_DLL_DEBUG_EVENT at 0x00007FFA30B30000, uxtheme.dll
        C:\Windows\System32\uxtheme.dll
{10136.10916} LOAD_DLL_DEBUG_EVENT at 0x00007FFA30D20000, dwmapi.dll
        C:\Windows\System32\dwmapi.dll
{10136.10916} LOAD_DLL_DEBUG_EVENT at 0x00007FFA31210000, windows.storage.dll
        C:\Windows\System32\windows.storage.dll
{10136.10916} LOAD_DLL_DEBUG_EVENT at 0x00007FFA32A80000, wldp.dll
        C:\Windows\System32\wldp.dll
{10136.10916} LOAD_DLL_DEBUG_EVENT at 0x00007FFA20710000, TextShaping.dll
        C:\Windows\System32\TextShaping.dll
{10136.10916} LOAD_DLL_DEBUG_EVENT at 0x00007FFA0FC60000, ListaryHook64.dll
        C:\Users\scillidan\scoop\apps\listary\5.00.2843\ListaryHook64.dll
{10136.10916} LOAD_DLL_DEBUG_EVENT at 0x00007FFA276E0000, oleacc.dll
        C:\Windows\System32\oleacc.dll
{10136.10916} LOAD_DLL_DEBUG_EVENT at 0x00007FFA35390000, msctf.dll
        C:\Windows\System32\msctf.dll
{10136.10916} LOAD_DLL_DEBUG_EVENT at 0x000006F780000000, ConEmuCD64.dll
        C:\Users\scillidan\scoop\apps\cmder\1.3.19\vendor\conemu-maximus5\ConEmu\ConEmuCD64.dll
{10136.10916} LOAD_DLL_DEBUG_EVENT at 0x00007FFA31010000, kernel.appcore.dll
        C:\Windows\System32\kernel.appcore.dll
{10136.10916} LOAD_DLL_DEBUG_EVENT at 0x00007FFA33300000, bcryptprimitives.dll
        C:\Windows\System32\bcryptprimitives.dll
{10136.10916} LOAD_DLL_DEBUG_EVENT at 0x00007FFA29E30000, TextInputFramework.dll
        C:\Windows\System32\TextInputFramework.dll
{10136.10916} LOAD_DLL_DEBUG_EVENT at 0x00007FFA304F0000, CoreUIComponents.dll
        C:\Windows\System32\CoreUIComponents.dll
{10136.10916} LOAD_DLL_DEBUG_EVENT at 0x00007FFA30890000, CoreMessaging.dll
        C:\Windows\System32\CoreMessaging.dll
{10136.10916} LOAD_DLL_DEBUG_EVENT at 0x00007FFA35830000, ws2_32.dll
        C:\Windows\System32\ws2_32.dll
{10136.10916} LOAD_DLL_DEBUG_EVENT at 0x00007FFA31DF0000, ntmarta.dll
        C:\Windows\System32\ntmarta.dll
{10136.10916} LOAD_DLL_DEBUG_EVENT at 0x00007FFA301B0000, WinTypes.dll
        C:\Windows\System32\WinTypes.dll
{10136.10916} LOAD_DLL_DEBUG_EVENT at 0x00007FFA35620000, clbcatq.dll
        C:\Windows\System32\clbcatq.dll
{10136.10916} LOAD_DLL_DEBUG_EVENT at 0x00007FF9FD830000, weasel.dll
        C:\Windows\System32\weasel.dll
{10136.10916} LOAD_DLL_DEBUG_EVENT at 0x00007FFA1B520000, usp10.dll
        C:\Windows\System32\usp10.dll
{10136.10916} LOAD_DLL_DEBUG_EVENT at 0x00007FFA32FF0000, sspicli.dll
        C:\Windows\System32\sspicli.dll
{10136.10916} LOAD_DLL_DEBUG_EVENT at 0x00007FFA08880000, ExplorerFrame.dll
        C:\Windows\System32\ExplorerFrame.dll
{10136.10916} LOAD_DLL_DEBUG_EVENT at 0x00007FFA08AA0000, DataExchange.dll
        C:\Windows\System32\DataExchange.dll
{10136.10916} LOAD_DLL_DEBUG_EVENT at 0x00007FFA2F990000, d3d11.dll
        C:\Windows\System32\d3d11.dll
{10136.10916} LOAD_DLL_DEBUG_EVENT at 0x00007FFA2FC00000, dcomp.dll
        C:\Windows\System32\dcomp.dll
{10136.10916} LOAD_DLL_DEBUG_EVENT at 0x00007FFA319F0000, dxgi.dll
        C:\Windows\System32\dxgi.dll
{10136.10916} LOAD_DLL_DEBUG_EVENT at 0x00007FFA296E0000, twinapi.appcore.dll
        C:\Windows\System32\twinapi.appcore.dll
{10136.10916} LOAD_DLL_DEBUG_EVENT at 0x00007FFA2ECD0000, propsys.dll
        C:\Windows\System32\propsys.dll
{10136.22952} CREATE_THREAD_DEBUG_EVENT
{10136.22952} EXCEPTION_BREAKPOINT at 0x00007FFA35A90860 flags 0x00000000 FC=1
{10136.22952} EXIT_THREAD_DEBUG_EVENT
ConEmuC64: Press Ctrl+Break to create minidump of debugging process
ConEmuC64: Sending DebugBreak event to process
{10136.18064} CREATE_THREAD_DEBUG_EVENT
{10136.18064} EXCEPTION_BREAKPOINT at 0x00007FFA35A90860 flags 0x00000000 FC=1
Creating minidump: D:\home\CEDump-210912-10136-220413205702676.mdmp...
MiniDumpWriteDump succeeded, 0 left
{10136.18064} EXIT_THREAD_DEBUG_EVENT
{10136.19968} EXIT_THREAD_DEBUG_EVENT
{10136.12256} EXIT_THREAD_DEBUG_EVENT
{10136.21028} EXIT_THREAD_DEBUG_EVENT
{10136.18180} EXIT_THREAD_DEBUG_EVENT
{10136.5752} CREATE_THREAD_DEBUG_EVENT
{10136.21832} CREATE_THREAD_DEBUG_EVENT

And this is some of the library or what I installed:

cmake
cmder
curl
cygwin
go
gsudo
lua
make
miniconda3
msys2-cn
nodejs
nuwen-mingw-gcc
perl
python
rtmpdump
rustup
sudo
vcredist2019
wget
windowsdesktop-runtime
zstd

Hopes it can help you.

Thanks for replying back.

Unfortunately I can't understand much from the debug logs, but regardless, the first screenshot hints that it doesn't find some files: starfetch should give back an error message in these situations:

  • It doesn't find the requested constellation file
  • It detects an invalid argument
  • You don't use arguments correctly

Since in your situation it outputs nothing, it means something happens prior to these error being detected, and the only thing I can think of that would cause this behaviour, is it not finding other resources file like the template file for example.

I'm not very familiar with Cygwin, but my guess is that when you execute starfetch.exe, it looks for the path /usr/local/ under C:, and from the debug logs you attached, it looks like you home folder (and thus all the other files as well) is inside D:. Maybe that's what's causing the problem.

Could you please post the output of starfetch -l?

It's here
image
There are some garbled here, but can ignore them.

Actually I also not familiar with Cygwin. It seems to simulate a UNIX environment on Windows
I more use cmder, will much better than Windows' CMD. Only when I meet with difficulties, I will use Cygwin.
Maybe you said it is, the mistake.
The path /usr/local/, Its real path is C:\Users\scillidan\scoop\persist\cygwin\root\usr\local\.
And the path /home/, I git clone repo and make it here. Its real path is C:\Users\scillidan\scoop\persist\cygwin\root\home\scillidan.

Ok so, form the starfetch -l output we have the confirmation that something is not working with the path.
starfetch -l should list every file it finds under /usr/local/starfetch/res/constellations/. If it doesn't output anything, it means it doesn't find any file in that path, or doesn't find the path itself.

Can you edit the source file starfetch/src/starfetch.cpp?
You should remove the lines form 21 to 25, and add this instead: string path = "C:\Users\scillidan\scoop\persist\cygwin\root\usr\local\starfetch\res\".

It works! :)
image

Nice!!
I see there are still a few problem with the rendering.
Probably because the escape code used isn't compatible with Windows(?).
It now uses '\033'

Yes, occasionally encounter this problem.
This problem seems to be mentioned here, https://conemu.github.io/en/AnsiEscapeCodes.html
But it is a bit difficult. I don't understand :(

I think as workaround, replacing line 69 with this replace(s.begin(), s.end(), '^', (char)27); should work.
[char]27 is the ascii equivalent of the escape code, hopefully that fixes it.

It still can't display properly. Anyway, thank you for your help :)

I'm sorry the problem still persists :(
I hope you find a solution!

I'll close this issue then, as the main problem has been fixed. If you want, you can open a new one about this escape code issue maybe

su8 commented

Compile the program in Visual Studio Code Editor - https://code.visualstudio.com/

Just follow the windows installation guide - https://github.com/Haruno19/starfetch#manual-windows

It work well on WSL:

Snipaste_2023-01-27_11-52-02

But when I was compiling it on window10, I encountered some weird errors👻.
So I used this rust-rewrite of starfetch on windows, for every rookie's sake.

su8 commented

Try ti edit with ln -sf not only woth ln -s

It stops here at compile the program yet.

image

Saying seems that there are not C or C++ files, like file.c, file.cpp.
I try same way with https://github.com/K1ngst0m/starfetch, but same errors.
Maybe this is my original sin because I hardly know how to use vscode, even though I have installed a bunch of plug-ins 🤪

I try just make install in folder (K1ngst0m/starfetch) and use the result.
Can see the wrong character:

image