temna-net / navbot

Automatically exported from code.google.com/p/navbot
0 stars 0 forks source link

Add a console-only version for Mono/Linux #9

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I think the only reason NavBot doesn't run in Mono is the Windows forms 
GUI (that is, the tray icon and the dialog). We could produce a version 
without these, using console input/command line arguments instead. This 
might then run under Linux using Mono!

Original issue reported on code.google.com by mark.oco...@gmail.com on 14 Oct 2007 at 8:56

GoogleCodeExporter commented 9 years ago
I just tested, and it does build and run successfully using Mono on Windows XP.

I'll test it on Linux when I get the chance.

Mono does support most of the Winforms API.

Original comment by kevinthi...@gmail.com on 19 Sep 2009 at 2:34

GoogleCodeExporter commented 9 years ago
Any progress on this? I would like to help out if at all possible.

I have downloaded the source and I am able to build from SVN, but when I run it 
the 
windows seems quite weird. It does not draw anything and just "copies" whatever 
was 
behind it when it started.

This is using Ubuntu 9.10 with Mono:
Mono JIT compiler version 2.4.2.3 (Debian 2.4.2.3+dfsg-2)
Copyright (C) 2002-2008 Novell, Inc and Contributors. www.mono-project.com
    TLS:           __thread
    GC:            Included Boehm (with typed GC)
    SIGSEGV:       altstack
    Notifications: epoll
    Architecture:  x86
    Disabled:      none

I know nothing of C#, some Java, but lots of C.

Original comment by zenit...@gmail.com on 5 Jan 2010 at 6:12

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Hi Zenithdk. The windows forms do almost nothing, you could try removing them 
from the code entirely and just 
hard-coding a path to your EVE directory for now (or taking it from the 
command-line). I don't have any 
development cycles to spend on this but am hapy to give you svn commit access 
if you get something working!

Original comment by mark.oco...@gmail.com on 19 Jan 2010 at 8:29

GoogleCodeExporter commented 9 years ago
I have Navbot running on mono on linux but i cannot select the marketlog 
folder. any folder i select the @run in taskbar@ button is greyed out. prob as 
mono does not have a virtual desktop to emulate the taskbar. version of mono 
that just runs and does not run in taskbar might be the answer.
Additionally i have also got mono to compile navbot to native linux application 
but still the same problem.

Original comment by OLarge...@gmail.com on 27 Nov 2010 at 2:14

GoogleCodeExporter commented 9 years ago
I ported Navbot to mono 2 months ago and so far it's running stable. I had to 
change quite a lot to get it working properly, esp. paths and porting the code 
to use mono-equivalents to the DB-classes. I also ported it to use the new 
SettingsManager. Everything works, even the GUI.

I also wrote a new module for the autodumper to use the kernel's inotify.

I don't know how to support both .net and mono, as the imports and 
naming-schemes for both db-classes are a bit different. My time is limited 
right now, but I'm willing to share my current progress.

Original comment by georgpsw...@googlemail.com on 27 Nov 2010 at 10:38

GoogleCodeExporter commented 9 years ago
On that note, what is the current .Net-target of navbot in windows?

Original comment by georgpsw...@googlemail.com on 27 Nov 2010 at 10:53

GoogleCodeExporter commented 9 years ago
Would be great if i could get a copy of your code for mono. navbot is an 
essential to me mostly. and moving to linux, i would like to be as painless as 
possible ::)

Original comment by OLarge...@gmail.com on 28 Nov 2010 at 1:13

GoogleCodeExporter commented 9 years ago
I actually confused the two .net projects I'm working on, of course Navbot 
doesn't use DB-classes directly :-)

Anyways I just made the path-names platform-independent, but someone needs to 
check if it still works in windows. 

For some reason the new ConfigurationManager is not picking up the settings, so 
I hardcoded the URL for now.

I attached the whole diff for my Monodevelop-project, I needed to change some 
linking references. It should work for current svn.

Original comment by georgpsw...@googlemail.com on 28 Nov 2010 at 7:51

Attachments:

GoogleCodeExporter commented 9 years ago
Stand corrected, I patched r35, the current revision L release.

Original comment by georgpsw...@googlemail.com on 28 Nov 2010 at 7:59

GoogleCodeExporter commented 9 years ago
Hmm, could i get help applying the patch. i have the required source. just not 
up to speed on patch.
i tried patch -p0 ../linux.diff to no avail. any ideas?
Am i just being a numpty :) ?

Original comment by OLarge...@gmail.com on 28 Nov 2010 at 8:31

GoogleCodeExporter commented 9 years ago
cd into navbot-rev-L (where EveMarketTool and NavBot folders are stored)
patch -p < /path/to/linux.diff

Original comment by georgpsw...@googlemail.com on 28 Nov 2010 at 8:39

GoogleCodeExporter commented 9 years ago
p0 of course

Original comment by georgpsw...@googlemail.com on 28 Nov 2010 at 8:40

GoogleCodeExporter commented 9 years ago
cool :) okay i have it patched and compiled and running but everytime i select 
the eve market log folder it says that it is wrong or something else has gone 
wrong. and not knowing enough about .net does not help my sitution. can you 
think of anything it might be or....... should i stick my head in the ground :) 
?

