Skip to content

Commit dac0495

Browse files
committed
fixed gha
1 parent a31c67b commit dac0495

File tree

4 files changed

+41
-39
lines changed

4 files changed

+41
-39
lines changed

.github/workflows/cmake.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ jobs:
7979

8080
steps:
8181
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
82-
- uses: actions/checkout@v3
82+
- uses: actions/checkout@v4
8383

8484
- name: Print env
8585
run: |

THIRDPARTY.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,16 @@ License file: [querylib/getopt2.h](querylib/getopt2.h)
6060
Linking method: Static linking
6161
Distribution method: Included in CodeQuery binaries
6262

63+
winmain.cpp from gosu project
64+
-----------------------------
65+
Title: WinMain.cpp (gosu)
66+
Author: Julian Raschke, Jan Lücker, cyberarm, and all
67+
Source: https://github.com/gosu/gosu/blob/master/src/WinMain.cpp
68+
License: MIT
69+
License file: [gui/winmain.cpp](gui/winmain.cpp)
70+
Linking method: Static linking
71+
Distribution method: Included in CodeQuery binaries for Windows
72+
6373
showgraph
6474
---------
6575
Title: showgraph

gui/winmain.cpp

Lines changed: 29 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ Taken from:
66
77
This license applies only to this file:
88
9-
Copyright (C) 2001-2017 Julian Raschke, Jan Lücker and all contributors.
9+
Copyright (C) 2001-2023 Julian Raschke, Jan Lücker, cyberarm, and all
10+
other contributors: https://github.com/gosu/gosu/graphs/contributors
1011
1112
Permission is hereby granted, free of charge, to any person obtaining a
1213
copy of this software and associated documentation files (the "Software"),
@@ -27,58 +28,51 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
2728
DEALINGS IN THE SOFTWARE.
2829
2930
Julian Raschke <[email protected]> & contributors
30-
http://www.libgosu.org/
31+
https://www.libgosu.org/
3132
3233
*/
3334

3435
//#ifdef _MSC_VER
3536
#ifdef _WIN32
3637

37-
#include <windows.h>
3838
#include <exception>
3939
#include <string>
4040
#include <vector>
41+
#include <windows.h>
4142
using namespace std;
4243

43-
vector<string> splitCmdLine()
44+
vector<string> split_cmd_line()
4445
{
4546
vector<string> result;
4647

47-
const char* cmdLine = ::GetCommandLineA();
48+
const char* cmd_line = ::GetCommandLineA();
4849

49-
const char* argBegin = 0;
50-
bool isQuotedArg = false;
50+
const char* arg_begin = nullptr;
51+
bool is_quoted_arg = false;
5152

52-
while (*cmdLine)
53-
{
54-
if (*cmdLine == '"')
55-
{
56-
if (argBegin == 0)
57-
{
58-
argBegin = cmdLine + 1;
59-
isQuotedArg = true;
53+
while (*cmd_line) {
54+
if (*cmd_line == '"') {
55+
if (arg_begin == nullptr) {
56+
arg_begin = cmd_line + 1;
57+
is_quoted_arg = true;
6058
}
61-
else if (isQuotedArg)
62-
{
63-
result.push_back(std::string(argBegin, cmdLine));
64-
argBegin = 0;
59+
else if (is_quoted_arg) {
60+
result.push_back(string(arg_begin, cmd_line));
61+
arg_begin = nullptr;
6562
}
6663
}
67-
else if (!isspace((unsigned char)*cmdLine) && argBegin == 0)
68-
{
69-
argBegin = cmdLine;
70-
isQuotedArg = false;
64+
else if (!isspace((unsigned char)*cmd_line) && arg_begin == nullptr) {
65+
arg_begin = cmd_line;
66+
is_quoted_arg = false;
7167
}
72-
else if (isspace((unsigned char)*cmdLine) && argBegin != 0 && !isQuotedArg)
73-
{
74-
result.push_back(std::string(argBegin, cmdLine + 1));
75-
argBegin = 0;
68+
else if (isspace((unsigned char)*cmd_line) && arg_begin != nullptr && !is_quoted_arg) {
69+
result.push_back(string(arg_begin, cmd_line + 1));
70+
arg_begin = nullptr;
7671
}
77-
++cmdLine;
72+
++cmd_line;
7873
}
7974

80-
if (argBegin != 0)
81-
result.push_back(argBegin);
75+
if (arg_begin != 0) result.push_back(arg_begin);
8276

8377
return result;
8478
}
@@ -87,20 +81,18 @@ int main(int argc, char* argv[]);
8781

8882
int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
8983
{
90-
try
91-
{
92-
vector<string> arguments = splitCmdLine();
84+
try {
85+
vector<string> arguments = split_cmd_line();
9386
vector<char*> argv(arguments.size());
94-
for (unsigned i = 0; i < argv.size(); ++i)
87+
for (unsigned i = 0; i < argv.size(); ++i) {
9588
argv[i] = const_cast<char*>(arguments[i].c_str());
89+
}
9690
return main(argv.size(), &argv[0]);
9791
}
98-
catch (const std::exception& e)
99-
{
92+
catch (const exception& e) {
10093
::MessageBoxA(0, e.what(), "Uncaught Exception", MB_OK | MB_ICONERROR);
10194
return EXIT_FAILURE;
10295
}
10396
}
10497

10598
#endif
106-

windows-install/qt6/buildqt6.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ cd output
99
windeployqt --release codequery.exe
1010
dir/b/a/s
1111
candle.exe -ext WixUIExtension -ext WixUtilExtension "c:\workspace\codequery\windows-install\qt6\codequeryqt690.wxs"
12-
light.exe -ext WixUIExtension -ext WixUtilExtension codequeryqt671.wixobj
12+
light.exe -ext WixUIExtension -ext WixUtilExtension codequeryqt690.wixobj

0 commit comments

Comments
 (0)