English Amiga Board


Go Back   English Amiga Board > Requests > request.Other

 
 
Thread Tools
Old 19 October 2014, 16:28   #21
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
hmm, uncool - *scratching my head*
lxamiga outputs:
Code:
  lxamiga                          146040 null  19/10/14 14:04:00
and
Code:
Line:   :R:Kick.rom                      524288 (rom) 15/07/93 00:00:00
f_type is once "null" and others enclosed like: "(rom)".

the section 3 part of the reg-exp is still the trouble, it must match enclosed and non-enclosed values.
but it does match enclosed value only - i do some tests

edit: the two question marks in section 3 - should ensure, to match f_type value with or without () - but this does not work as expected. *hmmm*

edit2: *maybe maybe*
revert chances in line 292 - to original state:
Code:
$f_type = "" unless defined $f_type;
and change again line 290 into:
Code:
/\s*(.*?)\s+(\d+)\s+(?:\(?(\w+)\)?)?\s+(\d+\/\d+\/\d+\s+\d+:\d+:\d+)\s(.*)/);
i added some question marks ( so the leading symbol is optional ) and my perl-one-liner now matching everything

Last edited by emufan; 19 October 2014 at 16:53.
emufan is offline  
Old 19 October 2014, 17:56   #22
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
about the listview - size of hdf/vol - dh1 exceeding INT value, so you see a negative value.
possible solution in line 105:
Code:
		'Size'     		=> 'int',
change into:
Code:
		'Size'     		=> 'double',
emufan is offline  
Old 19 October 2014, 23:22   #23
liviux76
Registered User
 
liviux76's Avatar
 
Join Date: Jan 2014
Location: BO/Italy
Posts: 711
Hi emufan!
Great progress!

Now the name of file is showed:



The features that don't work yet are "Download", "Rename", "Delete" and "Open". This is the error for "Download":



"Parent" works if the parent directory isn't the "root" directory (to go there it is possible to use the "Volumes" button).

So now it is possible to browse the file system and to upload files... it seems that almost half functions have been recovered!

I am still available if you want to investigate about the missing features... I think that the cause is that every "File Type" is "null"...

Unfortunately the CLI isn't giving any error now so I can't give you more details.

Thanks for your great job!
liviux76 is offline  
Old 19 October 2014, 23:30   #24
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
yep, i'm still here
about the "cannot be downloaded" - try the following in line 427:
original:
Code:
if ($dslist->[$select][2] ne "" && $dslist->[$select][2] !~ /(adf|hdf|rom)/i)
replace with this line:
Code:
if ($dslist->[$select][2] ne "" && $dslist->[$select][2] !~ /(adf|hdf|rom|null)/i)
you already changed line 105 into "double" - if so, it does not looks well.
maybe there is anothere definition possible (long) - i'll have a look.

edit: double --> double-precision floating point values
this is wrong for the filesize, but there is only int and float for digits. *searching again*

edit2: try line 105 with this:
Code:
'Size'     		=> 'text',
maybe this does work

edit3: to get an icon for the "null" filetype, change line 304 and 305:
original:
Code:
$pixbuf = $win->render_icon ("gtk-execute", 'menu') 	if $f_type =~ /^$/;
$pixbuf = $win->render_icon ("gtk-info", 'menu') 		if $f_type =~ /^$/ &&
change above into:
Code:
$pixbuf = $win->render_icon ("gtk-execute", 'menu') 	if $f_type =~ /null/i;
$pixbuf = $win->render_icon ("gtk-info", 'menu') 		if $f_type =~ /null/i &&
not sure about delete / rename . there are also debug lines, if you call the function in the gui.

-------------------------------------------------------------------------------------------------------------

edit4:
before we start to fix the f_type="null" issue on many (!?) lines in lxagui, you can try to fix line 292.
so start with an original lxagui, and change only line 290 and 292:
line 290:
Code:
/\s*(.*?)\s+(\d+)\s+(?:\(?(\w+)\)?)?\s+(\d+\/\d+\/\d+\s+\d+:\d+:\d+)\s(.*)/);
line 292:
Code:
$f_type = "" if ($f_type eq "null");
this will set $f_type to "" if we match a "null" - otherwise it will be dir/vol/rom ...
so we have the same value of $f_type as it is expected from the original lxagui.

