But there's another way....
Prologue: I have never used wine before (I mean the app, just look at my name).
So a friend of mine gave me 2 windows apps to tryout.
One was needed to be installed first, another was a portable app so didn't need any installing to be done.
So I downloaded wine-3.0-i686-1.sfs from Fatdog's SFS Manager. And loaded it.
Then Installed the first software by executing it's install.exe through wine. It installed nicely and runs nicely too.
The other app runs too by executing it's .exe file through wine.
I noticed the install script of first program did create menu entries.
Main Menu > Wine > Programs > App1
This got me thinking.
Of course I knew "The Easy Way"
But I wanted to investigate how wine does it.
Well, I found out wine created windows .lnk files in /root/.wine/drive_c/ProgramData/Microsoft/Windows/Start Menu/Programs/ folder
And also .desktop file in /root/.local/share/applications/wine/Programs/ folder which executed the .lnk file (not the .exe file) (the Exec= line in that .desktop file contained a lot of backslashes, 3 where I would use only one).
For example, Exec=env WINEPREFIX="/root/.wine" wine C:\\\\windows\\\\command\\\\start.exe /Unix /root/.wine/dosdevices/c:/ProgramData/Microsoft/Windows/Start\\ Menu/Programs/FluidSim/FluidSim.lnk
So I searched for making .lnk files in linux.
After 4 hours of searching found something usefull, because most would only talk about "just use .desktop file", "you can't create/edit .lnk file it's a windows file".
Well sorting through all those negatives remarks and thread leading to nowhere I finally made following HowTo...
Finally coming to the point of this thread..... lol
Howto:
1) Make a .lnk file pointing to your app's .exe
>a) Download the bash script from Here
This script makes .lnk files using hexdump I belive, more knowledgeable persons please comment.
The script has french comments, someone who knows french like Musher may translate them. (One more script to count musher, )
Copy this script to some place and make it executable
>b) Note down the "Windows" path to your portable app.
In my system / is seen as Z: drive and my app is on sda6.
So Path for me is Z:\mnt\sda6\Simulation\Pneumatic\bin\fl_sim_p.exe
Note the backslashes.
>c) Open terminal where you copied that script and run following command (Replace the "windows path to your app's .exe" with your path (keep the " " ) and "your apps name.lnk" with whatever your app is called)
Code: Select all
./mslink.sh -l "windows path to your app's .exe" -o "/root/.wine/drive_c/ProgramData/Microsoft/Windows/Start Menu/Programs/Your app's name.lnk"
Run following command in a terminal. (see referance.)
Code: Select all
wine winemenubuilder -w "/root/.wine/drive_c/ProgramData/Microsoft/Windows/Start Menu/Programs/Your app's name.lnk"
Epilogue:
Sorry for long post for just 2 commands.
But I hope it shows my 4hrs of search (+half hour of writing this post. lol)
This should be handled by wine itself, maybe playonlinux handles this.
There's chance to further enhance the mslinks.sh, so that just pointing it to a .exe will make .lnk at proper place with proper windows path.
I also see some differences between .lnk files created by an installer and what we created if I run "strings" command on them.
But it's beyond my current limits, someone more knowledgeable may help.
Is this hard way necessary to follow???, .... nope, do whatever floats your boat.
Thanks folks.
Hope this helps.