Original comment by OLarge...@gmail.com on 28 Nov 2010 at 9:16

GoogleCodeExporter commented 9 years ago
it looks like it's catching Exception E which i do not know, what this 
exception E is???

Original comment by OLarge...@gmail.com on 28 Nov 2010 at 9:42

GoogleCodeExporter commented 9 years ago
You must select the Marketlogs-folder, as NavBot checks if it's in the pathname.

Also, I just found out why AppSettings were not working, just copy App.config 
to bin/Release/NavBot.exe.config - voila!

Original comment by georgpsw...@googlemail.com on 28 Nov 2010 at 10:04

GoogleCodeExporter commented 9 years ago
My path looks like that: /home/username/EVE/logs/Marketlogs

Original comment by georgpsw...@googlemail.com on 28 Nov 2010 at 10:07

GoogleCodeExporter commented 9 years ago
this is wierd. i have the path selected as /home/me/wine/drive_c/users/me/My 
Documents/EVE/Logs/Marketlogs. Where the directory wine is a symbolic link to 
/home/me/.wine (which is hidden). and when i set it to run in taskbar it just 
sits there.

Original comment by OLarge...@gmail.com on 28 Nov 2010 at 10:13

GoogleCodeExporter commented 9 years ago
when i go to localhost:9999 it says something is wrong also.

Original comment by OLarge...@gmail.com on 28 Nov 2010 at 10:14

GoogleCodeExporter commented 9 years ago
Maybe this is a wine-configuration issue. In winecfg under integration I have 
"My Documents" linked to /home/me.

But if you select any Marketlogs-folder anywhere it should pick it up 
none-the-less. Do you have actual logs in there?

Original comment by georgpsw...@googlemail.com on 28 Nov 2010 at 10:19

GoogleCodeExporter commented 9 years ago
Have you "http://localhost:9999/*" in your trusted sites list in-game?

Original comment by georgpsw...@googlemail.com on 28 Nov 2010 at 10:20

GoogleCodeExporter commented 9 years ago
Ah, don't click on "Run NavBot in Taskbar", just select a folder. If you 
restart NavBot is your folder still set? Is the Info-Bubble coming up? It 
should be running then, without clicking the button.

Original comment by georgpsw...@googlemail.com on 28 Nov 2010 at 10:27

GoogleCodeExporter commented 9 years ago
Well the bubble does not appear at all. but i have even tried removing 
baloontips etc.
After i restart navbot the path is still set, yes.
And i have added navbot to the trusted sites to no avail.
additionally there was this code.
-----
catch (PlatformNotSupportedException e)

            {

                WindowState = FormWindowState.Normal;

                if (server != null)

                {

                    server.Close();

                }

                ReportError("Sorry, NavBot requires Windows XP SP2, Windows Vista or Windows Server 2003 to run.\nNo, really, I *am* sorry, but Microsoft simply doesn't support the HttpListener class on anything else.", e.ToString());

            }

            catch (Exception e)

            {

                WindowState = FormWindowState.Normal;

                if (server != null)

                {

                    server.Close();

                    ReportError("Are you sure EVE stores your market logs in \"" + eveDirectory.Text + "\"?\nIf so, then something else has gone wrong.\nI've put some extra error information in your clipboard - if you send it to Tejar then he'll do his best to help you.", e.ToString());

                }

                else

                {

                    //ReportError("Is another copy of NavBot already running? If not, try restarting or send an EVE mail to Tejar for help. \nI've put some extra error information in your clipboard that you can send to him.", e.ToString());

                }
----
i changed the server != NULL to if server == NULL otherwise it would just error 
with the error message and not even display a webpage if i when to 
localhost:9999

never easy eh :)
lol

Original comment by OLarge...@gmail.com on 28 Nov 2010 at 10:41

GoogleCodeExporter commented 9 years ago
Somehow PageServer is failing, changing code in the exception-handling is not 
solving the issue :)

Do you have System.Configuration in your References?

Original comment by georgpsw...@googlemail.com on 28 Nov 2010 at 10:51

GoogleCodeExporter commented 9 years ago
I'm compiling for Mono / .NET 3.5 btw.

Original comment by georgpsw...@googlemail.com on 28 Nov 2010 at 10:54

GoogleCodeExporter commented 9 years ago
yes i have System.Configuration for both markettool and navbot but if i double 
click them, nothing loads up. is it broke?

as for what mono version i am using i will need to check and will do this now. 
And match your specs.

Original comment by OLarge...@gmail.com on 28 Nov 2010 at 10:59

GoogleCodeExporter commented 9 years ago
Okay after completely re-installing linux dues to some failures. i now has 
Gentoo and latest wine and can compile to DotNet35 and navbot runs but when i 
click to see what navbot has for me(trades) it reports connection refused. any 
idea's?

Original comment by OLarge...@gmail.com on 2 Dec 2010 at 3:57

GoogleCodeExporter commented 9 years ago
okay, grand i have it working. the problem was to let it display market reports 
list first and then ask it for trades.

Awsome!!!11

Original comment by OLarge...@gmail.com on 2 Dec 2010 at 4:06

GoogleCodeExporter commented 9 years ago
OLargeOne: Could you post a patch or diff for how you made it work?
Cheers

Original comment by zenit...@gmail.com on 5 Jan 2011 at 12:21