and set debug=1 in line 30. post console output of gui functions you are using.

Last edited by emufan; 20 October 2014 at 03:43.
emufan is offline  
Old 20 October 2014, 21:17   #25
liviux76
Registered User
 
liviux76's Avatar
 
Join Date: Jan 2014
Location: BO/Italy
Posts: 711
Quote:
Originally Posted by emufan
edit4:
before we start to fix the f_type="null" issue on many (!?) lines in lxagui, you can try to fix line 292.
so start with an original lxagui, and change only line 290 and 292:
line 290:
Code:
/\s*(.*?)\s+(\d+)\s+(?:\(?(\w+)\)?)?\s+(\d+\/\d+\/\d+\s+\d+:\d+:\d+)\s(.*)/);
line 292:
Code:
$f_type = "" if ($f_type eq "null");
this will set $f_type to "" if we match a "null" - otherwise it will be dir/vol/rom ...
so we have the same value of $f_type as it is expected from the original lxagui.

and set debug=1 in line 30. post console output of gui functions you are using.
Hello man!
You did it!

I first tried your suggestions on the modified lxagui and actually they worked for the "Download" function but "Rename" "Delete" and "Open" still didn't work then I used a new lxamiga and I applied the two modifications on lines 290 and 292 as you said and now the program works exactly how it did in the past!

You are great, this is much better than using the command line...

If you want you can see the last lines of the CLI output but there weren't error messages at all (I had to cut the output in order to stay within 20000 characters):

Code:
      
OK - uploading from /home/livio/Desktop/Address_big.odt to RAM:Ram Disk/Address_big.odt
Initialising Amiga connection /dev/ttyS0, 38400 Baud, 4096 Block Size.
Uploading /home/livio/Desktop/Address_big.odt to RAM:Ram Disk/Address_big.odt
Sent: 14467/14467 Bytes (100.00%) 
Successfully uploaded 14467 bytes.
Initialising Amiga connection /dev/ttyS0, 38400 Baud, 4096 Block Size.
Received: 256/256 Bytes (100.00%) 
Number of entries: 6

  Address_big.odt                   14467 null  20/10/14 18:52:00           
  amiga.png                         28987 null  20/10/14 18:50:00           
  gameslist_1                      102282 null  20/10/14 18:48:00           
  Disk.info                          1013 null  06/07/94 12:50:00           
  Clipboards                            0 (dir) 06/07/94 12:50:00           
  T                                     0 (dir) 06/07/94 12:50:00           
Line:   Address_big.odt                   14467 null  20/10/14 18:52:00           
f_name = Address_big.odt, f_size=14467, f_type=, f_date=20/10/14 18:52:00, f_text=          
Line:   amiga.png                         28987 null  20/10/14 18:50:00           
f_name = amiga.png, f_size=28987, f_type=, f_date=20/10/14 18:50:00, f_text=          
Line:   gameslist_1                      102282 null  20/10/14 18:48:00           
f_name = gameslist_1, f_size=102282, f_type=, f_date=20/10/14 18:48:00, f_text=          
Line:   Disk.info                          1013 null  06/07/94 12:50:00           
f_name = Disk.info, f_size=1013, f_type=, f_date=06/07/94 12:50:00, f_text=          
Line:   Clipboards                            0 (dir) 06/07/94 12:50:00           
f_name = Clipboards, f_size=0, f_type=dir, f_date=06/07/94 12:50:00, f_text=          
Line:   T                                     0 (dir) 06/07/94 12:50:00           
f_name = T, f_size=0, f_type=dir, f_date=06/07/94 12:50:00, f_text=
Now I am more than happy but if you are still available we (you, actually) could try to fix an annoying problem, the "frozen gray GUI" during upload and download:



It would be better if the GUI shows the directory instead of a gray screen and it would be fantastic if there were a progress bar or something similar showing the upload/download status.

Do you think that that would be possible?
Let me know, I can do as many tests as you need! Thank you again!
liviux76 is offline  
Old 20 October 2014, 23:20   #26
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
Quote:
Originally Posted by liviux76 View Post
... then I used a new lxamiga and I applied the two modifications on lines 290 and 292 as you said and now the program works exactly how it did in the past!
just two lines with such an impact on the whole program - this is cool for sure

