Miranda under Wine: Difference between revisions

From Miranda NG
Jump to navigation Jump to search
(Miranda under Wine [en])
 
(due to https://bugs.winehq.org/show_bug.cgi?id=54906 we need to force win2003 compatibility)
 
(49 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{PageLang|en}}{{Languages/Wine}}
{{PageLang|en}}{{Languages/Wine}}
Linux is not a natively supported operating system, but Miranda is known to run on Linux under Wine.
Linux is not a natively supported operating system, but Miranda is known to run on Linux under Wine.


{{TNT|Note|The following article was tested in Ubuntu 21.10.}}
{{TNT|Important|Miranda architecture (32- or 64-bit) must match the Linux distributive architecture. In the following examples, it is assumed that the architecture is x64.}}


== Running Miranda in Wine ==
== OS Settings ==
=== Creating a separate Wine profile for Miranda NG ===
=== BSD ===
Create a separate directory for Wine to store its profile for work with Miranda:
To get {{Plugin|CrashDumper}} plugin working you need to allow debugging for non-privileged users. This could be done by adding the following to <tt>sysctl</tt>:
<pre style="overflow:auto;">
security.bsd.unprivileged_proc_debug=1
</pre>
 
=== Linux ===
{{TNT|Note|Starting from Wine 7.0 Miranda has been working with wine-stable. If you are using an earlier version of Wine, you need to install wine-staging.}}
 
== Creating a separate Wine profile for Miranda ==
Create a separate directory for Wine to store its profile to work with Miranda:
<pre style="overflow:auto;">
<pre style="overflow:auto;">
mkdir -p $HOME/.wines/miranda/
mkdir -p $HOME/.wines/miranda/
Line 14: Line 27:
</pre>
</pre>


 
== Initializing Wine profile ==
=== Initializing Wine profile ===
<pre style="overflow:auto;">
<pre style="overflow:auto;">
env WINEPREFIX=$HOME/.wines/miranda/ wine winecfg
env WINEPREFIX=$HOME/.wines/miranda/ wine winecfg -v 2003
</pre>
</pre>
* Decline installing the stuff (It's not needed to run Miranda).
* Decline installing the stuff (It's not needed to run Miranda).
* Select ''Windows XP'' on '''Applications''' tab.
* Click ''OK'' to close.


== Installing Miranda NG ==
* [[Downloads|Download]] archive containing Miranda NG 64-bit portable.
* Extract Miranda NG files to directory <tt>$HOME/.wines/miranda/drive_c/Miranda_NG/</tt>.


=== Installing Windows libraries into Wine profile ===
== Starting Miranda NG ==
Copy the following DLLs from Windows XP x32 or Windows 2003 x32 to directory <tt>$HOME/.wines/miranda/drive_c/windows/system32/</tt> (Libraries from Windows 7 x32 and higher haven't been tested):
Sample script to start Miranda (you can save it as <tt>$HOME/.wines/miranda/drive_c/Miranda_NG/Miranda64.sh</tt>):
* msftedit.dll
<pre style="overflow:auto;">
* msls31.dll
#!/bin/sh
* riched20.dll
cd $HOME/.wines/miranda/drive_c/Miranda_NG/
* riched32.dll
* secur32.dll


Start Wine configurator again:
env WINEPREFIX=$HOME/.wines/miranda/ wine Miranda64.exe
<pre style="overflow:auto;">
env WINEPREFIX=$HOME/.wines/miranda/ wine winecfg
</pre>
</pre>
* On '''LIBRARIES''' tab select and add the above mentioned files.
* On '''DESKTOP INTEGRATIONS''' tab uncheck all the items in '''Folder''' section.
* On '''Drives''' tab select Z: and specify the path: <tt>/home/USER/.win_soft/Miranda_NG/</tt>
* Click ''OK'' to close.


Run script and enter the desired database name. Tick "Start in service mode with: Import" if you already have Miranda database (for example, from Windows system) and want to keep using it. Press {{Button|Create}} button (and perform import from the old database if you choose import on the previous step).


=== Installing Miranda NG ===
== Additional Wine settings ==
Copy Miranda NG files to directory <tt>$HOME/.win_soft/Miranda_NG/</tt>, also copy your Miranda database files here, e. g. in <tt>Profiles</tt> subdirectory.
The following settings are not necessary, but may improve usability.


Specify path to directory containing your Miranda database in <tt>ProfileDir=</tt> setting of [[mirandaboot.ini/en|mirandaboot.ini]].
=== Opening folders in the system file manager ===
By default Wine opens the received files folder in its own explorer. You may find it more comfortable to view files that you receive from your contacts in your system file manager, e.g. when using {{Plugin|MenuEx|MenuItemEx}} plugin.


* Create file <tt>$HOME/.wines/miranda/drive_c/windows/open_on_host_sys.sh</tt> with contents:
<pre style="overflow:auto;">
#!/bin/sh


=== Starting Miranda NG ===
xdg-open "`winepath -u \"$1\"`"
<pre style="overflow:auto;">
env WINEPREFIX=$HOME/.wines/miranda/ LANG=ru_RU.UTF-8 wine $HOME/.win_soft/Miranda_NG/Miranda32.exe
</pre>
</pre>
* Mark it as executable: <tt>chmod +x $HOME/.wines/miranda/drive_c/windows/open_on_host_sys.sh</tt>
* Run registry editor: <tt>env WINEPREFIX=$HOME/.wines/miranda/ wine regedit</tt>
* Create key (subsection) <tt>command</tt> in section <tt>HKEY_CLASSES_ROOT\folder\shell\open</tt>
* In a created <tt>command</tt> key set default value: <tt>cmd /c start /b /min c:\windows\open_on_host_sys.sh "%1"</tt>


Pay attention to <tt>"cmd /c start"</tt> – the scripts won't run without it during testing.


== Differences under Wine ==
If you have no <tt>xdg-open</tt> in your system, you can specify the name of your favorite file manager and the necessary run keys, e.g. <tt>thunar</tt>. If you do use <tt>xdg-open</tt> you can also associate any file type with its default system application.
=== What doesn't work ===
* SSL connections
* Copy text feature in {{Plugin|TabSRMM}} (works in {{Plugin|HistoryPP|History++}})
* Sometimes input language switches to English when TabSRMM window is inactive.
* Some settings cannot be viewed/changed, namely lists with icons next to checkboxes, e. g. ''Contact list → Extra icons''.
* Keyboard LEDs won't flash on message received event ({{Plugin|KeyboardNotify}})
* Received files folders are opened in ugly Wine explorer.
* Menus don't work occasionally: they close if a tooltip pops up.
* Themes from Windows 7, only classic Windows XP look is available.
* Lots of animated smileys cause high CPU usage.
* Many smileys have got white background (was transparent in Windows).
* Probably something else :)
 
=== What works ===
Everything else


=== Further reading ===
* [https://wiki.winehq.org/FAQ Wine FAQ]
* [https://wiki.winehq.org/Winepath winepath]
* [https://askubuntu.com/questions/51325/how-to-associate-all-file-types-within-wine-with-its-corresponding-native-applic Ask Ubuntu: How to associate all file types within Wine with its corresponding native application?]
* [https://stackoverflow.com/questions/6004070/execute-shell-commands-from-program-running-in-wine Stack Overflow: Execute Shell Commands from Program running in WINE]
* [https://bugs.winehq.org/show_bug.cgi?id=12464 ShellExecute does not integrate well with external handlers]


== More about Wine ==
== More about Wine ==
* [http://wine-wiki.org/index.php/Advanced_Wine_User_Information Advanced Wine User Information]
* [https://web.archive.org/web/20151127234841/http://wine-wiki.org:80/index.php/Advanced_Wine_User_Information Advanced Wine User Information]
* [http://wiki.winehq.org/winetricks Winetricks – a helper script to download and install various redistributable runtime libraries]
* [http://www.kegel.com/wine/cl-howto-win7sdk.html Using Microsoft Windows 7 SDK on Linux]
 
* [https://wiki.winehq.org/Winetricks Winetricks – a helper script to download and install various redistributable runtime libraries]
* [https://appdb.winehq.org/objectManager.php?sClass=version&iId=29828 Wine HQ - Miranda NG - official bug tracker for Miranda NG on Wine]
[[Category:Help]]
[[Category:Help]]

Latest revision as of 18:06, 5 August 2023

Linux is not a natively supported operating system, but Miranda is known to run on Linux under Wine.

Note
The following article was tested in Ubuntu 21.10.
Important
Miranda architecture (32- or 64-bit) must match the Linux distributive architecture. In the following examples, it is assumed that the architecture is x64.

OS Settings

BSD

To get CrashDumper plugin working you need to allow debugging for non-privileged users. This could be done by adding the following to sysctl:

security.bsd.unprivileged_proc_debug=1

Linux

Note
Starting from Wine 7.0 Miranda has been working with wine-stable. If you are using an earlier version of Wine, you need to install wine-staging.

Creating a separate Wine profile for Miranda

Create a separate directory for Wine to store its profile to work with Miranda:

mkdir -p $HOME/.wines/miranda/

If $HOME variable isn't defined, replace it with path to your profile:

mkdir -p /home/USER/.wines/miranda/

Initializing Wine profile

env WINEPREFIX=$HOME/.wines/miranda/ wine winecfg -v 2003
  • Decline installing the stuff (It's not needed to run Miranda).

Installing Miranda NG

  • Download archive containing Miranda NG 64-bit portable.
  • Extract Miranda NG files to directory $HOME/.wines/miranda/drive_c/Miranda_NG/.

Starting Miranda NG

Sample script to start Miranda (you can save it as $HOME/.wines/miranda/drive_c/Miranda_NG/Miranda64.sh):

#!/bin/sh
cd $HOME/.wines/miranda/drive_c/Miranda_NG/

env WINEPREFIX=$HOME/.wines/miranda/ wine Miranda64.exe

Run script and enter the desired database name. Tick "Start in service mode with: Import" if you already have Miranda database (for example, from Windows system) and want to keep using it. Press Create button (and perform import from the old database if you choose import on the previous step).

Additional Wine settings

The following settings are not necessary, but may improve usability.

Opening folders in the system file manager

By default Wine opens the received files folder in its own explorer. You may find it more comfortable to view files that you receive from your contacts in your system file manager, e.g. when using MenuItemEx plugin.

  • Create file $HOME/.wines/miranda/drive_c/windows/open_on_host_sys.sh with contents:
#!/bin/sh

xdg-open "`winepath -u \"$1\"`"
  • Mark it as executable: chmod +x $HOME/.wines/miranda/drive_c/windows/open_on_host_sys.sh
  • Run registry editor: env WINEPREFIX=$HOME/.wines/miranda/ wine regedit
  • Create key (subsection) command in section HKEY_CLASSES_ROOT\folder\shell\open
  • In a created command key set default value: cmd /c start /b /min c:\windows\open_on_host_sys.sh "%1"

Pay attention to "cmd /c start" – the scripts won't run without it during testing.

If you have no xdg-open in your system, you can specify the name of your favorite file manager and the necessary run keys, e.g. thunar. If you do use xdg-open you can also associate any file type with its default system application.

Further reading

More about Wine