-
Notifications
You must be signed in to change notification settings - Fork 17
Linux support #95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Linux support #95
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds Linux support by introducing pkgconfig files, shell scripts, project updates, and CI workflows to build and package the Graphviz wrapper on both Windows and Linux.
- Added Linux pkgconfig files and gvmap pipeline script.
- Refactored project/solution files to target Linux with clang++, added STRDUP macro and cross-platform header guard.
- Introduced GitHub Actions workflows for Windows/Linux builds and multi-OS packaging.
Reviewed Changes
Copilot reviewed 114 out of 114 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
GraphvizWrapper/graphvizfiles/linux/pkgconfig/*.pc | Added pkgconfig definitions for various Graphviz libraries. |
GraphvizWrapper/graphvizfiles/linux/gvmap.sh | Added shell script for the gvmap pipeline on Linux. |
GraphvizWrapper/graphvizfiles/linux/graphviz/config6 | Added generated Graphviz plugin configuration for Linux. |
GraphvizWrapper/Test.cpp & Main.cpp | Switched _strdup to STRDUP , adjusted return types, added agclose_repro , and improved cleanup. |
GraphvizWrapper/GraphvizWrapper.h | Introduced STRDUP macro, API export macro, and cross-platform adjustments. |
GraphvizWrapper/GraphvizWrapper.vcxproj | Reworked project file to build on Windows and Linux in one file. |
ConsoleApplication/ConsoleApplication.* | Updated to use GraphvizWrapper via dynamic linking on Linux and Windows; made input/output portable. |
.github/workflows/{win-build.yml,linux-build.yml,ci-pack.yml,checks.yml} | Added CI workflows for building, testing, and packaging on Windows and Linux. |
.gitignore | Extended ignore patterns to cover RPM, DEB, SVG and binary folders. |
Comments suppressed due to low confidence (2)
.github/workflows/win-build.yml:19
- [nitpick] The workflow is using
actions/checkout@v1
, which is outdated. Consider updating toactions/checkout@v3
for better performance and compatibility.
- - uses: actions/checkout@v1
GraphvizWrapper/GraphvizWrapper.h:8
- On POSIX builds
STRDUP
maps tostrdup
, but<cstring>
(or<string.h>
) is not included, leading to implicit declaration errors. Consider adding#include <cstring>
under the non-Windows branch.
#ifdef _WIN32
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Enables Linux support alongside existing Windows build by adding Linux pkgconfig files, shell scripts, cross-platform build targets, and CI workflows.
- Added Linux pkgconfig (
.pc
) files and agvmap.sh
pipeline script - Refactored string duplication routines to use a cross-platform
STRDUP
macro and improved const-correctness - Extended MSBuild projects and GitHub Actions workflows to build, test, and package on both Windows and Linux
Reviewed Changes
Copilot reviewed 117 out of 117 changed files in this pull request and generated 3 comments.
Show a summary per file
File(s) | Description |
---|---|
GraphvizWrapper/graphvizfiles/linux/pkgconfig/*.pc | New pkgconfig entries for Graphviz libraries on Linux |
GraphvizWrapper/graphvizfiles/linux/gvmap.sh | Shell script for gvmap pipeline |
GraphvizWrapper/Test.cpp, Main.cpp | Swapped _strdup for STRDUP macro; added Linux test case |
GraphvizWrapper/GraphvizWrapper.h | Introduced STRDUP and API macros for cross-platform export |
GraphvizWrapper/GraphvizWrapper.vcxproj | Combined Windows/Linux build targets with conditional MSBuild imports |
ConsoleApplication/*.vcxproj, ConsoleApplication.cpp | Updated console app for multi-OS, replaced _getch with cin.get() |
.github/workflows/*.yml | Added separate Windows/Linux build and packaging workflows |
GraphvizWrapper/.gitignore, ConsoleApplication/.gitignore | Updated ignore patterns for build artifacts |
Comments suppressed due to low confidence (3)
GraphvizWrapper/Test.cpp:112
- [nitpick] Test functions use different naming patterns (
test_agread
vsmissing_label_repro
). Consider prefixing all test functions withtest_
for consistency.
int missing_label_repro() {
GraphvizWrapper/GraphvizWrapper.h:9
- Missing include for
<cstring>
(or<string.h>
). Add#include <cstring>
to ensurestrdup
and related C-string functions are declared.
#define STRDUP _strdup
GraphvizWrapper/graphvizfiles/linux/gvmap.sh:12
- [nitpick] Indentation is inconsistent (mix of spaces and tabs). Normalize to a single style for better readability.
LAYOUT=sfdp
Uh oh!
There was an error while loading. Please reload this page.