Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 03-08-2014, 09:29   #241
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,343
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 online now   Reply With Quote
Old 03-08-2014, 10:04   #242
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,343
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, 27 views)
__________________

__________________
rgleason is online now   Reply With Quote
Old 03-08-2014, 10:09   #243
Registered User
 
boat_alexandra's Avatar

Join Date: Aug 2009
Location: Masachusetts
Boat: bristol 27
Posts: 2,803
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
__________________
boat_alexandra is offline   Reply With Quote
Old 03-08-2014, 10:24   #244
Registered User
 
boat_alexandra's Avatar

Join Date: Aug 2009
Location: Masachusetts
Boat: bristol 27
Posts: 2,803
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?
__________________
boat_alexandra is offline   Reply With Quote
Old 03-08-2014, 10:37   #245
Registered User

Join Date: Jul 2010
Location: Monastir, Tunisia
Boat: Amel Sharki
Posts: 1,774
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, 10:41   #246
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 4,880
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, 10:49   #247
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 4,016
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, 11:06   #248
Registered User
 
boat_alexandra's Avatar

Join Date: Aug 2009
Location: Masachusetts
Boat: bristol 27
Posts: 2,803
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.
__________________
boat_alexandra is offline   Reply With Quote
Old 03-08-2014, 11:12   #249
Registered User
 
boat_alexandra's Avatar

Join Date: Aug 2009
Location: Masachusetts
Boat: bristol 27
Posts: 2,803
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.
__________________
boat_alexandra is offline   Reply With Quote
Old 03-08-2014, 11:35   #250
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 4,016
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, 11:54   #251
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 4,016
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, 13:15   #252
Registered User
 
boat_alexandra's Avatar

Join Date: Aug 2009
Location: Masachusetts
Boat: bristol 27
Posts: 2,803
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.
__________________
boat_alexandra is offline   Reply With Quote
Old 03-08-2014, 13:36   #253
Registered User
 
boat_alexandra's Avatar

Join Date: Aug 2009
Location: Masachusetts
Boat: bristol 27
Posts: 2,803
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
__________________
boat_alexandra is offline   Reply With Quote
Old 03-08-2014, 14:06   #254
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,343
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 online now   Reply With Quote
Old 03-08-2014, 14:32   #255
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,343
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 online now   Reply With Quote
Reply

Tags
enc, lease, opencpn

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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 08:43
OpenCPN Beta Version 3.1.802 Released bdbcat OpenCPN 158 14-08-2012 11:07
OpenCPN Beta Version 3.1.714 Released bdbcat OpenCPN 91 01-08-2012 18:08



Copyright 2002- Social Knowledge, LLC All Rights Reserved.

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


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

ShowCase vBulletin Plugins by Drive Thru Online, Inc.