Cruisers Forum
 

Go Back   Cruisers & Sailing Forums > Seamanship, Navigation & Boat Handling > OpenCPN
Cruiser Wiki Click Here to Login
Register Vendors FAQ Community Calendar Today's Posts Log in

Reply
  This discussion is proudly sponsored by:
Please support our sponsors and let them know you heard about their products on Cruisers Forums. Advertise Here
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 15-02-2014, 13:30   #691
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,632
Images: 2
Re: OpenCPN Internationalization ( i18n )

Hakan, a little background... it is not a problem for me, for sure.
For users who have Win7x64 all 32 bit programs are generally put in
C:\Program Files (x86)
so Opencpn would go into
C:\Program Files (x86)\OpenCPN\plugins

That is the norm for Win7x64 bit. Don't know about Win 8.1 though.
Users with 64 bit should perhaps be told to change the path to the absolute path ref?
rgleason is offline   Reply With Quote
Old 15-02-2014, 13:40   #692
Registered User

Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 4,147
Re: OpenCPN Internationalization ( i18n )

Rick..
Ok didn't know. You know I'm basically still on XP and can even find pleasure in old fashion DOS-commands. Like old-time you know.
But if it's a rule that opencpn is installed in a directory called "program files"(x86) on 64 bit machines it would be possible rather easy.
So the rule would be that opencpn is installed in the system "programfiles" but with the supplement (x86) ?? (We can't take for granted that everyone uses "C:\" though)
Hakan is offline   Reply With Quote
Old 15-02-2014, 13:45   #693
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,632
Images: 2
Re: OpenCPN Internationalization ( i18n )

Yes on 64bit win7 all 32bit is installed there, but it has a space I believe "Program Files (x86)"

If we could just check for 64bit? Or maybe prompt the user to answer
A.32bit or
B.64bit?
rgleason is offline   Reply With Quote
Old 15-02-2014, 13:47   #694
Registered User

Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 4,147
Re: OpenCPN Internationalization ( i18n )

Ok..I'll check and come back
Hakan is offline   Reply With Quote
Old 15-02-2014, 13:47   #695
Registered User

Join Date: Dec 2005
Location: Helsingborg
Boat: Dufour 35
Posts: 3,891
Re: OpenCPN Internationalization ( i18n )

As for Linux......
I could very easy include all plugins with Git code available, in the packages I build. All languages included in each plugin would then be available as well.
This could be a way to keep separate packages for the latest Ubuntu version, which are really redundant with Nohal's launchpad site......

Thomas
cagney is offline   Reply With Quote
Old 15-02-2014, 15:16   #696
Registered User

Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 4,147
Re: OpenCPN Internationalization ( i18n )

Quote:
Originally Posted by rgleason View Post
Yes on 64bit win7 all 32bit is installed there, but it has a space I believe "Program Files (x86)"

If we could just check for 64bit? Or maybe prompt the user to answer
A.32bit or
B.64bit?
Rick...
Well here's a new try. (I deleted a similar post a minute ago. I should have tested in W7 before upload)

Now it's late....zzzz
Håkan
Attached Files
File Type: pdf wmm_2.zip.pdf (100.8 KB, 44 views)
Hakan is offline   Reply With Quote
Old 16-02-2014, 02:01   #697
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,632
Images: 2
Re: OpenCPN Internationalization ( i18n )

Quote:
Copying of the files for the WMM_pi plugin
Batch file to copy translation files for the plugin
In Win7 it must be run with the command "Run as administartor"
or you will recive the "Access denied" message.
Press any key to continue . . .
C:\Users\Rick\Downloads\Plugins\\wmm_pi.dll
Access is denied.
0 file(s) copied.
Access is denied.
0 file(s) copied.
Access is denied.
0 file(s) copied.
Access is denied.
0 file(s) copied.
Access is denied.
0 file(s) copied.
Access is denied.
0 file(s) copied.
Access is denied.
0 file(s) copied.
Access is denied.
0 file(s) copied.
Press any key to continue . . .
Not sure if it is Norton Firewall or permissions (but I am an admin). Will try to find out later.

Maybe we should be looking at some kind of installer software that allows user selections? There must be some Open Source that is good. Maybe even cross platform?
http://en.wikipedia.org/wiki/List_of...ation_software
rgleason is offline   Reply With Quote
Old 16-02-2014, 02:08   #698
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,632
Images: 2
Re: OpenCPN Internationalization ( i18n )

Maybe even cross platform?
List of installation software - Wikipedia, the free encyclopedia
rgleason is offline   Reply With Quote
Old 16-02-2014, 02:15   #699
Registered User

Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 4,147
Re: OpenCPN Internationalization ( i18n )

Rick..
Win permission rules can for sure be tricky. So please see if you can find a method. or---
Quote:
Maybe we should be looking at some kind of installer software that allows user selections? There must be some Open Source that is good. Maybe even cross platform?
Yeah -- good. That could be much better then trying to muddle with a batch file basically made for the old fashion DOS??

Edit:
Even if I'm a administrator I had to run the file using the "Run as administartor". Did you try that?
Hakan is offline   Reply With Quote
Old 16-02-2014, 02:21   #700
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,632
Images: 2
Re: OpenCPN Internationalization ( i18n )

Anyone heard of Nullsoft Scriptable Install System?
NSIS Wiki
rgleason is offline   Reply With Quote
Old 16-02-2014, 02:34   #701
Registered User

Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 4,147
Re: OpenCPN Internationalization ( i18n )

Rick...
Sure nice programs but it seams a bit overkill when we are just talking about some "simple" file copying??

To be clear: Did you actually run the BAT-file using the mouse command "Run as administrator"??? I read a note about that CMD.EXE running the bat-file don't care about the user permissions.
Hakan is offline   Reply With Quote
Old 16-02-2014, 02:46   #702
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,632
Images: 2
Re: OpenCPN Internationalization ( i18n )

Highlight the batch file
CopyPluginWMM_Win32_Win64.bat
Right click and pick "Run as Administrator"

Quote:
Copying of the files for the WMM_pi plugin
Batch file to copy translation files for the plugin
In Win7 it must be run with the command "Run as administartor"
or you will recive the "Access denied" message.
Press any key to continue . . .
C:\Users\Rick\Downloads\Plugins\\wmm_pi.dll
1 file(s) copied.
1 file(s) copied.
1 file(s) copied.
1 file(s) copied.
1 file(s) copied.
1 file(s) copied.
1 file(s) copied.
1 file(s) copied.
Press any key to continue . . .
I believe it copied the language files... hard to determine. I've looked at the batch file and see the opncpn/share/local directory, but theres a lot of file at that location now. Don't know what was there before.

Also not sure about what the For command at the end does... copies a language file over the wmm-pi.mo or something?

I think batch should ask if you want to copy these files to PATH9s)? Yes No
It should then end with a message of where it copied the files to, so user can confirm.

