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 03-08-2014, 08:29   #241
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,711
Images: 2
Re: OpenCPN Beta Version 3.3.1824 Released

Quote:
(I built using visual studio as I have a windows laptop now)
Awesome Sean. - You got it! My father-in-law would be very pleased to know that his computer is being used for this purpose! I hope you like it. Is the HD working I hope?
rgleason is offline   Reply With Quote
Old 03-08-2014, 09:04   #242
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,711
Images: 2
Re: OpenCPN Beta Version 3.3.1824 Released

Git pull and cmake. Was able to CPACK 3.3.1931 (36mb) so next will try to become more familiar with NSIS Installer and read Pavels links unless Sean wants to create the installer?

See attached warnings. (0 errors of course)
Attached Files
File Type: doc MSVC++gitpull-cmake.doc (3.8 KB, 44 views)
rgleason is offline   Reply With Quote
Old 03-08-2014, 09:09   #243
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,422
Re: OpenCPN Beta Version 3.3.1824 Released

I think you will find the file drops from 36MB to 28MB if you use NSIS 3.0 also from 11MB to 7MB
seandepagnier is offline   Reply With Quote
Old 03-08-2014, 09:24   #244
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,422
Re: OpenCPN Beta Version 3.3.1824 Released

Quote:
Originally Posted by nohal View Post
And switching to mingw for Windows build is IMO not feasible. Especially now and without all the related necessities (= do it with a stable release, at the same time as switch to wx3.x, write a totally bulletproof documentation for the Windows based devs, make it seamlessly possible for them to keep using VS for their development, rebuild, test and fix all the plug-ins).
I am comparing the file sizes, and considering the reasons. I am not saying to switch or not, only that it is already an option for people if they choose to use it, and I know it performs just as well, and it is free software the same as opencpn.

When I installed visual studio today it said "for evaluation purposes only" and that's all I plan to do with it. I would never run opencpn built with this compiler for more than a few minutes for comparison purposes. I don't think the same can be said for what most others are doing, so technically this is a violation of the license agreement.

Code:
Visual Studio Express is licensed for distributing ONLY compiled programs as binary executables, but you are NOT allowed to distribute the source code of your program.

also, Visual Studio Express 2012 is the first express compiler that took away the ability to compile for other platforms except for windows 8 metro.

for this reason Visual Studio Express or Visual c++ Express is NOT for:

Open Source Software developers who must make available their SOURCE CODE with their program.
students in college who must submit their sample compiled programs and at least their SOURCE CODE.
It is also a dead end as we are stuck with version 2010. Furthermore, to be legal in many countries, I think one person must buy visual studio professional for $800 so that they may build opencpn to distribute it on the main site.

llvm is also an option. I have made all of my plugins work. It is trivial and most plugins do not need any changes since they compile with gcc already under linux. Mingw is gcc, it gives much better error messages, like for errors included in included files, and so forth. It supports a lot more features. I am biased, as a contributor I have code that lives in gcc, what do you expect from me?
seandepagnier is offline   Reply With Quote
Old 03-08-2014, 09:37   #245
Registered User

Join Date: Jul 2010
Location: Hannover - Germany
Boat: Amel Sharki
Posts: 2,546
Re: OpenCPN Beta Version 3.3.1824 Released

A few days ago Linus Torvalds called gcc a "pure ****".
See: Linux-Kernel Archive: Re: Random panic in load_balance() with 3.16-rc

Better to use LLVM/Clang.

Gerhard
CarCode is offline   Reply With Quote
Old 03-08-2014, 09:41   #246
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,463
Re: OpenCPN Beta Version 3.3.1824 Released

Folks...

Regarding doc size:

Kathi took a look at the images in the doc. They are all saved as very nice .png files. Reducing to .jpg or .gif file format and limiting the palette can reduce the size of some of these images by a factor of better than 4. For instance, the largest image is some 730 KB, and reduces to 165 KB as gif.

Anyone have an opinion on this idea? Any reason not to do this?

Thanks
Dave
bdbcat is offline   Reply With Quote
Old 03-08-2014, 09:49   #247
Registered User

Join Date: Feb 2010
Location: Tierra del Fuego
Boat: Phantom 19
Posts: 6,234
Re: OpenCPN Beta Version 3.3.1824 Released

Dave...
Sure can be done. The big question is: How? A script that takes the pictures one after another, tries to find the best format and then updates the html file if necessary (extension change from PNG to JPG)? It is easy to write. Force a palette reduction to all the PNGs? I kind of can't imagine a JPG keeping reasonable quality would be better than PNG in all cases, but might sure be wrong.

And of course, encode them using https://github.com/mozilla/mozjpeg

Pavel
nohal is offline   Reply With Quote
Old 03-08-2014, 10:06   #248
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,422
Re: OpenCPN Beta Version 3.3.1824 Released

Quote:
Originally Posted by CarCode View Post
A few days ago Linus Torvalds called gcc a "pure ****".
See: Linux-Kernel Archive: Re: Random panic in load_balance() with 3.16-rc

Better to use LLVM/Clang.

Gerhard
This is specifically gcc 4.9.

