As per Hakan
Quote:
Delete everything in ocpn_draw/build except
cairo.lib
expat.lib
opencpn.lib (fresh from yesterday)
WXSVG.lib
build.bat (Tdan's)
|
Using normal commands
Quote:
git fetch --all
git pull origin master
cd build
cmake -T v120_xp ..
cmake --build . --config release
cpack
Then tried git_fetch.bat from ocpn_draw_pi directory, worked fine.
|
Compiling ODraw for SVG Icons
Use with
OpenCPN specially compiled for use with SVG Icon
To use SVG within OD you need to ensure that OD_USE_SVG=ON in the cmake. From ocpn_draw/build
Quote:
On SourceForge > opencpnplugins - Browse 'opencpn_packaging_data'
Download 'OpenCPN_buildwin-svg.7z' and expand and copy 'buildwin' into 'ocpn_draw_pi/'
These files should all be copied to 'ocpn_draw_pi/build'
cairo.lib Copy from \ocpn_draw_pi\build\buildwin\gtk\cairo.lib
expat.lib Copy from \ocpn_draw_pi\build\buildwin\expat-2.1.0\expate.lib
opencpn.lib Copy from \OpenCPN\build\release\opencpn.lib (fresh fetch & compile)
WXSVG.lib Copy from \OpenCPN\build\release\wxsvg.lib (fresh fetch & compile)
|
OR
Quote:
Or get these files from a recent Opencpn fetch
Copy: \GitHub\OpenCPN\buildwin\gtk\cairo.lib ---> ocpn_draw_pi\build\
Copy: \GitHub\OpenCPN\buildwin\expat-2.1.0\expate.lib ---> ocpn_draw_pi\build\
Copy: \GitHub\OpenCPN\build\release\wxsvg.lib ---> ocpn_draw_pi\build\
Copy: \GitHub\OpenCPN\build\release\opencpn.lib ---> ocpn_draw_pi\build\
|
Then Copy
Images SVG & PNG
Quote:
Copy from \ocpn_draw_pi\data\[all images] ---> ocpn_draw_pi\images\ (new directory)
|
Ensure that OpenCPN is using SVG, i.e. compiled with OD_USE_SVG=ON as a cmake option.
Quote:
cmake -T v120_xp ..
cmake --OD_USE_SVG=ON ..
cmake --build . --config release [or debug]
cpack
|
Result: OK. When I check
..\GitHub\o-plugin\j-ocpn_draw_pi\build\_CPack_Packages\win32\NSIS\ocpn _draw_pi-0.4.618-win32\plugins\ocpn_draw_pi\data'
I find the svg and png files copied over. Also the exe was made and it instals.
Compiling OpenCPN for SVG Icons
From sourceforge download from opencpnplugins 'opencpn_packaging_data' -'OpenCPN_buildwin-svg.7z' ... and expand then copy 'buildwin' into 'OpenCPN/'
These files should all be copied to 'OpenCPN/build'
Quote:
cairo.lib Copy from buildwin
expat.lib Copy from buildwin
opencpn.lib Copy from fresh OpenCPN compile
WXSVG.lib Copy from fresh OpenCPN git fetch
|
Copy the SVG Image files
Quote:
Copy from ..\GitHub\OpenCPN\data\svg the directories: journeyman, journeyman_flat and traditional
to ..\GitHub\OpenCPN\images
|
also tried to
Quote:
..\GitHub\OpenCPN\build\uidata
|
These directories have the svg and png files
Result after Cpack - No svg directories in the NSIS directory, see below.
Also ensure that OpenCPN is using SVG, i.e. compiled with OCPN_USE_SVG=ON as a cmake option. Same routine
Quote:
cmake -T v120_xp ..
cmake --OCPN_USE_SVG=ON ..
cmake --build . --config release [or debug]
|
Result: No svg files or directories in the very bottom NSIS directory.
Also when I check '..\GitHub\o-plugin\j-ocpn_draw_pi\build\_CPack_Packages\win32\NSIS\ocpn _draw_pi-0.4.618-win32\plugins\ocpn_draw_pi\data'
I find NO svg files!!!
When installed the program loads with some icons (png?) and the
screen is black and it freezes.
When I uninstall Ocpn_Draw_pi it does the same thing.
When I copy the Journeyman, Journeyman-flat, Traditional Icons to the Program Files x86/OpenCPN.4.1.1301/uidata directory there is no improvement. Toolbar shows with a Black
screen, freezes.
=======
Debugging with VC2013 using the SVG Icon feature
(not tried yet)
Quote:
Copy cairo.lib, expat.lib and WXSVG.lib in the root of the build directory.
Copy the Git 'ocpn_draw_pi\data\*.svg & *.png' to VC2013 '\plugins\ocpn_draw_pi\data\' directory.
Using VC2013 build the project once you have run the cmake commands from the Dev Command prompt
cmake -T v120_xp ..
cmake --OCPN_USE_SVG=ON ..
In MSVC2013 issue 'Build'
This will expect to find the lib files and will complain if it does not.
At run time it will use the DLL's which should have been loaded by OCPN.
To install ocpn_draw_pi in MSVC, create an install package, install to MSVC and then running MSVC2010 OCPN. In this case the image files will all be in C:\Program Files\OpenCPN\plugins\ocpn_draw_pi\data.
You should notice that the SVG files are cleaner looking and if you cause them to scale they should still look OK. If you are not sure rename one of the SVG icons. In this case you will get a green jigsaw piece instead of the icon.
|
Question: Can you create an NSIS install file that is debug? -never tried it.
It would be nice to get this working. But I appear to be misunderstanding something here.