Batch files can get pretty sophisticated, and once the form is understood others can create them too. This may actually be the best and simplest way.

I'm going back to bed. Its 5:46 here. Thanks for your great idea.
rgleason is offline   Reply With Quote
Old 16-02-2014, 03:11   #703
Registered User

Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 4,147
Re: OpenCPN Internationalization ( i18n )

Quote:
Originally Posted by rgleason View Post
Highlight the batch file
CopyPluginWMM_Win32_Win64.bat
Right click and pick "Run as Administrator"
Yes - "Please follow the instructions"

Quote:
I believe it copied the language files... hard to determine. I've looked at the batch file and see the opncpn/share/local directory, but theres a lot of file at that location now. Don't knowwhat was there before.
A simple test I did: Delete one file that's also present in the zip-file and see if it returns.

Quote:
Also not sure about what the For command at the end does... copies a language file over the wmm-pi.mo or something?
In this case it takes for example the "de.mo" file, rename it to "opencpn-wmm_pi.mo" and copy it to the "....\de\LC_MESSAGES\" library.

Quote:
I think batch should ask if you want to copy these files to PATH9s)? Yes No
It should then end with a message of where it copied the files to, so user can confirm.
As long as we can agree for a suitable method everything can be fine tuned to our satisfaction.

I'll try to write a description text how to handle the plugin files. That will probably be the most important thing for all users and operating system. To bee continued.......

And---The basic with all this is to not only distribute the binary -.dll- but also the language files to the user. All in a package. --??

Håkan
Hakan is offline   Reply With Quote
Old 16-02-2014, 04:12   #704
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,417
Re: OpenCPN Internationalization ( i18n )

I don't really know windows, but why not make an installer program for each plugin similar to the installer for opencpn?
seandepagnier is offline   Reply With Quote
Old 16-02-2014, 04:36   #705
Registered User

Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 4,147
Re: OpenCPN Internationalization ( i18n )

Sean...
Yes that's probably the best. And since I could make a simple batch file for Windows I'm sure you can make it in C to be compiled for each system like the O installer. And I assume that it can be done rather plugin independent. It's basically the same for every plugin -copy the binary to ...\plugins\ -copy and rename the available .mo files to each directory. Furthermore we have to check if the plugin needs any additional files below ...\Opencpn\Plugins\ and if so copy also them.
I did the -mo files like this:
Code:
FOR %%G IN (ca_ES,cs,da,de,el_GR,es,et,fi_FI,fr,gl_ES,hu,hu_HU,it,nb_NO,nl,pl,pl_PL,pt_BR,pt_PT,ru,sv,tr_TR,zh_TW) DO (    
(IF EXIST "%~dp0\%%G.mo" copy "%~dp0\%%G.mo" "%_ODIR%\opencpn\share\locale\%%G\LC_MESSAGES\opencpn-wmm_pi.mo"))
Although it's Basic I think you can follow? (%~dp0 = This directory. Win7 don't know from where the batch-file is started!)


If you will like to try and I can be of any support please let me know.

Håkan
Hakan is offline   Reply With Quote
Reply


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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenCPN 2.3.0 dlymn OpenCPN 3 29-06-2011 01:44
Help with OpenCPN moggie OpenCPN 4 15-02-2011 16:18
Help with OpenCPN moggie Marine Electronics 1 10-02-2011 06:26
OpenCPN bdbcat OpenCPN 1343 19-09-2009 15:59

Advertise Here


All times are GMT -7. The time now is 01:22.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.