Make a shortcut in Winefile?

Questions about Wine on Linux
Locked
rin67630
Level 2
Level 2
Posts: 16
Joined: Sun Nov 21, 2021 4:19 pm

Make a shortcut in Winefile?

Post by rin67630 »

I started Winefile and wanted to make a shortcut for a program there.
(right click, Make link)
Nothing happened.

What is the procedure to make a shortcut in Winefile?
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: Make a shortcut in Winefile?

Post by Bob Wya »

rin67630 wrote: Thu Dec 02, 2021 5:40 pm I started Winefile and wanted to make a shortcut for a program there.
(right click, Make link)
Nothing happened.

What is the procedure to make a shortcut in Winefile?
This winefile context menu functionality - Create Link entry - is not yet implemented in Wine:

Code: Select all

dlls/shell32/shlview_cmenu.c

Code: Select all

static HRESULT WINAPI ItemMenu_InvokeCommand(
	IContextMenu3 *iface,
	LPCMINVOKECOMMANDINFO lpcmi)
{
    ContextMenu *This = impl_from_IContextMenu3(iface);

    if (lpcmi->cbSize != sizeof(CMINVOKECOMMANDINFO))
        FIXME("Is an EX structure\n");

    TRACE("(%p)->(invcom=%p verb=%p wnd=%p)\n",This,lpcmi,lpcmi->lpVerb, lpcmi->hwnd);

    if (IS_INTRESOURCE(lpcmi->lpVerb) && LOWORD(lpcmi->lpVerb) > FCIDM_SHVIEWLAST)
    {
        TRACE("Invalid Verb %x\n", LOWORD(lpcmi->lpVerb));
        return E_INVALIDARG;
    }

    if (IS_INTRESOURCE(lpcmi->lpVerb))
    {
        switch(LOWORD(lpcmi->lpVerb) + FCIDM_BASE)
        {
        case FCIDM_SHVIEW_EXPLORE:
            TRACE("Verb FCIDM_SHVIEW_EXPLORE\n");
            DoOpenExplore(This, lpcmi->hwnd, "explore");
            break;
        case FCIDM_SHVIEW_OPEN:
            TRACE("Verb FCIDM_SHVIEW_OPEN\n");
            DoOpenExplore(This, lpcmi->hwnd, "open");
            break;
        case FCIDM_SHVIEW_RENAME:
        {
            IShellBrowser *browser;

            /* get the active IShellView */
            browser = (IShellBrowser*)SendMessageA(lpcmi->hwnd, CWM_GETISHELLBROWSER, 0, 0);
            if (browser)
            {
                IShellView *view;

                if(SUCCEEDED(IShellBrowser_QueryActiveShellView(browser, &view)))
                {
                    TRACE("(shellview=%p)\n", view);
                    IShellView_SelectItem(view, This->apidl[0],
                         SVSI_DESELECTOTHERS|SVSI_EDIT|SVSI_ENSUREVISIBLE|SVSI_FOCUSED|SVSI_SELECT);
                    IShellView_Release(view);
                }
            }
            break;
        }
        case FCIDM_SHVIEW_DELETE:
            TRACE("Verb FCIDM_SHVIEW_DELETE\n");
            DoDelete(This);
            break;
        case FCIDM_SHVIEW_COPY:
            TRACE("Verb FCIDM_SHVIEW_COPY\n");
            DoCopyOrCut(This, lpcmi->hwnd, FALSE);
            break;
        case FCIDM_SHVIEW_CUT:
            TRACE("Verb FCIDM_SHVIEW_CUT\n");
            DoCopyOrCut(This, lpcmi->hwnd, TRUE);
            break;
        case FCIDM_SHVIEW_PROPERTIES:
            TRACE("Verb FCIDM_SHVIEW_PROPERTIES\n");
            DoOpenProperties(This, lpcmi->hwnd);
            break;
        default:
            FIXME("Unhandled Verb %xl\n",LOWORD(lpcmi->lpVerb));
            return E_INVALIDARG;
        }
    }
    else
    {
        TRACE("Verb is %s\n",debugstr_a(lpcmi->lpVerb));
        if (strcmp(lpcmi->lpVerb,"delete")==0)
            DoDelete(This);
        else if (strcmp(lpcmi->lpVerb,"copy")==0)
            DoCopyOrCut(This, lpcmi->hwnd, FALSE);
        else if (strcmp(lpcmi->lpVerb,"cut")==0)
            DoCopyOrCut(This, lpcmi->hwnd, TRUE);
        else if (strcmp(lpcmi->lpVerb,"properties")==0)
            DoOpenProperties(This, lpcmi->hwnd);
        else {
            FIXME("Unhandled string verb %s\n",debugstr_a(lpcmi->lpVerb));
            return E_FAIL;
        }
    }
    return S_OK;
}
Hence why the Wine terminal output - for the winefile Create Link menu entry - is just:

Code: Select all

00fc:fixme:shell:ItemMenu_InvokeCommand Unhandled Verb 51l
Bob
rin67630
Level 2
Level 2
Posts: 16
Joined: Sun Nov 21, 2021 4:19 pm

Re: Make a shortcut in Winefile?

Post by rin67630 »

Thank you for your kinde reply. Unfortunately I don't understand it.
Have I, as a user a way to create a shortcut in Winefile?
Where can I find the procedure?
Thank you.
Laszlo
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: Make a shortcut in Winefile?

Post by Bob Wya »

rin67630 wrote: Sat Dec 04, 2021 2:48 pm Thank you for your kinde reply. Unfortunately I don't understand it.
Have I, as a user a way to create a shortcut in Winefile?
Where can I find the procedure?
Thank you.
Laszlo
Hi Laszlo

You won't be able to make a shortcut directly in a the builtin Wine file managers: winefile.exe or explorer.exe .

It would probably be easier to do this task directly with your builtin/native Linux file manager.
E.g. for the Plasma 5 Desktop Environment:

Code: Select all

dolphin ~/.wine/drive_c
Then using the Dolphin menus:
Create New LinkLink to File or Directory...

Other Desktop Environments are available! :lol:

Bob
rin67630
Level 2
Level 2
Posts: 16
Joined: Sun Nov 21, 2021 4:19 pm

Re: Make a shortcut in Winefile?

Post by rin67630 »

Yes, I came to the same conclusion.
But frankly, why is this basic function still missing?
spoon0042
Level 6
Level 6
Posts: 570
Joined: Thu Dec 24, 2009 11:00 am

Re: Make a shortcut in Winefile?

Post by spoon0042 »

rin67630 wrote: Tue Dec 07, 2021 1:47 pm Yes, I came to the same conclusion.
But frankly, why is this basic function still missing?
The wine re-implemented Windows programs can be incomplete, with functionality only added if some app needs it or if someone requests it. In this particular case it's probably low priority since you can use Linux tools to do the same thing, more or less. I did look on https://bugs.winehq.org/ and didn't see that anyone has requested this yet; you could be the first. :)
Locked