LLVM is a good choice and should be explored on windows. I tried it on linux and compiled opencpn perfectly much faster than gcc. I didn't make a good comparison of runtime performance, but I didn't notice a problem.
seandepagnier is offline   Reply With Quote
Old 03-08-2014, 10:12   #249
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,422
Re: OpenCPN Beta Version 3.3.1824 Released

Quote:
Originally Posted by nohal View Post
Dave...
Sure can be done. The big question is: How? A script that takes the pictures one after another, tries to find the best format and then updates the html file if necessary (extension change from PNG to JPG)? It is easy to write. Force a palette reduction to all the PNGs? I kind of can't imagine a JPG keeping reasonable quality would be better than PNG in all cases, but might sure be wrong.

And of course, encode them using https://github.com/mozilla/mozjpeg

Pavel
What do you think about a script using "convert" from imagemagick?

First convert to tiff starting at 256, colors, and work down 128, 64... until the image is at the minimum distortion allowed. Next, convert to jpeg, and reduce until the quality is whatever the minimum acceptable distortion allowed. Pick the smallest file. I don't think gif or png can do less than 256 colors.

A lot of the images use a low number of colors.
seandepagnier is offline   Reply With Quote
Old 03-08-2014, 10:35   #250
Registered User

Join Date: Feb 2010
Location: Tierra del Fuego
Boat: Phantom 19
Posts: 6,234
Re: OpenCPN Beta Version 3.3.1824 Released

I did a little test:
Original: 19M
Code:
gm mogrify -format jpg *.png # 8.9M
mkdir ../optimized
find . -name "*.jpg" -exec /opt/libmozjpeg/bin/cjpeg -outfile ../optimized/{} {} \; # 7.9M
cp ../optimized/*.jpg .
sed -i -e 's/\.png/\.jpg/g' ../help_en_US.html
11 MB saved in 2 minutes, not bad...

Pavel
nohal is offline   Reply With Quote
Old 03-08-2014, 10:54   #251
Registered User

Join Date: Feb 2010
Location: Tierra del Fuego
Boat: Phantom 19
Posts: 6,234
Re: OpenCPN Beta Version 3.3.1824 Released

BTW,
Code:
find . -name "*.png" -exec gm convert {} -colors 32 {} \;
Gets us to the same 8MB with pretty comparable quality (I personally like it better than the lossy JPEG).
nohal is offline   Reply With Quote
Old 03-08-2014, 12:15   #252
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,422
Re: OpenCPN Beta Version 3.3.1824 Released

Quote:
Originally Posted by nohal View Post
BTW,
Code:
find . -name "*.png" -exec gm convert {} -colors 32 {} \;
Gets us to the same 8MB with pretty comparable quality (I personally like it better than the lossy JPEG).
Also, there is such a thing as lossy png compression we could consider.
seandepagnier is offline   Reply With Quote
Old 03-08-2014, 12:36   #253
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,422
Re: OpenCPN Beta Version 3.3.1824 Released

I have no idea how well this will work, but could be interesting:

pngquant ? lossy PNG compressor
seandepagnier is offline   Reply With Quote
Old 03-08-2014, 13:06   #254
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,711
Images: 2
Re: OpenCPN Beta Version 3.3.1824 Released

You wizards leave us mortals in the dust. Pretty nice way to save space.
I've got Sean's mingw git on the computer, should I try mingw or llvm-clang -unknown to me)?

Also for a web based Windows download, couldn't you just have web links to each installer program? Sort of like this.
  1. Main Program (5mb)
  2. Documentation Basic (17.4mb)
  3. Documentation Plugins (???)
  4. Tide/Current Data (698kb)
  5. GSHHS Data (base map)
Crude (789kb)
Low (1.5mb)
Intermediate (4.2mb)
High (12.3mb)
Full (49mb)
  1. Plugins (Separate installer programs)
WMM World Magnetic Model
AIS Radar
Calculator
Celestial Navigator
Climatology
Google Earth
Logbook Konni
Polar
Garmin Radar Overlay
Simrad/Lowrance Radar Overlay
Route Great Circle
Trimplot
Statusbar
Rtlsdr
SAR
Tidal US
VDR
Watchdog
Weatherfax


Or are you thinking of having a small installer program that prompts with a checklist of items to install, then proceeds to download each item and install it.

Should I uninstall NSIS older and then Install
NSIS 3.0b0
rgleason is offline   Reply With Quote
Old 03-08-2014, 13:32   #255
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,711
Images: 2
Re: OpenCPN Beta Version 3.3.1824 Released

Does this script only apply to Mozilla programs, or can it be used for other programs?
https://developer.mozilla.org/en-US/...nstall_Scripts

Dave is probably talking about RPM
http://www.rpm.org/max-rpm/s1-rpm-inside-scripts.html

Starting to get out of my league.... Is the server Linux with PHP5?
rgleason is offline   Reply With Quote
Reply

Tags
enc, lease, opencpn


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 Beta Version 3.1.814 Released bdbcat OpenCPN 185 14-09-2012 07:43
OpenCPN Beta Version 3.1.802 Released bdbcat OpenCPN 158 14-08-2012 10:07
OpenCPN Beta Version 3.1.714 Released bdbcat OpenCPN 91 01-08-2012 17:08

Advertise Here


All times are GMT -7. The time now is 15:38.


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.