ham-radio-software / D-Rats

D-Rats program for D-Star Ham Radios
https://iz2lxi.jimdofree.com/
Other
43 stars 13 forks source link

Windows MobaXTerm installation option #275

Closed wb8tyw closed 10 months ago

wb8tyw commented 11 months ago

A new way to install D-Rats on Windows using MobaXterm

wb8tyw commented 11 months ago

Seems to work for me. Optionally install the lzhuf msi file from the groups.io d-rats file repository (login required)

Install free MobaXterm wget the install script from this PR branch for a new or upgrade. Updated for current push If you have already downloaded the install script it must be deleted. rm -f d-rats_in_mobaxerm_install.sh And the URL for the download of a file from a PR will change anytime the PR updates the file. wget https://raw.githubusercontent.com/ham-radio-software/D-Rats/79e772fbe4f17cab1d721f33b34185f401039399/d-rats_in_mobaxerm_install.sh Once it is merged to master the PR in the readme file will work. chmod the script to be executable. chmod 0755 d-rats_in_mobaxerm_install.sh run the script. ./d-rats_in_mobaxerm_install.sh

One simple command to run.

Maybe this is the way we should support Microsoft Windows.

wb8tyw commented 11 months ago

lzhuf is a separate install and has not been tested with this. The lzhuf may need a binary built for Cygwin, or we need to change D-Rats to find the Windows location.

Just made sure that the GUI came up, did not really try much else.

wb8tyw commented 11 months ago

Now if the lzhuf package installed from groups.io d-rats file download it will use it. Just need to run / re-run script after installing lzhuf.

Simple hack was to install a symlink to the lzhuf.exe for d-rats to find it.

maurizioandreotti commented 11 months ago

after having installed mobyxterm, what shall I do? when I open its terminal it closes immediately.

Il giorno sab 11 nov 2023 alle ore 03:18 John E. Malmberg < @.***> ha scritto:

Now if the lzhuf package installed from groups.io d-rats file download it will use it. Just need to run / re-run script after installing lzhuf.

Simple hack was to install a symlink to the lzhuf.exe for d-rats to find it.

— Reply to this email directly, view it on GitHub https://github.com/ham-radio-software/D-Rats/pull/275#issuecomment-1806632231, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB2W7ORBAF6VEH4THJI3ZSDYD3N75AVCNFSM6AAAAAA7GWMWUSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBWGYZTEMRTGE . You are receiving this because your review was requested.Message ID: @.***>

maurizioandreotti commented 11 months ago

got it - testing

Il giorno sab 11 nov 2023 alle ore 03:18 John E. Malmberg < @.***> ha scritto:

Now if the lzhuf package installed from groups.io d-rats file download it will use it. Just need to run / re-run script after installing lzhuf.

Simple hack was to install a symlink to the lzhuf.exe for d-rats to find it.

— Reply to this email directly, view it on GitHub https://github.com/ham-radio-software/D-Rats/pull/275#issuecomment-1806632231, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB2W7ORBAF6VEH4THJI3ZSDYD3N75AVCNFSM6AAAAAA7GWMWUSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBWGYZTEMRTGE . You are receiving this because your review was requested.Message ID: @.***>

maurizioandreotti commented 11 months ago

the wget url in the readme file was hitting a 404,

got to use this: https://github.com/ham-radio-software/D-Rats/blob/835daa8f967fdad24f5238f876f6dba7c4992dd1/d-rats_in_mobaxerm_install.sh

then I had to change permissions on the downloaded script as otherwise it was not being executed:

chmod 755 d-rats_in_mobaxerm_install.sh

then got an error executing the script:

./d-rats_in_mobaxerm_install.sh ./d-rats_in_mobaxerm_install.sh: line 1: payload:allShortcutsEnabled:false: command not found

Il giorno sab 11 nov 2023 alle ore 03:18 John E. Malmberg < @.***> ha scritto:

Now if the lzhuf package installed from groups.io d-rats file download it will use it. Just need to run / re-run script after installing lzhuf.

Simple hack was to install a symlink to the lzhuf.exe for d-rats to find it.

