Skip to content

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

Open
wants to merge 91 commits into
base: master
Choose a base branch
from
Open

Linux support #95

wants to merge 91 commits into from

Conversation

chtenb
Copy link
Member

@chtenb chtenb commented Dec 20, 2024

  • Create issue to add nuget.org tests for linux and windows
  • Add debug symbols nuget package

@chtenb chtenb marked this pull request as ready for review May 19, 2025 14:23
@chtenb chtenb requested a review from Copilot May 19, 2025 14:24
Copy link

@Copilot Copilot AI left a 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 to actions/checkout@v3 for better performance and compatibility.
-    - uses: actions/checkout@v1

GraphvizWrapper/GraphvizWrapper.h:8

  • On POSIX builds STRDUP maps to strdup, but <cstring> (or <string.h>) is not included, leading to implicit declaration errors. Consider adding #include <cstring> under the non-Windows branch.
#ifdef _WIN32

@chtenb chtenb requested a review from Copilot May 20, 2025 13:45
Copy link

@Copilot Copilot AI left a 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 a gvmap.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 vs missing_label_repro). Consider prefixing all test functions with test_ for consistency.
int missing_label_repro() {

GraphvizWrapper/GraphvizWrapper.h:9

  • Missing include for <cstring> (or <string.h>). Add #include <cstring> to ensure strdup 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant