Skip to content

Commit 81d96f1

Browse files
committed
Added author list to about dialog. Refactored about dialog to put dependency/licenses info in external markdown file. Fixes #861.
1 parent 259c5a0 commit 81d96f1

5 files changed

Lines changed: 110 additions & 8 deletions

File tree

src/ngscopeclient/AboutDialog.cpp

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@ AboutDialog::AboutDialog(MainWindow* parent)
5050
: Dialog("About ngscopeclient", to_string_hex(reinterpret_cast<uintptr_t>(this)), ImVec2(600, 400))
5151
, m_parent(parent)
5252
{
53+
//this file is currently maintained by hand and updated for each release
54+
//TODO: make a script for this using https://api.github.com/repos/ngscopeclient/scopehal-apps/contributors
55+
m_authorsMarkdown = ReadDataFile("md/authors.md");
56+
57+
m_licenseMarkdown = ReadDataFile("md/licenses.md");
5358
}
5459

5560
AboutDialog::~AboutDialog()
@@ -106,14 +111,13 @@ bool AboutDialog::DoRender()
106111

107112
if(ImGui::BeginTabItem("Licenses"))
108113
{
109-
string str =
110-
"This is free software: you are free to change and redistribute it.\n"
111-
"There is NO WARRANTY, to the extent permitted by law.\n"
112-
"\n"
113-
"ngscopeclient and libscopehal are released under 3-clause BSD license.\n"
114-
"TODO: add full dependency list and individual licenses here";
115-
ImGui::Markdown( str.c_str(), str.length(), mdConfig );
114+
ImGui::Markdown(m_licenseMarkdown.c_str(), m_licenseMarkdown.length(), mdConfig );
115+
ImGui::EndTabItem();
116+
}
116117

118+
if(ImGui::BeginTabItem("Authors"))
119+
{
120+
ImGui::Markdown(m_authorsMarkdown.c_str(), m_authorsMarkdown.length(), mdConfig );
117121
ImGui::EndTabItem();
118122
}
119123

src/ngscopeclient/AboutDialog.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* *
33
* ngscopeclient *
44
* *
5-
* Copyright (c) 2012-2024 Andrew D. Zonenberg and contributors *
5+
* Copyright (c) 2012-2025 Andrew D. Zonenberg and contributors *
66
* All rights reserved. *
77
* *
88
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the *
@@ -52,6 +52,9 @@ class AboutDialog : public Dialog
5252

5353
protected:
5454
MainWindow* m_parent;
55+
56+
std::string m_authorsMarkdown;
57+
std::string m_licenseMarkdown;
5558
};
5659

5760
#endif

src/ngscopeclient/CMakeLists.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,16 @@ add_custom_target(
133133
COMMENT "Copying eye masks..."
134134
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/src/ngscopeclient/masks ${CMAKE_BINARY_DIR}/src/ngscopeclient/masks)
135135

136+
add_custom_target(
137+
ngmd
138+
COMMENT "Copying markdown files..."
139+
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/src/ngscopeclient/md ${CMAKE_BINARY_DIR}/src/ngscopeclient/md)
140+
136141
add_dependencies(ngscopeclient
137142
ngfonts
138143
ngicons
139144
ngmasks
145+
ngmd
140146
ngrendershaders
141147
ngprotoshaders
142148
nghalshaders
@@ -196,6 +202,8 @@ install(DIRECTORY ${CMAKE_SOURCE_DIR}/src/ngscopeclient/masks
196202
DESTINATION share/ngscopeclient)
197203
install(DIRECTORY ${CMAKE_SOURCE_DIR}/src/ngscopeclient/shaders
198204
DESTINATION share/ngscopeclient)
205+
install(DIRECTORY ${CMAKE_SOURCE_DIR}/src/ngscopeclient/md
206+
DESTINATION share/ngscopeclient)
199207

200208
install(FILES ${CMAKE_SOURCE_DIR}/src/ngscopeclient/ngscopeclient.desktop
201209
DESTINATION share/applications)
@@ -229,6 +237,8 @@ if(WIXPATH AND WIN32)
229237
${CMAKE_SOURCE_DIR}/src/ngscopeclient/icons ${CMAKE_BINARY_DIR}/dist/ngscopeclient_windows_x64/icons
230238
COMMAND ${CMAKE_COMMAND} -E copy_directory
231239
${CMAKE_SOURCE_DIR}/src/ngscopeclient/masks ${CMAKE_BINARY_DIR}/dist/ngscopeclient_windows_x64/masks
240+
COMMAND ${CMAKE_COMMAND} -E copy_directory
241+
${CMAKE_SOURCE_DIR}/src/ngscopeclient/md ${CMAKE_BINARY_DIR}/dist/ngscopeclient_windows_x64/md
232242

233243
COMMAND ${CMAKE_COMMAND} -E copy_directory
234244
${CMAKE_BINARY_DIR}/lib/scopeprotocols/shaders ${CMAKE_BINARY_DIR}/dist/ngscopeclient_windows_x64/shaders

src/ngscopeclient/md/authors.md

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
The following is a list of all contributors to ngscopeclient, libscopehal, and libscopeprotocols, alphabetically by GitHub username.
2+
3+
* 0bs3n (sen)
4+
* 602p (Louis Goessling)
5+
* 9names
6+
* andresmanelli (Andres)
7+
* antikerneldev
8+
* attie-argentum (Attie Grande)
9+
* azonenberg (Andrew Zonenberg)
10+
* bgianfo (Brian Gianforcaro)
11+
* biswa96 (Biswapriyo Nath)
12+
* bvernoux (Benjamin Vernoux)
13+
* chille (Christian Antila)
14+
* codysseus (Cody Holliday)
15+
* craigjb (Craig Bishop)
16+
* cushychicken (Nash Reilly)
17+
* cyberpunkdre (Dre)
18+
* d235j (David Ryskalczyk)
19+
* daglem (Dag Lem)
20+
* dannas (Dan Näslund)
21+
* dizzystem
22+
* dresco (Jon Escombe)
23+
* drandyhaas (Andy Haas)
24+
* ehntoo (Mitch Johnson)
25+
* electroniceel (Electronic Eel)
26+
* erdnaxe
27+
* four0four (Galen Schretlen)
28+
* fredzo
29+
* fsedano (Francisco Sedano)
30+
* hansemro (Hansem Ro)
31+
* hansfbaier (Hans Baier)
32+
* fazs (Fabian Zboril-Schwarz)
33+
* fridtjof (Fridtjof Mund)
34+
* gherkin
35+
* iromero91 (Jose Ignacio Romero)
36+
* johnsel (John Simons)
37+
* juan-domenech (Juan Domenech Fernandez)
38+
* jwise (Joshua Wise)
39+
* kench (Kenley Cheung)
40+
* kilimnik (Daniel Kilimnik)
41+
* kliment
42+
* lainy (Lain Agan)
43+
* laminar-oss
44+
* ledvinap (Petr Ledvina)
45+
* lethalbit (Aki)
46+
* macaba
47+
* mandl
48+
* matfi
49+
* mldulaney (Mairi Dulaney)
50+
* megabytephreak
51+
* miek (Mike Walters)
52+
* mubes
53+
* mugheeschohan (Mughees Chohan)
54+
* natemeyer (Nate Meyer)
55+
* noopwafel (Alyssa Milburn)
56+
* nshcat (Alex)
57+
* pepijndevos (Pepijn de Vos)
58+
* pd0wm (William Melching)
59+
* qduff (Quentin Duff)
60+
* randomplum (Dominik Sliwa)
61+
* rroohhh (Robin Heinemann)
62+
* rx14 (Stephanie Wilde-Hobbs)
63+
* sam210723 (Sam)
64+
* sajattack (Paul Sajna)
65+
* schneider-engineering (Felix Schneider)
66+
* smunaut (Sylvain Munaut)
67+
* someone--else
68+
* spookyvision (Anatol Ulrich)
69+
* stanciuadrian (Adrian Stanciu)
70+
* tarunik
71+
* tech2077
72+
* tiltmesenpai (Joshua Koike)
73+
* tomverbeure (Tom Verbeure)
74+
* travisgoodspeed (Travis Goodspeed)
75+
* umarcor (Unai Martinez-Corral)
76+
* vipqualitypost
77+
* whitequark (Catherine)
78+
* x44203
79+
* xzcvczx

src/ngscopeclient/md/licenses.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
This is free software: you are free to change and redistribute it.
2+
There is NO WARRANTY, to the extent permitted by law.
3+
4+
ngscopeclient and libscopehal are released under 3-clause BSD license.
5+
6+
TODO: add full dependency list and individual licenses here

0 commit comments

Comments
 (0)