— Reply to this email directly, view it on GitHub https://github.com/ham-radio-software/D-Rats/pull/275#issuecomment-1806632231, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB2W7ORBAF6VEH4THJI3ZSDYD3N75AVCNFSM6AAAAAA7GWMWUSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBWGYZTEMRTGE . You are receiving this because your review was requested.Message ID: @.***>

wb8tyw commented 11 months ago

I will need to update the readme.MD with that for a PR you need to use the "RAW" link to the script in the PR if the script has changed from the one in the master branch. And of course it does not yet exist in master, which is something else I forgot.

For this PR you have to use https://raw.githubusercontent.com/ham-radio-software/D-Rats/835daa8f967fdad24f5238f876f6dba7c4992dd1/d-rats_in_mobaxerm_install.sh for downloading the script.

Note that it starts out with "https://raw". Otherwise you are downloading an HTML page which will not work as a script.

maurizioandreotti commented 11 months ago

Thanks, found and launched -it took a while

so at the end of the script it sayis

and then executing ./d-rats do not do anything

Il giorno sab 11 nov 2023 alle ore 15:32 John E. Malmberg < @.***> ha scritto:

I will need to update the readme.MD with that for a PR you need to use the "RAW" link to the script in the PR if the script has changed from the one in the master branch. And of course it does not yet exist in master, which is something else I forgot.

For this PR you have to use https://raw.githubusercontent.com/ham-radio-software/D-Rats/835daa8f967fdad24f5238f876f6dba7c4992dd1/d-rats_in_mobaxerm_install.sh for downloading the script.

Note that it starts out with "https://raw". Otherwise you are downloading an HTML page which will not work as a script.

— Reply to this email directly, view it on GitHub https://github.com/ham-radio-software/D-Rats/pull/275#issuecomment-1806832212, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB2W7OTKDWRFM6XJNF2D4GLYD6EARAVCNFSM6AAAAAA7GWMWUSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBWHAZTEMRRGI . You are receiving this because your review was requested.Message ID: @.***>

wb8tyw commented 11 months ago

Fixed with current push, but old downloaded install file will need to be removed, and it looks like a new URL which I updated the earlier comments with will need to be used instead. Of course that also means fixing the protection.

The good news is that the script will quickly go over steps that have already been done.

KP4AJ commented 11 months ago

Hi John: Testing here. Question, Is ok the script gets and install Python 2? python27

Thanks for looking into easing Windows platform install process.

Edfel KP4AJ

KP4AJ commented 11 months ago

When running ./d-rats got:

 11/11/2023   15:27.47   /home/mobaxterm  ./d-rats /bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_029.UTF-8)

(d-rats.py:3304): Gtk-WARNING **: Locale not supported by C library. Using the fallback 'C' locale. fatal: not a git repository (or any of the parent directories): .git /usr/local/lib/pypi/pydub/utils.py:170: RuntimeWarning: Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work warn("Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work", RuntimeWarning) INFO:Spelling:Demand-opening aspell... INFO:Spelling:Tested spelling okay: ['spelling,', 'spieling,', 'sapling,', 'spewing,', 'spilling,', 'spoiling,', 'spooling,', 'spline,', 'spellings,', 'pealing,', 'peeling,', 'sealing,', 'selling,', 'soling,', 'spleen,', 'sling,', 'speckling,', 'paling,', 'piling,', 'poling,', 'puling,', 'splint,', "spelling's"] INFO:D-Rats:main: re-config option found -- Reconfigure D-rats INFO:D-Rats:main: args.config = /home/mobaxterm/.d-rats-ev INFO:DratsConfig:File /home/mobaxterm/.d-rats-ev/d-rats.config INFO:DratsConfig:/home/mobaxterm/D-RATS Shared INFO:DratsConfig:Creating directory for downloads: /home/mobaxterm/D-RATS Shared INFO:DratsConfig:Creating directory for maps: /home/mobaxterm/.d-rats-ev/maps INFO:MainApp:_refresh_lang: Setting language to: English INFO:MainApp:set_locale: OS Locale set to: en_US.UTF-8 INFO:MainApp:D-RATS v0.4.1.dev0 starting at Sat Nov 11 15:29:25 2023 on Platform UnixPlatform: configuration: /home/mobaxterm/.d-rats-ev system_data: /home/mobaxterm/d-rats-git OS version: CYGWIN_NT-10.0-19045-WOW64 DESKTOP-53QPD9T 3.3.5-341.i686 2022-06-12 08:16 UTC i686 Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged.