what about the look of the big numbers in size - does it look correct?

a progressbar is supported as well "Gtk2::ProgressBar->new" - but not sure how to implement / which values to use for animating it.

the source for freezing gui i cannot see at the moment.
there are some subroutines, eg. sub cmd_upload_file - these call external tool lxamiga - interesting lines (before lxamiga does start) are 396/397:
Code:
    $win->window->set_cursor(Gtk2::Gdk::Cursor->new("watch"));
    Gtk2::Gdk->flush();
maybe something we can change here, to have at least the gui visible or open a requester - something like "please stand by" is possible which will be closed, after finishing operation.
i try to find something

edit: just reading a pdf about gtk2/glib and i found some hint, not really understand what is it's impact.
anyway - worth a try:
insert in line 27 the following and try a freezing function in the gui:
Code:
use Glib qw/TRUE FALSE/;
anything changes? - if nothing changes / still hangs - just delete the line

----------------------------------------------------------------------------------------------------
edit2: just collecting some information here:
perl itself does simply wait for the answer from the external program (lxamiga).
maybe we can find a way to execute lxamiga in a different way, using perl's system or exec function.
perl - external programs. Waiting for an External Program to Finish Executing.
executing external commands.

edit3: maybe perl's system function can help, since it does fork a new process - so the parent process (the lxagui perl script itself ) - can do something else - even sit and wait.
for a start you can try to replace line 399 with the following:
Code:
my $ret = system("$lxamiga", "$lxargs", "upload", "$src", "$dst", "2>&1");
this is the upload function - so try to "upload" something - if this prevents the window from freezing, we can add a requester,
until lxamiga is finished.

Last edited by emufan; 21 October 2014 at 02:43.
emufan is offline  
Old 21 October 2014, 23:13   #27
liviux76
Registered User
 
liviux76's Avatar
 
Join Date: Jan 2014
Location: BO/Italy
Posts: 711
Hello mate!

I tried your suggestions, these are the results.

First i added the line

Code:
use Glib qw/TRUE FALSE/;
but trying to upload a file the GUI was gray as always so i removed that line as you said.

Then I commented the line 399 and put below that the line:

Code:
my $ret = system("$lxamiga", "$lxargs", "upload", "$src", "$dst", "2>&1");
but trying to upload a file a pop up error appeared:



This is the CLI output:

Code:
Initialising Amiga connection /dev/ttyS0, 38400 Baud, 4096 Block Size.
Received: 500/500 Bytes (100.00%) 
Number of entries: 6

  :R:Kick.rom                      524288 (rom) 15/07/93 00:00:00 AMIGA ROM Operating System ...
  RAM:Ram Disk                   133919704 (vol) 06/07/94 12:50:00           
  DH0:System                     367976448 (vol) 06/07/94 12:50:00           
  :DH0:System.hdf                367976448 (hdf) 06/07/94 12:50:00 SEC:63 SUR:16 RES:2 PRE:0 S...
  DH1:Data                       3628154880 (vol) 06/07/94 12:51:00           
  :DH1:Data.hdf                  3628154880 (hdf) 06/07/94 12:51:00 SEC:63 SUR:16 RES:2 PRE:0 S...
Line:   :R:Kick.rom                      524288 (rom) 15/07/93 00:00:00 AMIGA ROM Operating System ...
f_name = :R:Kick.rom, f_size=524288, f_type=rom, f_date=15/07/93 00:00:00, f_text=AMIGA ROM Operating System ...
Line:   RAM:Ram Disk                   133919704 (vol) 06/07/94 12:50:00           
f_name = RAM:Ram Disk, f_size=133919704, f_type=vol, f_date=06/07/94 12:50:00, f_text=          
Line:   DH0:System                     367976448 (vol) 06/07/94 12:50:00           
f_name = DH0:System, f_size=367976448, f_type=vol, f_date=06/07/94 12:50:00, f_text=          
Line:   :DH0:System.hdf                367976448 (hdf) 06/07/94 12:50:00 SEC:63 SUR:16 RES:2 PRE:0 S...
f_name = :DH0:System.hdf, f_size=367976448, f_type=hdf, f_date=06/07/94 12:50:00, f_text=SEC:63 SUR:16 RES:2 PRE:0 S...
Line:   DH1:Data                       3628154880 (vol) 06/07/94 12:51:00           
f_name = DH1:Data, f_size=3628154880, f_type=vol, f_date=06/07/94 12:51:00, f_text=          
Line:   :DH1:Data.hdf                  3628154880 (hdf) 06/07/94 12:51:00 SEC:63 SUR:16 RES:2 PRE:0 S...
f_name = :DH1:Data.hdf, f_size=3628154880, f_type=hdf, f_date=06/07/94 12:51:00, f_text=SEC:63 SUR:16 RES:2 PRE:0 S...
Callback on row: $VAR1 = [
          'RAM:Ram Disk',
          '133919704',
          'vol',
          bless( {}, 'Gtk2::Gdk::Pixbuf' ),
          '06/07/94 12:50:00',
          '          '
        ];

