일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
- ExtendWith
- esp-wroom-32d
- winsock.h Broadcast
- _sprintf
- 사전설치
- LINK2001
- __vsnprintf
- git 최초 설정
- Console
- 멀티바이트 문자 집합 사용
- Flutter
- Plugins
- 설치 테스트
- c++ set struct
- SQLite3
- __snprintf
- git 대용량 파일
- 확인할 수 없는 외부 기호
- OpenXLSX 한글
- wxWidget
- MFC
- 의존주입
- OpenCPN
- .gitattributes
- c++ Broadcast
- 정적 라이브러리에서 MFC 사용
- sts4
- c2678
- Mqtt
- OpenCPN설치
- Today
- Total
세상을 이롭게
OpenCPN 개발하기_02.빌드 본문
메뉴얼에 나와있는 대로 더 진행해보도록 하겠습니다.
Getting and building OpenCPN source
Get the OpenCPN sources
In the open x86 Native Tools Command Prompt for VS 2017 execute the following commands:
cd \Users\myname\Sources
git clone https://github.com/OpenCPN/OpenCPN
Get prebuilt Windows dependencies
-
Download the dependencies bundle from OpenCPN_buildwin-4.99a.7z
-
Extract into c:\Users\myname\Sources\OpenCPN\buildwin using 7-Zip
Building OpenCPN
-
In the open x86 Native Tools Command Prompt for VS 2017 execute the following commands to create the build directory, generate the solutions files and build the debug version, the release version and the setup package.
- **필자는 2019를 사용하고 있으므로 Visual Strudio 16 2019 로 해보겠습니다.
cd C:\Users\myname\Sources\OpenCPN
mkdir build
cd build
cmake -G "Visual Studio 15 2017" -T v141_xp ..
cmake --build .
cmake --build . --config release
cmake --build . --config release --target package



CMakeCache.txt 에서 v141_xp 를 v142로 바꾸고 다시 해보았다.

asdasd
asd
asd
asdasdasdsa
-
These commands should generate an OpenCPN install package in c:\Users\username\Sources\OpenCPN\build\opencpn_5.0.0_setup.exe
-
Excecute this program to install OpenCPN. Choose c:\Program Files (x86)\OpenCPN\ as installation directory to avoid unnecessary issues when installing plugins.
Alternatives:
-
Instead of running the last 3 cmake-commands, one could also start Visual Studio, open the generated solutionfile OpenCPN.sln and build from there.
-
Obviously other directories can be used as well, just as multiple opencpn installation. The instructions above are meant for those setting up a new development environment for just OpenCPN 5.0.
Setup Copyfiles.bat - Last step to Debug
Copyfiles.bat is a useful single batch file to copy all the needed files to the various directories. This batch file does not execute any cmake commands.
-
Move the file to <Your OpenCPN source tree> (for example: C:\Compile\Github\Opencpn)
-
Execute copyfiles.bat
-
Start Visual Studio 2017 and the OpenCPN-solution file. (For Example: C:\Compile\Github\Opencpn\build\opencpn.sln)
-
If the Solution Explorer is not visible, open the Solution Explorer (Via the view-menu, or Ctrl+Alt+L)
-
Select the project “Opencpn” from the list, right click and pick “Set as Startup Project”
Now Opencpn should be ready to debug.
BatchUTILS
BatchUTILS is another alternative that is a more complete set of batch files to assist building OpenCPN. Osetup.bat is intended to be modified by an individual user based on their own system. Git clone https://github.com/transmitterdan/BatchUTILS to your github directory, next to the OpenCPN local repository. Discussion about the use and development of BatchUtils
It’s nearly impossible to guess all the possible wxWidgets versions someone might have on their system. Also, other tools sometimes change paths as new versions are released. So it is expected that each user will customize Osetup.bat. The latest of Transmitter Dan's batchutils is in git. If you want to use some other environment variable other than WXDIR that is ok. The Cmake tool will accept a number of possible environment names as the root of the wxWidgets toolkit.
First Run
-
Make sure you've downloaded wxWidgets 3.1.2 and compiled them See the paragraph above.
-
Be sure to set environment path for wxWIDGETS_ROOT_DIR
-
First try doing Release or RelWithDebInfo to avoid issues using Debug because of missing wxWidgets debug .dlls.
-
Do not use the “All Build” target. Use the “opencpn” target.
-
Right click on “opencpn” target, and select “Set as StartUp Project”
-
Build the target “opencpn”. Should be able to debug this now.
-
If you get a popup similar to “this DLL can't be found; wxmsw312ud_gl_vc_custom.dll
-
You will need to rebuild wxWidgets in Debug mode if you want to run the OCPN Debug build. Not difficult. See the paragraph above.
-
You can also get useful debugging from the “RelWithDebInfo” build.