Program stalled. No D-Rat window opens. Seems I missed something to install.

Edfel KP4AJ

KP4AJ commented 11 months ago

John: I include a capture of ls command. Check 'D-RATS Shared' with the ' '.
ls-2

Not sure it is ok to be created that way.

Edfel

KP4AJ commented 11 months ago

John: I am getting this message at the MobaX terminal:

bash: warning: setlocale: LC_ALL: cannot change locale (en_029.UTF-8)

could explain the errors.

wb8tyw commented 11 months ago

The windows produced by running d-rats in MobaXterm may get rendered under other windows. In your Taskbar will be an X icon from MobaXterm that will have the windows that were launched.

Current d-rats will ignore python2, not sure why it gets installed.

Not sure about the locale mis-match either, do not remember seeing that on my first run, and do not see it on the new runs.

I was able to run through this install on Windows 7, 10, and 11 all 64 bit.

KP4AJ commented 11 months ago

Hi John: It is ok, might be I don't saw the first popup d-rats shows when running first time. It is running.

is-ok

Thank you very much!!!

73 Edfel

wb8tyw commented 11 months ago

If someone could write up a wiki article for installing D-Rats on Windows using MobaXterm, it would be great.

It needs to be clear that this for a MobaXterm install, and MobaXterm uses Cygwin, it uses a modified Cygwin so that referring to this type of install as Cygwin could cause confusion in the future.

Some information from e-mail threads that should be in the article:

Some of this from my windows 7 x86_64 install.

The lzhuf 65 msi package from the d-rats groups.io file area, (login required) should be download and installed first so that the script will find it.

https://mobaxterm.mobatek.net/download.html

Clicked on the install and got:

https://mobaxterm.mobatek.net/download-home-edition.html

Then clicked on the Installer edition, which downloaded a zip file.

The zip file must be extracted into another directory or it will not install

Double click on the msi file to install, and it appears to be installing.

Starting it up for the first time.

Had to allow MobaXterm access through the Windows firewall.

Click on Start local terminal

Pasting wget https://raw.githubusercontent.com/ham-radio-software/D-Rats/835daa8f967fdad24f5238f876f6dba7c4992dd1/d-rats_in_mobaxerm_install.sh into local terminal window.

It prompts to set an right click action, I chose the context menu and clicked paste

chmod 0755 d-rats_in_mobaxterm_install.sh.

D-Rats and components needed install is staring.

Seems to be taking a while.

Just completed:

./d-rats --version fatal: not a git repository (or any parent up to mount point /drives) Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set). /usr/local/lib/pypi/pydub/utils.py:170: RuntimeWarning: Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work warn("Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work", RuntimeWarning) INFO:Spelling:Demand-opening aspell... INFO:Spelling:Tested spelling okay: ['spelling,', 'spieling,', 'sapling,', 'spewing,', 'spilling,', 'spoiling,', 'spooling,', 'spline,', 'spellings,', 'pealing,', 'peeling,', 'sealing,', 'selling,', 'soling,', 'spleen,', 'sling,', 'speckling,', 'paling,', 'piling,', 'poling,', 'puling,', 'splint,', "spelling's"] version: 0.4.1.dev0

Some problems seen with the download page for MobaXterm, It may require Chrome, and it may require that the Chrome browser be freshly restarted. Chrome has a non-default option to reopen any open browser window on restart.

Looks like the version for a git clone is assuming running of the clone directory. Something else that needs to be fixed in the future. I can not seem to get rid of the ffmpeg warning by installing ffmpeg.

Looks like some log noise about dbus, not sure dbus exists in this emulation. There may be an environment variable that can suppress that.

