forked from seandepagnier/celestial_navigation_pi
-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathbldwin-rdeb.sh
More file actions
79 lines (62 loc) · 2.83 KB
/
bldwin-rdeb.sh
File metadata and controls
79 lines (62 loc) · 2.83 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#!/bin/bash
# FE2 Testplugin
# REKWITHDEBINFO VERSION
# Use "./build-win.sh" to run cmake.
# Adjust this command for your setup and Plugin.
# Requires wxWidgets setup
# - /home/fcgle/source/ocpn-wxWidgets
# - /home/fcgle/source/ where all the plugins and OpenCPN repos are kept.
# --------------------------------------
# For Opencpn using MS Visual Studio 2022
# --------------------------------------
# Used for local builds and testing.
# Create an empty "[plugin]/build" directory
# Use Bash Prompt from the [plugin] root directory: "bash ./bldwin-rdeb.sh"
# Find any errors in the build/output.txt file
# Then use bash prompt to run cloudsmith-upload.sh command: "bash ./bldwin-rdeb.sh"
# Which adds the metadata file to the tarball gz file.
# Set local environment to find and use wxWidgets
# Enable command tracing
set -x
# Confirm build exists and empty it and if no build directory create it.
if [ -d "build" ]; then
echo "The 'build' directory exists, remove all build dir files."
rm -rf build/*
else
echo "The 'build' directory does not exist. Create the build directory"
mkdir build
fi
# wxWidgets settings
set "wxDIR=C:\Users\fcgle\source\opencpn\..\ocpn_wxWidgets"
set "wxWIN=C:\Users\fcgle\source\opencpn\..\ocpn_wxWidgets"
set "wxWidgets_ROOT_DIR=C:\Users\fcgle\source\opencpn\..\ocpn_wxWidgets"
set "wxWidgets_LIB_DIR=C:\Users\fcgle\source\opencpn\..\ocpn_wxWidgets\lib\vc_dll"
set "VCver=17"
set "VCstr=Visual Studio 17"
# wxDIR=$WXWIN
# wxWidgets_ROOT_DIR=$WXWIN
# wxWidgets_LIB_DIR="$WXWIN/lib/vc14x_dll"
# WXWIN="/home/fcgle/source/wxWidgets-3.2.2"
# build the plugin with cmake
cd build
cmake -T v143 -A Win32 -DOCPN_TARGET=MSVC ..
cmake --build . --target package --config relwithdebinfo >output.txt
# Bash script completes tarball prep adding metadata into it.
bash ./cloudsmith-upload.sh
# Find ${bold}"build/output.txt"${normal} file if the build is not successful.
# Other examples below.
# Copy .dll and .pdb files for debugging into MSVisualStudio Development Setup
# Copy from
# C:\Users\fcgle\source\weather_routing_pi\build\relwithdebinfo weather_routing_pi.dll and weather_routing_pi.pdb
# into
# C:\Users\fcgle\source\opencpn\build\RelWithDebInfo\plugins
# cp -rv ./SourceFolder ./DestFolder
# cp -r ./dist/* ./out
# -r - Copy all files and folders inside a directory
# -i - Ask before replacing files
# -u - Copy only if the source is newer
# -v - Verbose mode, show files being copied
# copy ..\build\relwithdebinfo\weather_routing_pi.dll to C:\Users\fcgle\source\opencpn\build\RelWithDebInfo\plugins
# copy ..\build\relwithdebinfo\weather_routing_pi.pdb to C:\Users\fcgle\source\opencpn\build\RelWithDebInfo\plugins
cp -uv ./RelWithDebInfo/*_pi.dll C:/Users/fcgle/source/opencpn/build/RelWithDebInfo/plugins
cp -uv ./RelWithDebInfo/*_pi.pdb C:/Users/fcgle/source/opencpn/build/RelWithDebInfo/plugins