Skip to content
This repository has been archived by the owner on Nov 20, 2023. It is now read-only.

Commit

Permalink
Merge pull request #27 from Xerbo/gofastbreakthings
Browse files Browse the repository at this point in the history
Go fast, break things (refactor)
  • Loading branch information
Xerbo authored Nov 22, 2022
2 parents 00b0689 + b354356 commit d120491
Show file tree
Hide file tree
Showing 90 changed files with 2,377 additions and 950 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ jobs:
mkdir LeanHRPT-Decode/plugins/styles &&
mkdir LeanHRPT-Decode/plugins/imageformats &&
mkdir LeanHRPT-Decode/platforms &&
cp logo128.png LeanHRPT-Decode/ &&
cp logo128.ico LeanHRPT-Decode/ &&
cp presets.ini LeanHRPT-Decode/ &&
cp gradients.ini LeanHRPT-Decode/ &&
cp calibration.ini LeanHRPT-Decode/ &&
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ jobs:
mkdir LeanHRPT-Decode/plugins/styles &&
mkdir LeanHRPT-Decode/plugins/imageformats &&
mkdir LeanHRPT-Decode/platforms &&
cp logo128.png LeanHRPT-Decode/ &&
cp logo128.ico LeanHRPT-Decode/ &&
cp presets.ini LeanHRPT-Decode/ &&
cp gradients.ini LeanHRPT-Decode/ &&
cp calibration.ini LeanHRPT-Decode/ &&
Expand Down
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ CMakeUserPresets.json
*.png
*.tif
!images/*
!logo128.png

# Binary files
*.bin
Expand All @@ -75,6 +74,3 @@ CMakeUserPresets.json

# CMake build directory
build/

# VSCode
.vscode/
37 changes: 37 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"cSpell.words": [
"AHRPT",
"AMSU-A",
"AVHRR",
"backscan",
"CADU",
"CCSDS",
"CPPDU",
"deframer",
"demod",
"demuxer",
"FengYun",
"HIRS",
"HRPT",
"Imager",
"imagers",
"LeanHRPT",
"libpredict",
"LRPT",
"MetOp",
"MPDU",
"MSUMR",
"MTVZA",
"MWIR",
"NOAA",
"POES",
"shapefile",
"shapefiles",
"SWIR",
"syncword",
"VCDU",
"VCID",
"VIRR",
"Xerbo"
]
}
19 changes: 12 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)

# Generate with `find src/ | grep "\\.cpp" | sort`
file(GLOB_RECURSE CXX_SOURCE_FILES
src/commandline.cpp
src/decoders/decoder.cpp
Expand All @@ -20,9 +21,12 @@ file(GLOB_RECURSE CXX_SOURCE_FILES
src/decoders/noaa_gac.cpp
src/decoders/noaa_hrpt.cpp
src/fingerprint.cpp
src/geo/crs.cpp
src/geo/geolocation.cpp
src/geometry.cpp
src/imagecompositor.cpp
src/image/calibration.cpp
src/image/compositor.cpp
src/image/raw.cpp
src/main.cpp
src/mainwindow.cpp
src/map.cpp
Expand All @@ -35,11 +39,10 @@ file(GLOB_RECURSE CXX_SOURCE_FILES
src/protocol/lrpt/huffman.cpp
src/protocol/lrpt/jpeg.cpp
src/protocol/lrpt/packet.cpp
src/protocol/rawimage.cpp
src/protocol/repack.cpp
)
IF (WIN32)
add_executable(LeanHRPT-Decode WIN32 ${CXX_SOURCE_FILES})
add_executable(LeanHRPT-Decode WIN32 ${CXX_SOURCE_FILES} LeanHRPT-Decode.rc)
ELSE()
add_executable(LeanHRPT-Decode ${CXX_SOURCE_FILES})
ENDIF()
Expand Down Expand Up @@ -88,9 +91,9 @@ target_compile_definitions(LeanHRPT-Decode PRIVATE "VERSION=\"${VERSION}\"")
install(TARGETS LeanHRPT-Decode RUNTIME DESTINATION bin)
# Desktop file and icon
install(FILES ${CMAKE_SOURCE_DIR}/LeanHRPT-Decode.desktop DESTINATION share/applications)
install(FILES ${CMAKE_SOURCE_DIR}/logo128.png DESTINATION share/icons/hicolor/128x128/apps RENAME LeanHRPT-Decode.png)
install(FILES ${CMAKE_SOURCE_DIR}/logo128.ico DESTINATION share/icons/hicolor/128x128/apps RENAME LeanHRPT-Decode.png)
install(FILES ${CMAKE_SOURCE_DIR}/logo.svg DESTINATION share/icons/hicolor/scalable/apps RENAME LeanHRPT-Decode.svg)
configure_file(logo128.png logo128.png COPYONLY)
configure_file(logo128.ico logo128.ico COPYONLY)
configure_file(logo.svg logo.svg COPYONLY)
# Config files
install(FILES ${CMAKE_SOURCE_DIR}/projection.ini DESTINATION share/leanhrpt)
Expand Down Expand Up @@ -122,8 +125,10 @@ if (NOT VERSION STREQUAL "Unknown")
include(CPack)
endif()

find_package(Doxygen)
if (DOXYGEN_FOUND)
option(BUILD_DOXYGEN "Create HTML/LaTeX documentation with Doxygen" OFF)

if (BUILD_DOXYGEN)
find_package(Doxygen)
set(DOXYGEN_IN ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in)
set(DOXYGEN_OUT ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
configure_file(${DOXYGEN_IN} ${DOXYGEN_OUT} @ONLY)
Expand Down
12 changes: 11 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,20 @@ If you don't have a GitHub account, you can email me the patch at `xerbo (at) pr

## Coding style

The coding style of LeanHRPT is based off the [Google C++ Style Guide](https://google.github.io/styleguide/cppguide.html) with minor modifications (see `.clang-format`), in addition to this all files should use LF line endings and end in a newline.
The coding style of LeanHRPT is based off the [Google C++ Style Guide](https://google.github.io/styleguide/cppguide.html) with minor modifications (see `.clang-format`), in addition to this all files should use LF line endings and end in a newline. Use American english (i.e. color, not colour).

To automate this LeanHRPT comes with [pre-commit](https://pre-commit.com/) hooks which will enforce these rules.

### Development environment

LeanHRPT is developed with VSCode with the following extensions, while not required they may make your life easier:

- [C/C++](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools)
- [CMake Tools](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cmake-tools)
- [CMake](https://marketplace.visualstudio.com/items?itemName=twxs.cmake)
- [Code Spell Checker](https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker)
- [Clang-Format](https://marketplace.visualstudio.com/items?itemName=xaver.clang-format)

## Commit message style

- Keep titles short to prevent wrapping (descriptions exist)
Expand Down
4 changes: 2 additions & 2 deletions Doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ PROJECT_BRIEF =
# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy
# the logo to the output directory.

PROJECT_LOGO = logo128.png
PROJECT_LOGO = logo128.ico

# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
# into which the generated documentation will be written. If a relative path is
Expand Down Expand Up @@ -485,7 +485,7 @@ NUM_PROC_THREADS = 1
# normally produced when WARNINGS is set to YES.
# The default value is: NO.

EXTRACT_ALL = NO
EXTRACT_ALL = YES

# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will
# be included in the documentation.
Expand Down
1 change: 1 addition & 0 deletions LeanHRPT-Decode.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1 ICON "logo128.ico"
Loading

0 comments on commit d120491

Please sign in to comment.