(d-rats.py:4482): GLib-GIO-CRITICAL **: g_dbus_proxy_new_sync: assertion 'G_IS_DBUS_CONNECTION (connection)' failed INFO:MainApp:load main window with self config

This one, I think showed up with the localization PR, and I have not had time to chase it down. Grep is not finding it with any of the searches I have tried. Only way I know to chase it down is to add extra log messages in a binary search until I find where it is, or we get lucky,

(d-rats.py:4482): Gtk-WARNING **: Attempting to add a widget with type GtkBox to a GtkMenuItem, but as a GtkBin subclass a GtkMenuItem can only contain one widget at a time; it already contains a widget of type GtkAccelLabel

The script installs from master as a password is needed to install the python egg from the groups.io d-rats file area. I set it to master instead of a release version as we know that the last release version has some significant bugs.

As it uses read only git clone, advanced users can be told how to change the branch to a specific tag, commit, or pull request.

Do you think this is good enough to get Windows users to start using this?

  1. Download and install lzhuf
  2. Download and install MobaXterm
  3. Start MobaXterm
  4. Download Script 5 Fix script permissions 6 Run Script
  5. Setup D-rats.

Note that if you use the --config /drives/c/ for this instance to use your windows configuration instead of starting over, but that will need to be passed on every startup unless you create your own /usr/lib/my-drats shell script with that option as a default.

If you think this is ready to go, please use the review function of the pull request and mark this review approved,

maurizioandreotti commented 11 months ago

so i was able to complete installation and got D-Rats working.

but, I am not sure it is fully operational as

image

maurizioandreotti commented 11 months ago

anyhow I created the wiki:

KP4AJ commented 10 months ago

Hi: Maps functionality not working properly here. Program stalls and have to hard quit closing MobaXterm. D- Rats gets un responsive. Map window don't close. This despite change D-Rats Maps preferences and use http instead of https. Win 10 MSYS2 MINGW64 shows maps correctly. Will continue testing tomorrow after work.

INFO:MainApp:Showing Map Window INFO:MapDraw:draw_tile Deleting the broken tile to force futuredownload /home/mobaxterm/.d-rats-ev/maps/base/14/5184/7349.png

(d-rats.py:412): Gtk-CRITICAL **: gtk_widget_event: assertion 'WIDGET_REALIZED_FOR_EVENT (widget, event)' failed

(d-rats.py:412): Gtk-CRITICAL **: gtk_widget_event: assertion 'WIDGET_REALIZED_FOR_EVENT (widget, event)' failed

wb8tyw commented 10 months ago

Msys2 uses MinGW, and MinGW shares code with Cygwin with MobaXterm uses. Main difference is that Cygwin uses a library to provide a POSIX API for almost exact Linux API, and MinGW uses the minimal code changes need to get the program functional for most users.

So far I have only tested with the default map configured into D-Rats, and while it is slow because almost no tiles are cached, every thing works. I have not tried to hide (close button) the map window while it is downloading tiles. As downloading tiles is a background operation, it may block the processing of the hide operation.

There are known issues with the Map tile processing that have been seen the Msys2 installations that are similar to what you have reported, there is a ticket about them. One problem is that there is no throttling of the number of tiles being requested (all in parallel at once), and nothing to cancel the download of tiles that are no longer needed because of a change in location or zoom. This can result in a program hang or crash because of resource exhaustion. Once the most commonly used tiles are cached, this is hard to reproduce. It will take a bit of a re-write of the map download code to fix those issues.

The http/https issue is because the Msys2 package of trusted certificates is or was out of date. I have not checked if Msys2 has fixed this problem yet, or if Cygwin has the same issue.

Those Gtk-Critical messages are almost impossible to chase down with out a binary search of adding print statements or getting lucky and we are going to be stuck with them for a while. Some of that is from deprecated GTK code that has not been discovered. The line numbers in the messages usually do not exist.

maurizioandreotti commented 10 months ago

2 comments:

maurizioandreotti commented 10 months ago

I have reopened the drats again where i had installed it in this new way.

Now I can see the list of stations in the map. Not sure why...

image

while loading the map it becomes slow, but in reopening it retains the tiles and it's faster.