From 4a29ec81149c2b3ebec7b0f110e35ed798b9b3fa Mon Sep 17 00:00:00 2001 From: kcleal Date: Fri, 23 Feb 2024 15:01:45 +0000 Subject: [PATCH] Added shared library build option --- Makefile | 14 ++++++++++++++ docs/docs/install/Windows.md | 2 -- src/plot_controls.cpp | 1 + src/plot_manager.cpp | 2 +- 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 1de54bb..ca0066d 100644 --- a/Makefile +++ b/Makefile @@ -135,3 +135,17 @@ $(TARGET): $(OBJECTS) clean: -rm -f *.o ./src/*.o ./src/*.o.tmp ./lib/libBigWig/*.o -rm -f $(TARGET) + -rm -rf libgw + + +SHARED_TARGET = libgw/libgw.so +ifeq ($(PLATFORM),"Darwin") + SHARED_TARGET = libgw/libgw.dylib +endif + +shared: CXXFLAGS += -fPIC +shared: $(OBJECTS) + -mkdir -p libgw/include + -cp src/*.h libgw/include + -cp include/*.h libgw/include + $(CXX) $(OBJECTS) $(LDFLAGS) $(LDLIBS) -shared -o $(SHARED_TARGET) diff --git a/docs/docs/install/Windows.md b/docs/docs/install/Windows.md index 9e234ba..f664607 100644 --- a/docs/docs/install/Windows.md +++ b/docs/docs/install/Windows.md @@ -27,8 +27,6 @@ Download the GW installer script below: [GW Intel x86_64 Windows installer](https://github.com/kcleal/gw/releases/download/v0.9.3/gw-windows-installer.vbs) -[GW Intel x86_64 Windows installer](https://github.com/kcleal/gw/releases/download/v0.9.2/gw-windows-installer.vbs) - Run the downloaded visual-basic script by double-clicking, or right-clicking and selecting Run as program. The script will install GW, add a shortcut to GW in the Start Menu and put GW on your PATH. This means GW diff --git a/src/plot_controls.cpp b/src/plot_controls.cpp index 39976e4..32780a1 100644 --- a/src/plot_controls.cpp +++ b/src/plot_controls.cpp @@ -1816,6 +1816,7 @@ namespace Manager { tracks.push_back(HGW::GwTrack()); try { tracks.back().open(pth, true); + tracks.back().variant_distance = &opts.variant_distance; std::cout << termcolor::magenta << "\nTrack " << termcolor::reset << pth << "\n"; } catch (...) { tracks.pop_back(); diff --git a/src/plot_manager.cpp b/src/plot_manager.cpp index 8d3ac8c..e63434f 100644 --- a/src/plot_manager.cpp +++ b/src/plot_manager.cpp @@ -878,7 +878,7 @@ namespace Manager { SkPaint cog_paint = opts.theme.lcBright; cog_paint.setAntiAlias(true); - cog_paint.setStrokeWidth(6); + cog_paint.setStrokeWidth(3 * monitorScale); cog_paint.setStyle(SkPaint::kStrokeAndFill_Style); canvas->drawCircle(15 * monitorScale, half_h - 12.5 * monitorScale, 5 * monitorScale, cog_paint);