Initialising Amiga connection /dev/ttyS0, 38400 Baud, 4096 Block Size.
Received: 122/122 Bytes (100.00%) 
Number of entries: 3

  Disk.info                          1013 null  06/07/94 12:50:00           
  Clipboards                            0 (dir) 06/07/94 12:50:00           
  T                                     0 (dir) 06/07/94 12:50:00           
Line:   Disk.info                          1013 null  06/07/94 12:50:00           
f_name = Disk.info, f_size=1013, f_type=, f_date=06/07/94 12:50:00, f_text=          
Line:   Clipboards                            0 (dir) 06/07/94 12:50:00           
f_name = Clipboards, f_size=0, f_type=dir, f_date=06/07/94 12:50:00, f_text=          
Line:   T                                     0 (dir) 06/07/94 12:50:00           
f_name = T, f_size=0, f_type=dir, f_date=06/07/94 12:50:00, f_text=          
OK - uploading from /home/livio/bin/lxamiga/lxamiga to RAM:Ram Disk/lxamiga
Can't exec "~/bin/lxamiga/lxamiga": No such file or directory at /home/livio/bin/lxamiga/lxagui line 400.
The error is on line 400 since I added the line below line 399.
As for the volumes size you asked me how it was showed, here you can see it:



Hopefully we'll make some progress tomorrow! Thanks!
liviux76 is offline  
Old 22 October 2014, 18:27   #28
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
hmm, in the line 399 (or 400).- variable $lxamiga is misinterpreted or path is wrong to lxamiga.
/home/livio/bin/lxamiga/lxamiga does exists ?
try in shell:
Code:
file /home/livio/bin/lxamiga/lxamiga
and
file ~/bin/lxamiga/lxamiga
if the lxamiga binary is in different path, just change line 28:
Code:
my $lxamiga = "~/bin/lxamiga/lxamiga";
about the listview - large numbers/file-size - just try again in line 105:
Code:
'Size'     		=> 'text',
compare displayed size of dh1 : Data (vol) and dh1 : Data.hdf (hdf) - or make screenshot

Last edited by emufan; 22 October 2014 at 18:39.
emufan is offline  
Old 22 October 2014, 23:01   #29
liviux76
Registered User
 
liviux76's Avatar
 
Join Date: Jan 2014
Location: BO/Italy
Posts: 711
Hello,
the path is correct:

Code:
[livio@optiplex-380 ~]$ file /home/livio/bin/lxamiga/lxamiga
/home/livio/bin/lxamiga/lxamiga: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, not stripped
Code:
[livio@optiplex-380 ~]$ file ~/bin/lxamiga/lxamiga
/home/livio/bin/lxamiga/lxamiga: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, not stripped
It is probably misinterpreted...
As per the listview I will try your suggestion tomorrow since now I need to go sleep... I had a very hard day at work...
Thanks for your time!
liviux76 is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
PC to Amiga Connection AlfaRomeo support.Apps 4 12 September 2009 00:47
Amiga connection in BERLIN Amiga1992 Retrogaming General Discussion 3 30 April 2008 17:11
Nullmodem+TCP on unexpanded A1200 Doc Mindie New to Emulation or Amiga scene 1 08 July 2007 14:47
Nullmodem cable Tolismlf support.Hardware 1 24 November 2004 13:12
Amiga<->PC TCP Nullmodem Frog Amiga scene 7 24 October 2002 23:17

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 15:10.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.33713 seconds with 15 queries