Skip to content

Process: Windows Dev Env for Debug of Plugins #450

@rgleason

Description

@rgleason
  1. Setup the build environment using TransmitterDan's script for a Windows development setup https://opencpn.org/wiki/dokuwiki/doku.php?id=opencpn:development_manual
  2. Follow Complete builds using Visual Studio 2022/2019 Community Edition I've found this to be a very reliable way to create a Development environment which produces the necessary tarballs.
  3. I locate my local git folders under C:\Users[user]\source and the windows build environment under C:\Users[user]\source\opencpn
  4. wxWidgets are automatically downloaded and configured by TransmitterDan's script.
  5. I build the plugin locally (standalone) with a bash script which can be found here bldwin-rdeb.sh in weather_routing_pi I always build plugins using realwithdebinfo and use Visual Studio that way too.
  6. First I test the plugin in OpenCPN using Imported Plugin to load the tarball and test it in a preliminary way.
  7. Then I start up MSVisualStudio, select the project opencpn.sln , and Debug mode > Start Debugging and when OpenCPN starts up, then using Option > Plugins > Import Plugin, import the tarball from C:\Users[user]\source[plugin]\build.
  8. Note that the first time you compile the plugin you will need to copy the
    C:\Users\[user]\source\[plugin]\build\relwithdebinfo\[plugin_pi].pdb
    file into the proper OpenCPN development folder which is
    C:\Users\[user]\source\opencpn\build\RelWithDebInfo\plugins\[plugin]_pi.pdb
    or
    C:\Users\[user]\source\opencpn\build\plugins\[plugin_pi]\RelWithDebInfo\[plugin]_pi.pdb
  9. Now you are ready to test and debug the plugin.

Note: The other way to compile a plugin is to copy the entire git plugin folder into
C:\Users\fcgle\source\opencpn\plugins
where the internal plugins are built, and rebuild OpenCPN along with the plugin.

For some more details and discussion see this comment and those following

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions