Crazy crossplatform experiment (OSX + Linux)

sstteevvee

27-02-2009 00:40:03

Ok.. Be prepared for a dismal failure, but there is a chance that this will work to some degree.

First, get a copy of Mono for your platform and install it.

Next, download this ZIP file. Unzip all into one folder, change into the folder, then do something like:


/usr/local/bin/mono TVRename.exe

Cross your fingers, and see what happens.

Please post back here with tales of success or disaster, screenshots of success, along with which OS you're using and any error messages. Likely problems you'll encounter:

  1. It just won't start[/*:m]
  2. Downloading of show data from thetvdb will fail, because it doesn't want to load the DLL with the ZIP handling stuff[/*:m]
  3. Downloading data will cause it to bail out[/*:m]
  4. Episode guide displayer to not work[/*:m]
  5. Loading/saving of settings between runs to not work[/*:m]
  6. Errors related to "GetExceptionPointers()" or "GetExceptionCode()"[/*:m]
  7. It randomly crashes back to the command prompt[/*:m][/list:u]
    I've run the "Mono Migration Analyzer" on TVRename, and apart from those Exception functions, there's not too much that I can't code around. If/when Mono implements those two functions, or I figure out how to avoid having my code call them, we might just have OSX and Linux cross platform compatibility. :mrgreen:

    Please don't use that a5-MonoTest version for anything other than testing with Mono. Its the same as a4, but I've done a couple of dodgy things to make it Mono-friendly, but it might have some unexpected/weird bugs.

    I've tried it with Mono under Windows, and it picks up my existing settings, displays episode guides, shows upcoming shows, seems to be able to do some show/episode downloading, can scan for missing, and renaming, but trying to actually do renaming or moving/copying makes it bomb out. I think I know why the last of these is happening, too.

    P.S.: An alternative, if anyone feeling motivated, is getting .NET 2.0 installed under Wine (if it is even possible?), and running TVRename that way. The ZIP file above should remove the need for the C++ Runtime.

sstteevvee

27-02-2009 14:27:52

Hurrah! On OpenSUSE 11.0, with Mono 2.2:



Doesn't like to load settings files (might be the path separators I'm using in the code?), crashes if you try to add a show (something about accessing the registry).

But... It's a good start. :)

sstteevvee

27-02-2009 23:56:06

I've done some experimenting and reading, and I think that using Mono to get TVRename to fully work on Mono is going to be a no-go until the exception handling stuff is sorted out. I'll keep an eye on Mono; hopefully they do whatever magic is required soon.

A lot of the functions provided by .NET use exceptions to 'report' an error, so I can't code around it. Rewriting or converting the code to C# isn't something I want to do, either. :)

Next thing to try is Wine and .NET...

sstteevvee

28-02-2009 00:37:34

  1. Install wine[/*:m]
  2. Run "winetricks" and install "dotnet20" and "vcrun2008"[/*:m]
  3. Run the standard TVRename installer[/*:m]
  4. Copy config files from existing Windows install to ~/.wine/drive_c/windows/profiles/mono/Application Data/TVRename/TVRename/2.1[/*:m]
  5. cd ~/.wine/drive_c/Program Files/TVRename[/*:m]
  6. wine TVRename.exe[/*:m]
  7. First run: let it install the gecko web browser[/*:m]
  8. Be excited that it all seems good[/*:m]
  9. Be sad when it locks up and eventually crashes out when downloading data from thetvdb[/*:m][/list:u]

    When I get motivated again, I'll have a look at the screeds of info that wine prints out. There might be a clue in it.

    Screenshot.. TVRename running on Linux under Wine:

interfacelift

28-02-2009 07:20:27

It launches using Mono on Mac OS X 10.5.6:


However it seems to close whenever you click something useful, like "Add".

tankalf

07-07-2009 03:17:47

Hi everybody.

I just found this wonderful tv series renaming program. I love it !!
Also because it's the first I try that can download from TVDB Tv Series in your prefer language. WOW !!

I'm using mac also and I would like to help you with MAC if it is possible.

I'm not a programmer but I can try to help you.

Thanks a lot for your job

Carlo

michaelcdf

30-10-2009 04:54:03

Hi guys,
why don t you use wmware, parelle or bootcamp and load a windows xp on it.
Problem solved :)

Adaemox

14-12-2009 14:14:10

I was just curious if you've had any chance to invest any more time into getting this to work under wine or mono?

I'd be happy to lend a hand testing, as it is i'll be loading it up under VM Ware or something for the time being.

Cheers!

Adaemox

17-03-2010 13:41:21

I was just curious, with the latest Alpha, if Mono had progressed any past where it had when this post was originally released?

sstteevvee

18-03-2010 20:40:44

The move from C++ to C# in the latest alpha has been a huge help in getting it to work on Mono. I think there are now just three functions that are causing problems, and all should be relatively easily worked around. There is some discussion here about progress on using Mono to get it to work on OSX (which has an additional limitation over Linux).

oyvindhauge

04-08-2010 02:43:10

Hi,

First, I must express my gratitude for this sweet piece of software :D Second, as I am mainly a Linux user I would very much like to see TV Rename on Linux, how is the cross platform experiment going, any progress with Mono since the last post here? I tried running it with Wine, but without luck:

Channel ipc is not securable while ensureSecurity is specified as true

at System.Runtime.Remoting.Channels.ChannelServices.RegisterChannel (IChannel chnl, Boolean ensureSecurity) [0x00000] in <filename unknown>:0
at TVRename.UI.SetupIPC () [0x00000] in <filename unknown>:0
at TVRename.UI..ctor (TVRename.TVDoc doc) [0x00000] in <filename unknown>:0
at (wrapper remoting-invoke-with-check) TVRename.UI:.ctor (TVRename.TVDoc)
at GlobalMembersTVRename.Main (System.String[] args) [0x00000] in <filename unknown>:0


Having an officially supported Linux release would make my day! Keep up the good work :)

ObiWan

08-10-2010 05:33:58

I have been looking at the code a have gotten it to run on Linux with a few tweaks.

I have noticed that most if not all paths are converted to lowercase which is causing issues as Linux is case sensitive.
This causes nothing to be detected if the path has an uppercase char in it all.

I have manged to get the Folder Monitor parts working and it can detect and ID show but there are still issues with the rest of it including scan and creating season folders parts.

saidin

22-10-2010 02:27:15

Please bear with me, since I only just found this program..

I have/had been planning a similar project to this one, with many of the goals TVRename seems to have achieved, but some that it has not (yet). The crossplatform aspect was key to my goals. I run Linux at home, and others at my home run OSX/Windows. For me, sharing is as much of a pain as organizing, as one has to essentially diff each other's collections mentally and then one-by-one perform desired copies. This can all be automated if the clients talk to each other - but that means a cross platform client. To that end, I would like to leverage this codebase, even if only to solve my own case.

  1. I see there is a mention of the project being in C++ originally? At what point did this change and, since the change, has the feature set digressed much?[/*:m]
  2. What OS-specific stuff was in the C++ version?[/*:m][/list:o]

    My thinking is to use a crossplatform toolkit (I'm thinking Qt) and use the C++ codebase and reimplement any subsequent features that have been made to the C# code. I suspect this will be a fair whack of work and thus ask if anybody else is interested in this?

saidin

01-11-2010 20:55:06

So roughly 6 months of development :-)

Thanks.

Golradirza

13-01-2011 19:54:11

Any news on how TV Rename performs on Mono?
Has there been any developments with this in the past few months? I'm really keen to get it running.

ObiWan

28-01-2011 06:18:58

I have created a version that runs under mono on Linux.
The build is available at: http://www.mediafire.com/?5c5r3yt2nx61rxu

There may be a few issues, particularly with refreshing the cache. I've not had time to do much testing.
The diff file for the code is available at: http://www.mediafire.com/?u2ltyp8osntlzu5

SirloinOfBeef

13-12-2011 19:11:01

I have made the switch to OSX and sorely miss my TVrename. Is anyone still looking into an OSX / Linux port?

SirloinOfBeef

17-12-2011 15:51:11

I have managed to get the regular copy of TVRename working under Parallel Desktop (Windows 7 virtual machine). Not the quickest or most elegant solution, but it works for now.

ObiWan

31-12-2011 08:37:48

If you install the Mono runtime, you may be able to use the linux version I posted above.

The mono runtime can be got from: http://www.go-mono.com/mono-downloads/download.html

SirloinOfBeef

19-01-2012 01:18:52

No luck :(

http://imageshack.us/photo/my-images/44 ... at101.png/

gkaran

04-02-2012 01:30:57

I manages to run it succesfuly under Debian but when I tried to rename/move files (meaning I pressed "Do checked") the application exited and in the terminal I got the following error. But it actually did do when it was supposed to do despite then fact that the app closed.
System.ArgumentOutOfRangeException: '-28' is not a valid value for 'Value'. 'Value' should be between 'Minimum' and 'Maximum'
Parameter name: Value
at System.Windows.Forms.ScrollBar.set_Value (Int32 value) [0x00000] in <filename unknown>:0
at (wrapper remoting-invoke-with-check) System.Windows.Forms.ScrollBar:set_Value (int)
at System.Windows.Forms.ListView.SetScrollValue (System.Windows.Forms.ScrollBar scrollbar, Int32 val) [0x00000] in <filename unknown>:0
at System.Windows.Forms.ListView.set_TopItem (System.Windows.Forms.ListViewItem value) [0x00000] in <filename unknown>:0
at (wrapper remoting-invoke-with-check) System.Windows.Forms.ListView:set_TopItem (System.Windows.Forms.ListViewItem)
at TVRename.CopyMoveProgress.UpdateNewStyle () [0x00000] in <filename unknown>:0
at TVRename.CopyMoveProgress.copyTimer_Tick (System.Object sender, System.EventArgs e) [0x00000] in <filename unknown>:0
at System.Windows.Forms.Timer.OnTick (System.EventArgs e) [0x00000] in <filename unknown>:0
at System.Windows.Forms.Timer.FireTick () [0x00000] in <filename unknown>:0
at (wrapper remoting-invoke-with-check) System.Windows.Forms.Timer:FireTick ()
at System.Windows.Forms.XplatUIX11.CheckTimers (System.Collections.ArrayList timers, DateTime now) [0x00000] in <filename unknown>:0
at System.Windows.Forms.XplatUIX11.UpdateMessageQueue (System.Windows.Forms.XEventQueue queue) [0x00000] in <filename unknown>:0
at System.Windows.Forms.XplatUIX11.GetMessage (System.Object queue_id, System.Windows.Forms.MSG& msg, IntPtr handle, Int32 wFilterMin, Int32 wFilterMax) [0x00000] in <filename unknown>:0
at System.Windows.Forms.XplatUI.GetMessage (System.Object queue_id, System.Windows.Forms.MSG& msg, IntPtr hWnd, Int32 wFilterMin, Int32 wFilterMax) [0x00000] in <filename unknown>:0
at System.Windows.Forms.Application.RunLoop (Boolean Modal, System.Windows.Forms.ApplicationContext context) [0x00000] in <filename unknown>:0
at System.Windows.Forms.Form.ShowDialog (IWin32Window owner) [0x00000] in <filename unknown>:0
at System.Windows.Forms.Form.ShowDialog () [0x00000] in <filename unknown>:0
at (wrapper remoting-invoke-with-check) System.Windows.Forms.Form:ShowDialog ()
at TVRename.TVDoc.DoActions (TVRename.ScanListItemList theList) [0x00000] in <filename unknown>:0
at TVRename.UI.ActionAction (Boolean checkedNotSelected) [0x00000] in <filename unknown>:0
at TVRename.UI.bnActionAction_Click (System.Object sender, System.EventArgs e) [0x00000] in <filename unknown>:0
at System.Windows.Forms.Control.OnClick (System.EventArgs e) [0x00000] in <filename unknown>:0
at System.Windows.Forms.Button.OnClick (System.EventArgs e) [0x00000] in <filename unknown>:0
at System.Windows.Forms.ButtonBase.OnMouseUp (System.Windows.Forms.MouseEventArgs mevent) [0x00000] in <filename unknown>:0
at System.Windows.Forms.Button.OnMouseUp (System.Windows.Forms.MouseEventArgs mevent) [0x00000] in <filename unknown>:0
at System.Windows.Forms.Control.WmLButtonUp (System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0
at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0
at System.Windows.Forms.ButtonBase.WndProc (System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0
at System.Windows.Forms.Button.WndProc (System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0
at System.Windows.Forms.Control+ControlWindowTarget.OnMessage (System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0
at System.Windows.Forms.Control+ControlNativeWindow.WndProc (System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0
at System.Windows.Forms.NativeWindow.WndProc (IntPtr hWnd, Msg msg, IntPtr wParam, IntPtr lParam) [0x00000] in <filename unknown>:0

(TVRename.exe:8220): Gdk-WARNING **: GdkWindow 0x5200e17 unexpectedly destroyed

(TVRename.exe:8220): Gdk-WARNING **: GdkWindow 0x5200e14 unexpectedly destroyed

(TVRename.exe:8220): Gdk-WARNING **: GdkWindow 0x5200036 unexpectedly destroyed

(TVRename.exe:8220): Gdk-WARNING **: GdkWindow 0x520001d unexpectedly destroyed


That was the only only time it worked because since then when I try to run the application all I get is an error window containing the following error. Hope that info will help in the improvement of the mono transfer of the application. I used it a lot in windows and now I do miss it in linux.

Object reference not set to an instance of an object

at (wrapper stelemref) object:stelemref (object,intptr,object)
at System.Collections.Generic.Dictionary`2[System.String,System.String].Add (System.String key, System.String value) [0x00000] in <filename unknown>:0
at TVRename.Episode..ctor (TVRename.Episode O) [0x00000] in <filename unknown>:0
at TVRename.ProcessedEpisode..ctor (TVRename.Episode e, TVRename.ShowItem si) [0x00000] in <filename unknown>:0
at TVRename.TVDoc.GenerateEpisodes (TVRename.ShowItem si, TVRename.SeriesInfo ser, Int32 snum, Boolean applyRules) [0x00000] in <filename unknown>:0
at TVRename.TVDoc.GenerateEpisodeDict (TVRename.ShowItem si) [0x00000] in <filename unknown>:0
at TVRename.TVDoc.GenDict () [0x00000] in <filename unknown>:0
at TVRename.TVDoc.DoWhenToWatch (Boolean cachedOnly) [0x00000] in <filename unknown>:0
at TVRename.UI..ctor (TVRename.TVDoc doc) [0x00000] in <filename unknown>:0
at (wrapper remoting-invoke-with-check) TVRename.UI:.ctor (TVRename.TVDoc)
at GlobalMembersTVRename.Main (System.String[] args) [0x00000] in <filename unknown>:0