g/j2: Integrate highscores with Speedrun.com/JakSpeedruns.com when speedrunner mode is enabled (#3037)
This commit is contained in:
parent
97e04a7612
commit
8b3b96761d
|
|
@ -37,7 +37,7 @@ jobs:
|
||||||
sudo apt install build-essential cmake \
|
sudo apt install build-essential cmake \
|
||||||
clang gcc g++ lcov make nasm libxrandr-dev \
|
clang gcc g++ lcov make nasm libxrandr-dev \
|
||||||
libxinerama-dev libxcursor-dev libpulse-dev \
|
libxinerama-dev libxcursor-dev libpulse-dev \
|
||||||
libxi-dev zip ninja-build libgl1-mesa-dev
|
libxi-dev zip ninja-build libgl1-mesa-dev libssl-dev
|
||||||
|
|
||||||
- name: Setup Buildcache
|
- name: Setup Buildcache
|
||||||
uses: mikehardy/buildcache-action@v2.1.0
|
uses: mikehardy/buildcache-action@v2.1.0
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ jobs:
|
||||||
sudo apt install build-essential cmake \
|
sudo apt install build-essential cmake \
|
||||||
clang gcc g++ lcov make nasm libxrandr-dev \
|
clang gcc g++ lcov make nasm libxrandr-dev \
|
||||||
libxinerama-dev libxcursor-dev libpulse-dev \
|
libxinerama-dev libxcursor-dev libpulse-dev \
|
||||||
libxi-dev zip ninja-build libgl1-mesa-dev
|
libxi-dev zip ninja-build libgl1-mesa-dev libssl-dev
|
||||||
|
|
||||||
- name: Setup Buildcache
|
- name: Setup Buildcache
|
||||||
uses: mikehardy/buildcache-action@v2.1.0
|
uses: mikehardy/buildcache-action@v2.1.0
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ endif()
|
||||||
# For clangd
|
# For clangd
|
||||||
if (EXISTS "${CMAKE_CURRENT_BINARY_DIR}/compile_commands.json" )
|
if (EXISTS "${CMAKE_CURRENT_BINARY_DIR}/compile_commands.json" )
|
||||||
configure_file(
|
configure_file(
|
||||||
"${CMAKE_CURRENT_BINARY_DIR}/compile_commands.json"
|
"${CMAKE_CURRENT_BINARY_DIR}/compile_commands.json"
|
||||||
"${PROJECT_SOURCE_DIR}/build/compile_commands.json")
|
"${PROJECT_SOURCE_DIR}/build/compile_commands.json")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
@ -183,6 +183,23 @@ include_directories(./)
|
||||||
# build templating engine library
|
# build templating engine library
|
||||||
include_directories(SYSTEM third-party/inja)
|
include_directories(SYSTEM third-party/inja)
|
||||||
|
|
||||||
|
# libcurl for HTTP requests
|
||||||
|
|
||||||
|
# Enable SSL Support, most URLs now-a-days use SSL!
|
||||||
|
if(WIN32)
|
||||||
|
set(CURL_USE_SCHANNEL ON) # native Windows SSL support
|
||||||
|
elseif(APPLE)
|
||||||
|
set(CURL_USE_SECTRANSP ON) # native macOS SSL support
|
||||||
|
else()
|
||||||
|
set(CURL_USE_OPENSSL ON) # not native, but seems to be the best choice for linux
|
||||||
|
endif()
|
||||||
|
include_directories(third-party/curl/include)
|
||||||
|
if(STATICALLY_LINK)
|
||||||
|
build_third_party_lib(curl libcurl_static)
|
||||||
|
else()
|
||||||
|
build_third_party_lib(curl libcurl_shared)
|
||||||
|
endif()
|
||||||
|
|
||||||
# build repl library
|
# build repl library
|
||||||
build_third_party_lib(replxx replxx)
|
build_third_party_lib(replxx replxx)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -133,7 +133,7 @@ Unfortunately you'll still need task runner on your local machine to run the gam
|
||||||
Install packages and init repository:
|
Install packages and init repository:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
sudo apt install gcc make cmake build-essential g++ nasm clang-format libxrandr-dev libxinerama-dev libxcursor-dev libpulse-dev libxi-dev python libgl1-mesa-dev
|
sudo apt install gcc make cmake build-essential g++ nasm clang-format libxrandr-dev libxinerama-dev libxcursor-dev libpulse-dev libxi-dev python libgl1-mesa-dev libssl-dev
|
||||||
sudo sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b /usr/local/bin
|
sudo sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b /usr/local/bin
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -73,6 +73,15 @@ std::string strip_cpp_style_comments(const std::string& input) {
|
||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::optional<nlohmann::json> safe_parse_json(const std::string& input) {
|
||||||
|
json j = json::parse(input, nullptr, false);
|
||||||
|
if (j.is_discarded()) {
|
||||||
|
lg::error("Failed to parse json");
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
return j;
|
||||||
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Parse JSON file with comments stripped. Unlike the default comment stripping feature
|
* Parse JSON file with comments stripped. Unlike the default comment stripping feature
|
||||||
* of nlohmann::json, this allows you to have multiple comments in a row!
|
* of nlohmann::json, this allows you to have multiple comments in a row!
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@
|
||||||
using json = nlohmann::json;
|
using json = nlohmann::json;
|
||||||
|
|
||||||
std::string strip_cpp_style_comments(const std::string& input);
|
std::string strip_cpp_style_comments(const std::string& input);
|
||||||
|
std::optional<nlohmann::json> safe_parse_json(const std::string& input);
|
||||||
nlohmann::json parse_commented_json(const std::string& input, const std::string& source_name);
|
nlohmann::json parse_commented_json(const std::string& input, const std::string& source_name);
|
||||||
Range<int> parse_json_optional_integer_range(const nlohmann::json& json);
|
Range<int> parse_json_optional_integer_range(const nlohmann::json& json);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6800,6 +6800,26 @@
|
||||||
(progress-highscores-6th #x13c)
|
(progress-highscores-6th #x13c)
|
||||||
(progress-highscores-7th #x13d)
|
(progress-highscores-7th #x13d)
|
||||||
(progress-highscores-8th #x13e)
|
(progress-highscores-8th #x13e)
|
||||||
|
(progress-highscores-header-race #x13f)
|
||||||
|
(progress-highscores-subheader-class1 #x140)
|
||||||
|
(progress-highscores-subheader-class2 #x141)
|
||||||
|
(progress-highscores-subheader-class3 #x142)
|
||||||
|
(progress-highscores-header-guncourse #x143)
|
||||||
|
(progress-highscores-subheader-scattergun #x144)
|
||||||
|
(progress-highscores-subheader-blaster #x145)
|
||||||
|
(progress-highscores-subheader-vulcan #x146)
|
||||||
|
(progress-highscores-subheader-peacemaker #x147)
|
||||||
|
(progress-highscores-header-onin #x148)
|
||||||
|
(progress-highscores-header-metalhead-mash #x149)
|
||||||
|
(progress-highscores-header-jetboard #x14a)
|
||||||
|
(progress-highscores-subheader-oninstent #x14b)
|
||||||
|
(progress-highscores-subheader-hiphog #x14c)
|
||||||
|
(progress-highscores-subheader-stadium #x14d)
|
||||||
|
(progress-highscores-subheader-class1-reverse #x14e)
|
||||||
|
(progress-highscores-subheader-class2-reverse #x14f)
|
||||||
|
(progress-highscores-subheader-class3-reverse #x150)
|
||||||
|
(progress-highscores-subheader-portrace #x151)
|
||||||
|
(progress-highscores-subheader-cityrace #x152)
|
||||||
(progress-root-secrets #x153)
|
(progress-root-secrets #x153)
|
||||||
(progress-secrets-unlocked #x154)
|
(progress-secrets-unlocked #x154)
|
||||||
(progress-secrets-toggle-beard #x0155)
|
(progress-secrets-toggle-beard #x0155)
|
||||||
|
|
@ -7391,6 +7411,14 @@
|
||||||
(progress-hires-sky #x1309)
|
(progress-hires-sky #x1309)
|
||||||
(progress-fast-airlock #x130a)
|
(progress-fast-airlock #x130a)
|
||||||
(progress-fast-elevator #x130b)
|
(progress-fast-elevator #x130b)
|
||||||
|
(progress-highscores-header-speedrun #x130c)
|
||||||
|
(progress-highscores-subheader-speedrun-any #x130d)
|
||||||
|
(progress-highscores-subheader-speedrun-anyhoverless #x130e)
|
||||||
|
(progress-highscores-subheader-speedrun-allmissions #x130f)
|
||||||
|
(progress-highscores-subheader-speedrun-100 #x1310)
|
||||||
|
(progress-highscores-subheader-speedrun-anyorbs #x1311)
|
||||||
|
(progress-highscores-subheader-speedrun-anyhero #x1312)
|
||||||
|
(progress-highscores-local-time #x1313)
|
||||||
)
|
)
|
||||||
;; ---text-id-h:text-id
|
;; ---text-id-h:text-id
|
||||||
|
|
||||||
|
|
@ -31306,23 +31334,27 @@
|
||||||
(function int none))
|
(function int none))
|
||||||
(define-extern find-mission-text-at-index (function int game-task-node-info))
|
(define-extern find-mission-text-at-index (function int game-task-node-info))
|
||||||
(define-extern draw-secret-list (function secret-item-option progress font-context int symbol float none))
|
(define-extern draw-secret-list (function secret-item-option progress font-context int symbol float none))
|
||||||
(define-extern draw-highscore-icon (function menu-highscores-option uint int int float pointer))
|
(define-extern draw-highscore-icon (function menu-highscores-option texture-id int int float pointer))
|
||||||
(define-extern draw-highscore-cup "First int is an enum" (function menu-highscores-option int int int float float pointer))
|
(define-extern draw-highscore-cup "First int is an enum" (function menu-highscores-option int int int float float pointer))
|
||||||
(define-extern get-highscore-score "TODO - takes and returns an enum?" (function int int))
|
(define-extern get-highscore-score (function int int))
|
||||||
(define-extern eval-highscore (function print-highscore-obj int))
|
(define-extern eval-highscore (function print-highscore-obj int))
|
||||||
(define-extern str-print-time (function float string))
|
(define-extern str-print-time (function float string))
|
||||||
(define-extern print-highscore (function print-highscore-obj float))
|
(define-extern print-highscore (function print-highscore-obj float))
|
||||||
(define-extern get-highscore-text "TODO - takes an enum?" (function int text-id))
|
(define-extern get-highscore-text (function int text-id))
|
||||||
(define-extern get-highscore-text-sub "TODO - takes an enum?" (function int text-id))
|
(define-extern get-highscore-text-sub (function int text-id))
|
||||||
(define-extern get-highscore-icon "TODO - Icon id enum perhaps?" (function int uint))
|
(define-extern get-highscore-icon (function int texture-id))
|
||||||
(define-extern get-highscore-type "TODO - takes an enum?" (function int symbol))
|
(define-extern get-highscore-type
|
||||||
|
"Given a highscore index, return it's type as a symbol
|
||||||
|
@param highscore-index-arg something
|
||||||
|
@returns The type, as as symbol. Either `'game` or `'race`"
|
||||||
|
(function int symbol))
|
||||||
(define-extern highscore-available? (function int symbol))
|
(define-extern highscore-available? (function int symbol))
|
||||||
(define-extern get-num-highscores (function int))
|
(define-extern get-num-highscores (function int))
|
||||||
(define-extern get-next-highscore (function int int))
|
(define-extern get-next-highscore (function int int))
|
||||||
(define-extern get-prev-highscore (function int int))
|
(define-extern get-prev-highscore (function int int))
|
||||||
(define-extern get-highscore-icon-scale "TODO - takes an enum?" (function int float))
|
(define-extern get-highscore-icon-scale (function int float))
|
||||||
(define-extern get-highscore-icon-xoffset (function int int))
|
(define-extern get-highscore-icon-xoffset (function int int))
|
||||||
(define-extern get-highscore-icon-yoffset "TODO - takes an enum?" (function int int))
|
(define-extern get-highscore-icon-yoffset (function int int))
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;; ocean ;;
|
;; ocean ;;
|
||||||
|
|
|
||||||
|
|
@ -301,11 +301,11 @@
|
||||||
["L939", "uint64", true],
|
["L939", "uint64", true],
|
||||||
["L940", "uint64", true],
|
["L940", "uint64", true],
|
||||||
["L941", "uint64", true],
|
["L941", "uint64", true],
|
||||||
["L942", "uint64", true],
|
["L942", "texture-id", true],
|
||||||
["L943", "uint64", true],
|
["L943", "uint64", true],
|
||||||
["L944", "uint64", true],
|
["L944", "uint64", true],
|
||||||
["L945", "uint64", true],
|
["L945", "uint64", true],
|
||||||
["L946", "uint64", true],
|
["L946", "texture-id", true],
|
||||||
["L947", "uint64", true],
|
["L947", "uint64", true],
|
||||||
["L948", "uint64", true],
|
["L948", "uint64", true],
|
||||||
["L949", "uint64", true],
|
["L949", "uint64", true],
|
||||||
|
|
@ -314,7 +314,7 @@
|
||||||
["L952", "uint64", true],
|
["L952", "uint64", true],
|
||||||
["L953", "uint64", true],
|
["L953", "uint64", true],
|
||||||
["L954", "uint64", true],
|
["L954", "uint64", true],
|
||||||
["L955", "uint64", true],
|
["L955", "texture-id", true],
|
||||||
["L956", "uint64", true],
|
["L956", "uint64", true],
|
||||||
["L957", "uint64", true],
|
["L957", "uint64", true],
|
||||||
["L958", "uint64", true],
|
["L958", "uint64", true],
|
||||||
|
|
@ -325,7 +325,7 @@
|
||||||
["L963", "uint64", true],
|
["L963", "uint64", true],
|
||||||
["L964", "uint64", true],
|
["L964", "uint64", true],
|
||||||
["L965", "uint64", true],
|
["L965", "uint64", true],
|
||||||
["L966", "uint64", true],
|
["L966", "texture-id", true],
|
||||||
["L967", "uint64", true],
|
["L967", "uint64", true],
|
||||||
["L968", "uint64", true],
|
["L968", "uint64", true],
|
||||||
["L969", "uint64", true],
|
["L969", "uint64", true],
|
||||||
|
|
@ -336,18 +336,18 @@
|
||||||
["L974", "uint64", true],
|
["L974", "uint64", true],
|
||||||
["L975", "uint64", true],
|
["L975", "uint64", true],
|
||||||
["L976", "uint64", true],
|
["L976", "uint64", true],
|
||||||
["L977", "uint64", true],
|
["L977", "texture-id", true],
|
||||||
["L978", "uint64", true],
|
["L978", "uint64", true],
|
||||||
["L979", "uint64", true],
|
["L979", "uint64", true],
|
||||||
["L980", "uint64", true],
|
["L980", "uint64", true],
|
||||||
["L981", "uint64", true],
|
["L981", "uint64", true],
|
||||||
["L982", "uint64", true],
|
["L982", "texture-id", true],
|
||||||
["L983", "uint64", true],
|
["L983", "uint64", true],
|
||||||
["L984", "uint64", true],
|
["L984", "uint64", true],
|
||||||
["L985", "uint64", true],
|
["L985", "uint64", true],
|
||||||
["L986", "uint64", true],
|
["L986", "uint64", true],
|
||||||
["L987", "uint64", true],
|
["L987", "uint64", true],
|
||||||
["L988", "uint64", true],
|
["L988", "texture-id", true],
|
||||||
["L989", "uint64", true],
|
["L989", "uint64", true],
|
||||||
["L990", "uint64", true],
|
["L990", "uint64", true],
|
||||||
["L991", "uint64", true],
|
["L991", "uint64", true],
|
||||||
|
|
@ -359,7 +359,7 @@
|
||||||
["L997", "uint64", true],
|
["L997", "uint64", true],
|
||||||
["L998", "uint64", true],
|
["L998", "uint64", true],
|
||||||
["L999", "uint64", true],
|
["L999", "uint64", true],
|
||||||
["L1000", "uint64", true],
|
["L1000", "texture-id", true],
|
||||||
["L1001", "uint64", true],
|
["L1001", "uint64", true],
|
||||||
["L1002", "uint64", true],
|
["L1002", "uint64", true],
|
||||||
["L1003", "uint64", true],
|
["L1003", "uint64", true],
|
||||||
|
|
|
||||||
|
|
@ -4508,5 +4508,122 @@
|
||||||
"vars": {
|
"vars": {
|
||||||
"v0-2": ["result", "draw-string-result"]
|
"v0-2": ["result", "draw-string-result"]
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"get-num-highscores": {
|
||||||
|
"vars": {
|
||||||
|
"gp-0": "count",
|
||||||
|
"s5-0": "max-highscores"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"highscore-available?": {
|
||||||
|
"args": ["highscore-index"],
|
||||||
|
"vars": {
|
||||||
|
"v0-0": "available?",
|
||||||
|
"v1-0": "index"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"get-next-highscore": {
|
||||||
|
"args": ["current-highscore-index"],
|
||||||
|
"vars": {
|
||||||
|
"s3-0": "index-change",
|
||||||
|
"s4-0": "max-highscores",
|
||||||
|
"gp-0": "selected-index",
|
||||||
|
"s2-0": "curr-index"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"get-prev-highscore": {
|
||||||
|
"vars": {
|
||||||
|
"s4-0": "max-highscores",
|
||||||
|
"s3-0": "index-change",
|
||||||
|
"gp-0": "selected-index",
|
||||||
|
"s2-0": "curr-index",
|
||||||
|
"t9-0": "highscore-available-fn",
|
||||||
|
"a0-1": "normalized-index"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"(method 10 menu-highscores-option)": {
|
||||||
|
"args": ["this", "progress", "font-ctx", "option-index", "selected?"]
|
||||||
|
},
|
||||||
|
"get-highscore-type": {
|
||||||
|
"args": ["highscore-index-arg"],
|
||||||
|
"vars": {
|
||||||
|
"v1-0": "highscore-index",
|
||||||
|
"v0-0": "highscore-type"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"get-highscore-icon": {
|
||||||
|
"args": ["highscore-index-arg"],
|
||||||
|
"vars": {
|
||||||
|
"v0-0": "texture",
|
||||||
|
"v1-1": "highscore-index"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"get-highscore-text": {
|
||||||
|
"args": ["highscore-index"],
|
||||||
|
"vars": {
|
||||||
|
"v1-0": "index",
|
||||||
|
"v0-0": "text-id"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"get-highscore-text-sub": {
|
||||||
|
"args": ["highscore-index"],
|
||||||
|
"vars": {
|
||||||
|
"v0-0": "id",
|
||||||
|
"v1-0": "index"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"get-highscore-icon-scale": {
|
||||||
|
"args": ["highscore-index"],
|
||||||
|
"vars": {
|
||||||
|
"f0-0": "scale",
|
||||||
|
"f2-0": "guncourse-scale",
|
||||||
|
"f1-0": "race-scale"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"get-highscore-icon-xoffset": {
|
||||||
|
"args": ["highscore-index"]
|
||||||
|
},
|
||||||
|
"get-highscore-icon-yoffset": {
|
||||||
|
"args": ["highscore-index"],
|
||||||
|
"vars": {
|
||||||
|
"v0-1": "offset",
|
||||||
|
"a0-1": "guncourse-offset",
|
||||||
|
"v1-0": "race-offset"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"str-print-time": {
|
||||||
|
"args": ["time"],
|
||||||
|
"vars": {
|
||||||
|
"gp-0": "minutes",
|
||||||
|
"v1-5": "remainder-minutes",
|
||||||
|
"s5-0": "seconds",
|
||||||
|
"v1-6": "remainder-seconds",
|
||||||
|
"s3-0": "milliseconds"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"draw-highscore-cup": {
|
||||||
|
"args": ["highscore-option", "arg1", "arg2", "arg3", "arg4", "arg5"]
|
||||||
|
},
|
||||||
|
"eval-highscore": {
|
||||||
|
"args": ["print-highscore-info"]
|
||||||
|
},
|
||||||
|
"get-highscore-score": {
|
||||||
|
"args": ["highscore-index"],
|
||||||
|
"vars": {
|
||||||
|
"v1-0": "index",
|
||||||
|
"v0-0": "score-array-index"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"(method 9 highscore-info)": {
|
||||||
|
"args": ["this", "score"],
|
||||||
|
"vars": {
|
||||||
|
"v0-0": "place"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"(method 9 menu-highscores-option)": {
|
||||||
|
"args": ["this", "progress", "selected?"],
|
||||||
|
"vars": {
|
||||||
|
"s5-0": "play-sound?"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -222,6 +222,7 @@ set(RUNTIME_SOURCE
|
||||||
sce/sif_ee.cpp
|
sce/sif_ee.cpp
|
||||||
sce/stubs.cpp
|
sce/stubs.cpp
|
||||||
settings/settings.cpp
|
settings/settings.cpp
|
||||||
|
system/background_worker.cpp
|
||||||
system/Deci2Server.cpp
|
system/Deci2Server.cpp
|
||||||
system/hid/devices/game_controller.cpp
|
system/hid/devices/game_controller.cpp
|
||||||
system/hid/devices/keyboard.cpp
|
system/hid/devices/keyboard.cpp
|
||||||
|
|
@ -246,7 +247,7 @@ add_subdirectory(sound)
|
||||||
# we build the runtime as a static library.
|
# we build the runtime as a static library.
|
||||||
add_library(runtime STATIC ${RUNTIME_SOURCE} "../third-party/glad/src/glad.c")
|
add_library(runtime STATIC ${RUNTIME_SOURCE} "../third-party/glad/src/glad.c")
|
||||||
|
|
||||||
target_link_libraries(runtime common fmt SDL2::SDL2 imgui discord-rpc sound stb_image libco)
|
target_link_libraries(runtime common fmt SDL2::SDL2 imgui discord-rpc sound stb_image libco libcurl)
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
target_link_libraries(runtime mman)
|
target_link_libraries(runtime mman)
|
||||||
else()
|
else()
|
||||||
|
|
|
||||||
|
|
@ -150,5 +150,13 @@
|
||||||
"1308": "Unknown",
|
"1308": "Unknown",
|
||||||
"1309": "High-Resolution Sky",
|
"1309": "High-Resolution Sky",
|
||||||
"130a": "Fast Airlocks and Doors",
|
"130a": "Fast Airlocks and Doors",
|
||||||
"130b": "Fast Elevators"
|
"130b": "Fast Elevators",
|
||||||
|
"130c": "Speedrun",
|
||||||
|
"130d": "Any%",
|
||||||
|
"130e": "Any% - Hoverless",
|
||||||
|
"130f": "All Missions",
|
||||||
|
"1310": "100%",
|
||||||
|
"1311": "Any% - All Orbs",
|
||||||
|
"1312": "Any% - Hero Mode",
|
||||||
|
"1313": "Local Time"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -705,65 +705,355 @@ u32 alloc_vagdir_names(u32 heap_sym) {
|
||||||
return s7.offset;
|
return s7.offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
// std::vector<std::string> valid_levels = {
|
|
||||||
// "default-level", "intro", "demo", "title", "vinroom", "drillmid", "drill",
|
|
||||||
// "drillb", "drillmtn", "sewer", "sewerb", "sewer", "sewescb", "tomba",
|
|
||||||
// "tombb", "tombc", "tombd", "tombe", "tombext", "tombboss", "under",
|
|
||||||
// "underb", "palcab", "palshaft", "palboss", "palroof", "palout", "throne",
|
|
||||||
// "palent", "prison", "forexita", "forexitb", "forresca", "forrescb", "fordumpa",
|
|
||||||
// "fordumpb", "fordumpc", "fordumpd", "strip", "ruins", "sagehut", "atoll",
|
|
||||||
// "atollext", "mountain", "mtnext", "forest", "forestb", "mincan", "ctywide",
|
|
||||||
// "ctykora", "ctyasha", "ctygena", "ctygenb", "ctygenc", "ctysluma", "ctyslumb",
|
|
||||||
// "ctyslumc", "ctyport", "ctyfarma", "ctyfarmb", "ctyinda", "consite", "consiteb",
|
|
||||||
// "ctyindb", "ctymarka", "ctymarkb", "ctypal", "stadium", "stadiumb", "stadiumc",
|
|
||||||
// "stadiumd", "skatea", "garage", "stadblmp", "onintent", "kiosk", "oracle",
|
|
||||||
// "hideout", "hiphog", "gungame", "dig1", "dig3a", "dig3b", "caspad",
|
|
||||||
// "castle", "casboss", "casext", "cascity", "village1", "introcst", "nest",
|
|
||||||
// "nestb", "outrocst", "portwall", "island1", "skatepark", "halfpipe", "vistest",
|
|
||||||
// "woodstest", "tobytest", "chartest", "dptest", "ctyfence", "4aaron", "4pal01",
|
|
||||||
// "andrew01", "bsbs", "eitest", "miketest", "tatetest", "teststdc", "teststdd",
|
|
||||||
// "wasall", "stadocc"};
|
|
||||||
//
|
|
||||||
// std::vector<std::string> levels_dumped_lights = {};
|
|
||||||
// std::vector<std::string> levels_dumped_regions = {};
|
|
||||||
// std::vector<std::string> levels_dumped_samples = {};
|
|
||||||
|
|
||||||
inline u64 bool_to_symbol(const bool val) {
|
inline u64 bool_to_symbol(const bool val) {
|
||||||
return val ? static_cast<u64>(s7.offset) + true_symbol_offset(g_game_version) : s7.offset;
|
return val ? static_cast<u64>(s7.offset) + true_symbol_offset(g_game_version) : s7.offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
// u64 pc_has_level_been_dumped_lights(u32 level_name_str) {
|
// TODO - move to common
|
||||||
// auto level_name = std::string(Ptr<String>(level_name_str).c()->data());
|
|
||||||
//
|
|
||||||
// for (const auto& level : levels_dumped_lights) {
|
|
||||||
// if (level == level_name) {
|
|
||||||
// return bool_to_symbol(true);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// levels_dumped_lights.push_back(level_name);
|
|
||||||
// return bool_to_symbol(false);
|
|
||||||
//}
|
|
||||||
//
|
|
||||||
// u64 pc_has_level_been_dumped_regions(u32 level_name_str) {
|
|
||||||
// auto level_name = std::string(Ptr<String>(level_name_str).c()->data());
|
|
||||||
//
|
|
||||||
// for (const auto& level : levels_dumped_regions) {
|
|
||||||
// if (level == level_name) {
|
|
||||||
// return bool_to_symbol(true);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// levels_dumped_regions.push_back(level_name);
|
|
||||||
// return bool_to_symbol(false);
|
|
||||||
//}
|
|
||||||
|
|
||||||
void encode_utf8_string(u32 src_str_ptr, u32 str_dest_ptr) {
|
void encode_utf8_string(u32 src_str_ptr, u32 str_dest_ptr) {
|
||||||
auto str = std::string(Ptr<String>(src_str_ptr).c()->data());
|
auto str = std::string(Ptr<String>(src_str_ptr).c()->data());
|
||||||
std::string converted = get_font_bank(GameTextVersion::JAK2)->convert_utf8_to_game(str);
|
std::string converted = get_font_bank(GameTextVersion::JAK2)->convert_utf8_to_game(str);
|
||||||
strcpy(Ptr<String>(str_dest_ptr).c()->data(), converted.c_str());
|
strcpy(Ptr<String>(str_dest_ptr).c()->data(), converted.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO - currently using a single mutex for all background task synchronization
|
||||||
|
std::mutex background_task_lock;
|
||||||
|
|
||||||
|
std::string last_rpc_error = "";
|
||||||
|
|
||||||
|
// TODO - add a TTL to this
|
||||||
|
std::unordered_map<std::string, std::vector<std::pair<std::string, float>>>
|
||||||
|
external_speedrun_time_cache = {};
|
||||||
|
std::unordered_map<std::string, std::vector<std::pair<std::string, float>>>
|
||||||
|
external_race_time_cache = {};
|
||||||
|
std::unordered_map<std::string, std::vector<std::pair<std::string, float>>>
|
||||||
|
external_highscores_cache = {};
|
||||||
|
|
||||||
|
// clang-format off
|
||||||
|
const std::unordered_map<std::string, std::string> external_speedrun_lookup_urls = {
|
||||||
|
{"any", "https://www.speedrun.com/api/v1/leaderboards/ok6qlo1g/category/wdmze42q?embed=players&max=200"},
|
||||||
|
{"anyhoverless", "https://www.speedrun.com/api/v1/leaderboards/ok6qlo1g/category/xd1rxxrk?embed=players&max=200"},
|
||||||
|
{"allmissions", "https://www.speedrun.com/api/v1/leaderboards/ok6qlo1g/category/mkeon9d6?embed=players&max=200"},
|
||||||
|
{"100", "https://www.speedrun.com/api/v1/leaderboards/ok6qlo1g/category/7dg8q424?embed=players&max=200"},
|
||||||
|
{"anyorbs", "https://www.speedrun.com/api/v1/leaderboards/ok6qlo1g/category/wkpj7vkr?embed=players&max=200"},
|
||||||
|
{"anyhero", "https://www.speedrun.com/api/v1/leaderboards/ok6qlo1g/category/vdo0jodp?embed=players&max=200"}};
|
||||||
|
const std::unordered_map<std::string, std::string> external_race_lookup_urls = {
|
||||||
|
{"class3", "https://www.speedrun.com/api/v1/leaderboards/ok6qlo1g/level/rw6vp697/xd1738d8?embed=players&max=200"},
|
||||||
|
{"class2", "https://www.speedrun.com/api/v1/leaderboards/ok6qlo1g/level/n9305r90/xd1738d8?embed=players&max=200"},
|
||||||
|
{"class1", "https://www.speedrun.com/api/v1/leaderboards/ok6qlo1g/level/z98jv1wl/xd1738d8?embed=players&max=200"},
|
||||||
|
{"class3rev", "https://www.speedrun.com/api/v1/leaderboards/ok6qlo1g/level/rdn5j6dm/xd1738d8?embed=players&max=200"},
|
||||||
|
{"class2rev", "https://www.speedrun.com/api/v1/leaderboards/ok6qlo1g/level/ldye77w3/xd1738d8?embed=players&max=200"},
|
||||||
|
{"class1rev", "https://www.speedrun.com/api/v1/leaderboards/ok6qlo1g/level/gdrqkk9z/xd1738d8?embed=players&max=200"},
|
||||||
|
{"erol", "https://www.speedrun.com/api/v1/leaderboards/ok6qlo1g/level/nwl7kg9v/xd1738d8?embed=players&max=200"},
|
||||||
|
{"port", "https://www.speedrun.com/api/v1/leaderboards/ok6qlo1g/level/ywe8z4wl/xd1738d8?embed=players&max=200"}};
|
||||||
|
const std::unordered_map<std::string, std::string> external_highscores_lookup_urls = {
|
||||||
|
{"scatter", "https://api.jakspeedruns.workers.dev/v1/highscores/2"},
|
||||||
|
{"blaster", "https://api.jakspeedruns.workers.dev/v1/highscores/3"},
|
||||||
|
{"vulcan", "https://api.jakspeedruns.workers.dev/v1/highscores/4"},
|
||||||
|
{"peacemaker", "https://api.jakspeedruns.workers.dev/v1/highscores/5"},
|
||||||
|
{"jetboard", "https://api.jakspeedruns.workers.dev/v1/highscores/6"},
|
||||||
|
{"onin", "https://api.jakspeedruns.workers.dev/v1/highscores/7"},
|
||||||
|
{"mash", "https://api.jakspeedruns.workers.dev/v1/highscores/8"}};
|
||||||
|
// clang-format on
|
||||||
|
|
||||||
|
void callback_fetch_external_speedrun_times(bool success,
|
||||||
|
const std::string& cache_id,
|
||||||
|
std::optional<std::string> result) {
|
||||||
|
std::scoped_lock lock{background_task_lock};
|
||||||
|
|
||||||
|
if (!success) {
|
||||||
|
intern_from_c("*pc-rpc-error?*")->value() = bool_to_symbol(true);
|
||||||
|
if (result) {
|
||||||
|
last_rpc_error = result.value();
|
||||||
|
} else {
|
||||||
|
last_rpc_error = "Unexpected Error Occurred";
|
||||||
|
}
|
||||||
|
intern_from_c("*pc-waiting-on-rpc?*")->value() = bool_to_symbol(false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO - might be nice to have an error if we get an unexpected payload
|
||||||
|
if (!result) {
|
||||||
|
intern_from_c("*pc-waiting-on-rpc?*")->value() = bool_to_symbol(false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Parse the response
|
||||||
|
const auto data = safe_parse_json(result.value());
|
||||||
|
if (!data || !data->contains("data") || !data->at("data").contains("players") ||
|
||||||
|
!data->at("data").at("players").contains("data") || !data->at("data").contains("runs")) {
|
||||||
|
intern_from_c("*pc-waiting-on-rpc?*")->value() = bool_to_symbol(false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
auto& players = data->at("data").at("players").at("data");
|
||||||
|
auto& runs = data->at("data").at("runs");
|
||||||
|
std::vector<std::pair<std::string, float>> times = {};
|
||||||
|
for (const auto& run_info : runs) {
|
||||||
|
std::pair<std::string, float> time_info;
|
||||||
|
if (players.size() > times.size() && players.at(times.size()).contains("names") &&
|
||||||
|
players.at(times.size()).at("names").contains("international")) {
|
||||||
|
time_info.first = players.at(times.size()).at("names").at("international");
|
||||||
|
} else if (players.size() > times.size() && players.at(times.size()).contains("name")) {
|
||||||
|
time_info.first = players.at(times.size()).at("name");
|
||||||
|
} else {
|
||||||
|
time_info.first = "Unknown";
|
||||||
|
}
|
||||||
|
if (run_info.contains("run") && run_info.at("run").contains("times") &&
|
||||||
|
run_info.at("run").at("times").contains("primary_t")) {
|
||||||
|
time_info.second = run_info.at("run").at("times").at("primary_t");
|
||||||
|
times.push_back(time_info);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
external_speedrun_time_cache[cache_id] = times;
|
||||||
|
intern_from_c("*pc-waiting-on-rpc?*")->value() = bool_to_symbol(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO - duplicate code, put it in a function
|
||||||
|
void callback_fetch_external_race_times(bool success,
|
||||||
|
const std::string& cache_id,
|
||||||
|
std::optional<std::string> result) {
|
||||||
|
std::scoped_lock lock{background_task_lock};
|
||||||
|
|
||||||
|
if (!success) {
|
||||||
|
intern_from_c("*pc-rpc-error?*")->value() = bool_to_symbol(true);
|
||||||
|
if (result) {
|
||||||
|
last_rpc_error = result.value();
|
||||||
|
} else {
|
||||||
|
last_rpc_error = "Unexpected Error Occurred";
|
||||||
|
}
|
||||||
|
intern_from_c("*pc-waiting-on-rpc?*")->value() = bool_to_symbol(false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO - might be nice to have an error if we get an unexpected payload
|
||||||
|
if (!result) {
|
||||||
|
intern_from_c("*pc-waiting-on-rpc?*")->value() = bool_to_symbol(false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Parse the response
|
||||||
|
const auto data = safe_parse_json(result.value());
|
||||||
|
if (!data || !data->contains("data") || !data->at("data").contains("players") ||
|
||||||
|
!data->at("data").at("players").contains("data") || !data->at("data").contains("runs")) {
|
||||||
|
intern_from_c("*pc-waiting-on-rpc?*")->value() = bool_to_symbol(false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
auto& players = data->at("data").at("players").at("data");
|
||||||
|
auto& runs = data->at("data").at("runs");
|
||||||
|
std::vector<std::pair<std::string, float>> times = {};
|
||||||
|
for (const auto& run_info : runs) {
|
||||||
|
std::pair<std::string, float> time_info;
|
||||||
|
if (players.size() > times.size() && players.at(times.size()).contains("names") &&
|
||||||
|
players.at(times.size()).at("names").contains("international")) {
|
||||||
|
time_info.first = players.at(times.size()).at("names").at("international");
|
||||||
|
} else if (players.size() > times.size() && players.at(times.size()).contains("name")) {
|
||||||
|
time_info.first = players.at(times.size()).at("name");
|
||||||
|
} else {
|
||||||
|
time_info.first = "Unknown";
|
||||||
|
}
|
||||||
|
if (run_info.contains("run") && run_info.at("run").contains("times") &&
|
||||||
|
run_info.at("run").at("times").contains("primary_t")) {
|
||||||
|
time_info.second = run_info.at("run").at("times").at("primary_t");
|
||||||
|
times.push_back(time_info);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
external_race_time_cache[cache_id] = times;
|
||||||
|
intern_from_c("*pc-waiting-on-rpc?*")->value() = bool_to_symbol(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO - duplicate code, put it in a function
|
||||||
|
void callback_fetch_external_highscores(bool success,
|
||||||
|
const std::string& cache_id,
|
||||||
|
std::optional<std::string> result) {
|
||||||
|
std::scoped_lock lock{background_task_lock};
|
||||||
|
|
||||||
|
if (!success) {
|
||||||
|
intern_from_c("*pc-rpc-error?*")->value() = bool_to_symbol(true);
|
||||||
|
if (result) {
|
||||||
|
last_rpc_error = result.value();
|
||||||
|
} else {
|
||||||
|
last_rpc_error = "Unexpected Error Occurred";
|
||||||
|
}
|
||||||
|
intern_from_c("*pc-waiting-on-rpc?*")->value() = bool_to_symbol(false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO - might be nice to have an error if we get an unexpected payload
|
||||||
|
if (!result) {
|
||||||
|
intern_from_c("*pc-waiting-on-rpc?*")->value() = bool_to_symbol(false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Parse the response
|
||||||
|
const auto data = safe_parse_json(result.value());
|
||||||
|
std::vector<std::pair<std::string, float>> times = {};
|
||||||
|
for (const auto& highscore_info : data.value()) {
|
||||||
|
if (highscore_info.contains("playerName") && highscore_info.contains("score")) {
|
||||||
|
std::pair<std::string, float> time_info;
|
||||||
|
time_info.first = highscore_info.at("playerName");
|
||||||
|
time_info.second = highscore_info.at("score");
|
||||||
|
times.push_back(time_info);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
external_highscores_cache[cache_id] = times;
|
||||||
|
intern_from_c("*pc-waiting-on-rpc?*")->value() = bool_to_symbol(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
void pc_fetch_external_speedrun_times(u32 speedrun_id_ptr) {
|
||||||
|
std::scoped_lock lock{background_task_lock};
|
||||||
|
auto speedrun_id = std::string(Ptr<String>(speedrun_id_ptr).c()->data());
|
||||||
|
if (external_speedrun_lookup_urls.find(speedrun_id) == external_speedrun_lookup_urls.end()) {
|
||||||
|
lg::error("No URL for speedrun_id: '{}'", speedrun_id);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// First check to see if we've already retrieved this info
|
||||||
|
if (external_speedrun_time_cache.find(speedrun_id) == external_speedrun_time_cache.end()) {
|
||||||
|
intern_from_c("*pc-waiting-on-rpc?*")->value() = bool_to_symbol(true);
|
||||||
|
intern_from_c("*pc-rpc-error?*")->value() = bool_to_symbol(false);
|
||||||
|
// otherwise, hit the URL
|
||||||
|
WebRequestJobPayload req;
|
||||||
|
req.callback = callback_fetch_external_speedrun_times;
|
||||||
|
req.url = external_speedrun_lookup_urls.at(speedrun_id);
|
||||||
|
req.cache_id = speedrun_id;
|
||||||
|
g_background_worker.enqueue_webrequest(req);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void pc_fetch_external_race_times(u32 race_id_ptr) {
|
||||||
|
std::scoped_lock lock{background_task_lock};
|
||||||
|
auto race_id = std::string(Ptr<String>(race_id_ptr).c()->data());
|
||||||
|
if (external_race_lookup_urls.find(race_id) == external_race_lookup_urls.end()) {
|
||||||
|
lg::error("No URL for race_id: '{}'", race_id);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// First check to see if we've already retrieved this info
|
||||||
|
if (external_race_time_cache.find(race_id) == external_race_time_cache.end()) {
|
||||||
|
intern_from_c("*pc-waiting-on-rpc?*")->value() = bool_to_symbol(true);
|
||||||
|
intern_from_c("*pc-rpc-error?*")->value() = bool_to_symbol(false);
|
||||||
|
// otherwise, hit the URL
|
||||||
|
WebRequestJobPayload req;
|
||||||
|
req.callback = callback_fetch_external_race_times;
|
||||||
|
req.url = external_race_lookup_urls.at(race_id);
|
||||||
|
req.cache_id = race_id;
|
||||||
|
g_background_worker.enqueue_webrequest(req);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void pc_fetch_external_highscores(u32 highscore_id_ptr) {
|
||||||
|
std::scoped_lock lock{background_task_lock};
|
||||||
|
auto highscore_id = std::string(Ptr<String>(highscore_id_ptr).c()->data());
|
||||||
|
if (external_highscores_lookup_urls.find(highscore_id) == external_highscores_lookup_urls.end()) {
|
||||||
|
lg::error("No URL for highscore_id: '{}'", highscore_id);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// First check to see if we've already retrieved this info
|
||||||
|
if (external_highscores_cache.find(highscore_id) == external_highscores_cache.end()) {
|
||||||
|
intern_from_c("*pc-waiting-on-rpc?*")->value() = bool_to_symbol(true);
|
||||||
|
intern_from_c("*pc-rpc-error?*")->value() = bool_to_symbol(false);
|
||||||
|
// otherwise, hit the URL
|
||||||
|
WebRequestJobPayload req;
|
||||||
|
req.callback = callback_fetch_external_highscores;
|
||||||
|
req.url = external_highscores_lookup_urls.at(highscore_id);
|
||||||
|
req.cache_id = highscore_id;
|
||||||
|
g_background_worker.enqueue_webrequest(req);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void pc_get_external_speedrun_time(u32 speedrun_id_ptr,
|
||||||
|
s32 index,
|
||||||
|
u32 name_dest_ptr,
|
||||||
|
u32 time_dest_ptr) {
|
||||||
|
std::scoped_lock lock{background_task_lock};
|
||||||
|
auto speedrun_id = std::string(Ptr<String>(speedrun_id_ptr).c()->data());
|
||||||
|
if (external_speedrun_time_cache.find(speedrun_id) != external_speedrun_time_cache.end()) {
|
||||||
|
const auto& runs = external_speedrun_time_cache.at(speedrun_id);
|
||||||
|
if (index < runs.size()) {
|
||||||
|
const auto& run_info = external_speedrun_time_cache.at(speedrun_id).at(index);
|
||||||
|
std::string converted =
|
||||||
|
get_font_bank(GameTextVersion::JAK2)->convert_utf8_to_game(run_info.first);
|
||||||
|
strcpy(Ptr<String>(name_dest_ptr).c()->data(), converted.c_str());
|
||||||
|
*(Ptr<float>(time_dest_ptr).c()) = run_info.second;
|
||||||
|
} else {
|
||||||
|
std::string converted = get_font_bank(GameTextVersion::JAK2)->convert_utf8_to_game("");
|
||||||
|
strcpy(Ptr<String>(name_dest_ptr).c()->data(), converted.c_str());
|
||||||
|
*(Ptr<float>(time_dest_ptr).c()) = -1.0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void pc_get_external_race_time(u32 race_id_ptr, s32 index, u32 name_dest_ptr, u32 time_dest_ptr) {
|
||||||
|
std::scoped_lock lock{background_task_lock};
|
||||||
|
auto race_id = std::string(Ptr<String>(race_id_ptr).c()->data());
|
||||||
|
if (external_race_time_cache.find(race_id) != external_race_time_cache.end()) {
|
||||||
|
const auto& runs = external_race_time_cache.at(race_id);
|
||||||
|
if (index < runs.size()) {
|
||||||
|
const auto& run_info = external_race_time_cache.at(race_id).at(index);
|
||||||
|
std::string converted =
|
||||||
|
get_font_bank(GameTextVersion::JAK2)->convert_utf8_to_game(run_info.first);
|
||||||
|
strcpy(Ptr<String>(name_dest_ptr).c()->data(), converted.c_str());
|
||||||
|
*(Ptr<float>(time_dest_ptr).c()) = run_info.second;
|
||||||
|
} else {
|
||||||
|
std::string converted = get_font_bank(GameTextVersion::JAK2)->convert_utf8_to_game("");
|
||||||
|
strcpy(Ptr<String>(name_dest_ptr).c()->data(), converted.c_str());
|
||||||
|
*(Ptr<float>(time_dest_ptr).c()) = -1.0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void pc_get_external_highscore(u32 highscore_id_ptr,
|
||||||
|
s32 index,
|
||||||
|
u32 name_dest_ptr,
|
||||||
|
u32 time_dest_ptr) {
|
||||||
|
std::scoped_lock lock{background_task_lock};
|
||||||
|
auto highscore_id = std::string(Ptr<String>(highscore_id_ptr).c()->data());
|
||||||
|
if (external_highscores_cache.find(highscore_id) != external_highscores_cache.end()) {
|
||||||
|
const auto& runs = external_highscores_cache.at(highscore_id);
|
||||||
|
if (index < runs.size()) {
|
||||||
|
const auto& run_info = external_highscores_cache.at(highscore_id).at(index);
|
||||||
|
std::string converted =
|
||||||
|
get_font_bank(GameTextVersion::JAK2)->convert_utf8_to_game(run_info.first);
|
||||||
|
strcpy(Ptr<String>(name_dest_ptr).c()->data(), converted.c_str());
|
||||||
|
*(Ptr<float>(time_dest_ptr).c()) = run_info.second;
|
||||||
|
} else {
|
||||||
|
std::string converted = get_font_bank(GameTextVersion::JAK2)->convert_utf8_to_game("");
|
||||||
|
strcpy(Ptr<String>(name_dest_ptr).c()->data(), converted.c_str());
|
||||||
|
*(Ptr<float>(time_dest_ptr).c()) = -1.0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 pc_get_num_external_speedrun_times(u32 speedrun_id_ptr) {
|
||||||
|
std::scoped_lock lock{background_task_lock};
|
||||||
|
auto speedrun_id = std::string(Ptr<String>(speedrun_id_ptr).c()->data());
|
||||||
|
if (external_speedrun_time_cache.find(speedrun_id) != external_speedrun_time_cache.end()) {
|
||||||
|
return external_speedrun_time_cache.at(speedrun_id).size();
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 pc_get_num_external_race_times(u32 race_id_ptr) {
|
||||||
|
std::scoped_lock lock{background_task_lock};
|
||||||
|
auto race_id = std::string(Ptr<String>(race_id_ptr).c()->data());
|
||||||
|
if (external_race_time_cache.find(race_id) != external_race_time_cache.end()) {
|
||||||
|
return external_race_time_cache.at(race_id).size();
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 pc_get_num_external_highscores(u32 highscore_id_ptr) {
|
||||||
|
std::scoped_lock lock{background_task_lock};
|
||||||
|
auto highscore_id = std::string(Ptr<String>(highscore_id_ptr).c()->data());
|
||||||
|
if (external_highscores_cache.find(highscore_id) != external_highscores_cache.end()) {
|
||||||
|
return external_highscores_cache.at(highscore_id).size();
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
void InitMachine_PCPort() {
|
void InitMachine_PCPort() {
|
||||||
// PC Port added functions
|
// PC Port added functions
|
||||||
init_common_pc_port_functions(
|
init_common_pc_port_functions(
|
||||||
|
|
@ -788,10 +1078,21 @@ void InitMachine_PCPort() {
|
||||||
// debugging tools
|
// debugging tools
|
||||||
make_function_symbol_from_c("alloc-vagdir-names", (void*)alloc_vagdir_names);
|
make_function_symbol_from_c("alloc-vagdir-names", (void*)alloc_vagdir_names);
|
||||||
|
|
||||||
/*make_function_symbol_from_c("has-level-been-dumped-lights?",
|
// external RPCs
|
||||||
(void*)pc_has_level_been_dumped_lights);
|
make_function_symbol_from_c("pc-fetch-external-speedrun-times",
|
||||||
make_function_symbol_from_c("has-level-been-dumped-regions?",
|
(void*)pc_fetch_external_speedrun_times);
|
||||||
(void*)pc_has_level_been_dumped_regions);*/
|
make_function_symbol_from_c("pc-fetch-external-race-times", (void*)pc_fetch_external_race_times);
|
||||||
|
make_function_symbol_from_c("pc-fetch-external-highscores", (void*)pc_fetch_external_highscores);
|
||||||
|
make_function_symbol_from_c("pc-get-external-speedrun-time",
|
||||||
|
(void*)pc_get_external_speedrun_time);
|
||||||
|
make_function_symbol_from_c("pc-get-external-race-time", (void*)pc_get_external_race_time);
|
||||||
|
make_function_symbol_from_c("pc-get-external-highscore", (void*)pc_get_external_highscore);
|
||||||
|
make_function_symbol_from_c("pc-get-num-external-speedrun-times",
|
||||||
|
(void*)pc_get_num_external_speedrun_times);
|
||||||
|
make_function_symbol_from_c("pc-get-num-external-race-times",
|
||||||
|
(void*)pc_get_num_external_race_times);
|
||||||
|
make_function_symbol_from_c("pc-get-num-external-highscores",
|
||||||
|
(void*)pc_get_num_external_highscores);
|
||||||
|
|
||||||
// setup string constants
|
// setup string constants
|
||||||
auto user_dir_path = file_util::get_user_config_dir();
|
auto user_dir_path = file_util::get_user_config_dir();
|
||||||
|
|
|
||||||
|
|
@ -85,6 +85,7 @@
|
||||||
u8* g_ee_main_mem = nullptr;
|
u8* g_ee_main_mem = nullptr;
|
||||||
std::thread::id g_main_thread_id = std::thread::id();
|
std::thread::id g_main_thread_id = std::thread::id();
|
||||||
GameVersion g_game_version = GameVersion::Jak1;
|
GameVersion g_game_version = GameVersion::Jak1;
|
||||||
|
BackgroundWorker g_background_worker;
|
||||||
int g_server_port = DECI2_PORT;
|
int g_server_port = DECI2_PORT;
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
@ -227,6 +228,20 @@ void ee_runner(SystemThreadInterface& iface) {
|
||||||
iface.trigger_shutdown();
|
iface.trigger_shutdown();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* SystemThread Function for the EE Worker Thread (general purpose background tasks from the EE to
|
||||||
|
* be non-blocking)
|
||||||
|
*/
|
||||||
|
void ee_worker_runner(SystemThreadInterface& iface) {
|
||||||
|
iface.initialization_complete();
|
||||||
|
while (!iface.get_want_exit()) {
|
||||||
|
const auto queues_weres_empty = g_background_worker.process_queues();
|
||||||
|
if (queues_weres_empty) {
|
||||||
|
std::this_thread::sleep_for(std::chrono::milliseconds(50));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* SystemThread function for running the IOP (separate I/O Processor)
|
* SystemThread function for running the IOP (separate I/O Processor)
|
||||||
*/
|
*/
|
||||||
|
|
@ -407,6 +422,9 @@ RuntimeExitStatus exec_runtime(GameLaunchOptions game_options, int argc, const c
|
||||||
auto& deci_thread = tm.create_thread("DMP");
|
auto& deci_thread = tm.create_thread("DMP");
|
||||||
auto& iop_thread = tm.create_thread("IOP");
|
auto& iop_thread = tm.create_thread("IOP");
|
||||||
auto& ee_thread = tm.create_thread("EE");
|
auto& ee_thread = tm.create_thread("EE");
|
||||||
|
// a general worker thread to perform background operations from the EE thread (to not block the
|
||||||
|
// game)
|
||||||
|
auto& ee_worker_thread = tm.create_thread("EE-Worker");
|
||||||
auto& vm_dmac_thread = tm.create_thread("VM-DMAC");
|
auto& vm_dmac_thread = tm.create_thread("VM-DMAC");
|
||||||
prof().end_event();
|
prof().end_event();
|
||||||
|
|
||||||
|
|
@ -419,6 +437,10 @@ RuntimeExitStatus exec_runtime(GameLaunchOptions game_options, int argc, const c
|
||||||
auto p = scoped_prof("startup::exec_runtime::deci-start");
|
auto p = scoped_prof("startup::exec_runtime::deci-start");
|
||||||
deci_thread.start(deci2_runner);
|
deci_thread.start(deci2_runner);
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
auto p = scoped_prof("startup::exec_runtime::ee-worker-start");
|
||||||
|
ee_worker_thread.start(ee_worker_runner);
|
||||||
|
}
|
||||||
{
|
{
|
||||||
auto p = scoped_prof("startup::exec_runtime::ee-start");
|
auto p = scoped_prof("startup::exec_runtime::ee-start");
|
||||||
ee_thread.start(ee_runner);
|
ee_thread.start(ee_runner);
|
||||||
|
|
|
||||||
|
|
@ -12,9 +12,11 @@
|
||||||
|
|
||||||
#include "game/common/game_common_types.h"
|
#include "game/common/game_common_types.h"
|
||||||
#include "game/kernel/common/kboot.h"
|
#include "game/kernel/common/kboot.h"
|
||||||
|
#include "system/background_worker.h"
|
||||||
|
|
||||||
extern u8* g_ee_main_mem;
|
extern u8* g_ee_main_mem;
|
||||||
extern GameVersion g_game_version;
|
extern GameVersion g_game_version;
|
||||||
|
extern BackgroundWorker g_background_worker;
|
||||||
extern int g_server_port;
|
extern int g_server_port;
|
||||||
|
|
||||||
RuntimeExitStatus exec_runtime(GameLaunchOptions game_options, int argc, const char** argv);
|
RuntimeExitStatus exec_runtime(GameLaunchOptions game_options, int argc, const char** argv);
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,83 @@
|
||||||
|
#include "background_worker.h"
|
||||||
|
|
||||||
|
#include "common/log/log.h"
|
||||||
|
|
||||||
|
#include "curl/curl.h"
|
||||||
|
|
||||||
|
bool BackgroundWorker::process_queues() {
|
||||||
|
std::lock_guard<std::mutex> job_lock(job_queue_lock);
|
||||||
|
// Copy over anything in the inbox into the main job queue
|
||||||
|
// - this is a very fast operation
|
||||||
|
{
|
||||||
|
std::lock_guard<std::mutex> inbox_lock(inbox_queue_lock);
|
||||||
|
// Return early if there is nothing to process
|
||||||
|
if (inbox_queue.empty() && job_queue.empty()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
while (!inbox_queue.empty()) {
|
||||||
|
const auto& job = inbox_queue.front();
|
||||||
|
job_queue.push(job);
|
||||||
|
inbox_queue.pop();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Process actual job queue now
|
||||||
|
// - this is potentially a very slow operation!
|
||||||
|
// Process the queue until it's empty
|
||||||
|
while (!job_queue.empty()) {
|
||||||
|
const auto& job = job_queue.front();
|
||||||
|
switch (job.type) {
|
||||||
|
case JobType::WEB_REQUEST:
|
||||||
|
job_web_request(std::get<WebRequestJobPayload>(job.payload));
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
lg::error("[Job] Unsupported job type!");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
job_queue.pop();
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void BackgroundWorker::enqueue_webrequest(WebRequestJobPayload payload) {
|
||||||
|
std::lock_guard<std::mutex> inbox_lock(inbox_queue_lock);
|
||||||
|
inbox_queue.push({JobType::WEB_REQUEST, payload});
|
||||||
|
}
|
||||||
|
|
||||||
|
static size_t WriteCallback(void* contents, size_t size, size_t nmemb, void* userp) {
|
||||||
|
((std::string*)userp)->append((char*)contents, size * nmemb);
|
||||||
|
return size * nmemb;
|
||||||
|
}
|
||||||
|
|
||||||
|
void BackgroundWorker::job_web_request(WebRequestJobPayload payload) {
|
||||||
|
// TODO - move this into some common util function
|
||||||
|
CURL* curl;
|
||||||
|
CURLcode res;
|
||||||
|
std::string readBuffer;
|
||||||
|
|
||||||
|
curl_global_init(CURL_GLOBAL_DEFAULT);
|
||||||
|
|
||||||
|
curl = curl_easy_init();
|
||||||
|
if (curl) {
|
||||||
|
curl_easy_setopt(curl, CURLOPT_URL, payload.url.c_str());
|
||||||
|
|
||||||
|
/* cache the CA cert bundle in memory for a week */
|
||||||
|
curl_easy_setopt(curl, CURLOPT_CA_CACHE_TIMEOUT, 604800L);
|
||||||
|
curl_easy_setopt(curl, CURLOPT_TIMEOUT_MS, 10000L);
|
||||||
|
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteCallback);
|
||||||
|
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &readBuffer);
|
||||||
|
|
||||||
|
/* Perform the request, res will get the return code */
|
||||||
|
res = curl_easy_perform(curl);
|
||||||
|
/* Check for errors */
|
||||||
|
if (res != CURLE_OK) {
|
||||||
|
lg::error("[Job:WebRequest]: Error: {}", curl_easy_strerror(res));
|
||||||
|
curl_easy_cleanup(curl);
|
||||||
|
curl_global_cleanup();
|
||||||
|
payload.callback(false, payload.cache_id, curl_easy_strerror(res));
|
||||||
|
} else {
|
||||||
|
payload.callback(true, payload.cache_id, readBuffer);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,49 @@
|
||||||
|
#pragma once
|
||||||
|
#include <functional>
|
||||||
|
#include <mutex>
|
||||||
|
#include <optional>
|
||||||
|
#include <queue>
|
||||||
|
#include <string>
|
||||||
|
#include <variant>
|
||||||
|
|
||||||
|
// This is intended to be a general purpose worker which is processed by a separate thread
|
||||||
|
//
|
||||||
|
// This is useful for initiating long-running jobs instead of blocking the game
|
||||||
|
// but since you cannot spawn new threads directly in the EE without causing problems
|
||||||
|
// you can delegate to this worker, managed by a separate worker thread `ee_worker_thread`.
|
||||||
|
|
||||||
|
enum class JobType { WEB_REQUEST };
|
||||||
|
|
||||||
|
struct WebRequestJobPayload {
|
||||||
|
JobType type = JobType::WEB_REQUEST;
|
||||||
|
std::string url;
|
||||||
|
std::string cache_id;
|
||||||
|
std::function<void(bool, std::string cache_id, std::optional<std::string>)> callback;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct BackgroundJob {
|
||||||
|
JobType type;
|
||||||
|
std::variant<WebRequestJobPayload> payload;
|
||||||
|
};
|
||||||
|
|
||||||
|
// TODO - consider adding some sort of job tracking / polling if required
|
||||||
|
|
||||||
|
class BackgroundWorker {
|
||||||
|
// Because jobs can be quite lengthy, we want to minimize contention time for events being
|
||||||
|
// inserted by the main thread
|
||||||
|
//
|
||||||
|
// By using a separate queue as our "inbox" there will only ever be a blocking scenario for the
|
||||||
|
// queue while it's being quickly copied over to the main queue
|
||||||
|
std::queue<BackgroundJob> inbox_queue;
|
||||||
|
std::queue<BackgroundJob> job_queue;
|
||||||
|
std::mutex inbox_queue_lock;
|
||||||
|
std::mutex job_queue_lock;
|
||||||
|
|
||||||
|
public:
|
||||||
|
bool process_queues();
|
||||||
|
|
||||||
|
void enqueue_webrequest(WebRequestJobPayload payload);
|
||||||
|
|
||||||
|
private:
|
||||||
|
void job_web_request(WebRequestJobPayload payload);
|
||||||
|
};
|
||||||
|
|
@ -1703,39 +1703,40 @@
|
||||||
(&+ (-> this game-score data) (* (* arg0 8) 4))
|
(&+ (-> this game-score data) (* (* arg0 8) 4))
|
||||||
)
|
)
|
||||||
|
|
||||||
(defmethod get-rank highscore-info ((this highscore-info) (arg0 float))
|
;; TODO - make an enum for the highscore-place
|
||||||
(let ((v0-0 0))
|
(defmethod get-rank highscore-info ((this highscore-info) (score float))
|
||||||
|
(let ((place 0))
|
||||||
(cond
|
(cond
|
||||||
((logtest? (-> this flags) (highscore-flags time))
|
((logtest? (-> this flags) (highscore-flags time))
|
||||||
(cond
|
(cond
|
||||||
((= arg0 0.0)
|
((= score 0.0)
|
||||||
)
|
)
|
||||||
((>= (-> this gold-score) arg0)
|
((>= (-> this gold-score) score)
|
||||||
(set! v0-0 3)
|
(set! place 3)
|
||||||
)
|
)
|
||||||
((>= (-> this silver-score) arg0)
|
((>= (-> this silver-score) score)
|
||||||
(set! v0-0 2)
|
(set! place 2)
|
||||||
)
|
)
|
||||||
((>= (-> this bronze-score) arg0)
|
((>= (-> this bronze-score) score)
|
||||||
(set! v0-0 1)
|
(set! place 1)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
(else
|
(else
|
||||||
(cond
|
(cond
|
||||||
((>= arg0 (-> this gold-score))
|
((>= score (-> this gold-score))
|
||||||
(set! v0-0 3)
|
(set! place 3)
|
||||||
)
|
)
|
||||||
((>= arg0 (-> this silver-score))
|
((>= score (-> this silver-score))
|
||||||
(set! v0-0 2)
|
(set! place 2)
|
||||||
)
|
)
|
||||||
((>= arg0 (-> this bronze-score))
|
((>= score (-> this bronze-score))
|
||||||
(set! v0-0 1)
|
(set! place 1)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
v0-0
|
place
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4357,8 +4357,8 @@
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
(defun draw-highscore-icon ((arg0 menu-highscores-option) (arg1 uint) (arg2 int) (arg3 int) (arg4 float))
|
(defun draw-highscore-icon ((arg0 menu-highscores-option) (arg1 texture-id) (arg2 int) (arg3 int) (arg4 float))
|
||||||
(set! (-> arg0 sprites 0 tex) (lookup-texture-by-id (the-as texture-id arg1)))
|
(set! (-> arg0 sprites 0 tex) (lookup-texture-by-id arg1))
|
||||||
(set! (-> arg0 sprites 0 scale-x) arg4)
|
(set! (-> arg0 sprites 0 scale-x) arg4)
|
||||||
(set! (-> arg0 sprites 0 scale-y) arg4)
|
(set! (-> arg0 sprites 0 scale-y) arg4)
|
||||||
(set-hud-piece-position! (the-as hud-sprite (-> arg0 sprites)) arg2 arg3)
|
(set-hud-piece-position! (the-as hud-sprite (-> arg0 sprites)) arg2 arg3)
|
||||||
|
|
@ -4406,77 +4406,79 @@
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
(defun get-highscore-score ((arg0 int))
|
(defun get-highscore-score ((highscore-index int))
|
||||||
"TODO - takes and returns an enum?"
|
(let ((score-array-index 11))
|
||||||
(let ((v0-0 11))
|
(let ((index highscore-index))
|
||||||
(let ((v1-0 arg0))
|
|
||||||
(cond
|
(cond
|
||||||
((zero? v1-0)
|
((zero? index)
|
||||||
(set! v0-0 4)
|
(set! score-array-index 4)
|
||||||
)
|
)
|
||||||
((= v1-0 1)
|
((= index 1)
|
||||||
(set! v0-0 5)
|
(set! score-array-index 5)
|
||||||
)
|
)
|
||||||
((= v1-0 2)
|
((= index 2)
|
||||||
(set! v0-0 6)
|
(set! score-array-index 6)
|
||||||
)
|
)
|
||||||
((= v1-0 3)
|
((= index 3)
|
||||||
(set! v0-0 7)
|
(set! score-array-index 7)
|
||||||
)
|
)
|
||||||
((= v1-0 4)
|
((= index 4)
|
||||||
(set! v0-0 10)
|
(set! score-array-index 10)
|
||||||
)
|
)
|
||||||
((= v1-0 5)
|
((= index 5)
|
||||||
(set! v0-0 13)
|
(set! score-array-index 13)
|
||||||
)
|
)
|
||||||
((= v1-0 6)
|
((= index 6)
|
||||||
(set! v0-0 12)
|
(set! score-array-index 12)
|
||||||
)
|
)
|
||||||
((= v1-0 7)
|
((= index 7)
|
||||||
(set! v0-0 11)
|
(set! score-array-index 11)
|
||||||
)
|
)
|
||||||
((= v1-0 8)
|
((= index 8)
|
||||||
(set! v0-0 14)
|
(set! score-array-index 14)
|
||||||
)
|
)
|
||||||
((= v1-0 9)
|
((= index 9)
|
||||||
(set! v0-0 15)
|
(set! score-array-index 15)
|
||||||
)
|
)
|
||||||
((= v1-0 10)
|
((= index 10)
|
||||||
(set! v0-0 18)
|
(set! score-array-index 18)
|
||||||
)
|
)
|
||||||
((= v1-0 11)
|
((= index 11)
|
||||||
(set! v0-0 17)
|
(set! score-array-index 17)
|
||||||
)
|
)
|
||||||
((= v1-0 12)
|
((= index 12)
|
||||||
(set! v0-0 16)
|
(set! score-array-index 16)
|
||||||
)
|
)
|
||||||
((= v1-0 13)
|
((= index 13)
|
||||||
(set! v0-0 8)
|
(set! score-array-index 8)
|
||||||
)
|
)
|
||||||
((= v1-0 14)
|
((= index 14)
|
||||||
(set! v0-0 9)
|
(set! score-array-index 9)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
v0-0
|
score-array-index
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
(defun eval-highscore ((arg0 print-highscore-obj))
|
(defun eval-highscore ((print-highscore-info print-highscore-obj))
|
||||||
(get-rank (-> *highscore-info-array* (get-highscore-score (-> arg0 index))) (-> arg0 score))
|
(get-rank
|
||||||
|
(-> *highscore-info-array* (get-highscore-score (-> print-highscore-info index)))
|
||||||
|
(-> print-highscore-info score)
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
(defun str-print-time ((arg0 float))
|
(defun str-print-time ((time float))
|
||||||
0
|
0
|
||||||
0
|
0
|
||||||
0
|
0
|
||||||
(let* ((gp-0 (the int (* 0.016666668 arg0)))
|
(let* ((minutes (the int (* 0.016666668 time)))
|
||||||
(v1-5 (- arg0 (* 60.0 (the float gp-0))))
|
(remainder-minutes (- time (* 60.0 (the float minutes))))
|
||||||
(s5-0 (the int v1-5))
|
(seconds (the int remainder-minutes))
|
||||||
(v1-6 (- v1-5 (the float s5-0)))
|
(remainder-seconds (- remainder-minutes (the float seconds)))
|
||||||
(s3-0 (the int (* 1000.0 v1-6)))
|
(milliseconds (the int (* 1000.0 remainder-seconds)))
|
||||||
)
|
)
|
||||||
(format (clear *temp-string*) "~d:~2,'0,d:~3,'0,d" gp-0 s5-0 s3-0)
|
(format (clear *temp-string*) "~d:~2,'0,d:~3,'0,d" minutes seconds milliseconds)
|
||||||
)
|
)
|
||||||
*temp-string*
|
*temp-string*
|
||||||
)
|
)
|
||||||
|
|
@ -4662,263 +4664,263 @@
|
||||||
(set! (-> sv-16 origin x) (- (-> sv-16 origin x) (the float (+ sv-24 sv-32))))
|
(set! (-> sv-16 origin x) (- (-> sv-16 origin x) (the float (+ sv-24 sv-32))))
|
||||||
)
|
)
|
||||||
|
|
||||||
;; WARN: Return type mismatch int vs text-id.
|
(defun get-highscore-text ((highscore-index int))
|
||||||
(defun get-highscore-text ((arg0 int))
|
(let ((text-id 319))
|
||||||
"TODO - takes an enum?"
|
(let ((index highscore-index))
|
||||||
(let ((v0-0 319))
|
|
||||||
(let ((v1-0 arg0))
|
|
||||||
(cond
|
(cond
|
||||||
((zero? v1-0)
|
((zero? index)
|
||||||
(set! v0-0 323)
|
(set! text-id 323)
|
||||||
)
|
)
|
||||||
((= v1-0 1)
|
((= index 1)
|
||||||
(set! v0-0 323)
|
(set! text-id 323)
|
||||||
)
|
)
|
||||||
((= v1-0 2)
|
((= index 2)
|
||||||
(set! v0-0 323)
|
(set! text-id 323)
|
||||||
)
|
)
|
||||||
((= v1-0 3)
|
((= index 3)
|
||||||
(set! v0-0 323)
|
(set! text-id 323)
|
||||||
)
|
)
|
||||||
((= v1-0 4)
|
((= index 4)
|
||||||
(set! v0-0 330)
|
(set! text-id 330)
|
||||||
)
|
)
|
||||||
((= v1-0 5)
|
((= index 5)
|
||||||
(set! v0-0 319)
|
(set! text-id 319)
|
||||||
)
|
)
|
||||||
((= v1-0 6)
|
((= index 6)
|
||||||
(set! v0-0 319)
|
(set! text-id 319)
|
||||||
)
|
)
|
||||||
((= v1-0 7)
|
((= index 7)
|
||||||
(set! v0-0 319)
|
(set! text-id 319)
|
||||||
)
|
)
|
||||||
((= v1-0 8)
|
((= index 8)
|
||||||
(set! v0-0 319)
|
(set! text-id 319)
|
||||||
)
|
)
|
||||||
((= v1-0 9)
|
((= index 9)
|
||||||
(set! v0-0 319)
|
(set! text-id 319)
|
||||||
)
|
)
|
||||||
((= v1-0 10)
|
((= index 10)
|
||||||
(set! v0-0 319)
|
(set! text-id 319)
|
||||||
)
|
)
|
||||||
((= v1-0 11)
|
((= index 11)
|
||||||
(set! v0-0 319)
|
(set! text-id 319)
|
||||||
)
|
)
|
||||||
((= v1-0 12)
|
((= index 12)
|
||||||
(set! v0-0 319)
|
(set! text-id 319)
|
||||||
)
|
)
|
||||||
((= v1-0 13)
|
((= index 13)
|
||||||
(set! v0-0 328)
|
(set! text-id 328)
|
||||||
)
|
)
|
||||||
((= v1-0 14)
|
((= index 14)
|
||||||
(set! v0-0 329)
|
(set! text-id 329)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
(the-as text-id v0-0)
|
(the-as text-id text-id)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
;; WARN: Return type mismatch int vs text-id.
|
(defun get-highscore-text-sub ((highscore-index int))
|
||||||
(defun get-highscore-text-sub ((arg0 int))
|
(let ((id 320))
|
||||||
"TODO - takes an enum?"
|
(let ((index highscore-index))
|
||||||
(let ((v0-0 320))
|
|
||||||
(let ((v1-0 arg0))
|
|
||||||
(cond
|
(cond
|
||||||
((zero? v1-0)
|
((zero? index)
|
||||||
(set! v0-0 324)
|
(set! id 324)
|
||||||
)
|
)
|
||||||
((= v1-0 1)
|
((= index 1)
|
||||||
(set! v0-0 325)
|
(set! id 325)
|
||||||
)
|
)
|
||||||
((= v1-0 2)
|
((= index 2)
|
||||||
(set! v0-0 326)
|
(set! id 326)
|
||||||
)
|
)
|
||||||
((= v1-0 3)
|
((= index 3)
|
||||||
(set! v0-0 327)
|
(set! id 327)
|
||||||
)
|
)
|
||||||
((= v1-0 4)
|
((= index 4)
|
||||||
(set! v0-0 333)
|
(set! id 333)
|
||||||
)
|
)
|
||||||
((= v1-0 5)
|
((= index 5)
|
||||||
(set! v0-0 322)
|
(set! id 322)
|
||||||
)
|
)
|
||||||
((= v1-0 6)
|
((= index 6)
|
||||||
(set! v0-0 321)
|
(set! id 321)
|
||||||
)
|
)
|
||||||
((= v1-0 7)
|
((= index 7)
|
||||||
(set! v0-0 320)
|
(set! id 320)
|
||||||
)
|
)
|
||||||
((= v1-0 8)
|
((= index 8)
|
||||||
(set! v0-0 337)
|
(set! id 337)
|
||||||
)
|
)
|
||||||
((= v1-0 9)
|
((= index 9)
|
||||||
(set! v0-0 338)
|
(set! id 338)
|
||||||
)
|
)
|
||||||
((= v1-0 10)
|
((= index 10)
|
||||||
(set! v0-0 336)
|
(set! id 336)
|
||||||
)
|
)
|
||||||
((= v1-0 11)
|
((= index 11)
|
||||||
(set! v0-0 335)
|
(set! id 335)
|
||||||
)
|
)
|
||||||
((= v1-0 12)
|
((= index 12)
|
||||||
(set! v0-0 334)
|
(set! id 334)
|
||||||
)
|
)
|
||||||
((= v1-0 13)
|
((= index 13)
|
||||||
(set! v0-0 331)
|
(set! id 331)
|
||||||
)
|
)
|
||||||
((= v1-0 14)
|
((= index 14)
|
||||||
(set! v0-0 332)
|
(set! id 332)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
(the-as text-id v0-0)
|
(the-as text-id id)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
(defun get-highscore-icon ((arg0 int))
|
(defun get-highscore-icon ((highscore-index-arg int))
|
||||||
"TODO - Icon id enum perhaps?"
|
(let ((texture (new 'static 'texture-id :index #x10 :page #xc93)))
|
||||||
(let ((v0-0 (the-as uint #xc9301000)))
|
(let ((highscore-index highscore-index-arg))
|
||||||
(let ((v1-1 arg0))
|
|
||||||
(cond
|
(cond
|
||||||
((zero? v1-1)
|
((zero? highscore-index)
|
||||||
(set! v0-0 (the-as uint #xc9301000))
|
(set! texture (new 'static 'texture-id :index #x10 :page #xc93))
|
||||||
)
|
)
|
||||||
((= v1-1 1)
|
((= highscore-index 1)
|
||||||
(set! v0-0 (the-as uint #xc9301200))
|
(set! texture (new 'static 'texture-id :index #x12 :page #xc93))
|
||||||
)
|
)
|
||||||
((= v1-1 2)
|
((= highscore-index 2)
|
||||||
(set! v0-0 (the-as uint #xc9301300))
|
(set! texture (new 'static 'texture-id :index #x13 :page #xc93))
|
||||||
)
|
)
|
||||||
((= v1-1 3)
|
((= highscore-index 3)
|
||||||
(set! v0-0 (the-as uint #xc9301100))
|
(set! texture (new 'static 'texture-id :index #x11 :page #xc93))
|
||||||
)
|
)
|
||||||
((= v1-1 4)
|
((= highscore-index 4)
|
||||||
(set! v0-0 (the-as uint #xc9300e00))
|
(set! texture (new 'static 'texture-id :index #xe :page #xc93))
|
||||||
)
|
)
|
||||||
((= v1-1 5)
|
((= highscore-index 5)
|
||||||
(set! v0-0 (the-as uint #xc9300100))
|
(set! texture (new 'static 'texture-id :index #x1 :page #xc93))
|
||||||
)
|
)
|
||||||
((= v1-1 6)
|
((= highscore-index 6)
|
||||||
(set! v0-0 (the-as uint #xc9300100))
|
(set! texture (new 'static 'texture-id :index #x1 :page #xc93))
|
||||||
)
|
)
|
||||||
((= v1-1 7)
|
((= highscore-index 7)
|
||||||
(set! v0-0 (the-as uint #xc9300100))
|
(set! texture (new 'static 'texture-id :index #x1 :page #xc93))
|
||||||
)
|
)
|
||||||
((= v1-1 8)
|
((= highscore-index 8)
|
||||||
(set! v0-0 (the-as uint #xc9300100))
|
(set! texture (new 'static 'texture-id :index #x1 :page #xc93))
|
||||||
)
|
)
|
||||||
((= v1-1 9)
|
((= highscore-index 9)
|
||||||
(set! v0-0 (the-as uint #xc9300100))
|
(set! texture (new 'static 'texture-id :index #x1 :page #xc93))
|
||||||
)
|
)
|
||||||
((= v1-1 10)
|
((= highscore-index 10)
|
||||||
(set! v0-0 (the-as uint #xc9300100))
|
(set! texture (new 'static 'texture-id :index #x1 :page #xc93))
|
||||||
)
|
)
|
||||||
((= v1-1 11)
|
((= highscore-index 11)
|
||||||
(set! v0-0 (the-as uint #xc9300100))
|
(set! texture (new 'static 'texture-id :index #x1 :page #xc93))
|
||||||
)
|
)
|
||||||
((= v1-1 12)
|
((= highscore-index 12)
|
||||||
(set! v0-0 (the-as uint #xc9300100))
|
(set! texture (new 'static 'texture-id :index #x1 :page #xc93))
|
||||||
)
|
)
|
||||||
((= v1-1 13)
|
((= highscore-index 13)
|
||||||
(set! v0-0 (the-as uint #xc9301600))
|
(set! texture (new 'static 'texture-id :index #x16 :page #xc93))
|
||||||
)
|
)
|
||||||
((= v1-1 14)
|
((= highscore-index 14)
|
||||||
(set! v0-0 (the-as uint #xc9301700))
|
(set! texture (new 'static 'texture-id :index #x17 :page #xc93))
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
v0-0
|
(the-as texture-id texture)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
(defun get-highscore-type ((arg0 int))
|
(defun get-highscore-type ((highscore-index-arg int))
|
||||||
"TODO - takes an enum?"
|
"Given a highscore index, return it's type as a symbol
|
||||||
(let ((v0-0 'game))
|
@param highscore-index-arg something
|
||||||
(let ((v1-0 arg0))
|
@returns The type, as as symbol. Either `'game` or `'race`"
|
||||||
|
(let ((highscore-type 'game))
|
||||||
|
(let ((highscore-index highscore-index-arg))
|
||||||
(cond
|
(cond
|
||||||
((zero? v1-0)
|
((zero? highscore-index)
|
||||||
(set! v0-0 'game)
|
(set! highscore-type 'game)
|
||||||
)
|
)
|
||||||
((= v1-0 5)
|
((= highscore-index 5)
|
||||||
(set! v0-0 'race)
|
(set! highscore-type 'race)
|
||||||
)
|
)
|
||||||
((= v1-0 6)
|
((= highscore-index 6)
|
||||||
(set! v0-0 'race)
|
(set! highscore-type 'race)
|
||||||
)
|
)
|
||||||
((= v1-0 7)
|
((= highscore-index 7)
|
||||||
(set! v0-0 'race)
|
(set! highscore-type 'race)
|
||||||
)
|
)
|
||||||
((= v1-0 8)
|
((= highscore-index 8)
|
||||||
(set! v0-0 'race)
|
(set! highscore-type 'race)
|
||||||
)
|
)
|
||||||
((= v1-0 9)
|
((= highscore-index 9)
|
||||||
(set! v0-0 'race)
|
(set! highscore-type 'race)
|
||||||
)
|
)
|
||||||
((= v1-0 10)
|
((= highscore-index 10)
|
||||||
(set! v0-0 'race)
|
(set! highscore-type 'race)
|
||||||
)
|
)
|
||||||
((= v1-0 11)
|
((= highscore-index 11)
|
||||||
(set! v0-0 'race)
|
(set! highscore-type 'race)
|
||||||
)
|
)
|
||||||
((= v1-0 12)
|
((= highscore-index 12)
|
||||||
(set! v0-0 'race)
|
(set! highscore-type 'race)
|
||||||
)
|
)
|
||||||
((= v1-0 13)
|
((= highscore-index 13)
|
||||||
(set! v0-0 'game)
|
(set! highscore-type 'game)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
v0-0
|
highscore-type
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
(defun highscore-available? ((arg0 int))
|
(defun highscore-available? ((highscore-index int))
|
||||||
(let ((v0-0 #f))
|
(let ((available? #f))
|
||||||
(let ((v1-0 arg0))
|
(let ((index highscore-index))
|
||||||
(cond
|
(cond
|
||||||
((zero? v1-0)
|
((zero? index)
|
||||||
(set! v0-0 #t)
|
(set! available? #t)
|
||||||
)
|
)
|
||||||
((= v1-0 1)
|
((= index 1)
|
||||||
(set! v0-0
|
(set! available?
|
||||||
(logtest? (-> *game-info* sub-task-list (game-task-node city-yellow-gun-training-introduction) flags)
|
(logtest? (-> *game-info* sub-task-list (game-task-node city-yellow-gun-training-introduction) flags)
|
||||||
(game-task-node-flag closed)
|
(game-task-node-flag closed)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
((= v1-0 2)
|
((= index 2)
|
||||||
(set! v0-0 (logtest? (-> *game-info* secrets) (game-secrets gungame-blue)))
|
(set! available? (logtest? (-> *game-info* secrets) (game-secrets gungame-blue)))
|
||||||
)
|
)
|
||||||
((= v1-0 3)
|
((= index 3)
|
||||||
(set! v0-0 (logtest? (-> *game-info* secrets) (game-secrets gungame-dark)))
|
(set! available? (logtest? (-> *game-info* secrets) (game-secrets gungame-dark)))
|
||||||
)
|
)
|
||||||
((= v1-0 4)
|
((= index 4)
|
||||||
(set! v0-0 (logtest? (-> *game-info* sub-task-list (game-task-node stadium-board1-introduction) flags)
|
(set! available? (logtest? (-> *game-info* sub-task-list (game-task-node stadium-board1-introduction) flags)
|
||||||
(game-task-node-flag closed)
|
(game-task-node-flag closed)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
((= v1-0 5)
|
((= index 5)
|
||||||
(set! v0-0 (logtest? (-> *game-info* sub-task-list (game-task-node stadium-race-class3-introduction) flags)
|
(set! available?
|
||||||
(game-task-node-flag closed)
|
(logtest? (-> *game-info* sub-task-list (game-task-node stadium-race-class3-introduction) flags)
|
||||||
)
|
(game-task-node-flag closed)
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
((= v1-0 6)
|
((= index 6)
|
||||||
(set! v0-0 (logtest? (-> *game-info* sub-task-list (game-task-node stadium-race-class2-introduction) flags)
|
(set! available?
|
||||||
(game-task-node-flag closed)
|
(logtest? (-> *game-info* sub-task-list (game-task-node stadium-race-class2-introduction) flags)
|
||||||
)
|
(game-task-node-flag closed)
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
((= v1-0 7)
|
((= index 7)
|
||||||
(set! v0-0 (logtest? (-> *game-info* sub-task-list (game-task-node stadium-race-class1-introduction) flags)
|
(set! available?
|
||||||
(game-task-node-flag closed)
|
(logtest? (-> *game-info* sub-task-list (game-task-node stadium-race-class1-introduction) flags)
|
||||||
)
|
(game-task-node-flag closed)
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
((= v1-0 8)
|
((= index 8)
|
||||||
(set! v0-0
|
(set! available?
|
||||||
(or (logtest? (-> *game-info* sub-task-list (game-task-node city-burning-bush-race-port-introduction) flags)
|
(or (logtest? (-> *game-info* sub-task-list (game-task-node city-burning-bush-race-port-introduction) flags)
|
||||||
(game-task-node-flag closed)
|
(game-task-node-flag closed)
|
||||||
)
|
)
|
||||||
|
|
@ -4926,8 +4928,8 @@
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
((= v1-0 9)
|
((= index 9)
|
||||||
(set! v0-0
|
(set! available?
|
||||||
(or (logtest? (-> *game-info* sub-task-list (game-task-node city-burning-bush-race-errol-introduction) flags)
|
(or (logtest? (-> *game-info* sub-task-list (game-task-node city-burning-bush-race-errol-introduction) flags)
|
||||||
(game-task-node-flag closed)
|
(game-task-node-flag closed)
|
||||||
)
|
)
|
||||||
|
|
@ -4935,220 +4937,219 @@
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
((= v1-0 10)
|
((= index 10)
|
||||||
(set! v0-0 (logtest? (-> *game-info* secrets) (game-secrets reverse-races)))
|
(set! available? (logtest? (-> *game-info* secrets) (game-secrets reverse-races)))
|
||||||
)
|
)
|
||||||
((= v1-0 11)
|
((= index 11)
|
||||||
(set! v0-0 (logtest? (-> *game-info* secrets) (game-secrets reverse-races)))
|
(set! available? (logtest? (-> *game-info* secrets) (game-secrets reverse-races)))
|
||||||
)
|
)
|
||||||
((= v1-0 12)
|
((= index 12)
|
||||||
(set! v0-0 (logtest? (-> *game-info* secrets) (game-secrets reverse-races)))
|
(set! available? (logtest? (-> *game-info* secrets) (game-secrets reverse-races)))
|
||||||
)
|
)
|
||||||
((= v1-0 13)
|
((= index 13)
|
||||||
(set! v0-0 (logtest? (-> *game-info* sub-task-list (game-task-node city-play-onin-game-introduction) flags)
|
(set! available?
|
||||||
(game-task-node-flag closed)
|
(logtest? (-> *game-info* sub-task-list (game-task-node city-play-onin-game-introduction) flags)
|
||||||
)
|
(game-task-node-flag closed)
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
((= v1-0 14)
|
((= index 14)
|
||||||
(set! v0-0 (logtest? (-> *game-info* sub-task-list (game-task-node city-whack-introduction) flags)
|
(set! available? (logtest? (-> *game-info* sub-task-list (game-task-node city-whack-introduction) flags)
|
||||||
(game-task-node-flag closed)
|
(game-task-node-flag closed)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
v0-0
|
available?
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
(defun get-num-highscores ()
|
(defun get-num-highscores ()
|
||||||
(let ((gp-0 0))
|
(let ((count 0))
|
||||||
(dotimes (s5-0 15)
|
(dotimes (max-highscores 15)
|
||||||
(if (highscore-available? s5-0)
|
(if (highscore-available? max-highscores)
|
||||||
(+! gp-0 1)
|
(+! count 1)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
gp-0
|
count
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
(defun get-next-highscore ((arg0 int))
|
(defun get-next-highscore ((current-highscore-index int))
|
||||||
(let ((s4-0 15)
|
(let ((max-highscores 15)
|
||||||
(s3-0 1)
|
(index-change 1)
|
||||||
(gp-0 -1)
|
(selected-index -1)
|
||||||
)
|
)
|
||||||
(+ arg0 s3-0)
|
(+ current-highscore-index index-change)
|
||||||
(while (and (= gp-0 -1) (< s3-0 s4-0))
|
(while (and (= selected-index -1) (< index-change max-highscores))
|
||||||
(let ((s2-0 (+ arg0 s3-0)))
|
(let ((s2-0 (+ current-highscore-index index-change)))
|
||||||
(+! s3-0 1)
|
(+! index-change 1)
|
||||||
(if (highscore-available? (mod s2-0 s4-0))
|
(if (highscore-available? (mod s2-0 max-highscores))
|
||||||
(set! gp-0 (mod s2-0 s4-0))
|
(set! selected-index (mod s2-0 max-highscores))
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
(if (= gp-0 -1)
|
(if (= selected-index -1)
|
||||||
(set! gp-0 arg0)
|
(set! selected-index current-highscore-index)
|
||||||
)
|
)
|
||||||
gp-0
|
selected-index
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
(defun get-prev-highscore ((arg0 int))
|
(defun get-prev-highscore ((arg0 int))
|
||||||
(let ((s4-0 15)
|
(let ((max-highscores 15)
|
||||||
(s3-0 1)
|
(index-change 1)
|
||||||
(gp-0 -1)
|
(selected-index -1)
|
||||||
)
|
)
|
||||||
(+ arg0 s3-0)
|
(+ arg0 index-change)
|
||||||
(while (and (= gp-0 -1) (< s3-0 s4-0))
|
(while (and (= selected-index -1) (< index-change max-highscores))
|
||||||
(let ((s2-0 (- arg0 s3-0)))
|
(let ((curr-index (- arg0 index-change)))
|
||||||
(+! s3-0 1)
|
(+! index-change 1)
|
||||||
(if (< s2-0 0)
|
(if (< curr-index 0)
|
||||||
(set! s2-0 (+ s4-0 s2-0))
|
(set! curr-index (+ max-highscores curr-index))
|
||||||
)
|
)
|
||||||
(let ((t9-0 highscore-available?)
|
(let ((highscore-available-fn highscore-available?)
|
||||||
(a0-1 (abs s2-0))
|
(normalized-index (abs curr-index))
|
||||||
)
|
)
|
||||||
(if (t9-0 a0-1)
|
(if (highscore-available-fn normalized-index)
|
||||||
(set! gp-0 (abs s2-0))
|
(set! selected-index (abs curr-index))
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
(if (= gp-0 -1)
|
(if (= selected-index -1)
|
||||||
(set! gp-0 arg0)
|
(set! selected-index arg0)
|
||||||
)
|
)
|
||||||
gp-0
|
selected-index
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
(defun get-highscore-icon-scale ((arg0 int))
|
(defun get-highscore-icon-scale ((highscore-index int))
|
||||||
"TODO - takes an enum?"
|
(let ((scale (if (= (get-aspect-ratio) 'aspect4x3)
|
||||||
(let ((f0-0 (if (= (get-aspect-ratio) 'aspect4x3)
|
1.0
|
||||||
1.0
|
1.0
|
||||||
1.0
|
)
|
||||||
)
|
)
|
||||||
)
|
|
||||||
)
|
)
|
||||||
(let ((f2-0 0.6)
|
(let ((guncourse-scale 0.6)
|
||||||
(f1-0 0.8)
|
(race-scale 0.8)
|
||||||
)
|
)
|
||||||
(cond
|
(cond
|
||||||
((zero? arg0)
|
((zero? highscore-index)
|
||||||
(set! f0-0 f2-0)
|
(set! scale guncourse-scale)
|
||||||
)
|
)
|
||||||
((= arg0 1)
|
((= highscore-index 1)
|
||||||
(set! f0-0 f2-0)
|
(set! scale guncourse-scale)
|
||||||
)
|
)
|
||||||
((= arg0 2)
|
((= highscore-index 2)
|
||||||
(set! f0-0 f2-0)
|
(set! scale guncourse-scale)
|
||||||
)
|
)
|
||||||
((= arg0 3)
|
((= highscore-index 3)
|
||||||
(set! f0-0 f2-0)
|
(set! scale guncourse-scale)
|
||||||
)
|
)
|
||||||
((= arg0 4)
|
((= highscore-index 4)
|
||||||
(set! f0-0 0.5)
|
(set! scale 0.5)
|
||||||
)
|
)
|
||||||
((= arg0 5)
|
((= highscore-index 5)
|
||||||
(set! f0-0 f1-0)
|
(set! scale race-scale)
|
||||||
)
|
)
|
||||||
((= arg0 6)
|
((= highscore-index 6)
|
||||||
(set! f0-0 f1-0)
|
(set! scale race-scale)
|
||||||
)
|
)
|
||||||
((= arg0 7)
|
((= highscore-index 7)
|
||||||
(set! f0-0 f1-0)
|
(set! scale race-scale)
|
||||||
)
|
)
|
||||||
((= arg0 8)
|
((= highscore-index 8)
|
||||||
(set! f0-0 f1-0)
|
(set! scale race-scale)
|
||||||
)
|
)
|
||||||
((= arg0 9)
|
((= highscore-index 9)
|
||||||
(set! f0-0 f1-0)
|
(set! scale race-scale)
|
||||||
)
|
)
|
||||||
((= arg0 10)
|
((= highscore-index 10)
|
||||||
(set! f0-0 f1-0)
|
(set! scale race-scale)
|
||||||
)
|
)
|
||||||
((= arg0 11)
|
((= highscore-index 11)
|
||||||
(set! f0-0 f1-0)
|
(set! scale race-scale)
|
||||||
)
|
)
|
||||||
((= arg0 12)
|
((= highscore-index 12)
|
||||||
(set! f0-0 f1-0)
|
(set! scale race-scale)
|
||||||
)
|
)
|
||||||
((= arg0 13)
|
((= highscore-index 13)
|
||||||
(set! f0-0 0.7)
|
(set! scale 0.7)
|
||||||
)
|
)
|
||||||
((= arg0 14)
|
((= highscore-index 14)
|
||||||
(set! f0-0 0.7)
|
(set! scale 0.7)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
f0-0
|
scale
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
(defun get-highscore-icon-xoffset ((arg0 int))
|
(defun get-highscore-icon-xoffset ((highscore-index int))
|
||||||
(if (= (get-aspect-ratio) 'aspect4x3)
|
(if (= (get-aspect-ratio) 'aspect4x3)
|
||||||
435
|
435
|
||||||
410
|
410
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
(defun get-highscore-icon-yoffset ((arg0 int))
|
(defun get-highscore-icon-yoffset ((highscore-index int))
|
||||||
"TODO - takes an enum?"
|
(let ((offset (if (= (get-aspect-ratio) 'aspect4x3)
|
||||||
(let ((v0-1 (if (= (get-aspect-ratio) 'aspect4x3)
|
130
|
||||||
130
|
120
|
||||||
120
|
)
|
||||||
)
|
)
|
||||||
)
|
|
||||||
)
|
)
|
||||||
(let ((a0-1 130)
|
(let ((guncourse-offset 130)
|
||||||
(v1-0 120)
|
(race-offset 120)
|
||||||
)
|
)
|
||||||
(cond
|
(cond
|
||||||
((zero? arg0)
|
((zero? highscore-index)
|
||||||
(set! v0-1 a0-1)
|
(set! offset guncourse-offset)
|
||||||
)
|
)
|
||||||
((= arg0 1)
|
((= highscore-index 1)
|
||||||
(set! v0-1 a0-1)
|
(set! offset guncourse-offset)
|
||||||
)
|
)
|
||||||
((= arg0 2)
|
((= highscore-index 2)
|
||||||
(set! v0-1 a0-1)
|
(set! offset guncourse-offset)
|
||||||
)
|
)
|
||||||
((= arg0 3)
|
((= highscore-index 3)
|
||||||
(set! v0-1 a0-1)
|
(set! offset guncourse-offset)
|
||||||
)
|
)
|
||||||
((= arg0 5)
|
((= highscore-index 5)
|
||||||
(set! v0-1 v1-0)
|
(set! offset race-offset)
|
||||||
)
|
)
|
||||||
((= arg0 6)
|
((= highscore-index 6)
|
||||||
(set! v0-1 v1-0)
|
(set! offset race-offset)
|
||||||
)
|
)
|
||||||
((= arg0 7)
|
((= highscore-index 7)
|
||||||
(set! v0-1 v1-0)
|
(set! offset race-offset)
|
||||||
)
|
)
|
||||||
((= arg0 8)
|
((= highscore-index 8)
|
||||||
(set! v0-1 v1-0)
|
(set! offset race-offset)
|
||||||
)
|
)
|
||||||
((= arg0 9)
|
((= highscore-index 9)
|
||||||
(set! v0-1 v1-0)
|
(set! offset race-offset)
|
||||||
)
|
)
|
||||||
((= arg0 10)
|
((= highscore-index 10)
|
||||||
(set! v0-1 v1-0)
|
(set! offset race-offset)
|
||||||
)
|
)
|
||||||
((= arg0 11)
|
((= highscore-index 11)
|
||||||
(set! v0-1 v1-0)
|
(set! offset race-offset)
|
||||||
)
|
)
|
||||||
((= arg0 12)
|
((= highscore-index 12)
|
||||||
(set! v0-1 v1-0)
|
(set! offset race-offset)
|
||||||
)
|
)
|
||||||
((= arg0 13)
|
((= highscore-index 13)
|
||||||
(set! v0-1 125)
|
(set! offset 125)
|
||||||
)
|
)
|
||||||
((= arg0 14)
|
((= highscore-index 14)
|
||||||
(set! v0-1 125)
|
(set! offset 125)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
v0-1
|
offset
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3082,39 +3082,37 @@
|
||||||
0
|
0
|
||||||
)
|
)
|
||||||
|
|
||||||
(defmethod respond-progress menu-highscores-option ((this menu-highscores-option) (arg0 progress) (arg1 symbol))
|
(defmethod respond-progress menu-highscores-option ((this menu-highscores-option) (progress progress) (selected? symbol))
|
||||||
"Handle progress menu navigation logic."
|
"Handle progress menu navigation logic."
|
||||||
(set! (-> arg0 sliding) (seek-ease
|
(set! (-> progress sliding) (seek-ease
|
||||||
(-> arg0 sliding)
|
(-> progress sliding)
|
||||||
0.0
|
0.0
|
||||||
(* 0.1 (-> self clock time-adjust-ratio))
|
|
||||||
0.3
|
|
||||||
(* 0.001 (-> self clock time-adjust-ratio))
|
|
||||||
)
|
|
||||||
)
|
|
||||||
(set! (-> arg0 sliding-off) (seek-ease
|
|
||||||
(-> arg0 sliding-off)
|
|
||||||
1.0
|
|
||||||
(* 0.1 (-> self clock time-adjust-ratio))
|
(* 0.1 (-> self clock time-adjust-ratio))
|
||||||
-0.3
|
0.3
|
||||||
(* 0.001 (-> self clock time-adjust-ratio))
|
(* 0.001 (-> self clock time-adjust-ratio))
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
(set! (-> progress sliding-off) (seek-ease
|
||||||
|
(-> progress sliding-off)
|
||||||
|
1.0
|
||||||
|
(* 0.1 (-> self clock time-adjust-ratio))
|
||||||
|
-0.3
|
||||||
|
(* 0.001 (-> self clock time-adjust-ratio))
|
||||||
|
)
|
||||||
|
)
|
||||||
(when (-> *bigmap* progress-minimap)
|
(when (-> *bigmap* progress-minimap)
|
||||||
(let ((s5-0 #f))
|
(let ((play-sound? #f))
|
||||||
(cond
|
(cond
|
||||||
((or (cpad-pressed? 0 right l-analog-right)
|
((or (cpad-pressed? 0 right l-analog-right)
|
||||||
(and (cpad-hold? 0 right l-analog-right)
|
(and (cpad-hold? 0 right l-analog-right) (>= (- (current-time) (-> this last-move)) (seconds 0.2)))
|
||||||
(>= (- (current-time) (-> this last-move)) (seconds 0.2))
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
(when (< 1 (get-num-highscores))
|
(when (< 1 (get-num-highscores))
|
||||||
(set! (-> this last-move) (current-time))
|
(set! (-> this last-move) (current-time))
|
||||||
(set! s5-0 #t)
|
(set! play-sound? #t)
|
||||||
(set! (-> this prev-page-index) (-> this page-index))
|
(set! (-> this prev-page-index) (-> this page-index))
|
||||||
(set! (-> this page-index) (get-next-highscore (-> this page-index)))
|
(set! (-> this page-index) (get-next-highscore (-> this page-index)))
|
||||||
(set! (-> arg0 sliding) 1.0)
|
(set! (-> progress sliding) 1.0)
|
||||||
(set! (-> arg0 sliding-off) 0.0)
|
(set! (-> progress sliding-off) 0.0)
|
||||||
(set! (-> this slide-dir) -1.0)
|
(set! (-> this slide-dir) -1.0)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
@ -3125,25 +3123,25 @@
|
||||||
(set! (-> this last-move) (current-time))
|
(set! (-> this last-move) (current-time))
|
||||||
(set! (-> this prev-page-index) (-> this page-index))
|
(set! (-> this prev-page-index) (-> this page-index))
|
||||||
(set! (-> this page-index) (get-prev-highscore (-> this page-index)))
|
(set! (-> this page-index) (get-prev-highscore (-> this page-index)))
|
||||||
(set! s5-0 #t)
|
(set! play-sound? #t)
|
||||||
(set! (-> arg0 sliding) -1.0)
|
(set! (-> progress sliding) -1.0)
|
||||||
(set! (-> arg0 sliding-off) 0.0)
|
(set! (-> progress sliding-off) 0.0)
|
||||||
(set! (-> this slide-dir) 1.0)
|
(set! (-> this slide-dir) 1.0)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
((cpad-pressed? 0 triangle confirm)
|
((cpad-pressed? 0 triangle confirm)
|
||||||
(logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons triangle confirm))
|
(logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons triangle confirm))
|
||||||
(logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons triangle confirm))
|
(logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons triangle confirm))
|
||||||
(set! (-> arg0 sliding) 0.0)
|
(set! (-> progress sliding) 0.0)
|
||||||
(set! (-> arg0 sliding-off) 1.0)
|
(set! (-> progress sliding-off) 1.0)
|
||||||
(if (!= (-> *progress-state* starting-state) 'title)
|
(if (!= (-> *progress-state* starting-state) 'title)
|
||||||
(sound-play "window-contract")
|
(sound-play "window-contract")
|
||||||
(sound-play "generic-beep")
|
(sound-play "generic-beep")
|
||||||
)
|
)
|
||||||
(pop-state arg0)
|
(pop-state progress)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
(if s5-0
|
(if play-sound?
|
||||||
(sound-play "score-slide")
|
(sound-play "score-slide")
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -128,6 +128,26 @@
|
||||||
(progress-highscores-6th #x13c)
|
(progress-highscores-6th #x13c)
|
||||||
(progress-highscores-7th #x13d)
|
(progress-highscores-7th #x13d)
|
||||||
(progress-highscores-8th #x13e)
|
(progress-highscores-8th #x13e)
|
||||||
|
(progress-highscores-header-race #x13f)
|
||||||
|
(progress-highscores-subheader-class1 #x140)
|
||||||
|
(progress-highscores-subheader-class2 #x141)
|
||||||
|
(progress-highscores-subheader-class3 #x142)
|
||||||
|
(progress-highscores-header-guncourse #x143)
|
||||||
|
(progress-highscores-subheader-scattergun #x144)
|
||||||
|
(progress-highscores-subheader-blaster #x145)
|
||||||
|
(progress-highscores-subheader-vulcan #x146)
|
||||||
|
(progress-highscores-subheader-peacemaker #x147)
|
||||||
|
(progress-highscores-header-onin #x148)
|
||||||
|
(progress-highscores-header-metalhead-mash #x149)
|
||||||
|
(progress-highscores-header-jetboard #x14a)
|
||||||
|
(progress-highscores-subheader-oninstent #x14b)
|
||||||
|
(progress-highscores-subheader-hiphog #x14c)
|
||||||
|
(progress-highscores-subheader-stadium #x14d)
|
||||||
|
(progress-highscores-subheader-class1-reverse #x14e)
|
||||||
|
(progress-highscores-subheader-class2-reverse #x14f)
|
||||||
|
(progress-highscores-subheader-class3-reverse #x150)
|
||||||
|
(progress-highscores-subheader-portrace #x151)
|
||||||
|
(progress-highscores-subheader-cityrace #x152)
|
||||||
(progress-root-secrets #x153)
|
(progress-root-secrets #x153)
|
||||||
(progress-secrets-unlocked #x154)
|
(progress-secrets-unlocked #x154)
|
||||||
(progress-secrets-toggle-beard #x0155)
|
(progress-secrets-toggle-beard #x0155)
|
||||||
|
|
@ -719,6 +739,14 @@
|
||||||
(progress-hires-sky #x1309)
|
(progress-hires-sky #x1309)
|
||||||
(progress-fast-airlock #x130a)
|
(progress-fast-airlock #x130a)
|
||||||
(progress-fast-elevator #x130b)
|
(progress-fast-elevator #x130b)
|
||||||
|
(progress-highscores-header-speedrun #x130c)
|
||||||
|
(progress-highscores-subheader-speedrun-any #x130d)
|
||||||
|
(progress-highscores-subheader-speedrun-anyhoverless #x130e)
|
||||||
|
(progress-highscores-subheader-speedrun-allmissions #x130f)
|
||||||
|
(progress-highscores-subheader-speedrun-100 #x1310)
|
||||||
|
(progress-highscores-subheader-speedrun-anyorbs #x1311)
|
||||||
|
(progress-highscores-subheader-speedrun-anyhero #x1312)
|
||||||
|
(progress-highscores-local-time #x1313)
|
||||||
)
|
)
|
||||||
;; ---text-id
|
;; ---text-id
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -226,9 +226,19 @@
|
||||||
|
|
||||||
(define-extern pc-encode-utf8-string (function string string none))
|
(define-extern pc-encode-utf8-string (function string string none))
|
||||||
|
|
||||||
;; Used to dump fixture data for the editor, re-enable end-to-end if you need it
|
;; Jak 2 Specific Kernel Definitions
|
||||||
;; (define-extern has-level-been-dumped-lights? (function string symbol))
|
(define *pc-waiting-on-rpc?* symbol)
|
||||||
;; (define-extern has-level-been-dumped-regions? (function string symbol))
|
(define *pc-rpc-error?* symbol)
|
||||||
|
(define-extern pc-get-last-rpc-error (function string none))
|
||||||
|
(define-extern pc-fetch-external-race-times (function string none))
|
||||||
|
(define-extern pc-fetch-external-speedrun-times (function string none))
|
||||||
|
(define-extern pc-fetch-external-highscores (function string none))
|
||||||
|
(define-extern pc-get-external-race-time (function string int string (pointer float) none)) ;; returns the score and the name in the given string ptr
|
||||||
|
(define-extern pc-get-external-speedrun-time (function string int string (pointer float) none)) ;; returns the score and the name in the given string ptr
|
||||||
|
(define-extern pc-get-external-highscore (function string int string (pointer float) none)) ;; returns the score and the name in the given string ptr
|
||||||
|
(define-extern pc-get-num-external-race-times (function string int))
|
||||||
|
(define-extern pc-get-num-external-speedrun-times (function string int))
|
||||||
|
(define-extern pc-get-num-external-highscores (function string int))
|
||||||
|
|
||||||
(define-extern file-stream-open (function file-stream string symbol file-stream))
|
(define-extern file-stream-open (function file-stream string symbol file-stream))
|
||||||
(define-extern file-stream-close (function file-stream file-stream))
|
(define-extern file-stream-close (function file-stream file-stream))
|
||||||
|
|
|
||||||
|
|
@ -60,6 +60,7 @@
|
||||||
(when (and (-> *pc-settings* speedrunner-mode?)
|
(when (and (-> *pc-settings* speedrunner-mode?)
|
||||||
(-> this display-run-info?))
|
(-> this display-run-info?))
|
||||||
(clear *temp-string*)
|
(clear *temp-string*)
|
||||||
|
(clear *pc-encoded-temp-string*)
|
||||||
(format *temp-string* "<COLOR_WHITE>PC Cheats: <COLOR_GREEN>~D~%<COLOR_WHITE>Frame Rate: <COLOR_GREEN>~D~%<COLOR_WHITE>PS2 Actor Vis?: <COLOR_GREEN>~S~%<COLOR_WHITE>Version: <COLOR_GREEN>~S~%"
|
(format *temp-string* "<COLOR_WHITE>PC Cheats: <COLOR_GREEN>~D~%<COLOR_WHITE>Frame Rate: <COLOR_GREEN>~D~%<COLOR_WHITE>PS2 Actor Vis?: <COLOR_GREEN>~S~%<COLOR_WHITE>Version: <COLOR_GREEN>~S~%"
|
||||||
(the-as int (-> *pc-settings* cheats))
|
(the-as int (-> *pc-settings* cheats))
|
||||||
(-> *pc-settings* target-fps)
|
(-> *pc-settings* target-fps)
|
||||||
|
|
@ -67,6 +68,9 @@
|
||||||
*pc-settings-built-sha*)
|
*pc-settings-built-sha*)
|
||||||
(pc-encode-utf8-string *temp-string* *pc-encoded-temp-string*)
|
(pc-encode-utf8-string *temp-string* *pc-encoded-temp-string*)
|
||||||
(with-dma-buffer-add-bucket ((buf (-> (current-frame) global-buf)) (bucket-id debug-no-zbuf1))
|
(with-dma-buffer-add-bucket ((buf (-> (current-frame) global-buf)) (bucket-id debug-no-zbuf1))
|
||||||
|
;; reset bucket settings prior to drawing - font won't do this for us, and
|
||||||
|
;; draw-raw-image can sometimes mess them up. (intro sequence)
|
||||||
|
(dma-buffer-add-gs-set-flusha buf (alpha-1 (new 'static 'gs-alpha :b #x1 :d #x1)) (tex1-1 (new 'static 'gs-tex1 :mmag #x1 :mmin #x1)))
|
||||||
(let ((font-ctx (new 'stack 'font-context *font-default-matrix* 510 375 0.0 (font-color default) (font-flags right shadow kerning large))))
|
(let ((font-ctx (new 'stack 'font-context *font-default-matrix* 510 375 0.0 (font-color default) (font-flags right shadow kerning large))))
|
||||||
(set! (-> font-ctx scale) 0.325)
|
(set! (-> font-ctx scale) 0.325)
|
||||||
(draw-string-adv *pc-encoded-temp-string* buf font-ctx))))
|
(draw-string-adv *pc-encoded-temp-string* buf font-ctx))))
|
||||||
|
|
|
||||||
|
|
@ -624,13 +624,14 @@
|
||||||
;; draw-raw-image can sometimes mess them up.
|
;; draw-raw-image can sometimes mess them up.
|
||||||
(dma-buffer-add-gs-set-flusha buf
|
(dma-buffer-add-gs-set-flusha buf
|
||||||
(alpha-1 (new 'static 'gs-alpha :b #x1 :d #x1))
|
(alpha-1 (new 'static 'gs-alpha :b #x1 :d #x1))
|
||||||
(tex1-1 (new 'static 'gs-tex1 :mmag #x1 :mmin #x1))
|
(tex1-1 (new 'static 'gs-tex1 :mmag #x1 :mmin #x1)))
|
||||||
)
|
(clear *pc-encoded-temp-string*)
|
||||||
(draw-string-xy *pc-settings-built-sha*
|
(clear *temp-string*)
|
||||||
buf
|
(format *temp-string* "<COLOR_WHITE>~S" *pc-settings-built-sha*)
|
||||||
512 14
|
(pc-encode-utf8-string *temp-string* *pc-encoded-temp-string*)
|
||||||
(font-color flat-yellow)
|
(let ((font-ctx (new 'stack 'font-context *font-default-matrix* 2 403 0.0 (font-color default) (font-flags shadow kerning large))))
|
||||||
(font-flags right shadow kerning))))
|
(set! (-> font-ctx scale) 0.325)
|
||||||
|
(draw-string-adv *pc-encoded-temp-string* buf font-ctx))))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -51,325 +51,595 @@
|
||||||
(none)
|
(none)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
(defun get-highscore-icon-xoffset ((arg0 int))
|
|
||||||
(cond
|
|
||||||
((not (-> *pc-settings* use-vis?))
|
|
||||||
(adjust-game-x 435.0)
|
|
||||||
)
|
|
||||||
((= (get-aspect-ratio) 'aspect4x3)
|
|
||||||
435)
|
|
||||||
(else
|
|
||||||
410)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
(deftype highscore-cup-draw-params (structure)
|
(deftype highscore-cup-draw-params (structure)
|
||||||
((cup-scale float)
|
((cup-scale float)
|
||||||
(cup-y int16)
|
(cup-y int16)
|
||||||
(cup-x int16)
|
(y-on-later-pages int16)
|
||||||
(font-scale float)
|
(cup-x int16)
|
||||||
)
|
(font-scale float)
|
||||||
)
|
(font-scale-on-later-pages float)))
|
||||||
|
|
||||||
(define *highscore-cup-draw-params* (new 'static 'inline-array highscore-cup-draw-params 8
|
(define *highscore-cup-draw-params* (new 'static 'inline-array highscore-cup-draw-params 8
|
||||||
(new 'static 'highscore-cup-draw-params :cup-scale 0.25 :cup-y 174 :cup-x 112 :font-scale -1.0)
|
(new 'static 'highscore-cup-draw-params :cup-scale 0.25 :cup-y 174 :y-on-later-pages 180 :cup-x 112 :font-scale -1.0 :font-scale-on-later-pages 0.4)
|
||||||
(new 'static 'highscore-cup-draw-params :cup-scale 0.22 :cup-y 197 :cup-x 111 :font-scale 0.5)
|
(new 'static 'highscore-cup-draw-params :cup-scale 0.22 :cup-y 197 :y-on-later-pages 195 :cup-x 111 :font-scale 0.5 :font-scale-on-later-pages 0.4)
|
||||||
(new 'static 'highscore-cup-draw-params :cup-scale 0.20 :cup-y 217 :cup-x 110 :font-scale 0.4)
|
(new 'static 'highscore-cup-draw-params :cup-scale 0.20 :cup-y 217 :y-on-later-pages 210 :cup-x 110 :font-scale 0.4 :font-scale-on-later-pages 0.4)
|
||||||
(new 'static 'highscore-cup-draw-params :cup-scale 0.15 :cup-y 232 :cup-x 109 :font-scale 0.3)
|
(new 'static 'highscore-cup-draw-params :cup-scale 0.15 :cup-y 232 :y-on-later-pages 225 :cup-x 109 :font-scale 0.3 :font-scale-on-later-pages 0.4)
|
||||||
(new 'static 'highscore-cup-draw-params :cup-scale 0.15 :cup-y 244 :cup-x 109 :font-scale -1.0)
|
(new 'static 'highscore-cup-draw-params :cup-scale 0.15 :cup-y 244 :y-on-later-pages 239 :cup-x 109 :font-scale -1.0 :font-scale-on-later-pages 0.4)
|
||||||
(new 'static 'highscore-cup-draw-params :cup-scale 0.15 :cup-y 256 :cup-x 109 :font-scale -1.0)
|
(new 'static 'highscore-cup-draw-params :cup-scale 0.15 :cup-y 256 :y-on-later-pages 253 :cup-x 109 :font-scale -1.0 :font-scale-on-later-pages 0.4)
|
||||||
(new 'static 'highscore-cup-draw-params :cup-scale 0.15 :cup-y 268 :cup-x 109 :font-scale -1.0)
|
(new 'static 'highscore-cup-draw-params :cup-scale 0.15 :cup-y 268 :y-on-later-pages 266 :cup-x 109 :font-scale -1.0 :font-scale-on-later-pages 0.4)
|
||||||
(new 'static 'highscore-cup-draw-params :cup-scale 0.15 :cup-y 280 :cup-x 109 :font-scale -1.0)
|
(new 'static 'highscore-cup-draw-params :cup-scale 0.15 :cup-y 280 :y-on-later-pages 280 :cup-x 109 :font-scale -1.0 :font-scale-on-later-pages 0.4)))
|
||||||
))
|
|
||||||
|
|
||||||
(defun print-highscore ((arg0 print-highscore-obj))
|
(defun str-print-time-pc ((time float) (omit-milliseconds? symbol))
|
||||||
(local-vars (sv-16 font-context) (sv-20 float) (sv-24 int) (sv-32 int))
|
"Basically the same as str-print-time, but with hours support and can omit milliseconds
|
||||||
(set! sv-16 (-> arg0 context))
|
uses letters for the units instead of colons which can be ambiguous"
|
||||||
(set! sv-20 (-> arg0 interp))
|
(let* ((hours (the int (/ time 3600)))
|
||||||
|
(minutes (the int (/ (- time (* 3600.0 hours)) 60)))
|
||||||
|
(seconds (the int (- time (* 3600.0 hours) (* 60.0 minutes))))
|
||||||
|
(milliseconds (the int (* 1000.0 (- time (the int time))))))
|
||||||
|
(clear *temp-string*)
|
||||||
|
(when (> hours 0)
|
||||||
|
(format *temp-string* "~Dh" hours))
|
||||||
|
(format *temp-string* "~Dm" minutes)
|
||||||
|
(format *temp-string* "~Ds" seconds)
|
||||||
|
(when (not omit-milliseconds?)
|
||||||
|
(format *temp-string* "~Dms" milliseconds)))
|
||||||
|
*temp-string*)
|
||||||
|
|
||||||
|
(defun get-highscore-type ((highscore-index-arg int))
|
||||||
|
"Given a highscore index, return it's type as a symbol
|
||||||
|
@param highscore-index-arg something
|
||||||
|
@returns The type, as as symbol."
|
||||||
|
(let ((highscore-type 'game))
|
||||||
|
(let ((highscore-index highscore-index-arg))
|
||||||
|
(cond
|
||||||
|
((and (>= highscore-index 0) (<= highscore-index 4)) (set! highscore-type 'game))
|
||||||
|
((and (>= highscore-index 5) (<= highscore-index 12)) (set! highscore-type 'race))
|
||||||
|
((= highscore-index 13) (set! highscore-type 'game))
|
||||||
|
((and (>= highscore-index 15) (<= highscore-index 20)) (set! highscore-type 'speedrun))))
|
||||||
|
highscore-type))
|
||||||
|
|
||||||
|
(defun print-highscore-pc ((highscore-row print-highscore-obj) (name string))
|
||||||
|
(local-vars (font-ctx font-context) (cup-x-offset float) (sv-24 int) (sv-32 int))
|
||||||
|
(set! font-ctx (-> highscore-row context))
|
||||||
|
(set! cup-x-offset (-> highscore-row interp))
|
||||||
(set! sv-24 50)
|
(set! sv-24 50)
|
||||||
(set! sv-32 (if (= (get-aspect-ratio) 'aspect4x3)
|
(set! sv-32 (if (= (get-aspect-ratio) 'aspect4x3)
|
||||||
320
|
320
|
||||||
300
|
300))
|
||||||
)
|
|
||||||
)
|
|
||||||
(when (not (-> *pc-settings* use-vis?))
|
(when (not (-> *pc-settings* use-vis?))
|
||||||
(set! sv-32 (the int (* (-> *pc-settings* aspect-ratio-reciprocal) sv-32)))
|
(set! sv-32 (the int (* (-> *pc-settings* aspect-ratio-reciprocal) sv-32)))
|
||||||
(set! sv-24 (the int (* (-> *pc-settings* aspect-ratio-reciprocal) sv-24)))
|
(set! sv-24 (the int (* (-> *pc-settings* aspect-ratio-reciprocal) sv-24))))
|
||||||
)
|
(set-flags! font-ctx (font-flags kerning large))
|
||||||
(set-flags! sv-16 (font-flags kerning large))
|
(+! (-> font-ctx origin x) (the float sv-24))
|
||||||
(+! (-> sv-16 origin x) (the float sv-24))
|
|
||||||
|
(let* ((draw-params (-> *highscore-cup-draw-params* (-> highscore-row place)))
|
||||||
(let* ((draw-params (-> *highscore-cup-draw-params* (-> arg0 place)))
|
|
||||||
(cup-x (-> draw-params cup-x)))
|
(cup-x (-> draw-params cup-x)))
|
||||||
;; correct cup x
|
;; correct cup x
|
||||||
(when (not (-> *pc-settings* use-vis?))
|
(when (not (-> *pc-settings* use-vis?))
|
||||||
(set! cup-x (adjust-game-x (the float cup-x))))
|
(set! cup-x (adjust-game-x (the float cup-x))))
|
||||||
;; set font scale
|
;; set font scale
|
||||||
(if (> (-> draw-params font-scale) 0)
|
(if (> (-> *progress-pc-generic-store* current-highscore-page-index) 0)
|
||||||
(set-scale! sv-16 (-> draw-params font-scale)))
|
(set-scale! font-ctx (-> draw-params font-scale-on-later-pages))
|
||||||
|
(if (> (-> draw-params font-scale) 0)
|
||||||
|
(set-scale! font-ctx (-> draw-params font-scale))))
|
||||||
;; move font down
|
;; move font down
|
||||||
(when (< 0 (-> arg0 place))
|
(when (< 0 (-> highscore-row place))
|
||||||
(+! (-> sv-16 origin y) (the float (- (-> draw-params cup-y) (-> *highscore-cup-draw-params* (1- (-> arg0 place)) cup-y)))))
|
(if (> (-> *progress-pc-generic-store* current-highscore-page-index) 0)
|
||||||
|
(+! (-> font-ctx origin y) (the float (- (-> draw-params y-on-later-pages) (-> *highscore-cup-draw-params* (1- (-> highscore-row place)) y-on-later-pages))))
|
||||||
|
(+! (-> font-ctx origin y) (the float (- (-> draw-params cup-y) (-> *highscore-cup-draw-params* (1- (-> highscore-row place)) cup-y))))))
|
||||||
;; print highscore text
|
;; print highscore text
|
||||||
(print-game-text (string-format "~S" (lookup-text! *common-text* (-> (new 'static 'boxed-array :type text-id (text-id progress-highscores-1st)
|
(if (and (nonzero? name) (!= name #f))
|
||||||
(text-id progress-highscores-2nd)
|
(print-game-text (string-format "~S" name) font-ctx #f 44 (bucket-id progress))
|
||||||
(text-id progress-highscores-3rd)
|
(print-game-text (string-format "~S" (lookup-text! *common-text* (-> (new 'static 'boxed-array :type text-id (text-id progress-highscores-1st)
|
||||||
(text-id progress-highscores-4th)
|
(text-id progress-highscores-2nd)
|
||||||
(text-id progress-highscores-5th)
|
(text-id progress-highscores-3rd)
|
||||||
(text-id progress-highscores-6th)
|
(text-id progress-highscores-4th)
|
||||||
(text-id progress-highscores-7th)
|
(text-id progress-highscores-5th)
|
||||||
(text-id progress-highscores-8th))
|
(text-id progress-highscores-6th)
|
||||||
(-> arg0 place)) #f)) sv-16 #f 44 (bucket-id progress))
|
(text-id progress-highscores-7th)
|
||||||
|
(text-id progress-highscores-8th))
|
||||||
|
(-> highscore-row place)) #f)) font-ctx #f 44 (bucket-id progress)))
|
||||||
;; draw cup icon if we're not the previous page
|
;; draw cup icon if we're not the previous page
|
||||||
(if (not (-> arg0 previous))
|
(cond
|
||||||
(draw-highscore-cup (-> arg0 self) (eval-highscore arg0) (+ (the int sv-20) cup-x) (-> draw-params cup-y) (-> draw-params cup-scale) (-> arg0 local-scale)))
|
;; Just draw the cup based on the index if we're involving external times, it's not that complicated
|
||||||
)
|
((and (-> *pc-settings* speedrunner-mode?)
|
||||||
|
(= (-> *progress-pc-generic-store* current-highscore-page-index) 0))
|
||||||
(+! (-> sv-16 origin x) (the float sv-32))
|
;; TODO - enum
|
||||||
(set-flags! sv-16 (font-flags kerning right large))
|
(let ((place (case (-> highscore-row place)
|
||||||
|
((0) 3)
|
||||||
|
((1) 2)
|
||||||
|
((2) 1)
|
||||||
|
(else 0))))
|
||||||
|
(draw-highscore-cup (-> highscore-row self) place (+ (the int cup-x-offset) cup-x) (-> draw-params cup-y) (-> draw-params cup-scale) (-> highscore-row local-scale))))
|
||||||
|
(else
|
||||||
|
(when (and (= (-> *progress-pc-generic-store* current-highscore-page-index) 0)
|
||||||
|
(not (-> highscore-row previous)))
|
||||||
|
(draw-highscore-cup (-> highscore-row self) (eval-highscore highscore-row) (+ (the int cup-x-offset) cup-x) (-> draw-params cup-y) (-> draw-params cup-scale) (-> highscore-row local-scale))))))
|
||||||
|
(+! (-> font-ctx origin x) (the float sv-32))
|
||||||
|
(set-flags! font-ctx (font-flags kerning right large))
|
||||||
(cond
|
(cond
|
||||||
((-> arg0 game-score)
|
((-> highscore-row game-score)
|
||||||
(print-game-text (string-format "~D" (the int (-> arg0 score))) sv-16 #f 44 (bucket-id progress))
|
(print-game-text (string-format "~D" (the int (-> highscore-row score))) font-ctx #f 44 (bucket-id progress)))
|
||||||
)
|
|
||||||
(else
|
(else
|
||||||
(print-game-text (str-print-time (-> arg0 score)) sv-16 #f 44 (bucket-id progress))
|
(print-game-text (str-print-time-pc (-> highscore-row score) (= 'speedrun (get-highscore-type (-> highscore-row index)))) font-ctx #f 44 (bucket-id progress))))
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
(set-flags! sv-16 (font-flags kerning large))
|
(set-flags! font-ctx (font-flags kerning large))
|
||||||
(set! (-> sv-16 origin x) (- (-> sv-16 origin x) (the float (+ sv-24 sv-32))))
|
(set! (-> font-ctx origin x) (- (-> font-ctx origin x) (the float (+ sv-24 sv-32)))))
|
||||||
)
|
|
||||||
|
|
||||||
|
(defun highscore-available? ((highscore-index int))
|
||||||
|
(let ((available? #f))
|
||||||
|
(let ((index highscore-index))
|
||||||
|
(cond
|
||||||
|
((zero? index) (set! available? #t))
|
||||||
|
((= index 1) (set! available? (logtest? (-> *game-info* sub-task-list (game-task-node city-yellow-gun-training-introduction) flags) (game-task-node-flag closed))))
|
||||||
|
((= index 2) (set! available? (logtest? (-> *game-info* secrets) (game-secrets gungame-blue))))
|
||||||
|
((= index 3) (set! available? (logtest? (-> *game-info* secrets) (game-secrets gungame-dark))))
|
||||||
|
((= index 4) (set! available? (logtest? (-> *game-info* sub-task-list (game-task-node stadium-board1-introduction) flags) (game-task-node-flag closed))))
|
||||||
|
((= index 5) (set! available? (logtest? (-> *game-info* sub-task-list (game-task-node stadium-race-class3-introduction) flags) (game-task-node-flag closed))))
|
||||||
|
((= index 6) (set! available? (logtest? (-> *game-info* sub-task-list (game-task-node stadium-race-class2-introduction) flags) (game-task-node-flag closed))))
|
||||||
|
((= index 7) (set! available? (logtest? (-> *game-info* sub-task-list (game-task-node stadium-race-class1-introduction) flags) (game-task-node-flag closed))))
|
||||||
|
((= index 8) (set! available? (or (logtest? (-> *game-info* sub-task-list (game-task-node city-burning-bush-race-port-introduction) flags) (game-task-node-flag closed)) (open? (-> *game-info* sub-task-list (game-task-node city-burning-bush-race-port-introduction))))))
|
||||||
|
((= index 9) (set! available? (or (logtest? (-> *game-info* sub-task-list (game-task-node city-burning-bush-race-errol-introduction) flags) (game-task-node-flag closed)) (open? (-> *game-info* sub-task-list (game-task-node city-burning-bush-race-errol-introduction))))))
|
||||||
|
((= index 10) (set! available? (logtest? (-> *game-info* secrets) (game-secrets reverse-races))))
|
||||||
|
((= index 11) (set! available? (logtest? (-> *game-info* secrets) (game-secrets reverse-races))))
|
||||||
|
((= index 12) (set! available? (logtest? (-> *game-info* secrets) (game-secrets reverse-races))))
|
||||||
|
((= index 13) (set! available? (logtest? (-> *game-info* sub-task-list (game-task-node city-play-onin-game-introduction) flags) (game-task-node-flag closed))))
|
||||||
|
((= index 14) (set! available? (logtest? (-> *game-info* sub-task-list (game-task-node city-whack-introduction) flags) (game-task-node-flag closed))))
|
||||||
|
((and (>= index 15) (<= index 20)) (set! available? (and (-> *pc-settings* speedrunner-mode?))))))
|
||||||
|
available?))
|
||||||
|
|
||||||
(defmethod draw-option menu-highscores-option ((obj menu-highscores-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
|
(defun get-highscore-text ((highscore-index int))
|
||||||
(local-vars
|
(let ((id (text-id progress-highscores-header-race)))
|
||||||
(sv-96 float)
|
(let ((index highscore-index))
|
||||||
(sv-100 float)
|
(cond
|
||||||
(sv-104 float)
|
((and (>= index 0) (<= index 3)) (set! id (text-id progress-highscores-header-guncourse)))
|
||||||
(sv-108 float)
|
((= index 4) (set! id (text-id progress-highscores-header-jetboard)))
|
||||||
(sv-112 hud-box)
|
((and (>= index 5) (<= index 12)) (set! id (text-id progress-highscores-header-race)))
|
||||||
(sv-116 print-highscore-obj)
|
((= index 13) (set! id (text-id progress-highscores-header-onin)))
|
||||||
(sv-120 float)
|
((= index 14) (set! id (text-id progress-highscores-header-metalhead-mash)))
|
||||||
(sv-124 float)
|
((and (>= index 15) (<= index 20)) (set! id (text-id progress-highscores-header-speedrun)))))
|
||||||
)
|
(the-as text-id id)))
|
||||||
(let ((padding 20.0))
|
|
||||||
|
(defun get-highscore-text-sub ((highscore-index int))
|
||||||
|
(let ((id (text-id progress-highscores-subheader-class1)))
|
||||||
|
(let ((index highscore-index))
|
||||||
|
(cond
|
||||||
|
((zero? index) (set! id (text-id progress-highscores-subheader-scattergun)))
|
||||||
|
((= index 1) (set! id (text-id progress-highscores-subheader-blaster)))
|
||||||
|
((= index 2) (set! id (text-id progress-highscores-subheader-vulcan)))
|
||||||
|
((= index 3) (set! id (text-id progress-highscores-subheader-peacemaker)))
|
||||||
|
((= index 4) (set! id (text-id progress-highscores-subheader-stadium)))
|
||||||
|
((= index 5) (set! id (text-id progress-highscores-subheader-class3)))
|
||||||
|
((= index 6) (set! id (text-id progress-highscores-subheader-class2)))
|
||||||
|
((= index 7) (set! id (text-id progress-highscores-subheader-class1)))
|
||||||
|
((= index 8) (set! id (text-id progress-highscores-subheader-portrace)))
|
||||||
|
((= index 9) (set! id (text-id progress-highscores-subheader-cityrace)))
|
||||||
|
((= index 10) (set! id (text-id progress-highscores-subheader-class3-reverse)))
|
||||||
|
((= index 11) (set! id (text-id progress-highscores-subheader-class2-reverse)))
|
||||||
|
((= index 12) (set! id (text-id progress-highscores-subheader-class1-reverse)))
|
||||||
|
((= index 13) (set! id (text-id progress-highscores-subheader-oninstent)))
|
||||||
|
((= index 14) (set! id (text-id progress-highscores-subheader-hiphog)))
|
||||||
|
((= index 15) (set! id (text-id progress-highscores-subheader-speedrun-any)))
|
||||||
|
((= index 16) (set! id (text-id progress-highscores-subheader-speedrun-anyhoverless)))
|
||||||
|
((= index 17) (set! id (text-id progress-highscores-subheader-speedrun-allmissions)))
|
||||||
|
((= index 18) (set! id (text-id progress-highscores-subheader-speedrun-100)))
|
||||||
|
((= index 19) (set! id (text-id progress-highscores-subheader-speedrun-anyorbs)))
|
||||||
|
((= index 20) (set! id (text-id progress-highscores-subheader-speedrun-anyhero)))))
|
||||||
|
(the-as text-id id)))
|
||||||
|
|
||||||
|
(defun get-highscore-icon ((highscore-index int))
|
||||||
|
(let ((texture (new 'static 'texture-id :index #x10 :page #xc93)))
|
||||||
|
(let ((index highscore-index))
|
||||||
|
(cond
|
||||||
|
((zero? index) (set! texture (new 'static 'texture-id :index #x10 :page #xc93)))
|
||||||
|
((= index 1) (set! texture (new 'static 'texture-id :index #x12 :page #xc93)))
|
||||||
|
((= index 2) (set! texture (new 'static 'texture-id :index #x13 :page #xc93)))
|
||||||
|
((= index 3) (set! texture (new 'static 'texture-id :index #x11 :page #xc93)))
|
||||||
|
((= index 4) (set! texture (new 'static 'texture-id :index #xe :page #xc93)))
|
||||||
|
((and (>= index 5) (<= index 12)) (set! texture (new 'static 'texture-id :index #x1 :page #xc93)))
|
||||||
|
((= index 13) (set! texture (new 'static 'texture-id :index #x16 :page #xc93)))
|
||||||
|
((= index 14) (set! texture (new 'static 'texture-id :index #x17 :page #xc93)))
|
||||||
|
;; TODO - maybe i can lookup some unique icons for the categories? Maybe some of the bigmap ones? for now just the jetboard because fast
|
||||||
|
((and (>= index 15) (<= index 20)) (set! texture (new 'static 'texture-id :index #xe :page #xc93)))))
|
||||||
|
(the-as texture-id texture)))
|
||||||
|
|
||||||
|
(defun get-num-highscores ()
|
||||||
|
(let ((count 0))
|
||||||
|
(dotimes (max-highscores (if (-> *pc-settings* speedrunner-mode?) 21 15))
|
||||||
|
(when (highscore-available? max-highscores)
|
||||||
|
(+! count 1)))
|
||||||
|
count))
|
||||||
|
|
||||||
|
(defun get-next-highscore ((current-highscore-index int))
|
||||||
|
(let ((max-highscores (if (-> *pc-settings* speedrunner-mode?) 21 15))
|
||||||
|
(index-change 1)
|
||||||
|
(selected-index -1))
|
||||||
|
(+ current-highscore-index index-change)
|
||||||
|
(while (and (= selected-index -1) (< index-change max-highscores))
|
||||||
|
(let ((s2-0 (+ current-highscore-index index-change)))
|
||||||
|
(+! index-change 1)
|
||||||
|
(when (highscore-available? (mod s2-0 max-highscores))
|
||||||
|
(set! selected-index (mod s2-0 max-highscores)))))
|
||||||
|
(when (= selected-index -1)
|
||||||
|
(set! selected-index current-highscore-index))
|
||||||
|
selected-index))
|
||||||
|
|
||||||
|
(defun get-prev-highscore ((current-highscore-index int))
|
||||||
|
(let ((max-highscores (if (-> *pc-settings* speedrunner-mode?) 21 15))
|
||||||
|
(index-change 1)
|
||||||
|
(selected-index -1))
|
||||||
|
(+ current-highscore-index index-change)
|
||||||
|
(while (and (= selected-index -1) (< index-change max-highscores))
|
||||||
|
(let ((curr-index (- current-highscore-index index-change)))
|
||||||
|
(+! index-change 1)
|
||||||
|
(when (< curr-index 0)
|
||||||
|
(set! curr-index (+ max-highscores curr-index)))
|
||||||
|
(let ((highscore-available-fn highscore-available?)
|
||||||
|
(normalized-index (abs curr-index)))
|
||||||
|
(when (highscore-available-fn normalized-index)
|
||||||
|
(set! selected-index (abs curr-index))))))
|
||||||
|
(when (= selected-index -1)
|
||||||
|
(set! selected-index current-highscore-index))
|
||||||
|
selected-index))
|
||||||
|
|
||||||
|
(defun get-highscore-icon-scale ((highscore-index int))
|
||||||
|
(let ((scale 1.0)
|
||||||
|
(guncourse-scale 0.6)
|
||||||
|
(race-scale 0.8))
|
||||||
|
(cond
|
||||||
|
((and (>= highscore-index 0) (<= highscore-index 3)) (set! scale guncourse-scale))
|
||||||
|
((= highscore-index 4) (set! scale 0.5))
|
||||||
|
((and (>= highscore-index 5) (<= highscore-index 12)) (set! scale race-scale))
|
||||||
|
((= highscore-index 13) (set! scale 0.7))
|
||||||
|
((= highscore-index 14) (set! scale 0.7))
|
||||||
|
((and (>= highscore-index 15) (<= highscore-index 20)) (set! scale 0.5)))
|
||||||
|
scale))
|
||||||
|
|
||||||
|
(defun get-highscore-icon-xoffset ((highscore-index int))
|
||||||
|
(cond
|
||||||
|
((not (-> *pc-settings* use-vis?)) (adjust-game-x 435.0))
|
||||||
|
((= (get-aspect-ratio) 'aspect4x3) 435)
|
||||||
|
(else 410)))
|
||||||
|
|
||||||
|
;; TODO:
|
||||||
|
;; - nothing found
|
||||||
|
;; - API error
|
||||||
|
|
||||||
|
(defun progress-pc-get-external-time ((highscore-index int) (row-index int))
|
||||||
|
(case highscore-index
|
||||||
|
((0) (pc-get-external-highscore "scatter" row-index *pc-cpp-temp-string* (&-> *progress-pc-generic-store* custom-highscore-score)))
|
||||||
|
((1) (pc-get-external-highscore "blaster" row-index *pc-cpp-temp-string* (&-> *progress-pc-generic-store* custom-highscore-score)))
|
||||||
|
((2) (pc-get-external-highscore "vulcan" row-index *pc-cpp-temp-string* (&-> *progress-pc-generic-store* custom-highscore-score)))
|
||||||
|
((3) (pc-get-external-highscore "peacemaker" row-index *pc-cpp-temp-string* (&-> *progress-pc-generic-store* custom-highscore-score)))
|
||||||
|
((4) (pc-get-external-highscore "jetboard" row-index *pc-cpp-temp-string* (&-> *progress-pc-generic-store* custom-highscore-score)))
|
||||||
|
((5) (pc-get-external-race-time "class3" row-index *pc-cpp-temp-string* (&-> *progress-pc-generic-store* custom-highscore-score)))
|
||||||
|
((6) (pc-get-external-race-time "class2" row-index *pc-cpp-temp-string* (&-> *progress-pc-generic-store* custom-highscore-score)))
|
||||||
|
((7) (pc-get-external-race-time "class1" row-index *pc-cpp-temp-string* (&-> *progress-pc-generic-store* custom-highscore-score)))
|
||||||
|
((8) (pc-get-external-race-time "port" row-index *pc-cpp-temp-string* (&-> *progress-pc-generic-store* custom-highscore-score)))
|
||||||
|
((9) (pc-get-external-race-time "erol" row-index *pc-cpp-temp-string* (&-> *progress-pc-generic-store* custom-highscore-score)))
|
||||||
|
((10) (pc-get-external-race-time "class3rev" row-index *pc-cpp-temp-string* (&-> *progress-pc-generic-store* custom-highscore-score)))
|
||||||
|
((11) (pc-get-external-race-time "class2rev" row-index *pc-cpp-temp-string* (&-> *progress-pc-generic-store* custom-highscore-score)))
|
||||||
|
((12) (pc-get-external-race-time "class1rev" row-index *pc-cpp-temp-string* (&-> *progress-pc-generic-store* custom-highscore-score)))
|
||||||
|
((13) (pc-get-external-highscore "onin" row-index *pc-cpp-temp-string* (&-> *progress-pc-generic-store* custom-highscore-score)))
|
||||||
|
((14) (pc-get-external-highscore "mash" row-index *pc-cpp-temp-string* (&-> *progress-pc-generic-store* custom-highscore-score)))
|
||||||
|
((15) (pc-get-external-speedrun-time "any" row-index *pc-cpp-temp-string* (&-> *progress-pc-generic-store* custom-highscore-score)))
|
||||||
|
((16) (pc-get-external-speedrun-time "anyhoverless" row-index *pc-cpp-temp-string* (&-> *progress-pc-generic-store* custom-highscore-score)))
|
||||||
|
((17) (pc-get-external-speedrun-time "allmissions" row-index *pc-cpp-temp-string* (&-> *progress-pc-generic-store* custom-highscore-score)))
|
||||||
|
((18) (pc-get-external-speedrun-time "100" row-index *pc-cpp-temp-string* (&-> *progress-pc-generic-store* custom-highscore-score)))
|
||||||
|
((19) (pc-get-external-speedrun-time "anyorbs" row-index *pc-cpp-temp-string* (&-> *progress-pc-generic-store* custom-highscore-score)))
|
||||||
|
((20) (pc-get-external-speedrun-time "anyhero" row-index *pc-cpp-temp-string* (&-> *progress-pc-generic-store* custom-highscore-score)))))
|
||||||
|
|
||||||
|
(defun draw-highscore-page-up-down-arrows ((font-ctx font-context) (draw-up? symbol) (draw-down? symbol))
|
||||||
|
(let ((new-x-pos 58.0)
|
||||||
|
(new-y-pos-up 105)
|
||||||
|
(new-y-pos-down 190)
|
||||||
|
(new-scale 0.5)
|
||||||
|
(old-scale (-> font-ctx scale))
|
||||||
|
(old-x-pos (-> font-ctx origin x))
|
||||||
|
(old-y-pos (-> font-ctx origin y)))
|
||||||
|
(when (= (get-aspect-ratio) 'aspect16x9)
|
||||||
|
(set! new-x-pos 251.5)
|
||||||
|
(set! new-y-pos-up 75)
|
||||||
|
(set! new-y-pos-down 265))
|
||||||
|
(set! (-> font-ctx scale) new-scale)
|
||||||
|
(when draw-up?
|
||||||
|
(set! (-> font-ctx origin x) (the float new-x-pos))
|
||||||
|
(set! (-> font-ctx origin y) (the float new-y-pos-up))
|
||||||
|
(let ((print-text-fn print-game-text))
|
||||||
|
(format (clear *temp-string*) "~33L~C" 160)
|
||||||
|
(print-text-fn *temp-string* font-ctx #f 44 (bucket-id progress))))
|
||||||
|
(when draw-down?
|
||||||
|
(set! (-> font-ctx origin x) (the float new-x-pos))
|
||||||
|
(set! (-> font-ctx origin y) (the float (+ new-y-pos-up new-y-pos-down)))
|
||||||
|
(let ((print-text-fn-1 print-game-text))
|
||||||
|
(format (clear *temp-string*) "~33L~C" 162)
|
||||||
|
(print-text-fn-1 *temp-string* font-ctx #f 44 (bucket-id progress))))
|
||||||
|
(set! (-> font-ctx origin x) old-x-pos)
|
||||||
|
(set! (-> font-ctx origin y) old-y-pos)
|
||||||
|
(set! (-> font-ctx scale) old-scale))
|
||||||
|
(none))
|
||||||
|
|
||||||
|
(defun progress-pc-is-higher-score-preferred? ((highscore-index int))
|
||||||
|
(case highscore-index
|
||||||
|
((0) #t)
|
||||||
|
((1) #t)
|
||||||
|
((2) #t)
|
||||||
|
((3) #t)
|
||||||
|
((4) #t)
|
||||||
|
((5) #t)
|
||||||
|
((13) #t)
|
||||||
|
((14) #t)
|
||||||
|
(else #f)))
|
||||||
|
|
||||||
|
(defun progress-pc-get-next-external-score ((highscore-index int) (rows-already-printed int))
|
||||||
|
"Fetches the next valid score, merges with local scores. Score will be returned, name will be in [[*pc-cpp-temp-string*]]
|
||||||
|
this is a bit inefficient, but it lets us avoid keeping track of state"
|
||||||
|
(let ((return-next-value? #f)
|
||||||
|
(local-index 0)
|
||||||
|
(external-index 0)
|
||||||
|
(max-local-times (progress-pc-get-num-nonzero-local-scores highscore-index))
|
||||||
|
(max-external-times (progress-pc-max-external-scores highscore-index))
|
||||||
|
(times-enumerated 0)
|
||||||
|
(local-score-ptr (get-game-score-ref *game-info* (get-highscore-score highscore-index)))
|
||||||
|
(higher-score-preferred? (progress-pc-is-higher-score-preferred? highscore-index)))
|
||||||
|
;; first check if we should return the next value
|
||||||
|
(while (< times-enumerated (progress-pc-max-highscore-rows highscore-index))
|
||||||
|
(when (>= times-enumerated rows-already-printed)
|
||||||
|
(set! return-next-value? #t))
|
||||||
|
(cond
|
||||||
|
;; case where both arrays have times remaining
|
||||||
|
((and (< local-index max-local-times) (< external-index max-external-times))
|
||||||
|
(progress-pc-get-external-time highscore-index external-index)
|
||||||
|
(cond
|
||||||
|
((and (not higher-score-preferred?) (< (-> local-score-ptr local-index) (-> *progress-pc-generic-store* custom-highscore-score)))
|
||||||
|
(inc! times-enumerated)
|
||||||
|
(if return-next-value?
|
||||||
|
(begin
|
||||||
|
(clear *pc-cpp-temp-string*)
|
||||||
|
(format *pc-cpp-temp-string* "~S~S" "~[~1L" (lookup-text! *common-text* (text-id progress-highscores-local-time) #f))
|
||||||
|
(return (-> local-score-ptr local-index)))
|
||||||
|
(inc! local-index)))
|
||||||
|
(else
|
||||||
|
(inc! times-enumerated)
|
||||||
|
(if return-next-value?
|
||||||
|
(return (-> *progress-pc-generic-store* custom-highscore-score))
|
||||||
|
(inc! external-index)))))
|
||||||
|
;; case where we only have local times left
|
||||||
|
((< local-index max-local-times)
|
||||||
|
(inc! times-enumerated)
|
||||||
|
(if return-next-value?
|
||||||
|
(begin
|
||||||
|
(clear *pc-cpp-temp-string*)
|
||||||
|
(format *pc-cpp-temp-string* "~S~S" "~[~1L" (lookup-text! *common-text* (text-id progress-highscores-local-time) #f))
|
||||||
|
(return (-> local-score-ptr local-index)))
|
||||||
|
(inc! local-index)))
|
||||||
|
;; case where we only have external times left
|
||||||
|
((< external-index max-external-times)
|
||||||
|
(progress-pc-get-external-time highscore-index external-index)
|
||||||
|
(inc! times-enumerated)
|
||||||
|
(if return-next-value?
|
||||||
|
(return (-> *progress-pc-generic-store* custom-highscore-score))
|
||||||
|
(inc! external-index)))))
|
||||||
|
-1.0))
|
||||||
|
|
||||||
|
(defmethod draw-option menu-highscores-option ((this menu-highscores-option) (progress progress) (font-ctx font-context) (option-index int) (selected? symbol))
|
||||||
|
(let ((alpha (fmax 0.0 (* 2.0 (- 0.5 (-> progress menu-transition)))))
|
||||||
|
(padding 20.0)
|
||||||
|
(icon-scale 0.22)
|
||||||
|
(line-width 395.0)
|
||||||
|
(old-font-origin-x (-> font-ctx origin x))
|
||||||
|
(ui-boundary (new 'stack-no-clear 'hud-box))
|
||||||
|
(highscore-row (new 'stack 'print-highscore-obj))
|
||||||
|
(row-width 0.0)
|
||||||
|
(unknown-todo 0.0))
|
||||||
(if (not (-> *pc-settings* use-vis?))
|
(if (not (-> *pc-settings* use-vis?))
|
||||||
(*! padding (-> *pc-settings* aspect-ratio-reciprocal)))
|
(*! padding (-> *pc-settings* aspect-ratio-reciprocal)))
|
||||||
(set! sv-96 (* 2.0 (- 0.5 (-> arg0 menu-transition))))
|
|
||||||
(set! sv-100 0.22)
|
|
||||||
(set! sv-104 395.0)
|
|
||||||
(if (not (-> *pc-settings* use-vis?))
|
(if (not (-> *pc-settings* use-vis?))
|
||||||
(*! sv-104 (-> *pc-settings* aspect-ratio-reciprocal)))
|
(*! line-width (-> *pc-settings* aspect-ratio-reciprocal)))
|
||||||
(set! sv-108 (-> arg1 origin x))
|
(set! row-width (* (-> progress sliding) line-width))
|
||||||
(set! sv-112 (new 'stack-no-clear 'hud-box))
|
(set! unknown-todo (* (-> progress sliding-off) (-> this slide-dir) line-width))
|
||||||
(set! sv-116 (new 'stack 'print-highscore-obj))
|
|
||||||
(set! sv-120 (* (-> arg0 sliding) sv-104))
|
|
||||||
(set! sv-124 (* (-> arg0 sliding-off) (-> obj slide-dir) sv-104))
|
|
||||||
(if (< sv-96 0.0)
|
|
||||||
(set! sv-96 0.0)
|
|
||||||
)
|
|
||||||
(cond
|
(cond
|
||||||
((not (-> *bigmap* progress-minimap))
|
((or (= *pc-waiting-on-rpc?* #t) (not (-> *bigmap* progress-minimap)))
|
||||||
(draw-busy-loading arg1)
|
(draw-busy-loading font-ctx))
|
||||||
)
|
|
||||||
(else
|
(else
|
||||||
;; initial font parameters
|
;; initial font parameters
|
||||||
(set! (-> arg1 alpha) sv-96)
|
(set! (-> font-ctx alpha) alpha)
|
||||||
(set-scale! arg1 1.0)
|
(set-scale! font-ctx 1.0)
|
||||||
(set-flags! arg1 (font-flags kerning middle large))
|
(set-flags! font-ctx (font-flags kerning middle large))
|
||||||
(set-color! arg1 (font-color progress))
|
(set-color! font-ctx (font-color progress))
|
||||||
|
|
||||||
;; set up for decoration text
|
;; set up for decoration text
|
||||||
(set! (-> arg1 origin x) 59.0)
|
(set! (-> font-ctx origin x) 59.0)
|
||||||
(if (not (-> *pc-settings* use-vis?))
|
(if (not (-> *pc-settings* use-vis?))
|
||||||
(set! (-> arg1 origin x) (the float (adjust-game-x (-> arg1 origin x)))))
|
(set! (-> font-ctx origin x) (the float (adjust-game-x (-> font-ctx origin x)))))
|
||||||
(set! (-> arg1 origin y) 78.0)
|
(set! (-> font-ctx origin y) 78.0)
|
||||||
(set! (-> arg1 width) sv-104)
|
(set! (-> font-ctx width) line-width)
|
||||||
(set! (-> arg1 height) 215.0)
|
(set! (-> font-ctx height) 215.0)
|
||||||
|
|
||||||
;; set the scissor region
|
;; set the scissor region
|
||||||
(begin-scissor sv-112 arg0)
|
(begin-scissor ui-boundary progress)
|
||||||
|
|
||||||
;; set up for highscore icon
|
;; set up for highscore icon
|
||||||
(set! (-> obj sprites 0 tex) (lookup-texture-by-id (new 'static 'texture-id :index #x3 :page #xc93)))
|
(set! (-> this sprites 0 tex) (lookup-texture-by-id (new 'static 'texture-id :index #x3 :page #xc93)))
|
||||||
(set! (-> obj sprites 0 flags) (the-as uint 4))
|
(set! (-> this sprites 0 flags) (the-as uint 4))
|
||||||
(set! (-> obj sprites 0 scale-x) sv-100)
|
(set! (-> this sprites 0 scale-x) icon-scale)
|
||||||
(set! (-> obj sprites 0 scale-y) sv-100)
|
(set! (-> this sprites 0 scale-y) icon-scale)
|
||||||
(let ((v1-33 (-> obj sprites 0 color2)))
|
(let ((icon-sprite (-> this sprites 0 color2)))
|
||||||
(set! (-> v1-33 0) 128)
|
(set! (-> icon-sprite 0) 128)
|
||||||
(set! (-> v1-33 1) 128)
|
(set! (-> icon-sprite 1) 128)
|
||||||
(set! (-> v1-33 2) 128)
|
(set! (-> icon-sprite 2) 128)
|
||||||
(set! (-> v1-33 3) (the int (* 128.0 sv-96)))
|
(set! (-> icon-sprite 3) (the int (* 128.0 alpha)))
|
||||||
)
|
)
|
||||||
(set! (-> obj sprites 0 pos z) #xfffff0)
|
(set! (-> this sprites 0 pos z) #xfffff0)
|
||||||
(set! (-> obj sprites 0 pos w) 0)
|
(set! (-> this sprites 0 pos w) 0)
|
||||||
|
|
||||||
;; draw decoration text
|
;; draw decoration text
|
||||||
(if (= (-> *setting-control* user-default language) (language-enum spanish))
|
(if (= (-> *setting-control* user-default language) (language-enum spanish))
|
||||||
(draw-decoration obj arg1 sv-96 (text-id progress-root-highscores) #t 0.8)
|
(draw-decoration this font-ctx alpha (text-id progress-root-highscores) #t 0.8)
|
||||||
(draw-decoration obj arg1 sv-96 (text-id progress-root-highscores) #t 0.95)
|
(draw-decoration this font-ctx alpha (text-id progress-root-highscores) #t 0.95))
|
||||||
)
|
|
||||||
|
;; draw scrolling arrows if applicable
|
||||||
|
(when (> (progress-pc-max-highscore-rows (-> this page-index)) 8)
|
||||||
|
(draw-highscore-page-up-down-arrows font-ctx
|
||||||
|
(> (-> *progress-pc-generic-store* current-highscore-page-index) 0)
|
||||||
|
(< (* (inc (-> *progress-pc-generic-store* current-highscore-page-index)) 8) (progress-pc-max-highscore-rows (-> this page-index)))))
|
||||||
|
|
||||||
;; draw highscore title (e.g 'Gun Course')
|
;; draw highscore title (e.g 'Gun Course')
|
||||||
(set-scale! arg1 0.6)
|
(set-scale! font-ctx 0.6)
|
||||||
(set! (-> arg1 height) 185.0)
|
(set! (-> font-ctx height) 185.0)
|
||||||
(+! (-> arg1 origin y) 46.0)
|
(+! (-> font-ctx origin y) 46.0)
|
||||||
(set! (-> arg1 origin x) 65.0)
|
(set! (-> font-ctx origin x) 65.0)
|
||||||
(if (not (-> *pc-settings* use-vis?))
|
(if (not (-> *pc-settings* use-vis?))
|
||||||
(set! (-> arg1 origin x) (the float (adjust-game-x (-> arg1 origin x)))))
|
(set! (-> font-ctx origin x) (the float (adjust-game-x (-> font-ctx origin x)))))
|
||||||
(set-width! arg1 367)
|
(set-width! font-ctx 367)
|
||||||
(set-flags! arg1 (font-flags kerning large))
|
(set-flags! font-ctx (font-flags kerning large))
|
||||||
(set-color! arg1 (font-color progress-force-selected))
|
(set-color! font-ctx (font-color progress-force-selected))
|
||||||
(set! (-> arg1 origin x) (+ padding sv-120 (-> arg1 origin x)))
|
(set! (-> font-ctx origin x) (+ padding row-width (-> font-ctx origin x)))
|
||||||
(set-scale! arg1 0.75)
|
(set-scale! font-ctx 0.75)
|
||||||
(when (= (-> *setting-control* user-default language) (language-enum german))
|
(when (= (-> *setting-control* user-default language) (language-enum german))
|
||||||
(set-scale! arg1 0.69)
|
(set-scale! font-ctx 0.69))
|
||||||
)
|
|
||||||
(when (= (-> *setting-control* user-default language) (language-enum french))
|
(when (= (-> *setting-control* user-default language) (language-enum french))
|
||||||
(set-scale! arg1 0.72)
|
(set-scale! font-ctx 0.72))
|
||||||
)
|
|
||||||
(when (= (-> *setting-control* user-default language) (language-enum spanish))
|
(when (= (-> *setting-control* user-default language) (language-enum spanish))
|
||||||
(set-scale! arg1 0.65)
|
(set-scale! font-ctx 0.65))
|
||||||
)
|
(print-game-text (string-format "~S" (lookup-text! *common-text* (get-highscore-text (-> this page-index)) #f)) font-ctx #f 44 (bucket-id progress))
|
||||||
(print-game-text (string-format "~S" (lookup-text! *common-text* (get-highscore-text (-> obj page-index)) #f)) arg1 #f 44 (bucket-id progress))
|
|
||||||
|
|
||||||
;; now draw highscore subtitle (e.g 'Scatter Gun')
|
;; now draw highscore subtitle (e.g 'Scatter Gun')
|
||||||
(+! (-> arg1 origin y) 25.0)
|
(+! (-> font-ctx origin y) 25.0)
|
||||||
(set-scale! arg1 0.6)
|
(set-scale! font-ctx 0.6)
|
||||||
(when (or (= (-> *setting-control* user-default language) (language-enum french))
|
(when (or (= (-> *setting-control* user-default language) (language-enum french))
|
||||||
(= (-> *setting-control* user-default language) (language-enum spanish))
|
(= (-> *setting-control* user-default language) (language-enum spanish))
|
||||||
)
|
)
|
||||||
(set-scale! arg1 0.58)
|
(set-scale! font-ctx 0.58))
|
||||||
)
|
(print-game-text (string-format "~S" (lookup-text! *common-text* (get-highscore-text-sub (-> this page-index)) #f)) font-ctx #f 44 (bucket-id progress))
|
||||||
(print-game-text (string-format "~S" (lookup-text! *common-text* (get-highscore-text-sub (-> obj page-index)) #f)) arg1 #f 44 (bucket-id progress))
|
|
||||||
|
|
||||||
;; draw highscore icon
|
;; draw highscore icon
|
||||||
(set! (-> arg1 origin x) (- (-> arg1 origin x) (+ padding sv-120)))
|
(set! (-> font-ctx origin x) (- (-> font-ctx origin x) (+ padding row-width)))
|
||||||
(+! (-> arg1 origin y) 25.0)
|
(+! (-> font-ctx origin y) 25.0)
|
||||||
(draw-highscore-icon
|
(draw-highscore-icon
|
||||||
obj
|
this
|
||||||
(get-highscore-icon (-> obj page-index))
|
(get-highscore-icon (-> this page-index))
|
||||||
(the int (+ (the float (get-highscore-icon-xoffset (-> obj page-index))) sv-120))
|
(the int (+ (the float (get-highscore-icon-xoffset (-> this page-index))) row-width))
|
||||||
(get-highscore-icon-yoffset (-> obj page-index))
|
(get-highscore-icon-yoffset (-> this page-index))
|
||||||
(get-highscore-icon-scale (-> obj page-index))
|
(get-highscore-icon-scale (-> this page-index)))
|
||||||
)
|
|
||||||
|
;; print the scores now.
|
||||||
;; print the 8 scores now.
|
(set! old-font-origin-x (-> font-ctx origin x))
|
||||||
(set! sv-108 (-> arg1 origin x))
|
(set-color! font-ctx (font-color progress))
|
||||||
(set-color! arg1 (font-color progress))
|
(+! (-> font-ctx origin x) row-width)
|
||||||
(+! (-> arg1 origin x) sv-120)
|
(set-scale! font-ctx 0.6)
|
||||||
(set-scale! arg1 0.6)
|
(let ((score-ptr (get-game-score-ref *game-info* (get-highscore-score (-> this page-index)))))
|
||||||
(let ((gp-5 (get-game-score-ref *game-info* (get-highscore-score (-> obj page-index)))))
|
(set! (-> highscore-row index) (-> this page-index))
|
||||||
(set! (-> sv-116 index) (-> obj page-index))
|
(set! (-> highscore-row previous) #f)
|
||||||
(set! (-> sv-116 previous) #f)
|
(set! (-> highscore-row self) this)
|
||||||
(set! (-> sv-116 self) obj)
|
(case (get-highscore-type (-> this page-index))
|
||||||
(case (get-highscore-type (-> obj page-index))
|
(('game) (set! (-> highscore-row game-score) #t))
|
||||||
(('game)
|
(('race) (set! (-> highscore-row game-score) #f))
|
||||||
(set! (-> sv-116 game-score) #t)
|
(('speedrun) (set! (-> highscore-row game-score) #f)))
|
||||||
)
|
(set! (-> highscore-row context) font-ctx)
|
||||||
(('race)
|
(set! (-> highscore-row local-scale) alpha)
|
||||||
(set! (-> sv-116 game-score) #f)
|
(set! (-> highscore-row interp) row-width)
|
||||||
)
|
;; retrieve the scores and draw them
|
||||||
)
|
(if (-> *pc-settings* speedrunner-mode?)
|
||||||
(set! (-> sv-116 context) arg1)
|
(cond
|
||||||
(set! (-> sv-116 local-scale) sv-96)
|
((= (get-highscore-type (-> this page-index)) 'speedrun)
|
||||||
(set! (-> sv-116 interp) sv-120)
|
;; speedruns are easy, there are no local times
|
||||||
(dotimes (s5-5 8)
|
(dotimes (row-index 8)
|
||||||
(set! (-> sv-116 place) s5-5)
|
(let ((run-index (+ row-index (* (-> *progress-pc-generic-store* current-highscore-page-index) 8))))
|
||||||
(set! (-> sv-116 score) (-> gp-5 s5-5))
|
;; fetch the info
|
||||||
(print-highscore sv-116)
|
(progress-pc-get-external-time (-> this page-index) run-index)
|
||||||
)
|
(set! (-> highscore-row place) row-index)
|
||||||
)
|
(set! (-> highscore-row score) (-> *progress-pc-generic-store* custom-highscore-score))
|
||||||
(set! (-> arg1 origin x) sv-108)
|
(when (> (-> *progress-pc-generic-store* custom-highscore-score) 0)
|
||||||
|
(print-highscore-pc highscore-row *pc-cpp-temp-string*)))))
|
||||||
|
(else
|
||||||
|
;; races and highscores are a bit more tricky as they may have local times
|
||||||
|
;; so we merge them so you can see how you locally stack up against the competition
|
||||||
|
(dotimes (row-index 8)
|
||||||
|
(let* ((num-rows-already-printed (+ row-index (* (-> *progress-pc-generic-store* current-highscore-page-index) 8)))
|
||||||
|
(score (progress-pc-get-next-external-score (-> this page-index) num-rows-already-printed)))
|
||||||
|
(set! (-> highscore-row place) row-index)
|
||||||
|
(set! (-> highscore-row score) score)
|
||||||
|
(when (> score 0)
|
||||||
|
(print-highscore-pc highscore-row *pc-cpp-temp-string*))))))
|
||||||
|
(dotimes (row-index 8)
|
||||||
|
(set! (-> highscore-row place) row-index)
|
||||||
|
(set! (-> highscore-row score) (-> score-ptr row-index))
|
||||||
|
(print-highscore-pc highscore-row (the-as string #f)))))
|
||||||
|
(set! (-> font-ctx origin x) old-font-origin-x)
|
||||||
|
|
||||||
;; draw the previous highscore that was seen
|
;; draw the previous highscore that was seen
|
||||||
;; note that we only need to know what the last one was
|
;; note that we only need to know what the last one was
|
||||||
;; since the screen only needs to draw 2 highscores at any given time anyway
|
;; since the screen only needs to draw 2 highscores at any given time anyway
|
||||||
;; reset font parameters
|
;; reset font parameters
|
||||||
(set-scale! arg1 0.6)
|
(set-scale! font-ctx 0.6)
|
||||||
(set! (-> arg1 origin x) 59.0)
|
(set! (-> font-ctx origin x) 59.0)
|
||||||
(if (not (-> *pc-settings* use-vis?))
|
(if (not (-> *pc-settings* use-vis?))
|
||||||
(set! (-> arg1 origin x) (the float (adjust-game-x (-> arg1 origin x)))))
|
(set! (-> font-ctx origin x) (the float (adjust-game-x (-> font-ctx origin x)))))
|
||||||
(set! (-> arg1 origin y) 78.0)
|
(set! (-> font-ctx origin y) 78.0)
|
||||||
(set! (-> arg1 width) sv-104)
|
(set! (-> font-ctx width) line-width)
|
||||||
(set! (-> arg1 height) 215.0)
|
(set! (-> font-ctx height) 215.0)
|
||||||
(set-scale! arg1 0.5)
|
(set-scale! font-ctx 0.5)
|
||||||
(set! (-> arg1 height) 185.0)
|
(set! (-> font-ctx height) 185.0)
|
||||||
(+! (-> arg1 origin y) 46.0)
|
(+! (-> font-ctx origin y) 46.0)
|
||||||
(set! (-> arg1 origin x) 80.0)
|
(set! (-> font-ctx origin x) 80.0)
|
||||||
(if (not (-> *pc-settings* use-vis?))
|
(if (not (-> *pc-settings* use-vis?))
|
||||||
(set! (-> arg1 origin x) (the float (adjust-game-x (-> arg1 origin x)))))
|
(set! (-> font-ctx origin x) (the float (adjust-game-x (-> font-ctx origin x)))))
|
||||||
(set! (-> obj sprites 0 pos z) #xffffff)
|
(set! (-> this sprites 0 pos z) #xffffff)
|
||||||
(set! (-> arg1 width) sv-104)
|
(set! (-> font-ctx width) line-width)
|
||||||
(set-flags! arg1 (font-flags kerning large))
|
(set-flags! font-ctx (font-flags kerning large))
|
||||||
(set-color! arg1 (font-color progress-force-selected))
|
(set-color! font-ctx (font-color progress-force-selected))
|
||||||
(set! (-> arg1 origin x) (+ padding sv-124 (-> arg1 origin x)))
|
(set! (-> font-ctx origin x) (+ padding unknown-todo (-> font-ctx origin x)))
|
||||||
(set-scale! arg1 0.75)
|
(set-scale! font-ctx 0.75)
|
||||||
(when (= (-> *setting-control* user-default language) (language-enum german))
|
(when (= (-> *setting-control* user-default language) (language-enum german))
|
||||||
(set-scale! arg1 0.69)
|
(set-scale! font-ctx 0.69))
|
||||||
)
|
|
||||||
(when (= (-> *setting-control* user-default language) (language-enum french))
|
(when (= (-> *setting-control* user-default language) (language-enum french))
|
||||||
(set-scale! arg1 0.72)
|
(set-scale! font-ctx 0.72))
|
||||||
)
|
|
||||||
(when (= (-> *setting-control* user-default language) (language-enum spanish))
|
(when (= (-> *setting-control* user-default language) (language-enum spanish))
|
||||||
(set-scale! arg1 0.65)
|
(set-scale! font-ctx 0.65))
|
||||||
)
|
(print-game-text (string-format "~S" (lookup-text! *common-text* (get-highscore-text (-> this prev-page-index)) #f)) font-ctx #f 44 (bucket-id progress))
|
||||||
(print-game-text (string-format "~S" (lookup-text! *common-text* (get-highscore-text (-> obj prev-page-index)) #f)) arg1 #f 44 (bucket-id progress))
|
(+! (-> font-ctx origin y) 25.0)
|
||||||
(+! (-> arg1 origin y) 25.0)
|
(set-scale! font-ctx 0.6)
|
||||||
(set-scale! arg1 0.6)
|
|
||||||
(when (or (= (-> *setting-control* user-default language) (language-enum french))
|
(when (or (= (-> *setting-control* user-default language) (language-enum french))
|
||||||
(= (-> *setting-control* user-default language) (language-enum spanish))
|
(= (-> *setting-control* user-default language) (language-enum spanish)))
|
||||||
)
|
(set-scale! font-ctx 0.58))
|
||||||
(set-scale! arg1 0.58)
|
(print-game-text (string-format "~S" (lookup-text! *common-text* (get-highscore-text-sub (-> this prev-page-index)) #f)) font-ctx #f 44 (bucket-id progress))
|
||||||
)
|
(set! (-> font-ctx origin x) (- (-> font-ctx origin x) (+ padding unknown-todo)))
|
||||||
(print-game-text (string-format "~S" (lookup-text! *common-text* (get-highscore-text-sub (-> obj prev-page-index)) #f)) arg1 #f 44 (bucket-id progress))
|
(+! (-> font-ctx origin y) 25.0)
|
||||||
(set! (-> arg1 origin x) (- (-> arg1 origin x) (+ padding sv-124)))
|
|
||||||
(+! (-> arg1 origin y) 25.0)
|
|
||||||
(draw-highscore-icon
|
(draw-highscore-icon
|
||||||
obj
|
this
|
||||||
(get-highscore-icon (-> obj prev-page-index))
|
(get-highscore-icon (-> this prev-page-index))
|
||||||
(the int (+ (the float (get-highscore-icon-xoffset (-> obj page-index))) sv-124))
|
(the int (+ (the float (get-highscore-icon-xoffset (-> this page-index))) unknown-todo))
|
||||||
(get-highscore-icon-yoffset (-> obj page-index))
|
(get-highscore-icon-yoffset (-> this page-index))
|
||||||
(get-highscore-icon-scale (-> obj page-index))
|
(get-highscore-icon-scale (-> this page-index)))
|
||||||
)
|
(set! old-font-origin-x (-> font-ctx origin x))
|
||||||
(set! sv-108 (-> arg1 origin x))
|
(set-color! font-ctx (font-color progress))
|
||||||
(set-color! arg1 (font-color progress))
|
(+! (-> font-ctx origin x) unknown-todo)
|
||||||
(+! (-> arg1 origin x) sv-124)
|
(set-scale! font-ctx 0.6)
|
||||||
(set-scale! arg1 0.6)
|
|
||||||
(when (< 1 (get-num-highscores))
|
(when (< 1 (get-num-highscores))
|
||||||
(let ((gp-11 (get-game-score-ref *game-info* (get-highscore-score (-> obj prev-page-index)))))
|
(let ((gp-11 (get-game-score-ref *game-info* (get-highscore-score (-> this prev-page-index)))))
|
||||||
(set! (-> sv-116 index) (-> obj prev-page-index))
|
(set! (-> highscore-row index) (-> this prev-page-index))
|
||||||
(set! (-> sv-116 previous) #t)
|
(set! (-> highscore-row previous) #t)
|
||||||
(set! (-> sv-116 self) obj)
|
(set! (-> highscore-row self) this)
|
||||||
(case (get-highscore-type (-> obj prev-page-index))
|
(case (get-highscore-type (-> this prev-page-index))
|
||||||
(('game)
|
(('game)
|
||||||
(set! (-> sv-116 game-score) #t)
|
(set! (-> highscore-row game-score) #t))
|
||||||
)
|
|
||||||
(('race)
|
(('race)
|
||||||
(set! (-> sv-116 game-score) #f)
|
(set! (-> highscore-row game-score) #f)))
|
||||||
)
|
(set! (-> highscore-row context) font-ctx)
|
||||||
)
|
(set! (-> highscore-row local-scale) alpha)
|
||||||
(set! (-> sv-116 context) arg1)
|
(set! (-> highscore-row interp) row-width)
|
||||||
(set! (-> sv-116 local-scale) sv-96)
|
;; TODO - update this section
|
||||||
(set! (-> sv-116 interp) sv-120)
|
|
||||||
(dotimes (s5-10 8)
|
(dotimes (s5-10 8)
|
||||||
(set! (-> sv-116 place) s5-10)
|
(set! (-> highscore-row place) s5-10)
|
||||||
(set! (-> sv-116 score) (-> gp-11 s5-10))
|
(set! (-> highscore-row score) (-> gp-11 s5-10))
|
||||||
(print-highscore sv-116)
|
(print-highscore-pc highscore-row (the-as string #f))))
|
||||||
)
|
(set! (-> font-ctx origin x) old-font-origin-x)
|
||||||
)
|
(set-scale! font-ctx 0.6))
|
||||||
(set! (-> arg1 origin x) sv-108)
|
(when (< 1 (get-num-highscores))
|
||||||
(set-scale! arg1 0.6)
|
(draw-previous-next this font-ctx #t))
|
||||||
)
|
(end-scissor ui-boundary 1.0))))
|
||||||
(if (< 1 (get-num-highscores))
|
(none))
|
||||||
(draw-previous-next obj arg1 #t)
|
|
||||||
)
|
|
||||||
(end-scissor sv-112 1.0)
|
|
||||||
)
|
|
||||||
))
|
|
||||||
0
|
|
||||||
(none)
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
(defmethod draw-option menu-slider-option ((obj menu-slider-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
|
(defmethod draw-option menu-slider-option ((obj menu-slider-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
|
||||||
|
|
@ -1973,7 +2243,7 @@
|
||||||
|
|
||||||
(defun draw-up-down-aspect ((font font-context) (y-up float) (y-down float))
|
(defun draw-up-down-aspect ((font font-context) (y-up float) (y-down float))
|
||||||
(protect ((-> font origin x) (-> font origin y) (-> font scale))
|
(protect ((-> font origin x) (-> font origin y) (-> font scale))
|
||||||
|
|
||||||
(let ((start-y (-> font origin y)))
|
(let ((start-y (-> font origin y)))
|
||||||
(set-scale! font 0.5)
|
(set-scale! font 0.5)
|
||||||
(set! (-> font origin y) (- start-y y-up))
|
(set! (-> font origin y) (- start-y y-up))
|
||||||
|
|
@ -2015,7 +2285,7 @@
|
||||||
|
|
||||||
(if (not (-> *pc-settings* use-vis?))
|
(if (not (-> *pc-settings* use-vis?))
|
||||||
(*! middle-pad (-> *pc-settings* aspect-ratio-reciprocal)))
|
(*! middle-pad (-> *pc-settings* aspect-ratio-reciprocal)))
|
||||||
|
|
||||||
(protect ((-> arg1 origin x) (-> arg1 width))
|
(protect ((-> arg1 origin x) (-> arg1 width))
|
||||||
(set-scale! arg1 0.6)
|
(set-scale! arg1 0.6)
|
||||||
(set-width! arg1 50)
|
(set-width! arg1 50)
|
||||||
|
|
@ -2024,7 +2294,7 @@
|
||||||
(print-game-text "x" arg1 #f 44 (bucket-id progress))
|
(print-game-text "x" arg1 #f 44 (bucket-id progress))
|
||||||
|
|
||||||
(set-width! arg1 font-w-corrected)
|
(set-width! arg1 font-w-corrected)
|
||||||
|
|
||||||
(set-scale! arg1 0.6)
|
(set-scale! arg1 0.6)
|
||||||
(set! (-> arg1 origin y) numbers-y)
|
(set! (-> arg1 origin y) numbers-y)
|
||||||
(set! (-> arg1 origin x) (- 256.0 middle-pad font-w-corrected))
|
(set! (-> arg1 origin x) (- 256.0 middle-pad font-w-corrected))
|
||||||
|
|
@ -2067,7 +2337,7 @@
|
||||||
(set! (-> arg1 origin y) numbers-text-y)
|
(set! (-> arg1 origin y) numbers-text-y)
|
||||||
(print-game-text (lookup-text! *common-text* (text-id progress-aspect-ratio-custom-height) #f) arg1 #f 44 (bucket-id progress))
|
(print-game-text (lookup-text! *common-text* (text-id progress-aspect-ratio-custom-height) #f) arg1 #f 44 (bucket-id progress))
|
||||||
)
|
)
|
||||||
|
|
||||||
(set! (-> arg1 origin y) 289.0)
|
(set! (-> arg1 origin y) 289.0)
|
||||||
(cond
|
(cond
|
||||||
((< (/ (the float (-> *pc-settings* aspect-custom-x)) (the float (-> *pc-settings* aspect-custom-y))) (/ 4.0 3.0))
|
((< (/ (the float (-> *pc-settings* aspect-custom-x)) (the float (-> *pc-settings* aspect-custom-y))) (/ 4.0 3.0))
|
||||||
|
|
@ -2232,7 +2502,7 @@
|
||||||
|
|
||||||
(defun draw-up-down-music-player ((font font-context) (box hud-box))
|
(defun draw-up-down-music-player ((font font-context) (box hud-box))
|
||||||
(protect ((-> font origin x) (-> font origin y) (-> font scale) (-> font width) (-> font height))
|
(protect ((-> font origin x) (-> font origin y) (-> font scale) (-> font width) (-> font height))
|
||||||
|
|
||||||
(let ((start-y (-> font origin y)))
|
(let ((start-y (-> font origin y)))
|
||||||
(set-scale! font 0.5)
|
(set-scale! font 0.5)
|
||||||
(set! (-> font width) (- (-> box max x) (-> box min x)))
|
(set! (-> font width) (- (-> box max x) (-> box min x)))
|
||||||
|
|
@ -2279,7 +2549,7 @@
|
||||||
|
|
||||||
|
|
||||||
(defmethod draw-option menu-music-player-option ((obj menu-music-player-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
|
(defmethod draw-option menu-music-player-option ((obj menu-music-player-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
|
||||||
|
|
||||||
(let* ((alpha (* 2.0 (- 0.5 (-> arg0 menu-transition))))
|
(let* ((alpha (* 2.0 (- 0.5 (-> arg0 menu-transition))))
|
||||||
(y-pad-top 11)
|
(y-pad-top 11)
|
||||||
(text-height 23)
|
(text-height 23)
|
||||||
|
|
@ -2328,7 +2598,7 @@
|
||||||
(let* ((flava-bits (the-as int (-> *music-player-tracks* i flava)))
|
(let* ((flava-bits (the-as int (-> *music-player-tracks* i flava)))
|
||||||
(flava-count (count-bits flava-bits))
|
(flava-count (count-bits flava-bits))
|
||||||
(flava-text-height (the int (* (/ 0.42 0.45) text-height))))
|
(flava-text-height (the int (* (/ 0.42 0.45) text-height))))
|
||||||
|
|
||||||
;; draw highlight first
|
;; draw highlight first
|
||||||
(draw-highlight-music-player (the int (-> box min x)) (the int (+ -6.0 (-> arg1 origin y)))
|
(draw-highlight-music-player (the int (-> box min x)) (the int (+ -6.0 (-> arg1 origin y)))
|
||||||
(the int (- (-> box max x) (-> box min x))) (+ text-height (* flava-count flava-text-height))
|
(the int (- (-> box max x) (-> box min x))) (+ text-height (* flava-count flava-text-height))
|
||||||
|
|
@ -2336,7 +2606,7 @@
|
||||||
|
|
||||||
;; draw text for each flava!
|
;; draw text for each flava!
|
||||||
(protect ((-> arg1 origin x) (-> arg1 origin y) (-> arg1 scale))
|
(protect ((-> arg1 origin x) (-> arg1 origin y) (-> arg1 scale))
|
||||||
|
|
||||||
(set-scale! arg1 0.42)
|
(set-scale! arg1 0.42)
|
||||||
(+! (-> arg1 origin x) tab-flava)
|
(+! (-> arg1 origin x) tab-flava)
|
||||||
(set! (-> arg1 origin y) list-text-y)
|
(set! (-> arg1 origin y) list-text-y)
|
||||||
|
|
@ -2392,7 +2662,7 @@
|
||||||
(max! (-> obj max-scroll) (-> obj current-scroll)))
|
(max! (-> obj max-scroll) (-> obj current-scroll)))
|
||||||
|
|
||||||
(end-scissor-music-player box)
|
(end-scissor-music-player box)
|
||||||
|
|
||||||
;; draw right panel text
|
;; draw right panel text
|
||||||
(let ((icon-x 0)
|
(let ((icon-x 0)
|
||||||
(icon-y 174)
|
(icon-y 174)
|
||||||
|
|
@ -2465,7 +2735,7 @@
|
||||||
(set-hud-sprite-attributes! (-> obj sprites 1) :tex (lookup-texture-by-id (get-level-icon-id-02 icon-id)) :a alpha :scale-x icon-scale :scale-y icon-scale :x (+ icon-x icon-w) :y icon-y)
|
(set-hud-sprite-attributes! (-> obj sprites 1) :tex (lookup-texture-by-id (get-level-icon-id-02 icon-id)) :a alpha :scale-x icon-scale :scale-y icon-scale :x (+ icon-x icon-w) :y icon-y)
|
||||||
(set-hud-sprite-attributes! (-> obj sprites 2) :tex (lookup-texture-by-id (get-level-icon-id-03 icon-id)) :a alpha :scale-x icon-scale :scale-y icon-scale :x icon-x :y (+ icon-y icon-h))
|
(set-hud-sprite-attributes! (-> obj sprites 2) :tex (lookup-texture-by-id (get-level-icon-id-03 icon-id)) :a alpha :scale-x icon-scale :scale-y icon-scale :x icon-x :y (+ icon-y icon-h))
|
||||||
(set-hud-sprite-attributes! (-> obj sprites 3) :tex (lookup-texture-by-id (get-level-icon-id-04 icon-id)) :a alpha :scale-x icon-scale :scale-y icon-scale :x (+ icon-x icon-w) :y (+ icon-y icon-h))
|
(set-hud-sprite-attributes! (-> obj sprites 3) :tex (lookup-texture-by-id (get-level-icon-id-04 icon-id)) :a alpha :scale-x icon-scale :scale-y icon-scale :x (+ icon-x icon-w) :y (+ icon-y icon-h))
|
||||||
|
|
||||||
;; danger scroller
|
;; danger scroller
|
||||||
(set-scale! arg1 0.42)
|
(set-scale! arg1 0.42)
|
||||||
(set! (-> arg1 origin y) (+ 26.0 (-> box max y)))
|
(set! (-> arg1 origin y) (+ 26.0 (-> box max y)))
|
||||||
|
|
|
||||||
|
|
@ -577,7 +577,7 @@
|
||||||
(print-game-text (lookup-text! *common-text* (-> obj name) #f) font-ctx #f 44 (bucket-id progress))
|
(print-game-text (lookup-text! *common-text* (-> obj name) #f) font-ctx #f 44 (bucket-id progress))
|
||||||
(when selected?
|
(when selected?
|
||||||
;; Now print the right aligned text, if the option is selected
|
;; Now print the right aligned text, if the option is selected
|
||||||
(set! (-> font-ctx origin x) (if (= (get-aspect-ratio) 'aspect16x9) 430.0 438.0))
|
(set! (-> font-ctx origin x) (the float (adjust-game-x (if (= (get-aspect-ratio) 'aspect16x9) 430.0 438.0))))
|
||||||
(+! (-> font-ctx origin y) 6.0)
|
(+! (-> font-ctx origin y) 6.0)
|
||||||
(set-flags! font-ctx (font-flags kerning right large))
|
(set-flags! font-ctx (font-flags kerning right large))
|
||||||
(clear *temp-string*)
|
(clear *temp-string*)
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,10 @@
|
||||||
(clear-screen? symbol)
|
(clear-screen? symbol)
|
||||||
(keybind-select-time time-frame)
|
(keybind-select-time time-frame)
|
||||||
(history-stack generic-progress-state-entry 10 :inline)
|
(history-stack generic-progress-state-entry 10 :inline)
|
||||||
(history-stack-index int32))
|
(history-stack-index int32)
|
||||||
|
(current-highscore-page-index int32)
|
||||||
|
(custom-highscore-score float) ;; TODO - just needed a way to pass a `(pointer float)` to C++, didn't seem like you could do such a thing with a `let` binding?
|
||||||
|
)
|
||||||
(:methods
|
(:methods
|
||||||
(init! (_type_) none)
|
(init! (_type_) none)
|
||||||
(navigate! (_type_ progress menu-option-list (function none)) none)
|
(navigate! (_type_ progress menu-option-list (function none)) none)
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,7 @@
|
||||||
(defmethod init! progress-pc-generic-store ((this progress-pc-generic-store))
|
(defmethod init! progress-pc-generic-store ((this progress-pc-generic-store))
|
||||||
(set! (-> this clear-screen?) #f)
|
(set! (-> this clear-screen?) #f)
|
||||||
(set! (-> this keybind-select-time) 0)
|
(set! (-> this keybind-select-time) 0)
|
||||||
|
(set! (-> this current-highscore-page-index) 0)
|
||||||
(none))
|
(none))
|
||||||
|
|
||||||
(defmethod call-on-confirm menu-generic-details-confirm-entry ((this menu-generic-details-confirm-entry))
|
(defmethod call-on-confirm menu-generic-details-confirm-entry ((this menu-generic-details-confirm-entry))
|
||||||
|
|
|
||||||
|
|
@ -159,6 +159,30 @@
|
||||||
(set! (-> *progress-state-pc* music-player-track) #f)
|
(set! (-> *progress-state-pc* music-player-track) #f)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
(defun progress-pc-fetch-external-times ((highscore-index int))
|
||||||
|
(when (-> *pc-settings* speedrunner-mode?)
|
||||||
|
(case highscore-index
|
||||||
|
((0) (pc-fetch-external-highscores "scatter"))
|
||||||
|
((1) (pc-fetch-external-highscores "blaster"))
|
||||||
|
((2) (pc-fetch-external-highscores "vulcan"))
|
||||||
|
((3) (pc-fetch-external-highscores "peacemaker"))
|
||||||
|
((4) (pc-fetch-external-highscores "jetboard"))
|
||||||
|
((5) (pc-fetch-external-race-times "class3"))
|
||||||
|
((6) (pc-fetch-external-race-times "class2"))
|
||||||
|
((7) (pc-fetch-external-race-times "class1"))
|
||||||
|
((8) (pc-fetch-external-race-times "port"))
|
||||||
|
((9) (pc-fetch-external-race-times "erol"))
|
||||||
|
((10) (pc-fetch-external-race-times "class3rev"))
|
||||||
|
((11) (pc-fetch-external-race-times "class2rev"))
|
||||||
|
((12) (pc-fetch-external-race-times "class1rev"))
|
||||||
|
((13) (pc-fetch-external-highscores "onin"))
|
||||||
|
((14) (pc-fetch-external-highscores "mash"))
|
||||||
|
((15) (pc-fetch-external-speedrun-times "any"))
|
||||||
|
((16) (pc-fetch-external-speedrun-times "anyhoverless"))
|
||||||
|
((17) (pc-fetch-external-speedrun-times "allmissions"))
|
||||||
|
((18) (pc-fetch-external-speedrun-times "100"))
|
||||||
|
((19) (pc-fetch-external-speedrun-times "anyorbs"))
|
||||||
|
((20) (pc-fetch-external-speedrun-times "anyhero")))))
|
||||||
|
|
||||||
(defmethod set-menu-options progress ((obj progress) (arg0 symbol))
|
(defmethod set-menu-options progress ((obj progress) (arg0 symbol))
|
||||||
"Set the menu options for the menu state specified by arg0."
|
"Set the menu options for the menu state specified by arg0."
|
||||||
|
|
@ -329,6 +353,9 @@
|
||||||
0
|
0
|
||||||
)
|
)
|
||||||
(set! (-> obj current-options) *highscores-options*)
|
(set! (-> obj current-options) *highscores-options*)
|
||||||
|
;; ensure external data is fetched if applicable
|
||||||
|
(progress-pc-fetch-external-times 0)
|
||||||
|
(set! (-> *progress-pc-generic-store* current-highscore-page-index) 0)
|
||||||
)
|
)
|
||||||
(('secret)
|
(('secret)
|
||||||
(set! (-> obj secret-buying) #f)
|
(set! (-> obj secret-buying) #f)
|
||||||
|
|
@ -755,3 +782,117 @@
|
||||||
0
|
0
|
||||||
(none)
|
(none)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
;; NOTE - this technically includes the gold/silver/bronze times
|
||||||
|
;; maybe figure out how to omit them eventually, (not sure if there is anything that differentiates them)
|
||||||
|
;; From a highscores perspective it doesn't really matter, the default scores are awful
|
||||||
|
(define-extern get-highscore-score (function int int))
|
||||||
|
(defun progress-pc-get-num-nonzero-local-scores ((highscore-index int))
|
||||||
|
(let ((count 0)
|
||||||
|
(score-ptr (get-game-score-ref *game-info* (get-highscore-score highscore-index))))
|
||||||
|
(dotimes (idx 8)
|
||||||
|
(when (> (-> score-ptr idx) 0)
|
||||||
|
(inc! count)))
|
||||||
|
count))
|
||||||
|
|
||||||
|
(defun progress-pc-max-external-scores ((highscore-index int))
|
||||||
|
(case highscore-index
|
||||||
|
((0) (pc-get-num-external-highscores "scatter"))
|
||||||
|
((1) (pc-get-num-external-highscores "blaster"))
|
||||||
|
((2) (pc-get-num-external-highscores "vulcan"))
|
||||||
|
((3) (pc-get-num-external-highscores "peacemaker"))
|
||||||
|
((4) (pc-get-num-external-highscores "jetboard"))
|
||||||
|
((5) (pc-get-num-external-race-times "class3"))
|
||||||
|
((6) (pc-get-num-external-race-times "class2"))
|
||||||
|
((7) (pc-get-num-external-race-times "class1"))
|
||||||
|
((8) (pc-get-num-external-race-times "port"))
|
||||||
|
((9) (pc-get-num-external-race-times "erol"))
|
||||||
|
((10) (pc-get-num-external-race-times "class3rev"))
|
||||||
|
((11) (pc-get-num-external-race-times "class2rev"))
|
||||||
|
((12) (pc-get-num-external-race-times "class1rev"))
|
||||||
|
((13) (pc-get-num-external-highscores "onin"))
|
||||||
|
((14) (pc-get-num-external-highscores "mash"))))
|
||||||
|
|
||||||
|
(defun progress-pc-max-highscore-rows ((highscore-index int))
|
||||||
|
(case highscore-index
|
||||||
|
((0) (+ (progress-pc-get-num-nonzero-local-scores highscore-index) (pc-get-num-external-highscores "scatter")))
|
||||||
|
((1) (+ (progress-pc-get-num-nonzero-local-scores highscore-index) (pc-get-num-external-highscores "blaster")))
|
||||||
|
((2) (+ (progress-pc-get-num-nonzero-local-scores highscore-index) (pc-get-num-external-highscores "vulcan")))
|
||||||
|
((3) (+ (progress-pc-get-num-nonzero-local-scores highscore-index) (pc-get-num-external-highscores "peacemaker")))
|
||||||
|
((4) (+ (progress-pc-get-num-nonzero-local-scores highscore-index) (pc-get-num-external-highscores "jetboard")))
|
||||||
|
((5) (+ (progress-pc-get-num-nonzero-local-scores highscore-index) (pc-get-num-external-race-times "class3")))
|
||||||
|
((6) (+ (progress-pc-get-num-nonzero-local-scores highscore-index) (pc-get-num-external-race-times "class2")))
|
||||||
|
((7) (+ (progress-pc-get-num-nonzero-local-scores highscore-index) (pc-get-num-external-race-times "class1")))
|
||||||
|
((8) (+ (progress-pc-get-num-nonzero-local-scores highscore-index) (pc-get-num-external-race-times "port")))
|
||||||
|
((9) (+ (progress-pc-get-num-nonzero-local-scores highscore-index) (pc-get-num-external-race-times "erol")))
|
||||||
|
((10) (+ (progress-pc-get-num-nonzero-local-scores highscore-index) (pc-get-num-external-race-times "class3rev")))
|
||||||
|
((11) (+ (progress-pc-get-num-nonzero-local-scores highscore-index) (pc-get-num-external-race-times "class2rev")))
|
||||||
|
((12) (+ (progress-pc-get-num-nonzero-local-scores highscore-index) (pc-get-num-external-race-times "class1rev")))
|
||||||
|
((13) (+ (progress-pc-get-num-nonzero-local-scores highscore-index) (pc-get-num-external-highscores "onin")))
|
||||||
|
((14) (+ (progress-pc-get-num-nonzero-local-scores highscore-index) (pc-get-num-external-highscores "mash")))
|
||||||
|
((15) (pc-get-num-external-speedrun-times "any"))
|
||||||
|
((16) (pc-get-num-external-speedrun-times "anyhoverless"))
|
||||||
|
((17) (pc-get-num-external-speedrun-times "allmissions"))
|
||||||
|
((18) (pc-get-num-external-speedrun-times "100"))
|
||||||
|
((19) (pc-get-num-external-speedrun-times "anyorbs"))
|
||||||
|
((20) (pc-get-num-external-speedrun-times "anyhero"))
|
||||||
|
(else 8)))
|
||||||
|
|
||||||
|
(defmethod respond-progress menu-highscores-option ((this menu-highscores-option) (progress progress) (selected? symbol))
|
||||||
|
"Handle progress menu navigation logic."
|
||||||
|
(set! (-> progress sliding) (seek-ease (-> progress sliding) 0.0 (* 0.1 (-> self clock time-adjust-ratio)) 0.3 (* 0.001 (-> self clock time-adjust-ratio))))
|
||||||
|
(set! (-> progress sliding-off) (seek-ease (-> progress sliding-off) 1.0 (* 0.1 (-> self clock time-adjust-ratio)) -0.3 (* 0.001 (-> self clock time-adjust-ratio))))
|
||||||
|
(when (and (!= *pc-waiting-on-rpc?* #t) (-> *bigmap* progress-minimap))
|
||||||
|
(let ((play-sound? #f))
|
||||||
|
(cond
|
||||||
|
((or (cpad-pressed? 0 right l-analog-right)
|
||||||
|
(and (cpad-hold? 0 right l-analog-right) (>= (- (current-time) (-> this last-move)) (seconds 0.2))))
|
||||||
|
(when (< 1 (get-num-highscores))
|
||||||
|
(set! (-> this last-move) (current-time))
|
||||||
|
(set! play-sound? #t)
|
||||||
|
(set! (-> this prev-page-index) (-> this page-index))
|
||||||
|
(set! (-> this page-index) (get-next-highscore (-> this page-index)))
|
||||||
|
;; ensure external data is fetched if applicable
|
||||||
|
(progress-pc-fetch-external-times (-> this page-index))
|
||||||
|
(set! (-> *progress-pc-generic-store* current-highscore-page-index) 0)
|
||||||
|
(set! (-> progress sliding) 1.0)
|
||||||
|
(set! (-> progress sliding-off) 0.0)
|
||||||
|
(set! (-> this slide-dir) -1.0)))
|
||||||
|
((or (cpad-pressed? 0 left l-analog-left)
|
||||||
|
(and (cpad-hold? 0 left l-analog-left) (>= (- (current-time) (-> this last-move)) (seconds 0.2))))
|
||||||
|
(when (< 1 (get-num-highscores))
|
||||||
|
(set! (-> this last-move) (current-time))
|
||||||
|
(set! (-> this prev-page-index) (-> this page-index))
|
||||||
|
(set! (-> this page-index) (get-prev-highscore (-> this page-index)))
|
||||||
|
;; ensure external data is fetched if applicable
|
||||||
|
(progress-pc-fetch-external-times (-> this page-index))
|
||||||
|
(set! (-> *progress-pc-generic-store* current-highscore-page-index) 0)
|
||||||
|
(set! play-sound? #t)
|
||||||
|
(set! (-> progress sliding) -1.0)
|
||||||
|
(set! (-> progress sliding-off) 0.0)
|
||||||
|
(set! (-> this slide-dir) 1.0)))
|
||||||
|
((or (cpad-pressed? 0 down l-analog-down)
|
||||||
|
(and (cpad-hold? 0 down l-analog-down) (>= (- (current-time) (-> this last-move)) (seconds 0.2))))
|
||||||
|
(when (< (* (inc (-> *progress-pc-generic-store* current-highscore-page-index)) 8) (progress-pc-max-highscore-rows (-> this page-index)))
|
||||||
|
(set! (-> this last-move) (current-time))
|
||||||
|
(sound-play "secrets-scroll")
|
||||||
|
(inc! (-> *progress-pc-generic-store* current-highscore-page-index))))
|
||||||
|
((or (cpad-pressed? 0 up l-analog-up)
|
||||||
|
(and (cpad-hold? 0 up l-analog-up) (>= (- (current-time) (-> this last-move)) (seconds 0.2))))
|
||||||
|
(when (> (-> *progress-pc-generic-store* current-highscore-page-index) 0)
|
||||||
|
(set! (-> this last-move) (current-time))
|
||||||
|
(sound-play "secrets-scroll")
|
||||||
|
(dec! (-> *progress-pc-generic-store* current-highscore-page-index))))
|
||||||
|
((cpad-pressed? 0 triangle confirm)
|
||||||
|
(set! (-> *progress-pc-generic-store* current-highscore-page-index) 0)
|
||||||
|
(logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons triangle confirm))
|
||||||
|
(logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons triangle confirm))
|
||||||
|
(set! (-> progress sliding) 0.0)
|
||||||
|
(set! (-> progress sliding-off) 1.0)
|
||||||
|
(if (!= (-> *progress-state* starting-state) 'title)
|
||||||
|
(sound-play "window-contract")
|
||||||
|
(sound-play "generic-beep"))
|
||||||
|
(pop-state progress)))
|
||||||
|
(when play-sound?
|
||||||
|
(sound-play "score-slide"))))
|
||||||
|
0)
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,12 @@
|
||||||
import unidiff
|
import unidiff
|
||||||
from colorama import Fore
|
from colorama import Fore
|
||||||
|
|
||||||
with open("lint-changes.diff", encoding="utf-8") as f:
|
try:
|
||||||
diff = f.read()
|
with open("lint-changes.diff", encoding="utf-8") as f:
|
||||||
|
diff = f.read()
|
||||||
|
except:
|
||||||
|
print("Unable to read lint-changes.diff, exiting without failing, must be some odd changes in the diff!.")
|
||||||
|
exit(0)
|
||||||
|
|
||||||
patch_set = unidiff.PatchSet.from_string(diff)
|
patch_set = unidiff.PatchSet.from_string(diff)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1610,39 +1610,39 @@
|
||||||
)
|
)
|
||||||
|
|
||||||
;; definition for method 9 of type highscore-info
|
;; definition for method 9 of type highscore-info
|
||||||
(defmethod get-rank highscore-info ((this highscore-info) (arg0 float))
|
(defmethod get-rank highscore-info ((this highscore-info) (score float))
|
||||||
(let ((v0-0 0))
|
(let ((place 0))
|
||||||
(cond
|
(cond
|
||||||
((logtest? (-> this flags) (highscore-flags time))
|
((logtest? (-> this flags) (highscore-flags time))
|
||||||
(cond
|
(cond
|
||||||
((= arg0 0.0)
|
((= score 0.0)
|
||||||
)
|
)
|
||||||
((>= (-> this gold-score) arg0)
|
((>= (-> this gold-score) score)
|
||||||
(set! v0-0 3)
|
(set! place 3)
|
||||||
)
|
)
|
||||||
((>= (-> this silver-score) arg0)
|
((>= (-> this silver-score) score)
|
||||||
(set! v0-0 2)
|
(set! place 2)
|
||||||
)
|
)
|
||||||
((>= (-> this bronze-score) arg0)
|
((>= (-> this bronze-score) score)
|
||||||
(set! v0-0 1)
|
(set! place 1)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
(else
|
(else
|
||||||
(cond
|
(cond
|
||||||
((>= arg0 (-> this gold-score))
|
((>= score (-> this gold-score))
|
||||||
(set! v0-0 3)
|
(set! place 3)
|
||||||
)
|
)
|
||||||
((>= arg0 (-> this silver-score))
|
((>= score (-> this silver-score))
|
||||||
(set! v0-0 2)
|
(set! place 2)
|
||||||
)
|
)
|
||||||
((>= arg0 (-> this bronze-score))
|
((>= score (-> this bronze-score))
|
||||||
(set! v0-0 1)
|
(set! place 1)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
v0-0
|
place
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -3184,37 +3184,37 @@
|
||||||
)
|
)
|
||||||
|
|
||||||
;; definition for method 9 of type menu-highscores-option
|
;; definition for method 9 of type menu-highscores-option
|
||||||
(defmethod respond-progress menu-highscores-option ((this menu-highscores-option) (arg0 progress) (arg1 symbol))
|
(defmethod respond-progress menu-highscores-option ((this menu-highscores-option) (progress progress) (selected? symbol))
|
||||||
"Handle progress menu navigation logic."
|
"Handle progress menu navigation logic."
|
||||||
(set! (-> arg0 sliding) (seek-ease
|
(set! (-> progress sliding) (seek-ease
|
||||||
(-> arg0 sliding)
|
(-> progress sliding)
|
||||||
0.0
|
0.0
|
||||||
(* 0.1 (-> self clock time-adjust-ratio))
|
|
||||||
0.3
|
|
||||||
(* 0.001 (-> self clock time-adjust-ratio))
|
|
||||||
)
|
|
||||||
)
|
|
||||||
(set! (-> arg0 sliding-off) (seek-ease
|
|
||||||
(-> arg0 sliding-off)
|
|
||||||
1.0
|
|
||||||
(* 0.1 (-> self clock time-adjust-ratio))
|
(* 0.1 (-> self clock time-adjust-ratio))
|
||||||
-0.3
|
0.3
|
||||||
(* 0.001 (-> self clock time-adjust-ratio))
|
(* 0.001 (-> self clock time-adjust-ratio))
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
(set! (-> progress sliding-off) (seek-ease
|
||||||
|
(-> progress sliding-off)
|
||||||
|
1.0
|
||||||
|
(* 0.1 (-> self clock time-adjust-ratio))
|
||||||
|
-0.3
|
||||||
|
(* 0.001 (-> self clock time-adjust-ratio))
|
||||||
|
)
|
||||||
|
)
|
||||||
(when (-> *bigmap* progress-minimap)
|
(when (-> *bigmap* progress-minimap)
|
||||||
(let ((s5-0 #f))
|
(let ((play-sound? #f))
|
||||||
(cond
|
(cond
|
||||||
((or (cpad-pressed? 0 right l-analog-right)
|
((or (cpad-pressed? 0 right l-analog-right)
|
||||||
(and (cpad-hold? 0 right l-analog-right) (time-elapsed? (-> this last-move) (seconds 0.2)))
|
(and (cpad-hold? 0 right l-analog-right) (time-elapsed? (-> this last-move) (seconds 0.2)))
|
||||||
)
|
)
|
||||||
(when (< 1 (get-num-highscores))
|
(when (< 1 (get-num-highscores))
|
||||||
(set-time! (-> this last-move))
|
(set-time! (-> this last-move))
|
||||||
(set! s5-0 #t)
|
(set! play-sound? #t)
|
||||||
(set! (-> this prev-page-index) (-> this page-index))
|
(set! (-> this prev-page-index) (-> this page-index))
|
||||||
(set! (-> this page-index) (get-next-highscore (-> this page-index)))
|
(set! (-> this page-index) (get-next-highscore (-> this page-index)))
|
||||||
(set! (-> arg0 sliding) 1.0)
|
(set! (-> progress sliding) 1.0)
|
||||||
(set! (-> arg0 sliding-off) 0.0)
|
(set! (-> progress sliding-off) 0.0)
|
||||||
(set! (-> this slide-dir) -1.0)
|
(set! (-> this slide-dir) -1.0)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
@ -3225,25 +3225,25 @@
|
||||||
(set-time! (-> this last-move))
|
(set-time! (-> this last-move))
|
||||||
(set! (-> this prev-page-index) (-> this page-index))
|
(set! (-> this prev-page-index) (-> this page-index))
|
||||||
(set! (-> this page-index) (get-prev-highscore (-> this page-index)))
|
(set! (-> this page-index) (get-prev-highscore (-> this page-index)))
|
||||||
(set! s5-0 #t)
|
(set! play-sound? #t)
|
||||||
(set! (-> arg0 sliding) -1.0)
|
(set! (-> progress sliding) -1.0)
|
||||||
(set! (-> arg0 sliding-off) 0.0)
|
(set! (-> progress sliding-off) 0.0)
|
||||||
(set! (-> this slide-dir) 1.0)
|
(set! (-> this slide-dir) 1.0)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
((cpad-pressed? 0 triangle confirm)
|
((cpad-pressed? 0 triangle confirm)
|
||||||
(logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons triangle confirm))
|
(logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons triangle confirm))
|
||||||
(logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons triangle confirm))
|
(logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons triangle confirm))
|
||||||
(set! (-> arg0 sliding) 0.0)
|
(set! (-> progress sliding) 0.0)
|
||||||
(set! (-> arg0 sliding-off) 1.0)
|
(set! (-> progress sliding-off) 1.0)
|
||||||
(if (!= (-> *progress-state* starting-state) 'title)
|
(if (!= (-> *progress-state* starting-state) 'title)
|
||||||
(sound-play "window-contract")
|
(sound-play "window-contract")
|
||||||
(sound-play "generic-beep")
|
(sound-play "generic-beep")
|
||||||
)
|
)
|
||||||
(pop-state arg0)
|
(pop-state progress)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
(if s5-0
|
(if play-sound?
|
||||||
(sound-play "score-slide")
|
(sound-play "score-slide")
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,315 @@
|
||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
#
|
||||||
|
# This software is licensed as described in the file COPYING, which
|
||||||
|
# you should have received as part of this distribution. The terms
|
||||||
|
# are also available at https://curl.se/docs/copyright.html.
|
||||||
|
#
|
||||||
|
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
# copies of the Software, and permit persons to whom the Software is
|
||||||
|
# furnished to do so, under the terms of the COPYING file.
|
||||||
|
#
|
||||||
|
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
# KIND, either express or implied.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: curl
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
# https://dev.azure.com/daniel0244/curl/_build?view=runs
|
||||||
|
#
|
||||||
|
# Azure Pipelines configuration:
|
||||||
|
# https://aka.ms/yaml
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
branches:
|
||||||
|
include:
|
||||||
|
- 'master'
|
||||||
|
- '*/ci'
|
||||||
|
paths:
|
||||||
|
exclude:
|
||||||
|
- '.circleci/*'
|
||||||
|
- '.cirrus.yml'
|
||||||
|
- '.github/*'
|
||||||
|
- '.github/workflows/*'
|
||||||
|
- 'appveyor.yml'
|
||||||
|
- 'packages/*'
|
||||||
|
- 'plan9/*'
|
||||||
|
|
||||||
|
pr:
|
||||||
|
branches:
|
||||||
|
include:
|
||||||
|
- 'master'
|
||||||
|
paths:
|
||||||
|
exclude:
|
||||||
|
- '.circleci/*'
|
||||||
|
- '.cirrus.yml'
|
||||||
|
- '.github/*'
|
||||||
|
- '.github/workflows/*'
|
||||||
|
- 'appveyor.yml'
|
||||||
|
- 'packages/*'
|
||||||
|
- 'plan9/*'
|
||||||
|
|
||||||
|
stages:
|
||||||
|
|
||||||
|
##########################################
|
||||||
|
### Linux jobs first
|
||||||
|
##########################################
|
||||||
|
|
||||||
|
- stage: linux
|
||||||
|
dependsOn: []
|
||||||
|
jobs:
|
||||||
|
- job: ubuntu
|
||||||
|
# define defaults to make sure variables are always expanded/replaced
|
||||||
|
variables:
|
||||||
|
install: ''
|
||||||
|
configure: ''
|
||||||
|
tests: '!433'
|
||||||
|
timeoutInMinutes: 60
|
||||||
|
pool:
|
||||||
|
vmImage: 'ubuntu-latest'
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
default:
|
||||||
|
name: default
|
||||||
|
install:
|
||||||
|
configure: --enable-debug --with-openssl
|
||||||
|
disable_ipv6:
|
||||||
|
name: w/o IPv6
|
||||||
|
configure: --disable-ipv6 --with-openssl
|
||||||
|
disable_http_smtp_imap:
|
||||||
|
name: w/o HTTP/SMTP/IMAP
|
||||||
|
configure: --disable-http --disable-smtp --disable-imap --without-ssl
|
||||||
|
disable_thredres:
|
||||||
|
name: sync resolver
|
||||||
|
configure: --disable-threaded-resolver --with-openssl
|
||||||
|
https_only:
|
||||||
|
name: HTTPS only
|
||||||
|
configure: --disable-dict --disable-file --disable-ftp --disable-gopher --disable-imap --disable-ldap --disable-pop3 --disable-rtmp --disable-rtsp --disable-scp --disable-sftp --disable-smb --disable-smtp --disable-telnet --disable-tftp --with-openssl
|
||||||
|
torture:
|
||||||
|
name: torture
|
||||||
|
install: libnghttp2-dev
|
||||||
|
configure: --enable-debug --disable-shared --disable-threaded-resolver --with-openssl
|
||||||
|
tests: -n -t --shallow=25 !FTP
|
||||||
|
steps:
|
||||||
|
- script: sudo apt-get update && sudo apt-get install -y stunnel4 python3-impacket libzstd-dev libbrotli-dev $(install)
|
||||||
|
displayName: 'apt install'
|
||||||
|
retryCountOnTaskFailure: 3
|
||||||
|
|
||||||
|
- script: autoreconf -fi && ./configure --enable-warnings --enable-werror $(configure)
|
||||||
|
displayName: 'configure $(name)'
|
||||||
|
|
||||||
|
- script: make V=1 && make V=1 examples && cd tests && make V=1
|
||||||
|
displayName: 'compile'
|
||||||
|
env:
|
||||||
|
MAKEFLAGS: "-j 2"
|
||||||
|
|
||||||
|
- script: make V=1 test-ci
|
||||||
|
displayName: 'test'
|
||||||
|
env:
|
||||||
|
AZURE_ACCESS_TOKEN: "$(System.AccessToken)"
|
||||||
|
TFLAGS: "-ac /usr/bin/curl -r $(tests)"
|
||||||
|
|
||||||
|
- stage: distcheck
|
||||||
|
dependsOn: []
|
||||||
|
jobs:
|
||||||
|
- job: ubuntu
|
||||||
|
timeoutInMinutes: 30
|
||||||
|
pool:
|
||||||
|
vmImage: 'ubuntu-latest'
|
||||||
|
steps:
|
||||||
|
- script: autoreconf -fi && ./configure --without-ssl
|
||||||
|
displayName: 'configure $(name)'
|
||||||
|
|
||||||
|
- script: make && ./maketgz 99.98.97
|
||||||
|
displayName: 'make tarball'
|
||||||
|
|
||||||
|
- script: |
|
||||||
|
tar xf curl-99.98.97.tar.gz
|
||||||
|
cd curl-99.98.97
|
||||||
|
./configure --prefix=$HOME/temp --without-ssl
|
||||||
|
make
|
||||||
|
make TFLAGS=1 test
|
||||||
|
make install
|
||||||
|
# basic check of the installed files
|
||||||
|
cd ..
|
||||||
|
bash scripts/installcheck.sh $HOME/temp
|
||||||
|
rm -rf curl-99.98.97
|
||||||
|
|
||||||
|
displayName: 'verify in-tree configure build'
|
||||||
|
|
||||||
|
- script: |
|
||||||
|
# verify out-of-tree build
|
||||||
|
tar xf curl-99.98.97.tar.gz
|
||||||
|
touch curl-99.98.97/docs/{cmdline-opts,libcurl}/Makefile.inc
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
../curl-99.98.97/configure --without-ssl
|
||||||
|
make
|
||||||
|
make TFLAGS='-p 1 1139' test
|
||||||
|
# verify cmake build
|
||||||
|
cd ..
|
||||||
|
rm -rf curl-99.98.97
|
||||||
|
|
||||||
|
displayName: 'verify out-of-tree configure build'
|
||||||
|
|
||||||
|
- script: |
|
||||||
|
tar xf curl-99.98.97.tar.gz
|
||||||
|
cd curl-99.98.97
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
cmake ..
|
||||||
|
make
|
||||||
|
|
||||||
|
displayName: 'verify out-of-tree cmake build'
|
||||||
|
|
||||||
|
- stage: scanbuild
|
||||||
|
dependsOn: []
|
||||||
|
jobs:
|
||||||
|
- job: ubuntu
|
||||||
|
timeoutInMinutes: 30
|
||||||
|
pool:
|
||||||
|
vmImage: 'ubuntu-latest'
|
||||||
|
steps:
|
||||||
|
- script: sudo apt-get update && sudo apt-get install -y clang-tools clang libssl-dev libssh2-1-dev libpsl-dev libbrotli-dev libzstd-dev
|
||||||
|
displayName: 'apt install'
|
||||||
|
retryCountOnTaskFailure: 3
|
||||||
|
|
||||||
|
- script: autoreconf -fi
|
||||||
|
displayName: 'autoreconf'
|
||||||
|
|
||||||
|
- script: scan-build ./configure --enable-debug --enable-werror --with-openssl --with-libssh2
|
||||||
|
displayName: 'configure'
|
||||||
|
env:
|
||||||
|
CC: "clang"
|
||||||
|
CCX: "clang++"
|
||||||
|
|
||||||
|
- script: scan-build --status-bugs make
|
||||||
|
displayName: 'make'
|
||||||
|
|
||||||
|
- script: scan-build --status-bugs make examples
|
||||||
|
displayName: 'make examples'
|
||||||
|
|
||||||
|
##########################################
|
||||||
|
### Windows jobs below
|
||||||
|
##########################################
|
||||||
|
|
||||||
|
- stage: windows
|
||||||
|
dependsOn: []
|
||||||
|
variables:
|
||||||
|
agent.preferPowerShellOnContainers: true
|
||||||
|
jobs:
|
||||||
|
- job: msys
|
||||||
|
# define defaults to make sure variables are always expanded/replaced
|
||||||
|
variables:
|
||||||
|
container_img: ''
|
||||||
|
container_cmd: ''
|
||||||
|
configure: ''
|
||||||
|
tests: ''
|
||||||
|
timeoutInMinutes: 120
|
||||||
|
pool:
|
||||||
|
vmImage: 'windows-2019'
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
v2_mingw32_openssl:
|
||||||
|
name: 32-bit OpenSSL/libssh2
|
||||||
|
container_img: ghcr.io/mback2k/curl-docker-winbuildenv/msys2-mingw32:ltsc2019
|
||||||
|
container_cmd: C:\msys64\usr\bin\sh
|
||||||
|
prepare: pacman -S --needed --noconfirm --noprogressbar libssh2-devel mingw-w64-i686-libssh2 mingw-w64-i686-python-pip mingw-w64-i686-python-wheel mingw-w64-i686-python-pyopenssl && python3 -m pip install --prefer-binary impacket
|
||||||
|
configure: --host=i686-w64-mingw32 --build=i686-w64-mingw32 --prefix=/mingw32 --enable-debug --enable-werror --with-libssh2 --with-openssl
|
||||||
|
tests: "~571"
|
||||||
|
v2_mingw64_openssl:
|
||||||
|
name: 64-bit OpenSSL/libssh2
|
||||||
|
container_img: ghcr.io/mback2k/curl-docker-winbuildenv/msys2-mingw64:ltsc2019
|
||||||
|
container_cmd: C:\msys64\usr\bin\sh
|
||||||
|
prepare: pacman -S --needed --noconfirm --noprogressbar libssh2-devel mingw-w64-x86_64-libssh2 mingw-w64-x86_64-python-pip mingw-w64-x86_64-python-wheel mingw-w64-x86_64-python-pyopenssl && python3 -m pip install --prefer-binary impacket
|
||||||
|
configure: --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --prefix=/mingw64 --enable-debug --enable-werror --with-libssh2 --with-openssl
|
||||||
|
tests: "~571"
|
||||||
|
v2_mingw64_libssh:
|
||||||
|
name: 64-bit OpenSSL/libssh
|
||||||
|
container_img: ghcr.io/mback2k/curl-docker-winbuildenv/msys2-mingw64:ltsc2019
|
||||||
|
container_cmd: C:\msys64\usr\bin\sh
|
||||||
|
prepare: pacman -S --needed --noconfirm --noprogressbar libssh-devel mingw-w64-x86_64-libssh
|
||||||
|
configure: --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --prefix=/mingw64 --enable-debug --enable-werror --with-libssh --with-openssl
|
||||||
|
tests: "~571 ~614"
|
||||||
|
v1_mingw:
|
||||||
|
name: 32-bit (legacy)
|
||||||
|
container_img: ghcr.io/mback2k/curl-docker-winbuildenv/msys1-mingw:ltsc2019
|
||||||
|
container_cmd: C:\MinGW\msys\1.0\bin\sh
|
||||||
|
configure: --host=i686-pc-mingw32 --build=i686-pc-mingw32 --prefix=/mingw --enable-debug --without-ssl --with-mingw1-deprecated
|
||||||
|
tests: "!203 !1143"
|
||||||
|
v1_mingw32:
|
||||||
|
name: 32-bit w/o zlib
|
||||||
|
container_img: ghcr.io/mback2k/curl-docker-winbuildenv/msys1-mingw32:ltsc2019
|
||||||
|
container_cmd: C:\MinGW\msys\1.0\bin\sh
|
||||||
|
configure: --host=i686-w64-mingw32 --build=i686-w64-mingw32 --prefix=/mingw32 --enable-debug --enable-werror --without-zlib --without-ssl
|
||||||
|
tests: "!203 !1143"
|
||||||
|
v1_mingw64:
|
||||||
|
name: 64-bit w/o zlib
|
||||||
|
container_img: ghcr.io/mback2k/curl-docker-winbuildenv/msys1-mingw64:ltsc2019
|
||||||
|
container_cmd: C:\MinGW\msys\1.0\bin\sh
|
||||||
|
configure: --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --prefix=/mingw64 --enable-debug --enable-werror --without-zlib --without-ssl
|
||||||
|
tests: "!203 !1143"
|
||||||
|
v2_mingw32_schannel:
|
||||||
|
name: 32-bit Schannel/SSPI/WinIDN/libssh2
|
||||||
|
container_img: ghcr.io/mback2k/curl-docker-winbuildenv/msys2-mingw32:ltsc2019
|
||||||
|
container_cmd: C:\msys64\usr\bin\sh
|
||||||
|
prepare: pacman -S --needed --noconfirm --noprogressbar libssh2-devel mingw-w64-i686-libssh2 mingw-w64-i686-python-pip mingw-w64-i686-python-wheel mingw-w64-i686-python-pyopenssl && python3 -m pip install --prefer-binary impacket
|
||||||
|
configure: --host=i686-w64-mingw32 --build=i686-w64-mingw32 --prefix=/mingw32 --enable-debug --enable-werror --enable-sspi --with-schannel --with-winidn --with-libssh2
|
||||||
|
tests: "~571"
|
||||||
|
v2_mingw64_schannel:
|
||||||
|
name: 64-bit Schannel/SSPI/WinIDN/libssh2
|
||||||
|
container_img: ghcr.io/mback2k/curl-docker-winbuildenv/msys2-mingw64:ltsc2019
|
||||||
|
container_cmd: C:\msys64\usr\bin\sh
|
||||||
|
prepare: pacman -S --needed --noconfirm --noprogressbar libssh2-devel mingw-w64-x86_64-libssh2 mingw-w64-x86_64-python-pip mingw-w64-x86_64-python-wheel mingw-w64-x86_64-python-pyopenssl && python3 -m pip install --prefer-binary impacket
|
||||||
|
configure: --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --prefix=/mingw64 --enable-debug --enable-werror --enable-sspi --with-schannel --with-winidn --with-libssh2
|
||||||
|
tests: "~571"
|
||||||
|
v1_mingw_schannel:
|
||||||
|
name: 32-bit Schannel/SSPI/WinIDN (legacy)
|
||||||
|
container_img: ghcr.io/mback2k/curl-docker-winbuildenv/msys1-mingw:ltsc2019
|
||||||
|
container_cmd: C:\MinGW\msys\1.0\bin\sh
|
||||||
|
configure: --host=i686-pc-mingw32 --build=i686-pc-mingw32 --prefix=/mingw --enable-debug --enable-sspi --with-schannel --with-winidn --with-mingw1-deprecated
|
||||||
|
tests: "!203 !305 !311 !312 !313 !404 !1143 !2033 !2035 !2038 !2041 !2042 !2048 !2070 !2079 !2087 !3023 !3024"
|
||||||
|
v1_mingw32_schannel:
|
||||||
|
name: 32-bit Schannel/SSPI/WinIDN w/o zlib
|
||||||
|
container_img: ghcr.io/mback2k/curl-docker-winbuildenv/msys1-mingw32:ltsc2019
|
||||||
|
container_cmd: C:\MinGW\msys\1.0\bin\sh
|
||||||
|
configure: --host=i686-w64-mingw32 --build=i686-w64-mingw32 --prefix=/mingw32 --enable-debug --enable-werror --enable-sspi --with-schannel --with-winidn --without-zlib
|
||||||
|
tests: "!203 !1143"
|
||||||
|
v1_mingw64_schannel:
|
||||||
|
name: 64-bit Schannel/SSPI/WinIDN w/o zlib
|
||||||
|
container_img: ghcr.io/mback2k/curl-docker-winbuildenv/msys1-mingw64:ltsc2019
|
||||||
|
container_cmd: C:\MinGW\msys\1.0\bin\sh
|
||||||
|
configure: --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --prefix=/mingw64 --enable-debug --enable-werror --enable-sspi --with-schannel --with-winidn --without-zlib
|
||||||
|
tests: "!203 !1143"
|
||||||
|
container:
|
||||||
|
image: $(container_img)
|
||||||
|
env:
|
||||||
|
MSYS2_PATH_TYPE: inherit
|
||||||
|
steps:
|
||||||
|
- script: $(container_cmd) -l -c "cd $(echo '%cd%') && $(prepare)"
|
||||||
|
displayName: 'prepare'
|
||||||
|
condition: variables.prepare
|
||||||
|
retryCountOnTaskFailure: 3
|
||||||
|
|
||||||
|
- script: $(container_cmd) -l -c "cd $(echo '%cd%') && autoreconf -fi && ./configure $(configure)"
|
||||||
|
displayName: 'configure $(name)'
|
||||||
|
|
||||||
|
- script: $(container_cmd) -l -c "cd $(echo '%cd%') && make V=1 && make V=1 examples && cd tests && make V=1"
|
||||||
|
displayName: 'compile'
|
||||||
|
env:
|
||||||
|
MAKEFLAGS: "-j 2"
|
||||||
|
|
||||||
|
- script: $(container_cmd) -l -c "cd $(echo '%cd%') && make V=1 install && PATH=/usr/bin:/bin find . -type f -path '*/.libs/*.exe' -print -execdir mv -t .. {} \;"
|
||||||
|
displayName: 'install'
|
||||||
|
|
||||||
|
- script: $(container_cmd) -l -c "cd $(echo '%cd%') && make V=1 test-ci"
|
||||||
|
displayName: 'test'
|
||||||
|
env:
|
||||||
|
AZURE_ACCESS_TOKEN: "$(System.AccessToken)"
|
||||||
|
TFLAGS: "-ac /usr/bin/curl.exe !IDN !SCP ~612 ~1056 $(tests)"
|
||||||
|
|
@ -0,0 +1,540 @@
|
||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
#
|
||||||
|
# This software is licensed as described in the file COPYING, which
|
||||||
|
# you should have received as part of this distribution. The terms
|
||||||
|
# are also available at https://curl.se/docs/copyright.html.
|
||||||
|
#
|
||||||
|
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
# copies of the Software, and permit persons to whom the Software is
|
||||||
|
# furnished to do so, under the terms of the COPYING file.
|
||||||
|
#
|
||||||
|
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
# KIND, either express or implied.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: curl
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
# View these jobs in the browser: https://app.circleci.com/pipelines/github/curl/curl
|
||||||
|
|
||||||
|
# Use the latest 2.1 version of CircleCI pipeline process engine. See: https://circleci.com/docs/2.0/configuration-reference
|
||||||
|
version: 2.1
|
||||||
|
|
||||||
|
commands:
|
||||||
|
configure:
|
||||||
|
steps:
|
||||||
|
- run:
|
||||||
|
command: |
|
||||||
|
autoreconf -fi
|
||||||
|
./configure --enable-warnings --enable-werror --with-openssl
|
||||||
|
|
||||||
|
configure-openssl-no-verbose:
|
||||||
|
steps:
|
||||||
|
- run:
|
||||||
|
command: |
|
||||||
|
autoreconf -fi
|
||||||
|
./configure --disable-verbose --enable-werror --with-openssl
|
||||||
|
|
||||||
|
configure-no-proxy:
|
||||||
|
steps:
|
||||||
|
- run:
|
||||||
|
command: |
|
||||||
|
autoreconf -fi
|
||||||
|
./configure --disable-proxy --enable-werror --with-openssl
|
||||||
|
|
||||||
|
configure-macos-normal:
|
||||||
|
steps:
|
||||||
|
- run:
|
||||||
|
command: |
|
||||||
|
autoreconf -fi
|
||||||
|
./configure --enable-warnings --enable-websockets --without-ssl CFLAGS='-Wno-vla -mmacosx-version-min=10.9'
|
||||||
|
|
||||||
|
configure-macos-debug:
|
||||||
|
steps:
|
||||||
|
- run:
|
||||||
|
command: |
|
||||||
|
autoreconf -fi
|
||||||
|
./configure --enable-warnings --enable-websockets --without-ssl --enable-debug CFLAGS='-Wno-vla -mmacosx-version-min=10.9'
|
||||||
|
|
||||||
|
configure-macos-libssh2:
|
||||||
|
steps:
|
||||||
|
- run:
|
||||||
|
command: |
|
||||||
|
autoreconf -fi
|
||||||
|
./configure --enable-warnings --enable-websockets --without-ssl --with-libssh2=/opt/homebrew/opt/libssh2 --enable-debug CFLAGS='-Wno-vla -mmacosx-version-min=10.9'
|
||||||
|
|
||||||
|
configure-macos-libssh-c-ares:
|
||||||
|
steps:
|
||||||
|
- run:
|
||||||
|
command: |
|
||||||
|
autoreconf -fi
|
||||||
|
./configure --enable-warnings --enable-websockets --with-openssl --with-libssh --enable-ares --enable-debug PKG_CONFIG_PATH="$(brew --prefix openssl)/lib/pkgconfig" CFLAGS='-Wno-vla -mmacosx-version-min=10.9'
|
||||||
|
|
||||||
|
configure-macos-libssh:
|
||||||
|
steps:
|
||||||
|
- run:
|
||||||
|
command: |
|
||||||
|
autoreconf -fi
|
||||||
|
./configure --enable-warnings --enable-websockets --with-openssl --with-libssh --enable-debug PKG_CONFIG_PATH="$(brew --prefix openssl)/lib/pkgconfig" CFLAGS='-Wno-vla -mmacosx-version-min=10.9'
|
||||||
|
|
||||||
|
configure-macos-c-ares:
|
||||||
|
steps:
|
||||||
|
- run:
|
||||||
|
command: |
|
||||||
|
autoreconf -fi
|
||||||
|
./configure --enable-warnings --enable-websockets --without-ssl --enable-ares --enable-debug CFLAGS='-Wno-vla -mmacosx-version-min=10.9'
|
||||||
|
|
||||||
|
configure-macos-http-only:
|
||||||
|
steps:
|
||||||
|
- run:
|
||||||
|
command: |
|
||||||
|
autoreconf -fi
|
||||||
|
./configure --enable-warnings --enable-maintainer-mode --disable-dict --disable-file --disable-ftp --disable-gopher --disable-imap --disable-ldap --disable-pop3 --disable-rtmp --disable-rtsp --disable-scp --disable-sftp --disable-smb --disable-smtp --disable-telnet --disable-tftp --disable-unix-sockets --disable-shared --without-brotli --without-gssapi --without-libidn2 --without-libpsl --without-librtmp --without-libssh2 --without-nghttp2 --without-ntlm-auth --without-ssl --without-zlib --enable-debug CFLAGS='-Wno-vla -mmacosx-version-min=10.15'
|
||||||
|
|
||||||
|
configure-macos-securetransport-http2:
|
||||||
|
steps:
|
||||||
|
- run:
|
||||||
|
command: |
|
||||||
|
autoreconf -fi
|
||||||
|
./configure --enable-warnings --enable-websockets --with-secure-transport CFLAGS='-Wno-vla -mmacosx-version-min=10.8'
|
||||||
|
|
||||||
|
configure-macos-openssl-http2:
|
||||||
|
steps:
|
||||||
|
- run:
|
||||||
|
command: |
|
||||||
|
autoreconf -fi
|
||||||
|
./configure --enable-warnings --enable-websockets --with-openssl --enable-debug PKG_CONFIG_PATH="$(brew --prefix openssl)/lib/pkgconfig" CFLAGS='-Wno-vla -mmacosx-version-min=10.9'
|
||||||
|
|
||||||
|
configure-macos-libressl-http2:
|
||||||
|
steps:
|
||||||
|
- run:
|
||||||
|
command: |
|
||||||
|
autoreconf -fi
|
||||||
|
./configure --enable-warnings --enable-websockets --with-openssl --enable-debug PKG_CONFIG_PATH="$(brew --prefix libressl)/lib/pkgconfig" CFLAGS='-Wno-vla -mmacosx-version-min=10.9'
|
||||||
|
|
||||||
|
configure-macos-torture:
|
||||||
|
steps:
|
||||||
|
- run:
|
||||||
|
command: |
|
||||||
|
autoreconf -fi
|
||||||
|
./configure --enable-warnings --enable-websockets --disable-shared --disable-threaded-resolver --with-openssl --enable-debug PKG_CONFIG_PATH="$(brew --prefix openssl)/lib/pkgconfig" CFLAGS='-Wno-vla -mmacosx-version-min=10.9'
|
||||||
|
|
||||||
|
configure-macos-torture-ftp:
|
||||||
|
steps:
|
||||||
|
- run:
|
||||||
|
command: |
|
||||||
|
autoreconf -fi
|
||||||
|
./configure --enable-warnings --enable-websockets --disable-shared --disable-threaded-resolver --with-openssl --enable-debug PKG_CONFIG_PATH="$(brew --prefix openssl)/lib/pkgconfig" CFLAGS='-Wno-vla -mmacosx-version-min=10.9'
|
||||||
|
|
||||||
|
install-cares:
|
||||||
|
steps:
|
||||||
|
- run:
|
||||||
|
command: |
|
||||||
|
sudo apt-get update && sudo apt-get install -y libc-ares-dev
|
||||||
|
|
||||||
|
install-libssh:
|
||||||
|
steps:
|
||||||
|
- run:
|
||||||
|
command: |
|
||||||
|
sudo apt-get update && sudo apt-get install -y libssh-dev
|
||||||
|
|
||||||
|
install-deps:
|
||||||
|
steps:
|
||||||
|
- run:
|
||||||
|
command: |
|
||||||
|
sudo apt-get update && sudo apt-get install -y libpsl-dev libbrotli-dev libzstd-dev zlib1g-dev python3-pip
|
||||||
|
sudo python3 -m pip install impacket
|
||||||
|
|
||||||
|
install-deps-brew:
|
||||||
|
steps:
|
||||||
|
- run:
|
||||||
|
command: |
|
||||||
|
# Drop libressl as long as we're not trying to build it
|
||||||
|
echo libtool autoconf automake pkg-config nghttp2 libssh2 openssl libssh c-ares | xargs -Ix -n1 echo brew '"x"' > /tmp/Brewfile
|
||||||
|
while [ $? -eq 0 ]; do for i in 1 2 3; do brew update && brew bundle install --no-lock --file /tmp/Brewfile && break 2 || { echo Error: wait to try again; sleep 10; } done; false Too many retries; done
|
||||||
|
sudo python3 -m pip install impacket
|
||||||
|
|
||||||
|
configure-libssh:
|
||||||
|
steps:
|
||||||
|
- run:
|
||||||
|
command: |
|
||||||
|
autoreconf -fi
|
||||||
|
./configure --enable-warnings --enable-werror --with-openssl --with-libssh
|
||||||
|
|
||||||
|
install-wolfssl:
|
||||||
|
steps:
|
||||||
|
- run:
|
||||||
|
command: |
|
||||||
|
WOLFSSL_VER=5.6.0
|
||||||
|
curl -LOsSf --retry 6 --retry-connrefused --max-time 999 https://github.com/wolfSSL/wolfssl/archive/v$WOLFSSL_VER-stable.tar.gz
|
||||||
|
tar -xzf v$WOLFSSL_VER-stable.tar.gz
|
||||||
|
cd wolfssl-$WOLFSSL_VER-stable
|
||||||
|
./autogen.sh
|
||||||
|
./configure --enable-tls13 --enable-all --enable-harden --prefix=$HOME/wssl
|
||||||
|
make install
|
||||||
|
|
||||||
|
install-wolfssh:
|
||||||
|
steps:
|
||||||
|
- run:
|
||||||
|
command: |
|
||||||
|
WOLFSSH_VER=1.4.12
|
||||||
|
curl -LOsSf --retry 6 --retry-connrefused --max-time 999 https://github.com/wolfSSL/wolfssh/archive/v$WOLFSSH_VER-stable.tar.gz
|
||||||
|
tar -xzf v$WOLFSSH_VER-stable.tar.gz
|
||||||
|
cd wolfssh-$WOLFSSH_VER-stable
|
||||||
|
./autogen.sh
|
||||||
|
./configure --with-wolfssl=$HOME/wssl --prefix=$HOME/wssh --enable-scp --enable-sftp --disable-examples
|
||||||
|
make install
|
||||||
|
|
||||||
|
configure-cares:
|
||||||
|
steps:
|
||||||
|
- run:
|
||||||
|
command: |
|
||||||
|
autoreconf -fi
|
||||||
|
./configure --enable-warnings --enable-werror --with-openssl --enable-ares
|
||||||
|
|
||||||
|
configure-wolfssh:
|
||||||
|
steps:
|
||||||
|
- run:
|
||||||
|
command: |
|
||||||
|
autoreconf -fi
|
||||||
|
LDFLAGS="-Wl,-rpath,$HOME/wssh/lib" ./configure --enable-warnings --enable-werror --with-wolfssl=$HOME/wssl --with-wolfssh=$HOME/wssh
|
||||||
|
|
||||||
|
configure-cares-debug:
|
||||||
|
steps:
|
||||||
|
- run:
|
||||||
|
command: |
|
||||||
|
autoreconf -fi
|
||||||
|
./configure --enable-debug --enable-werror --with-openssl --enable-ares
|
||||||
|
|
||||||
|
build:
|
||||||
|
steps:
|
||||||
|
- run: make -j3 V=1
|
||||||
|
- run: make -j3 V=1 examples
|
||||||
|
|
||||||
|
build-macos:
|
||||||
|
steps:
|
||||||
|
- run: make -j7 V=1
|
||||||
|
- run: make -j7 V=1 examples
|
||||||
|
|
||||||
|
test:
|
||||||
|
steps:
|
||||||
|
- run: make -j3 V=1 test-ci
|
||||||
|
|
||||||
|
test-macos:
|
||||||
|
steps:
|
||||||
|
- run: make -j7 V=1 test-ci
|
||||||
|
|
||||||
|
test-torture:
|
||||||
|
steps:
|
||||||
|
- run: make -j5 V=1 test-ci TFLAGS="-n -t --shallow=25 !FTP"
|
||||||
|
|
||||||
|
test-torture-ftp:
|
||||||
|
steps:
|
||||||
|
- run: make -j5 V=1 test-ci TFLAGS="-n -t --shallow=20 FTP"
|
||||||
|
|
||||||
|
executors:
|
||||||
|
ubuntu:
|
||||||
|
machine:
|
||||||
|
image: ubuntu-2004:202010-01
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
basic:
|
||||||
|
executor: ubuntu
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- configure
|
||||||
|
- build
|
||||||
|
- test
|
||||||
|
|
||||||
|
no-verbose:
|
||||||
|
executor: ubuntu
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- install-deps
|
||||||
|
- configure-openssl-no-verbose
|
||||||
|
- build
|
||||||
|
|
||||||
|
wolfssh:
|
||||||
|
executor: ubuntu
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- install-deps
|
||||||
|
- install-wolfssl
|
||||||
|
- install-wolfssh
|
||||||
|
- configure-wolfssh
|
||||||
|
- build
|
||||||
|
|
||||||
|
no-proxy:
|
||||||
|
executor: ubuntu
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- install-deps
|
||||||
|
- configure-no-proxy
|
||||||
|
- build
|
||||||
|
- test
|
||||||
|
|
||||||
|
cares:
|
||||||
|
executor: ubuntu
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- install-cares
|
||||||
|
- configure-cares
|
||||||
|
- build
|
||||||
|
- test
|
||||||
|
|
||||||
|
libssh:
|
||||||
|
executor: ubuntu
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- install-libssh
|
||||||
|
- configure-libssh
|
||||||
|
- build
|
||||||
|
- test
|
||||||
|
|
||||||
|
arm:
|
||||||
|
machine:
|
||||||
|
image: ubuntu-2004:202101-01
|
||||||
|
resource_class: arm.medium
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- configure
|
||||||
|
- build
|
||||||
|
- test
|
||||||
|
|
||||||
|
arm-cares:
|
||||||
|
machine:
|
||||||
|
image: ubuntu-2004:202101-01
|
||||||
|
resource_class: arm.medium
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- install-cares
|
||||||
|
- configure-cares-debug
|
||||||
|
- build
|
||||||
|
- test
|
||||||
|
|
||||||
|
# TODO: All builds with "macos.x86.medium.gen2" must be changed to
|
||||||
|
# "macos.m1.medium.gen1" in January 2024 because the former will be removed
|
||||||
|
# (the names should also be changed from macos-x86-* to macos-arm-*). We
|
||||||
|
# want the M1 (ARM) machines anyway, for platform diversity.
|
||||||
|
# See https://circleci.com/docs/configuration-reference/#macos-execution-environment
|
||||||
|
macos-x86-normal:
|
||||||
|
macos:
|
||||||
|
xcode: 15.0.0
|
||||||
|
resource_class: macos.x86.medium.gen2
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- install-deps-brew
|
||||||
|
- configure-macos-normal
|
||||||
|
- build-macos
|
||||||
|
- test-macos
|
||||||
|
|
||||||
|
macos-x86-debug:
|
||||||
|
macos:
|
||||||
|
xcode: 15.0.0
|
||||||
|
resource_class: macos.x86.medium.gen2
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- install-deps-brew
|
||||||
|
- configure-macos-debug
|
||||||
|
- build-macos
|
||||||
|
- test-macos
|
||||||
|
|
||||||
|
macos-x86-libssh2:
|
||||||
|
macos:
|
||||||
|
xcode: 15.0.0
|
||||||
|
resource_class: macos.x86.medium.gen2
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- install-deps-brew
|
||||||
|
- configure-macos-libssh2
|
||||||
|
- build-macos
|
||||||
|
- test-macos
|
||||||
|
|
||||||
|
macos-x86-libssh-c-ares:
|
||||||
|
macos:
|
||||||
|
xcode: 15.0.0
|
||||||
|
resource_class: macos.x86.medium.gen2
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- install-deps-brew
|
||||||
|
- configure-macos-libssh-c-ares
|
||||||
|
- build-macos
|
||||||
|
- test-macos
|
||||||
|
|
||||||
|
macos-x86-libssh:
|
||||||
|
macos:
|
||||||
|
xcode: 15.0.0
|
||||||
|
resource_class: macos.x86.medium.gen2
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- install-deps-brew
|
||||||
|
- configure-macos-libssh
|
||||||
|
- build-macos
|
||||||
|
- test-macos
|
||||||
|
|
||||||
|
macos-x86-c-ares:
|
||||||
|
macos:
|
||||||
|
xcode: 15.0.0
|
||||||
|
resource_class: macos.x86.medium.gen2
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- install-deps-brew
|
||||||
|
- configure-macos-c-ares
|
||||||
|
- build-macos
|
||||||
|
- test-macos
|
||||||
|
|
||||||
|
macos-x86-http-only:
|
||||||
|
macos:
|
||||||
|
xcode: 15.0.0
|
||||||
|
resource_class: macos.x86.medium.gen2
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- install-deps-brew
|
||||||
|
- configure-macos-http-only
|
||||||
|
- build-macos
|
||||||
|
- test-macos
|
||||||
|
|
||||||
|
macos-x86-http-securetransport-http2:
|
||||||
|
macos:
|
||||||
|
xcode: 15.0.0
|
||||||
|
resource_class: macos.x86.medium.gen2
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- install-deps-brew
|
||||||
|
- configure-macos-securetransport-http2
|
||||||
|
- build-macos
|
||||||
|
- test-macos
|
||||||
|
|
||||||
|
macos-x86-http-openssl-http2:
|
||||||
|
macos:
|
||||||
|
xcode: 15.0.0
|
||||||
|
resource_class: macos.x86.medium.gen2
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- install-deps-brew
|
||||||
|
- configure-macos-openssl-http2
|
||||||
|
- build-macos
|
||||||
|
- test-macos
|
||||||
|
|
||||||
|
macos-x86-http-libressl-http2:
|
||||||
|
macos:
|
||||||
|
xcode: 15.0.0
|
||||||
|
resource_class: macos.x86.medium.gen2
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- install-deps-brew
|
||||||
|
- configure-macos-libressl-http2
|
||||||
|
- build-macos
|
||||||
|
- test-macos
|
||||||
|
|
||||||
|
macos-x86-http-torture:
|
||||||
|
macos:
|
||||||
|
xcode: 15.0.0
|
||||||
|
resource_class: macos.x86.medium.gen2
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- install-deps-brew
|
||||||
|
- configure-macos-torture
|
||||||
|
- build-macos
|
||||||
|
- test-torture
|
||||||
|
|
||||||
|
macos-x86-http-torture-ftp:
|
||||||
|
macos:
|
||||||
|
xcode: 15.0.0
|
||||||
|
resource_class: macos.x86.medium.gen2
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- install-deps-brew
|
||||||
|
- configure-macos-torture-ftp
|
||||||
|
- build-macos
|
||||||
|
- test-torture-ftp
|
||||||
|
|
||||||
|
workflows:
|
||||||
|
x86-openssl:
|
||||||
|
jobs:
|
||||||
|
- basic
|
||||||
|
|
||||||
|
openssl-c-ares:
|
||||||
|
jobs:
|
||||||
|
- cares
|
||||||
|
|
||||||
|
openssl-libssh:
|
||||||
|
jobs:
|
||||||
|
- libssh
|
||||||
|
|
||||||
|
openssl-no-proxy:
|
||||||
|
jobs:
|
||||||
|
- no-proxy
|
||||||
|
|
||||||
|
openssl-no-verbose:
|
||||||
|
jobs:
|
||||||
|
- no-verbose
|
||||||
|
|
||||||
|
wolfssl-wolfssh:
|
||||||
|
jobs:
|
||||||
|
- wolfssh
|
||||||
|
|
||||||
|
arm-openssl:
|
||||||
|
jobs:
|
||||||
|
- arm
|
||||||
|
|
||||||
|
arm-openssl-c-ares:
|
||||||
|
jobs:
|
||||||
|
- arm-cares
|
||||||
|
|
||||||
|
macos-x86-normal:
|
||||||
|
jobs:
|
||||||
|
- macos-x86-normal
|
||||||
|
|
||||||
|
macos-x86-debug:
|
||||||
|
jobs:
|
||||||
|
- macos-x86-debug
|
||||||
|
|
||||||
|
macos-x86-libssh2:
|
||||||
|
jobs:
|
||||||
|
- macos-x86-libssh2
|
||||||
|
|
||||||
|
macos-x86-libssh-c-ares:
|
||||||
|
jobs:
|
||||||
|
- macos-x86-libssh-c-ares
|
||||||
|
|
||||||
|
macos-x86-libssh:
|
||||||
|
jobs:
|
||||||
|
- macos-x86-libssh
|
||||||
|
|
||||||
|
macos-x86-c-ares:
|
||||||
|
jobs:
|
||||||
|
- macos-x86-c-ares
|
||||||
|
|
||||||
|
macos-x86-http-only:
|
||||||
|
jobs:
|
||||||
|
- macos-x86-http-only
|
||||||
|
|
||||||
|
macos-x86-http-securetransport-http2:
|
||||||
|
jobs:
|
||||||
|
- macos-x86-http-securetransport-http2
|
||||||
|
|
||||||
|
macos-x86-http-openssl-http2:
|
||||||
|
jobs:
|
||||||
|
- macos-x86-http-openssl-http2
|
||||||
|
|
||||||
|
# There are problem linking with LibreSSL on the CI boxes that prevent this
|
||||||
|
# from working.
|
||||||
|
#macos-x86-http-libressl-http2:
|
||||||
|
# jobs:
|
||||||
|
# - macos-x86-http-libressl-http2
|
||||||
|
|
||||||
|
macos-x86-http-torture:
|
||||||
|
jobs:
|
||||||
|
- macos-x86-http-torture
|
||||||
|
|
||||||
|
macos-x86-http-torture-ftp:
|
||||||
|
jobs:
|
||||||
|
- macos-x86-http-torture-ftp
|
||||||
|
|
@ -0,0 +1,85 @@
|
||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
#
|
||||||
|
# This software is licensed as described in the file COPYING, which
|
||||||
|
# you should have received as part of this distribution. The terms
|
||||||
|
# are also available at https://curl.se/docs/copyright.html.
|
||||||
|
#
|
||||||
|
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
# copies of the Software, and permit persons to whom the Software is
|
||||||
|
# furnished to do so, under the terms of the COPYING file.
|
||||||
|
#
|
||||||
|
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
# KIND, either express or implied.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: curl
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
# https://cirrus-ci.com/github/curl/curl
|
||||||
|
#
|
||||||
|
# Cirrus CI configuration:
|
||||||
|
# https://cirrus-ci.org/guide/writing-tasks/
|
||||||
|
|
||||||
|
freebsd_task:
|
||||||
|
skip: "changesIncludeOnly(
|
||||||
|
'**/CMakeLists.txt',
|
||||||
|
'.azure-pipelines.yml',
|
||||||
|
'.circleci/**',
|
||||||
|
'.github/**',
|
||||||
|
'appveyor.yml',
|
||||||
|
'CMake/**',
|
||||||
|
'packages/**',
|
||||||
|
'plan9/**',
|
||||||
|
'projects/**',
|
||||||
|
'winbuild/**'
|
||||||
|
)"
|
||||||
|
|
||||||
|
name: FreeBSD
|
||||||
|
|
||||||
|
matrix:
|
||||||
|
- name: FreeBSD 13.2
|
||||||
|
freebsd_instance:
|
||||||
|
image_family: freebsd-13-2
|
||||||
|
|
||||||
|
env:
|
||||||
|
CIRRUS_CLONE_DEPTH: 10
|
||||||
|
CRYPTOGRAPHY_DONT_BUILD_RUST: 1
|
||||||
|
MAKEFLAGS: -j 3
|
||||||
|
|
||||||
|
pkginstall_script:
|
||||||
|
- pkg update -f
|
||||||
|
- pkg install -y autoconf automake libtool pkgconf brotli openldap24-client heimdal libpsl libssh2 openssh-portable libidn2 librtmp libnghttp2 nghttp2 stunnel py39-openssl py39-impacket py39-cryptography
|
||||||
|
- pkg delete -y curl
|
||||||
|
configure_script:
|
||||||
|
- autoreconf -fi
|
||||||
|
# Building with the address sanitizer is causing unexplainable test issues due to timeouts
|
||||||
|
#- case `uname -r` in
|
||||||
|
# 12.2*)
|
||||||
|
# export CC=clang;
|
||||||
|
# export CFLAGS="-fsanitize=address,undefined,signed-integer-overflow -fno-sanitize-recover=undefined,integer -Wformat -Werror=format-security -Werror=array-bounds -g";
|
||||||
|
# export CXXFLAGS="-fsanitize=address,undefined -fno-sanitize-recover=undefined,integer -Wformat -Werror=format-security -Werror=array-bounds -g";
|
||||||
|
# export LDFLAGS="-fsanitize=address,undefined -fno-sanitize-recover=undefined,integer" ;;
|
||||||
|
# esac
|
||||||
|
- ./configure --prefix="${HOME}"/install --enable-debug --with-openssl --with-libssh2 --with-brotli --with-gssapi --with-libidn2 --enable-manual --enable-ldap --enable-ldaps --with-librtmp --with-libpsl --with-nghttp2 || { tail -300 config.log; false; }
|
||||||
|
compile_script:
|
||||||
|
- make V=1 && make V=1 examples && cd tests && make V=1
|
||||||
|
test_script:
|
||||||
|
# blackhole?
|
||||||
|
- sysctl net.inet.tcp.blackhole
|
||||||
|
# make sure we don't run blackhole != 0
|
||||||
|
- sudo sysctl net.inet.tcp.blackhole=0
|
||||||
|
# Some tests won't run if run as root so run them as another user.
|
||||||
|
# Make directories world writable so the test step can write wherever it needs.
|
||||||
|
- find . -type d -exec chmod 777 {} \;
|
||||||
|
# The OpenSSH server instance for the testsuite cannot be started on FreeBSD,
|
||||||
|
# therefore the SFTP and SCP tests are disabled right away from the beginning.
|
||||||
|
#
|
||||||
|
- sudo -u nobody make V=1 TFLAGS="-n !SFTP !SCP" test-ci
|
||||||
|
install_script:
|
||||||
|
- make V=1 install
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: curl
|
||||||
|
|
||||||
|
tests/**
|
||||||
|
docs/**
|
||||||
|
docs/examples/**
|
||||||
|
|
@ -0,0 +1,33 @@
|
||||||
|
;;;***************************************************************************
|
||||||
|
;;; _ _ ____ _
|
||||||
|
;;; Project ___| | | | _ \| |
|
||||||
|
;;; / __| | | | |_) | |
|
||||||
|
;;; | (__| |_| | _ <| |___
|
||||||
|
;;; \___|\___/|_| \_\_____|
|
||||||
|
;;;
|
||||||
|
;;; Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
;;;
|
||||||
|
;;; This software is licensed as described in the file COPYING, which
|
||||||
|
;;; you should have received as part of this distribution. The terms
|
||||||
|
;;; are also available at https://curl.se/docs/copyright.html.
|
||||||
|
;;;
|
||||||
|
;;; You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
;;; copies of the Software, and permit persons to whom the Software is
|
||||||
|
;;; furnished to do so, under the terms of the COPYING file.
|
||||||
|
;;;
|
||||||
|
;;; This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
;;; KIND, either express or implied.
|
||||||
|
;;;
|
||||||
|
;;; SPDX-License-Identifier: curl
|
||||||
|
;;;
|
||||||
|
;;;***************************************************************************
|
||||||
|
;;; Directory Local Variables
|
||||||
|
;;; See Info node `(emacs) Directory Variables' for more information.
|
||||||
|
|
||||||
|
((nil . ((indent-tabs-mode . nil)
|
||||||
|
(show-trailing-whitespace . t)))
|
||||||
|
(c-mode . ((c-basic-offset . 2)
|
||||||
|
))
|
||||||
|
(c++-mode . ((c-basic-offset . 2)
|
||||||
|
))
|
||||||
|
)
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: curl
|
||||||
|
|
||||||
|
# Make repository REUSE compliant
|
||||||
|
ad9bc5976d6661cd5b03ebc379313bf657701c14
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: curl
|
||||||
|
|
||||||
|
*.dsw -crlf
|
||||||
|
buildconf eol=lf
|
||||||
|
configure.ac eol=lf
|
||||||
|
*.m4 eol=lf
|
||||||
|
*.in eol=lf
|
||||||
|
*.am eol=lf
|
||||||
|
*.sh eol=lf
|
||||||
|
*.[ch] whitespace=tab-in-indent
|
||||||
|
|
||||||
|
# Batch files (bat,btm,cmd) must be run with CRLF line endings.
|
||||||
|
# Refer to https://github.com/curl/curl/pull/6442
|
||||||
|
*.bat text eol=crlf
|
||||||
|
*.btm text eol=crlf
|
||||||
|
*.cmd text eol=crlf
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: curl
|
||||||
|
|
@ -0,0 +1,29 @@
|
||||||
|
<!--
|
||||||
|
Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
|
||||||
|
SPDX-License-Identifier: curl
|
||||||
|
-->
|
||||||
|
|
||||||
|
How to contribute to curl
|
||||||
|
=========================
|
||||||
|
|
||||||
|
Join the community
|
||||||
|
------------------
|
||||||
|
|
||||||
|
1. Click 'watch' on the GitHub repo
|
||||||
|
|
||||||
|
2. Subscribe to the suitable [mailing lists](https://curl.se/mail/)
|
||||||
|
|
||||||
|
Read [CONTRIBUTE](../docs/CONTRIBUTE.md)
|
||||||
|
---------------------------------------
|
||||||
|
|
||||||
|
Send your suggestions using one of these methods:
|
||||||
|
-------------------------------------------------
|
||||||
|
|
||||||
|
1. in a mail to the mailing list
|
||||||
|
|
||||||
|
2. as a [pull request](https://github.com/curl/curl/pulls)
|
||||||
|
|
||||||
|
3. as an [issue](https://github.com/curl/curl/issues)
|
||||||
|
|
||||||
|
/ The curl team!
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: curl
|
||||||
|
|
||||||
|
github: curl
|
||||||
|
open_collective: curl
|
||||||
|
|
@ -0,0 +1,55 @@
|
||||||
|
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: curl
|
||||||
|
|
||||||
|
name: Bug Report
|
||||||
|
description: Create a report to help us improve
|
||||||
|
|
||||||
|
body:
|
||||||
|
- type: markdown
|
||||||
|
attributes:
|
||||||
|
value: |
|
||||||
|
Thanks for taking the time to fill out this bug report!
|
||||||
|
|
||||||
|
Only file bugs here! Ask questions on the mailing lists https://curl.se/mail/
|
||||||
|
|
||||||
|
**SECURITY RELATED?** Post it here: https://hackerone.com/curl
|
||||||
|
|
||||||
|
There are collections of known issues to be aware of:
|
||||||
|
|
||||||
|
- https://curl.se/docs/knownbugs.html
|
||||||
|
- https://curl.se/docs/todo.html
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
id: reproducer
|
||||||
|
attributes:
|
||||||
|
label: I did this
|
||||||
|
validations:
|
||||||
|
required: false
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
id: expected-behaviour
|
||||||
|
attributes:
|
||||||
|
label: I expected the following
|
||||||
|
validations:
|
||||||
|
required: false
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
id: version
|
||||||
|
attributes:
|
||||||
|
label: curl/libcurl version
|
||||||
|
description: |
|
||||||
|
Please paste the output of `curl -V` here.
|
||||||
|
placeholder: 'curl 8.2.0'
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
id: os
|
||||||
|
attributes:
|
||||||
|
label: operating system
|
||||||
|
description: |
|
||||||
|
On Unix please post the output of `uname -a` here.
|
||||||
|
placeholder: 'Fedora Linux 38'
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: curl
|
||||||
|
|
||||||
|
blank_issues_enabled: false
|
||||||
|
contact_links:
|
||||||
|
- name: Feature request
|
||||||
|
url: https://curl.se/mail/
|
||||||
|
about: To propose new features or enhancements, please bring that discussion to a suitable curl mailing list.
|
||||||
|
- name: Question
|
||||||
|
url: https://curl.se/mail/
|
||||||
|
about: Questions should go to the mailing list
|
||||||
|
- name: Commercial support
|
||||||
|
url: https://curl.se/support.html
|
||||||
|
about: Several companies are offering paid support for curl/libcurl
|
||||||
|
|
@ -0,0 +1,303 @@
|
||||||
|
# Copyright (C) Daniel Fandrich, <dan@coneharvesters.com>, et al.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: curl
|
||||||
|
|
||||||
|
# The workflow configures the .github/workflows/label.yml action
|
||||||
|
# to add labels to pull requests. This is not (yet?) a replacement for human
|
||||||
|
# triaging, but is intended to add labels to the easy cases. If the matching
|
||||||
|
# language becomes more powerful, more cases should be able to be handled.
|
||||||
|
#
|
||||||
|
# The biggest low-hanging problem is this:
|
||||||
|
# It looks like there's no way of specifying that a label be added if *all* the
|
||||||
|
# files match *any* one of a number of globs. This feature request is tracked
|
||||||
|
# in https://github.com/actions/labeler/issues/423
|
||||||
|
|
||||||
|
authentication:
|
||||||
|
- all: ['docs/mk-ca-bundle.1']
|
||||||
|
- all: ['docs/libcurl/opts/CURLINFO_HTTPAUTH*']
|
||||||
|
- all: ['docs/libcurl/opts/CURLINFO_PROXYAUTH*']
|
||||||
|
- all: ['docs/libcurl/opts/CURLOPT_KRB*']
|
||||||
|
- all: ['docs/libcurl/opts/CURLOPT_SASL*']
|
||||||
|
- all: ['docs/libcurl/opts/CURLOPT_SERVICE_NAME*']
|
||||||
|
- all: ['docs/libcurl/opts/CURLOPT_USERNAME*']
|
||||||
|
- all: ['docs/libcurl/opts/CURLOPT_USERPWD*']
|
||||||
|
- all: ['docs/libcurl/opts/CURLOPT_XOAUTH*']
|
||||||
|
- all: ['lib/*gssapi*']
|
||||||
|
- all: ['lib/*krb5*']
|
||||||
|
- all: ['lib/*ntlm*']
|
||||||
|
- all: ['lib/curl_sasl.*']
|
||||||
|
- all: ['lib/http_aws*']
|
||||||
|
- all: ['lib/http_digest.*']
|
||||||
|
- all: ['lib/http_negotiate.*']
|
||||||
|
- all: ['lib/vauth/**']
|
||||||
|
- all: ['tests/server/fake_ntlm.c']
|
||||||
|
|
||||||
|
build:
|
||||||
|
- all: ['**/CMakeLists.txt']
|
||||||
|
- all: ['**/Makefile.am']
|
||||||
|
- all: ['**/Makefile.inc']
|
||||||
|
- all: ['**/Makefile.mk']
|
||||||
|
- all: ['**/*.m4']
|
||||||
|
- all: ['**/*.mk']
|
||||||
|
- all: ['lib/libcurl*.in']
|
||||||
|
- all: ['CMake/**']
|
||||||
|
- all: ['configure.ac']
|
||||||
|
- all: ['m4/**']
|
||||||
|
- all: ['MacOSX-Framework']
|
||||||
|
- all: ['packages/**']
|
||||||
|
- all: ['plan9/**']
|
||||||
|
- all: ['projects/**']
|
||||||
|
- all: ['winbuild/**']
|
||||||
|
- all: ['libcurl.def']
|
||||||
|
|
||||||
|
CI:
|
||||||
|
- any: ['.azure-pipelines.yml']
|
||||||
|
- any: ['.circleci/**']
|
||||||
|
- any: ['.cirrus.yml']
|
||||||
|
- any: ['.github/**']
|
||||||
|
- any: ['appveyor.yml']
|
||||||
|
- any: ['tests/azure.pm']
|
||||||
|
- any: ['tests/appveyor.pm']
|
||||||
|
|
||||||
|
cmake:
|
||||||
|
- all: ['**/CMakeLists.txt']
|
||||||
|
- all: ['CMake/**']
|
||||||
|
|
||||||
|
cmdline tool:
|
||||||
|
- any: ['docs/cmdline-opts/**']
|
||||||
|
- any: ['src/**']
|
||||||
|
|
||||||
|
connecting & proxies:
|
||||||
|
- all: ['docs/CONNECTION-FILTERS.md']
|
||||||
|
- all: ['docs/libcurl/opts/CURLINFO_CONNECT*']
|
||||||
|
- all: ['docs/libcurl/opts/CURLINFO_PROXY*']
|
||||||
|
- all: ['docs/libcurl/opts/CURLOPT_ADDRESS*']
|
||||||
|
- all: ['docs/libcurl/opts/CURLOPT_CONNECT*']
|
||||||
|
- all: ['docs/libcurl/opts/CURLOPT_HAPROXY*']
|
||||||
|
- all: ['docs/libcurl/opts/CURLOPT_OPENSOCKET*']
|
||||||
|
- all: ['docs/libcurl/opts/CURLOPT_PRE_PROXY*']
|
||||||
|
- all: ['docs/libcurl/opts/CURLOPT_PROXY*']
|
||||||
|
- all: ['docs/libcurl/opts/CURLOPT_SOCKOPT*']
|
||||||
|
- all: ['docs/libcurl/opts/CURLOPT_SOCKS*']
|
||||||
|
- all: ['docs/libcurl/opts/CURLOPT_TCP*']
|
||||||
|
- all: ['docs/libcurl/opts/CURLOPT_TIMEOUT*']
|
||||||
|
- all: ['lib/cf-*proxy.*']
|
||||||
|
- all: ['lib/cf-socket.*']
|
||||||
|
- all: ['lib/cfilters.*']
|
||||||
|
- all: ['lib/conncache.*']
|
||||||
|
- all: ['lib/connect.*']
|
||||||
|
- all: ['lib/http_proxy.*']
|
||||||
|
- all: ['lib/if2ip.*']
|
||||||
|
- all: ['lib/noproxy.*']
|
||||||
|
- all: ['lib/socks.*']
|
||||||
|
- all: ['tests/server/socksd.c']
|
||||||
|
|
||||||
|
cookies:
|
||||||
|
- all: ['docs/HTTP-COOKIES.md']
|
||||||
|
- all: ['docs/libcurl/opts/CURLINFO_COOKIE*']
|
||||||
|
- all: ['docs/libcurl/opts/CURLOPT_COOKIE*']
|
||||||
|
- all: ['lib/cookie.*']
|
||||||
|
- all: ['lib/psl.*']
|
||||||
|
|
||||||
|
cryptography:
|
||||||
|
- all: ['docs/CIPHERS.md']
|
||||||
|
- all: ['docs/RUSTLS.md']
|
||||||
|
- all: ['docs/libcurl/opts/CURLOPT_EGDSOCKET*']
|
||||||
|
- all: ['lib/*sha256*']
|
||||||
|
- all: ['lib/curl_des.*']
|
||||||
|
- all: ['lib/curl_hmac.*']
|
||||||
|
- all: ['lib/curl_md?.*']
|
||||||
|
- all: ['lib/md?.*']
|
||||||
|
- all: ['lib/rand.*']
|
||||||
|
|
||||||
|
DICT:
|
||||||
|
- all: ['lib/dict.*']
|
||||||
|
- all: ['tests/dictserver.py']
|
||||||
|
|
||||||
|
documentation:
|
||||||
|
- all: ['**/*.md']
|
||||||
|
- all: ['**/*.txt', '!**/CMakeLists.txt']
|
||||||
|
- all: ['**/*.1']
|
||||||
|
- all: ['**/*.3']
|
||||||
|
- all: ['CHANGES']
|
||||||
|
- all: ['docs/**', '!docs/examples/**']
|
||||||
|
- all: ['GIT-INFO']
|
||||||
|
- all: ['LICENSES/**']
|
||||||
|
- all: ['README']
|
||||||
|
- all: ['RELEASE-NOTES']
|
||||||
|
|
||||||
|
FTP:
|
||||||
|
- all: ['docs/libcurl/opts/CURLINFO_FTP*']
|
||||||
|
- all: ['docs/libcurl/opts/CURLOPT_FTP*']
|
||||||
|
- all: ['docs/libcurl/opts/CURLOPT_WILDCARDMATCH*']
|
||||||
|
- all: ['lib/curl_fnmatch.*']
|
||||||
|
- all: ['lib/curl_range.*']
|
||||||
|
- all: ['lib/ftp*']
|
||||||
|
- all: ['tests/ftp*']
|
||||||
|
|
||||||
|
GOPHER:
|
||||||
|
- all: ['lib/gopher*']
|
||||||
|
|
||||||
|
HTTP:
|
||||||
|
- all: ['docs/HSTS.md']
|
||||||
|
- all: ['docs/HTTP-COOKIES.md']
|
||||||
|
- all: ['docs/libcurl/opts/CURLINFO_COOKIE*']
|
||||||
|
- all: ['docs/libcurl/opts/CURLOPT_COOKIE*']
|
||||||
|
- all: ['docs/libcurl/opts/CURLINFO_HTTP_**']
|
||||||
|
- all: ['docs/libcurl/opts/CURLINFO_REDIRECT*']
|
||||||
|
- all: ['docs/libcurl/opts/CURLINFO_REFER*']
|
||||||
|
- all: ['docs/libcurl/opts/CURLOPT_FOLLOWLOCATION*']
|
||||||
|
- all: ['docs/libcurl/opts/CURLOPT_HSTS*']
|
||||||
|
- all: ['docs/libcurl/opts/CURLOPT_HTTP*']
|
||||||
|
- all: ['docs/libcurl/opts/CURLOPT_POST.*']
|
||||||
|
- all: ['docs/libcurl/opts/CURLOPT_POSTFIELD*']
|
||||||
|
- all: ['docs/libcurl/opts/CURLOPT_POSTREDIR*']
|
||||||
|
- all: ['docs/libcurl/opts/CURLOPT_REDIR*']
|
||||||
|
- all: ['docs/libcurl/opts/CURLOPT_REFER*']
|
||||||
|
- all: ['docs/libcurl/opts/CURLOPT_TRAILER*']
|
||||||
|
- all: ['docs/libcurl/opts/CURLOPT_TRANSFER_ENCODING*']
|
||||||
|
- all: ['lib/cf-https*']
|
||||||
|
- all: ['lib/cf-h1*']
|
||||||
|
- all: ['lib/cf-h2*']
|
||||||
|
- all: ['lib/cookie.*']
|
||||||
|
- all: ['lib/http*']
|
||||||
|
- all: ['tests/http*']
|
||||||
|
- all: ['tests/http-server.pl']
|
||||||
|
- all: ['tests/http/*']
|
||||||
|
- all: ['tests/nghttp*']
|
||||||
|
|
||||||
|
HTTP/2:
|
||||||
|
- all: ['docs/HTTP2.md']
|
||||||
|
- all: ['docs/libcurl/opts/CURLOPT_STREAM*']
|
||||||
|
- all: ['lib/http2*']
|
||||||
|
- all: ['tests/http2-server.pl']
|
||||||
|
|
||||||
|
HTTP/3:
|
||||||
|
- all: ['.github/workflows/ngtcp2*']
|
||||||
|
- all: ['.github/workflows/quiche*']
|
||||||
|
- all: ['docs/HTTP3.md']
|
||||||
|
- all: ['lib/vquic/**']
|
||||||
|
- all: ['tests/http3-server.pl']
|
||||||
|
- all: ['tests/nghttpx.conf']
|
||||||
|
|
||||||
|
Hyper:
|
||||||
|
- all: ['docs/HYPER.md']
|
||||||
|
- all: ['lib/c-hyper.*']
|
||||||
|
|
||||||
|
IMAP:
|
||||||
|
- all: ['lib/imap*']
|
||||||
|
|
||||||
|
LDAP:
|
||||||
|
- all: ['lib/*ldap*']
|
||||||
|
|
||||||
|
libcurl API:
|
||||||
|
- all: ['docs/libcurl/ABI.md']
|
||||||
|
- any: ['include/curl/**']
|
||||||
|
|
||||||
|
MIME:
|
||||||
|
- all: ['docs/libcurl/curl_mime_*']
|
||||||
|
- all: ['docs/libcurl/opts/CURLOPT_MIME*']
|
||||||
|
- all: ['lib/mime*']
|
||||||
|
|
||||||
|
MQTT:
|
||||||
|
- all: ['docs/MQTT.md']
|
||||||
|
- all: ['lib/mqtt*']
|
||||||
|
- all: ['tests/server/mqttd.c']
|
||||||
|
|
||||||
|
name lookup:
|
||||||
|
- all: ['docs/libcurl/opts/CURLINFO_NAMELOOKUP*']
|
||||||
|
- all: ['docs/libcurl/opts/CURLOPT_DNS*']
|
||||||
|
- all: ['docs/libcurl/opts/CURLOPT_DOH*']
|
||||||
|
- all: ['docs/libcurl/opts/CURLOPT_RESOLVE*']
|
||||||
|
- all: ['lib/asyn*']
|
||||||
|
- all: ['lib/curl_gethostname.*']
|
||||||
|
- all: ['lib/doh*']
|
||||||
|
- all: ['lib/host*']
|
||||||
|
- all: ['lib/idn*']
|
||||||
|
- all: ['lib/inet_pton.*']
|
||||||
|
- all: ['lib/socketpair*']
|
||||||
|
- all: ['tests/server/resolve.c']
|
||||||
|
|
||||||
|
POP3:
|
||||||
|
- all: ['lib/pop3.*']
|
||||||
|
|
||||||
|
RTMP:
|
||||||
|
- all: ['lib/curl_rtmp.*']
|
||||||
|
|
||||||
|
RTSP:
|
||||||
|
- all: ['docs/libcurl/opts/CURLINFO_RTSP*']
|
||||||
|
- all: ['docs/libcurl/opts/CURLOPT_RTSP*']
|
||||||
|
- all: ['lib/rtsp.*']
|
||||||
|
- all: ['tests/rtspserver.pl']
|
||||||
|
- all: ['tests/server/rtspd.c']
|
||||||
|
|
||||||
|
SCP/SFTP:
|
||||||
|
- all: ['docs/libcurl/opts/CURLOPT_SSH*']
|
||||||
|
- all: ['lib/vssh/**']
|
||||||
|
- all: ['tests/sshhelp.pm']
|
||||||
|
- all: ['tests/sshserver.pl']
|
||||||
|
|
||||||
|
script:
|
||||||
|
- all: ['**/*.pl']
|
||||||
|
- all: ['**/*.sh']
|
||||||
|
- all: ['curl-config.in']
|
||||||
|
- all: ['docs/curl-config.1']
|
||||||
|
- all: ['docs/mk-ca-bundle.1']
|
||||||
|
- all: ['docs/THANKS-filter']
|
||||||
|
- all: ['scripts/**']
|
||||||
|
|
||||||
|
SMB:
|
||||||
|
- all: ['lib/smb.*']
|
||||||
|
- all: ['tests/smbserver.py']
|
||||||
|
|
||||||
|
SMTP:
|
||||||
|
- all: ['docs/libcurl/opts/CURLOPT_MAIL*']
|
||||||
|
- all: ['lib/smtp.*']
|
||||||
|
|
||||||
|
tests:
|
||||||
|
- any: ['tests/**']
|
||||||
|
|
||||||
|
TFTP:
|
||||||
|
- all: ['lib/tftp.*']
|
||||||
|
- all: ['tests/tftpserver.pl']
|
||||||
|
- all: ['tests/server/tftp*']
|
||||||
|
|
||||||
|
TLS:
|
||||||
|
- all: ['docs/SSL*']
|
||||||
|
- all: ['docs/libcurl/opts/CURLINFO_CA*']
|
||||||
|
- all: ['docs/libcurl/opts/CURLINFO_CERT*']
|
||||||
|
- all: ['docs/libcurl/opts/CURLINFO_SSL*']
|
||||||
|
- all: ['docs/libcurl/opts/CURLINFO_TLS*']
|
||||||
|
- all: ['docs/libcurl/opts/CURLOPT_CA*']
|
||||||
|
- all: ['docs/libcurl/opts/CURLOPT_CERT*']
|
||||||
|
- all: ['docs/libcurl/opts/CURLOPT_PINNEDPUBLICKEY*']
|
||||||
|
- all: ['docs/libcurl/opts/CURLOPT_SSL*']
|
||||||
|
- all: ['docs/libcurl/opts/CURLOPT_TLS*']
|
||||||
|
- all: ['docs/libcurl/opts/CURLOPT_USE_SSL*']
|
||||||
|
- all: ['lib/vtls/**']
|
||||||
|
|
||||||
|
URL:
|
||||||
|
- all: ['docs/libcurl/curl_url*']
|
||||||
|
- all: ['docs/URL-SYNTAX.md']
|
||||||
|
- all: ['include/curl/urlapi.h']
|
||||||
|
- all: ['lib/urlapi*']
|
||||||
|
|
||||||
|
WebSocket:
|
||||||
|
- all: ['docs/WEBSOCKET.md*']
|
||||||
|
- all: ['docs/libcurl/curl_ws_*']
|
||||||
|
- all: ['docs/libcurl/libcurl-ws.3']
|
||||||
|
- all: ['docs/libcurl/opts/CURLOPT_WS_*']
|
||||||
|
- all: ['include/curl/websockets.h']
|
||||||
|
- all: ['lib/ws.*']
|
||||||
|
|
||||||
|
Windows:
|
||||||
|
- all: ['CMake/Platforms/WindowsCache.cmake']
|
||||||
|
- all: ['lib/*win32*']
|
||||||
|
- all: ['lib/curl_multibyte.*']
|
||||||
|
- all: ['lib/rename.*']
|
||||||
|
- all: ['lib/vtls/schannel*']
|
||||||
|
- all: ['m4/curl-schannel.m4']
|
||||||
|
- all: ['projects/**']
|
||||||
|
- all: ['src/tool_doswin.c']
|
||||||
|
- all: ['winbuild/**']
|
||||||
|
- all: ['libcurl.def']
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: curl
|
||||||
|
|
||||||
|
# Configuration for lock-threads - https://github.com/dessant/lock-threads
|
||||||
|
|
||||||
|
# Number of days of inactivity before a closed issue or pull request is locked
|
||||||
|
daysUntilLock: 90
|
||||||
|
# Comment to post before locking. Set to `false` to disable
|
||||||
|
lockComment: false
|
||||||
|
# Limit to only `issues` or `pulls`
|
||||||
|
# only: issues
|
||||||
|
|
@ -0,0 +1,79 @@
|
||||||
|
#!/usr/bin/perl
|
||||||
|
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: curl
|
||||||
|
#
|
||||||
|
# Input: a libcurl nroff man page
|
||||||
|
# Output: the same file, minus the SYNOPSIS and the EXAMPLE sections
|
||||||
|
#
|
||||||
|
|
||||||
|
my $f = $ARGV[0];
|
||||||
|
my $o = $ARGV[1];
|
||||||
|
|
||||||
|
open(F, "<$f") or die;
|
||||||
|
open(O, ">$o") or die;
|
||||||
|
|
||||||
|
my $ignore = 0;
|
||||||
|
while(<F>) {
|
||||||
|
if($_ =~ /^.SH (SYNOPSIS|EXAMPLE|\"SEE ALSO\"|SEE ALSO)/) {
|
||||||
|
$ignore = 1;
|
||||||
|
}
|
||||||
|
elsif($ignore && ($_ =~ /^.SH/)) {
|
||||||
|
$ignore = 0;
|
||||||
|
}
|
||||||
|
elsif(!$ignore) {
|
||||||
|
# filter out mentioned CURLE_ names
|
||||||
|
$_ =~ s/CURL(M|SH|U|H)code//g;
|
||||||
|
$_ =~ s/CURL_(READ|WRITE)FUNC_[A-Z0-9_]*//g;
|
||||||
|
$_ =~ s/CURL_CSELECT_[A-Z0-9_]*//g;
|
||||||
|
$_ =~ s/CURL_DISABLE_[A-Z0-9_]*//g;
|
||||||
|
$_ =~ s/CURL_FORMADD_[A-Z0-9_]*//g;
|
||||||
|
$_ =~ s/CURL_HET_DEFAULT//g;
|
||||||
|
$_ =~ s/CURL_IPRESOLVE_[A-Z0-9_]*//g;
|
||||||
|
$_ =~ s/CURL_PROGRESSFUNC_CONTINUE//g;
|
||||||
|
$_ =~ s/CURL_REDIR_[A-Z0-9_]*//g;
|
||||||
|
$_ =~ s/CURL_RTSPREQ_[A-Z0-9_]*//g;
|
||||||
|
$_ =~ s/CURL_TIMECOND_[A-Z0-9_]*//g;
|
||||||
|
$_ =~ s/CURL_VERSION_[A-Z0-9_]*//g;
|
||||||
|
$_ =~ s/CURLALTSVC_[A-Z0-9_]*//g;
|
||||||
|
$_ =~ s/CURLAUTH_[A-Z0-9_]*//g;
|
||||||
|
$_ =~ s/CURLE_[A-Z0-9_]*//g;
|
||||||
|
$_ =~ s/CURLFORM_[A-Z0-9_]*//g;
|
||||||
|
$_ =~ s/CURLFTP_[A-Z0-9_]*//g;
|
||||||
|
$_ =~ s/CURLFTPAUTH_[A-Z0-9_]*//g;
|
||||||
|
$_ =~ s/CURLFTPMETHOD_[A-Z0-9_]*//g;
|
||||||
|
$_ =~ s/CURLFTPSSL_[A-Z0-9_]*//g;
|
||||||
|
$_ =~ s/CURLGSSAPI_[A-Z0-9_]*//g;
|
||||||
|
$_ =~ s/CURLHEADER_[A-Z0-9_]*//g;
|
||||||
|
$_ =~ s/CURLINFO_[A-Z0-9_]*//g;
|
||||||
|
$_ =~ s/CURLM_[A-Z0-9_]*//g;
|
||||||
|
$_ =~ s/CURLMIMEOPT_[A-Z0-9_]*//g;
|
||||||
|
$_ =~ s/CURLMOPT_[A-Z0-9_]*//g;
|
||||||
|
$_ =~ s/CURLOPT_[A-Z0-9_]*//g;
|
||||||
|
$_ =~ s/CURLPIPE_[A-Z0-9_]*//g;
|
||||||
|
$_ =~ s/CURLPROTO_[A-Z0-9_]*//g;
|
||||||
|
$_ =~ s/CURLPROXY_[A-Z0-9_]*//g;
|
||||||
|
$_ =~ s/CURLPX_[A-Z0-9_]*//g;
|
||||||
|
$_ =~ s/CURLSHE_[A-Z0-9_]*//g;
|
||||||
|
$_ =~ s/CURLSHOPT_[A-Z0-9_]*//g;
|
||||||
|
$_ =~ s/CURLSSH_[A-Z0-9_]*//g;
|
||||||
|
$_ =~ s/CURLSSLBACKEND_[A-Z0-9_]*//g;
|
||||||
|
$_ =~ s/CURLU_[A-Z0-9_]*//g;
|
||||||
|
$_ =~ s/CURLUE_[A-Z0-9_]*//g;
|
||||||
|
$_ =~ s/CURLUPART_[A-Z0-9_]*//g;
|
||||||
|
$_ =~ s/CURLUSESSL_[A-Z0-9_]*//g;
|
||||||
|
$_ =~ s/curl_global_(init_mem|sslset|cleanup)//g;
|
||||||
|
$_ =~ s/curl_(strequal|strnequal|formadd|waitfd|formget|getdate|formfree)//g;
|
||||||
|
$_ =~ s/curl_easy_(nextheader|duphandle)//g;
|
||||||
|
$_ =~ s/curl_multi_fdset//g;
|
||||||
|
$_ =~ s/curl_mime_(subparts|addpart|filedata|data_cb)//g;
|
||||||
|
$_ =~ s/curl_ws_(send|recv|meta)//g;
|
||||||
|
$_ =~ s/curl_url_(dup)//g;
|
||||||
|
$_ =~ s/curl_pushheader_by(name|num)//g;
|
||||||
|
$_ =~ s/libcurl-(env|ws)//g;
|
||||||
|
$_ =~ s/(^|\W)((tftp|https|http|ftp):\/\/[a-z0-9\-._~%:\/?\#\[\]\@!\$&'()*+,;=]+)//gi;
|
||||||
|
print O $_;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
close(F);
|
||||||
|
close(O);
|
||||||
|
|
@ -0,0 +1,909 @@
|
||||||
|
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: curl
|
||||||
|
#
|
||||||
|
ABI
|
||||||
|
accessor
|
||||||
|
ACK
|
||||||
|
AES
|
||||||
|
AIA
|
||||||
|
AIX
|
||||||
|
al
|
||||||
|
Alessandro
|
||||||
|
allocator
|
||||||
|
alnum
|
||||||
|
ALPN
|
||||||
|
Altera
|
||||||
|
ALTSVC
|
||||||
|
amiga
|
||||||
|
AmigaOS
|
||||||
|
AmiSSL
|
||||||
|
anyauth
|
||||||
|
anycast
|
||||||
|
apache
|
||||||
|
Apache
|
||||||
|
API
|
||||||
|
APIs
|
||||||
|
APOP
|
||||||
|
AppVeyor
|
||||||
|
archivers
|
||||||
|
Archos
|
||||||
|
Arntsen
|
||||||
|
Aros
|
||||||
|
ascii
|
||||||
|
asynch
|
||||||
|
AsynchDNS
|
||||||
|
atime
|
||||||
|
auth
|
||||||
|
autobuild
|
||||||
|
autobuilds
|
||||||
|
Autoconf
|
||||||
|
Automake
|
||||||
|
Autotools
|
||||||
|
autotools
|
||||||
|
AVR
|
||||||
|
AWS
|
||||||
|
AWS-LC
|
||||||
|
axTLS
|
||||||
|
backend
|
||||||
|
backends
|
||||||
|
backoff
|
||||||
|
backticks
|
||||||
|
Baratov
|
||||||
|
basename
|
||||||
|
bashrc
|
||||||
|
BDFL
|
||||||
|
BearSSL
|
||||||
|
Benoit
|
||||||
|
BeOS
|
||||||
|
bitmask
|
||||||
|
bitwise
|
||||||
|
Björn
|
||||||
|
Bjørn
|
||||||
|
bool
|
||||||
|
boolean
|
||||||
|
BoringSSL
|
||||||
|
boringssl
|
||||||
|
Boukris
|
||||||
|
Broadcom
|
||||||
|
brotli
|
||||||
|
bufq
|
||||||
|
bufref
|
||||||
|
bugfix
|
||||||
|
bugfixes
|
||||||
|
buildable
|
||||||
|
buildbot
|
||||||
|
buildconf
|
||||||
|
Caddy
|
||||||
|
calloc
|
||||||
|
CAPA
|
||||||
|
capath
|
||||||
|
CCC
|
||||||
|
CDN
|
||||||
|
CentOS
|
||||||
|
CFLAGS
|
||||||
|
CGI's
|
||||||
|
CHACHA
|
||||||
|
chacha
|
||||||
|
Chaffraix
|
||||||
|
changelog
|
||||||
|
changeset
|
||||||
|
CharConv
|
||||||
|
charset
|
||||||
|
charsets
|
||||||
|
checksrc
|
||||||
|
checksums
|
||||||
|
chgrp
|
||||||
|
chmod
|
||||||
|
chown
|
||||||
|
ChromeOS
|
||||||
|
CI's
|
||||||
|
CIDR
|
||||||
|
CIFS
|
||||||
|
CLA
|
||||||
|
CLAs
|
||||||
|
cleartext
|
||||||
|
CLI
|
||||||
|
clientp
|
||||||
|
cliget
|
||||||
|
closesocket
|
||||||
|
CMake
|
||||||
|
cmake
|
||||||
|
cmake's
|
||||||
|
CMakeLists
|
||||||
|
CodeQL
|
||||||
|
codeql
|
||||||
|
CODESET
|
||||||
|
codeset
|
||||||
|
Comcast
|
||||||
|
Config
|
||||||
|
config
|
||||||
|
conncache
|
||||||
|
connectdata
|
||||||
|
CookieInfo
|
||||||
|
Coverity
|
||||||
|
CPUs
|
||||||
|
CR
|
||||||
|
CRL
|
||||||
|
CRLF
|
||||||
|
crt
|
||||||
|
crypto
|
||||||
|
cryptographic
|
||||||
|
cryptographically
|
||||||
|
CSEQ
|
||||||
|
CSeq
|
||||||
|
csh
|
||||||
|
cshrc
|
||||||
|
CTRL
|
||||||
|
cURL
|
||||||
|
CURLcode
|
||||||
|
CURLE
|
||||||
|
CURLH
|
||||||
|
curlimages
|
||||||
|
curlrc
|
||||||
|
curltest
|
||||||
|
customizable
|
||||||
|
CVE
|
||||||
|
CVSS
|
||||||
|
CWD
|
||||||
|
CWE
|
||||||
|
cyassl
|
||||||
|
Cygwin
|
||||||
|
daniel
|
||||||
|
datatracker
|
||||||
|
Debian
|
||||||
|
decrypt
|
||||||
|
deepcode
|
||||||
|
DELE
|
||||||
|
DER
|
||||||
|
deselectable
|
||||||
|
destructor
|
||||||
|
detections
|
||||||
|
dev
|
||||||
|
devcpp
|
||||||
|
DevOps
|
||||||
|
devtools
|
||||||
|
DHCP
|
||||||
|
dir
|
||||||
|
distro
|
||||||
|
distro's
|
||||||
|
distros
|
||||||
|
DJGPP
|
||||||
|
dlist
|
||||||
|
DLL
|
||||||
|
dll
|
||||||
|
DLLs
|
||||||
|
DNS
|
||||||
|
dns
|
||||||
|
dnsop
|
||||||
|
DoH
|
||||||
|
doxygen
|
||||||
|
drftpd
|
||||||
|
dsa
|
||||||
|
Dudka
|
||||||
|
Dymond
|
||||||
|
dynbuf
|
||||||
|
EAGAIN
|
||||||
|
EBCDIC
|
||||||
|
ECC
|
||||||
|
ECDHE
|
||||||
|
ECH
|
||||||
|
ECONNREFUSED
|
||||||
|
eCOS
|
||||||
|
EFnet
|
||||||
|
EGD
|
||||||
|
EHLO
|
||||||
|
EINTR
|
||||||
|
else's
|
||||||
|
encodings
|
||||||
|
enctype
|
||||||
|
endianness
|
||||||
|
Engler
|
||||||
|
enum
|
||||||
|
epoll
|
||||||
|
EPRT
|
||||||
|
EPSV
|
||||||
|
ERRNO
|
||||||
|
errno
|
||||||
|
ESNI
|
||||||
|
et
|
||||||
|
etag
|
||||||
|
ETag
|
||||||
|
ETags
|
||||||
|
exe
|
||||||
|
executables
|
||||||
|
EXPN
|
||||||
|
extensibility
|
||||||
|
failsafe
|
||||||
|
Falkeborn
|
||||||
|
Fandrich
|
||||||
|
Fastly
|
||||||
|
fcpp
|
||||||
|
Fedora
|
||||||
|
Feltzing
|
||||||
|
ffi
|
||||||
|
filesize
|
||||||
|
filesystem
|
||||||
|
FLOSS
|
||||||
|
fnmatch
|
||||||
|
formpost
|
||||||
|
formposts
|
||||||
|
Fortnite
|
||||||
|
FOSS
|
||||||
|
FPL
|
||||||
|
fread
|
||||||
|
FreeBSD
|
||||||
|
FreeDOS
|
||||||
|
FreeRTOS
|
||||||
|
freshmeat
|
||||||
|
Frexx
|
||||||
|
FS
|
||||||
|
fseek
|
||||||
|
FTPing
|
||||||
|
fuzzer
|
||||||
|
fwrite
|
||||||
|
Garmin
|
||||||
|
gcc
|
||||||
|
GCM
|
||||||
|
gdb
|
||||||
|
Genode
|
||||||
|
Gentoo
|
||||||
|
Gergely
|
||||||
|
getaddrinfo
|
||||||
|
getenv
|
||||||
|
gethostbyname
|
||||||
|
gethostname
|
||||||
|
Getinfo
|
||||||
|
getinfo
|
||||||
|
GETing
|
||||||
|
getpwuid
|
||||||
|
ggcov
|
||||||
|
Ghedini
|
||||||
|
Gisle
|
||||||
|
Glesys
|
||||||
|
globbed
|
||||||
|
globbing
|
||||||
|
gmail
|
||||||
|
GnuTLS
|
||||||
|
gnutls
|
||||||
|
Golemon
|
||||||
|
GOST
|
||||||
|
GPG
|
||||||
|
GPL
|
||||||
|
GPLed
|
||||||
|
Greear
|
||||||
|
groff
|
||||||
|
GSKit
|
||||||
|
gskit
|
||||||
|
GSS
|
||||||
|
GSSAPI
|
||||||
|
GTFO
|
||||||
|
Guenter
|
||||||
|
Gunderson
|
||||||
|
Gustafsson
|
||||||
|
gzip
|
||||||
|
Gzipped
|
||||||
|
gzipped
|
||||||
|
HackerOne
|
||||||
|
HackerOne's
|
||||||
|
HAProxy
|
||||||
|
HardenedBSD
|
||||||
|
Hards
|
||||||
|
Haxx
|
||||||
|
haxx
|
||||||
|
Heimdal
|
||||||
|
HELO
|
||||||
|
HH
|
||||||
|
HMAC
|
||||||
|
Hoersken
|
||||||
|
Holme
|
||||||
|
homebrew
|
||||||
|
hostname
|
||||||
|
hostnames
|
||||||
|
Housley
|
||||||
|
Hruska
|
||||||
|
HSTS
|
||||||
|
hsts
|
||||||
|
HTC
|
||||||
|
html
|
||||||
|
http
|
||||||
|
HTTPAUTH
|
||||||
|
httpd
|
||||||
|
HTTPD
|
||||||
|
httpget
|
||||||
|
HttpGet
|
||||||
|
HTTPS
|
||||||
|
https
|
||||||
|
hyper's
|
||||||
|
Högskolan
|
||||||
|
IANA
|
||||||
|
Icecast
|
||||||
|
ICONV
|
||||||
|
iconv
|
||||||
|
IDN
|
||||||
|
IDNA
|
||||||
|
IETF
|
||||||
|
ietf
|
||||||
|
ifdef
|
||||||
|
ifdefed
|
||||||
|
Ifdefs
|
||||||
|
ifdefs
|
||||||
|
IIS
|
||||||
|
ILE
|
||||||
|
Illumos
|
||||||
|
IMAP
|
||||||
|
imap
|
||||||
|
IMAPS
|
||||||
|
imaps
|
||||||
|
impacket
|
||||||
|
init
|
||||||
|
initializer
|
||||||
|
inlined
|
||||||
|
interop
|
||||||
|
interoperable
|
||||||
|
interoperates
|
||||||
|
IoT
|
||||||
|
ipadOS
|
||||||
|
IPCXN
|
||||||
|
IPv
|
||||||
|
IPv4
|
||||||
|
IPv4/6
|
||||||
|
IPv6
|
||||||
|
IRIs
|
||||||
|
IRIX
|
||||||
|
Itanium
|
||||||
|
iX
|
||||||
|
Jakub
|
||||||
|
Jiri
|
||||||
|
jo
|
||||||
|
jpeg
|
||||||
|
jq
|
||||||
|
JSON
|
||||||
|
json
|
||||||
|
Julien
|
||||||
|
Kamil
|
||||||
|
Kaufmann
|
||||||
|
kB
|
||||||
|
KDE
|
||||||
|
keepalive
|
||||||
|
Keil
|
||||||
|
kerberos
|
||||||
|
Keychain
|
||||||
|
keychain
|
||||||
|
KiB
|
||||||
|
kickstart
|
||||||
|
Kirei
|
||||||
|
Knauf
|
||||||
|
kqueue
|
||||||
|
Krb
|
||||||
|
krb
|
||||||
|
Kubernetes
|
||||||
|
Kuhrt
|
||||||
|
Kungliga
|
||||||
|
Largefile
|
||||||
|
LDAP
|
||||||
|
ldap
|
||||||
|
LDAPS
|
||||||
|
ldaps
|
||||||
|
LF
|
||||||
|
LGTM
|
||||||
|
libbrotlidec
|
||||||
|
libc
|
||||||
|
libcurl
|
||||||
|
libcurl's
|
||||||
|
libcurls
|
||||||
|
libera
|
||||||
|
libev
|
||||||
|
libevent
|
||||||
|
libgsasl
|
||||||
|
libidn
|
||||||
|
libnssckbi
|
||||||
|
libnsspem
|
||||||
|
libpsl
|
||||||
|
Libre
|
||||||
|
libre
|
||||||
|
LibreSSL
|
||||||
|
libressl
|
||||||
|
librtmp
|
||||||
|
libs
|
||||||
|
libssh
|
||||||
|
libSSH
|
||||||
|
libssh2
|
||||||
|
Libtool
|
||||||
|
libuv
|
||||||
|
libWebSocket
|
||||||
|
libz
|
||||||
|
libzstd
|
||||||
|
LineageOS
|
||||||
|
linux
|
||||||
|
ln
|
||||||
|
localhost
|
||||||
|
LOGDIR
|
||||||
|
logfile
|
||||||
|
lookups
|
||||||
|
loopback
|
||||||
|
LPRT
|
||||||
|
LSB
|
||||||
|
lseek
|
||||||
|
Lua
|
||||||
|
lwIP
|
||||||
|
macdef
|
||||||
|
macOS
|
||||||
|
macos
|
||||||
|
Makefile
|
||||||
|
makefiles
|
||||||
|
malloc
|
||||||
|
mallocs
|
||||||
|
maprintf
|
||||||
|
Marek
|
||||||
|
Mavrogiannopoulos
|
||||||
|
Mbed
|
||||||
|
mbedTLS
|
||||||
|
Meglio
|
||||||
|
memdebug
|
||||||
|
MesaLink
|
||||||
|
mesalink
|
||||||
|
Metalink
|
||||||
|
mfprintf
|
||||||
|
Michal
|
||||||
|
Micrium
|
||||||
|
MicroBlaze
|
||||||
|
MicroOS
|
||||||
|
mingw
|
||||||
|
MinGW
|
||||||
|
MINIX
|
||||||
|
misconfigured
|
||||||
|
Mishyn
|
||||||
|
mitigations
|
||||||
|
MITM
|
||||||
|
mk
|
||||||
|
mkdir
|
||||||
|
mktime
|
||||||
|
Monnerat
|
||||||
|
monospace
|
||||||
|
MorphOS
|
||||||
|
MPE
|
||||||
|
MPL
|
||||||
|
mprintf
|
||||||
|
MQTT
|
||||||
|
mqtt
|
||||||
|
mqtts
|
||||||
|
MSB
|
||||||
|
MSGSENT
|
||||||
|
msh
|
||||||
|
MSIE
|
||||||
|
msnprintf
|
||||||
|
msprintf
|
||||||
|
msquic
|
||||||
|
mstate
|
||||||
|
MSVC
|
||||||
|
MSYS
|
||||||
|
msys
|
||||||
|
mtime
|
||||||
|
mTLS
|
||||||
|
MUA
|
||||||
|
multicwd
|
||||||
|
multiparts
|
||||||
|
MultiSSL
|
||||||
|
mumbo
|
||||||
|
musedev
|
||||||
|
mutex
|
||||||
|
mvaprintf
|
||||||
|
mvfprintf
|
||||||
|
mvprintf
|
||||||
|
mvsnprintf
|
||||||
|
mvsprintf
|
||||||
|
MX
|
||||||
|
Nagel
|
||||||
|
Nagle
|
||||||
|
NAMELOOKUP
|
||||||
|
Natively
|
||||||
|
NATs
|
||||||
|
nc
|
||||||
|
NCR
|
||||||
|
NDK
|
||||||
|
NEC
|
||||||
|
Necko
|
||||||
|
NetBSD
|
||||||
|
netrc
|
||||||
|
netstat
|
||||||
|
Netware
|
||||||
|
NFS
|
||||||
|
nghttp
|
||||||
|
nghttpx
|
||||||
|
ngtcp
|
||||||
|
Nikos
|
||||||
|
Nios
|
||||||
|
nitems
|
||||||
|
NixOS
|
||||||
|
NLST
|
||||||
|
nmake
|
||||||
|
nmemb
|
||||||
|
nocwd
|
||||||
|
NODELAY
|
||||||
|
NonStop
|
||||||
|
NOOP
|
||||||
|
Novell
|
||||||
|
NPN
|
||||||
|
nroff
|
||||||
|
nslookup
|
||||||
|
NSS
|
||||||
|
nss
|
||||||
|
NTLM
|
||||||
|
NTLMUSER
|
||||||
|
NTLMv
|
||||||
|
NUM
|
||||||
|
NuttX
|
||||||
|
OAuth
|
||||||
|
objcopy
|
||||||
|
OCSP
|
||||||
|
Ok
|
||||||
|
OpenBSD
|
||||||
|
OpenLDAP
|
||||||
|
OpenRISC
|
||||||
|
OpenSSF
|
||||||
|
OpenSSF's
|
||||||
|
OpenSSH
|
||||||
|
OpenSSL
|
||||||
|
OpenStep
|
||||||
|
openSUSE
|
||||||
|
openwall
|
||||||
|
Orbis
|
||||||
|
ORing
|
||||||
|
Osipov
|
||||||
|
OSS
|
||||||
|
pac
|
||||||
|
pacman
|
||||||
|
parser's
|
||||||
|
parsers
|
||||||
|
PASE
|
||||||
|
PASV
|
||||||
|
PEM
|
||||||
|
pem
|
||||||
|
perl
|
||||||
|
permafailing
|
||||||
|
PINGs
|
||||||
|
pipelining
|
||||||
|
PKCS
|
||||||
|
pkcs
|
||||||
|
PKGBUILD
|
||||||
|
PKI
|
||||||
|
pluggable
|
||||||
|
PolarSSL
|
||||||
|
Polhem
|
||||||
|
pollset
|
||||||
|
POSIX
|
||||||
|
Postfix
|
||||||
|
POSTing
|
||||||
|
POSTs
|
||||||
|
PowerShell
|
||||||
|
pre
|
||||||
|
prebuilt
|
||||||
|
precompiled
|
||||||
|
prepend
|
||||||
|
prepended
|
||||||
|
prepending
|
||||||
|
prepends
|
||||||
|
preprocess
|
||||||
|
preprocessed
|
||||||
|
Preprocessing
|
||||||
|
preprocessor
|
||||||
|
Prereq
|
||||||
|
PRET
|
||||||
|
pretransfer
|
||||||
|
printf
|
||||||
|
printf's
|
||||||
|
PSL
|
||||||
|
pthreads
|
||||||
|
PTR
|
||||||
|
ptr
|
||||||
|
punycode
|
||||||
|
PWD
|
||||||
|
pwd
|
||||||
|
py
|
||||||
|
pycurl
|
||||||
|
pytest
|
||||||
|
Pytest
|
||||||
|
QNX
|
||||||
|
QoS
|
||||||
|
Qubes
|
||||||
|
QUIC
|
||||||
|
quictls
|
||||||
|
quicwg
|
||||||
|
Raad
|
||||||
|
radix
|
||||||
|
RAS
|
||||||
|
RBS
|
||||||
|
ReactOS
|
||||||
|
README
|
||||||
|
realloc
|
||||||
|
Realtime
|
||||||
|
rebase
|
||||||
|
RECV
|
||||||
|
recv
|
||||||
|
Redhat
|
||||||
|
redirections
|
||||||
|
redirs
|
||||||
|
redistributable
|
||||||
|
Redox
|
||||||
|
reentrant
|
||||||
|
Referer
|
||||||
|
referer
|
||||||
|
reinitializes
|
||||||
|
Relatedly
|
||||||
|
repo
|
||||||
|
reprioritized
|
||||||
|
resending
|
||||||
|
resends
|
||||||
|
RETR
|
||||||
|
retransmit
|
||||||
|
retrigger
|
||||||
|
RHEL
|
||||||
|
RICS
|
||||||
|
Rikard
|
||||||
|
rmdir
|
||||||
|
ROADMAP
|
||||||
|
Roadmap
|
||||||
|
Rockbox
|
||||||
|
roffit
|
||||||
|
RPG
|
||||||
|
RSA
|
||||||
|
RTMP
|
||||||
|
rtmp
|
||||||
|
RTMPE
|
||||||
|
RTMPS
|
||||||
|
RTMPT
|
||||||
|
RTMPTE
|
||||||
|
RTMPTS
|
||||||
|
RTOS
|
||||||
|
RTP
|
||||||
|
RTSP
|
||||||
|
rtsp
|
||||||
|
RTT
|
||||||
|
runtests
|
||||||
|
runtime
|
||||||
|
Ruslan
|
||||||
|
rustc
|
||||||
|
rustls
|
||||||
|
Sagula
|
||||||
|
SanDisk
|
||||||
|
SAS
|
||||||
|
SASL
|
||||||
|
Satiro
|
||||||
|
Schannel
|
||||||
|
Schindelin
|
||||||
|
SCO
|
||||||
|
SCP
|
||||||
|
scp
|
||||||
|
SDK
|
||||||
|
se
|
||||||
|
SEB
|
||||||
|
SEK
|
||||||
|
selectable
|
||||||
|
Serv
|
||||||
|
setopt
|
||||||
|
setsockopt
|
||||||
|
setuid
|
||||||
|
SFTP
|
||||||
|
sftp
|
||||||
|
sha
|
||||||
|
SHOUTcast
|
||||||
|
SIGALRM
|
||||||
|
SIGCHLD
|
||||||
|
SIGPIPE
|
||||||
|
singlecwd
|
||||||
|
SINIX
|
||||||
|
Sintonen
|
||||||
|
sizeof
|
||||||
|
SLE
|
||||||
|
slist
|
||||||
|
sln
|
||||||
|
SMB
|
||||||
|
smb
|
||||||
|
SMBS
|
||||||
|
smbs
|
||||||
|
SMBv
|
||||||
|
SMTP
|
||||||
|
smtp
|
||||||
|
smtps
|
||||||
|
SMTPS
|
||||||
|
SNI
|
||||||
|
socketopen
|
||||||
|
socketpair
|
||||||
|
sockopt
|
||||||
|
SOCKOPT
|
||||||
|
SOCKSv
|
||||||
|
Solaris
|
||||||
|
SONAME
|
||||||
|
Soref
|
||||||
|
SPARC
|
||||||
|
SPDX
|
||||||
|
SPNEGO
|
||||||
|
Spotify
|
||||||
|
sprintf
|
||||||
|
src
|
||||||
|
SRP
|
||||||
|
SRWLOCK
|
||||||
|
SSL
|
||||||
|
ssl
|
||||||
|
SSLeay
|
||||||
|
SSLKEYLOGFILE
|
||||||
|
sslv
|
||||||
|
SSLv
|
||||||
|
SSLVERSION
|
||||||
|
SSPI
|
||||||
|
stackoverflow
|
||||||
|
STARTTLS
|
||||||
|
STARTTRANSFER
|
||||||
|
stateful
|
||||||
|
statvfs
|
||||||
|
stderr
|
||||||
|
stdin
|
||||||
|
stdout
|
||||||
|
Steinar
|
||||||
|
Stenberg
|
||||||
|
STOR
|
||||||
|
strcat
|
||||||
|
strcpy
|
||||||
|
strdup
|
||||||
|
strerror
|
||||||
|
strlen
|
||||||
|
strncat
|
||||||
|
struct
|
||||||
|
structs
|
||||||
|
Structs
|
||||||
|
stunnel
|
||||||
|
subdirectories
|
||||||
|
subdirectory
|
||||||
|
submitters
|
||||||
|
substring
|
||||||
|
substrings
|
||||||
|
SunOS
|
||||||
|
SunSSH
|
||||||
|
superset
|
||||||
|
svc
|
||||||
|
svcb
|
||||||
|
Svyatoslav
|
||||||
|
Swisscom
|
||||||
|
sws
|
||||||
|
Symbian
|
||||||
|
symlink
|
||||||
|
symlinks
|
||||||
|
syntaxes
|
||||||
|
Szakats
|
||||||
|
TABs
|
||||||
|
Tatsuhiro
|
||||||
|
TBD
|
||||||
|
TCP
|
||||||
|
tcpdump
|
||||||
|
Tekniska
|
||||||
|
testability
|
||||||
|
TFTP
|
||||||
|
tftp
|
||||||
|
Tizen
|
||||||
|
TLS
|
||||||
|
tlsv
|
||||||
|
TLSv
|
||||||
|
TODO
|
||||||
|
Tomtom
|
||||||
|
toolchain
|
||||||
|
toolchains
|
||||||
|
toolset
|
||||||
|
toplevel
|
||||||
|
TPF
|
||||||
|
TrackMemory
|
||||||
|
transcode
|
||||||
|
Tru
|
||||||
|
Tse
|
||||||
|
Tsujikawa
|
||||||
|
TTL
|
||||||
|
tvOS
|
||||||
|
txt
|
||||||
|
typedef
|
||||||
|
typedefed
|
||||||
|
Ubuntu
|
||||||
|
ucLinux
|
||||||
|
UDP
|
||||||
|
UI
|
||||||
|
UID
|
||||||
|
UIDL
|
||||||
|
Ultrix
|
||||||
|
Unary
|
||||||
|
unassign
|
||||||
|
UNC
|
||||||
|
uncompress
|
||||||
|
unencoded
|
||||||
|
unencrypted
|
||||||
|
unescape
|
||||||
|
Unglobbed
|
||||||
|
UNICOS
|
||||||
|
unix
|
||||||
|
UnixSockets
|
||||||
|
UnixWare
|
||||||
|
unlink
|
||||||
|
unpause
|
||||||
|
unpaused
|
||||||
|
unpauses
|
||||||
|
unpausing
|
||||||
|
unsanitized
|
||||||
|
Unshare
|
||||||
|
unsharing
|
||||||
|
untrusted
|
||||||
|
UPN
|
||||||
|
upstreaming
|
||||||
|
URI
|
||||||
|
URIs
|
||||||
|
url
|
||||||
|
URL's
|
||||||
|
urlencoded
|
||||||
|
urlget
|
||||||
|
USD
|
||||||
|
userdata
|
||||||
|
Userinfo
|
||||||
|
userinfo
|
||||||
|
USERPROFILE
|
||||||
|
UTF
|
||||||
|
UX
|
||||||
|
valgrind
|
||||||
|
Vanem
|
||||||
|
vararg
|
||||||
|
VC
|
||||||
|
vcpkg
|
||||||
|
vexxhost
|
||||||
|
Viktor
|
||||||
|
VM
|
||||||
|
VMS
|
||||||
|
VMware
|
||||||
|
VRF
|
||||||
|
VRFY
|
||||||
|
VSE
|
||||||
|
vsprintf
|
||||||
|
vt
|
||||||
|
vtls
|
||||||
|
vxWorks
|
||||||
|
wakeup
|
||||||
|
Warta
|
||||||
|
watchOS
|
||||||
|
WAV
|
||||||
|
WB
|
||||||
|
web page
|
||||||
|
WebDAV
|
||||||
|
WebOS
|
||||||
|
WebSocket
|
||||||
|
WEBSOCKET
|
||||||
|
WHATWG
|
||||||
|
whitespace
|
||||||
|
Whitespaces
|
||||||
|
winbind
|
||||||
|
WinBind
|
||||||
|
winbuild
|
||||||
|
winidn
|
||||||
|
WinIDN
|
||||||
|
WinLDAP
|
||||||
|
WinSock
|
||||||
|
winsock
|
||||||
|
WinSSL
|
||||||
|
winssl
|
||||||
|
Wireshark
|
||||||
|
wolfSSH
|
||||||
|
wolfSSL
|
||||||
|
WS
|
||||||
|
WSS
|
||||||
|
www
|
||||||
|
Xbox
|
||||||
|
XDG
|
||||||
|
xdigit
|
||||||
|
Xilinx
|
||||||
|
XP
|
||||||
|
Xtensa
|
||||||
|
XYZ
|
||||||
|
Youtube
|
||||||
|
YYYY
|
||||||
|
YYYYMMDD
|
||||||
|
Zakrzewski
|
||||||
|
Zitzmann
|
||||||
|
zlib
|
||||||
|
zsh
|
||||||
|
zstd
|
||||||
|
Zuul
|
||||||
|
zuul
|
||||||
|
|
@ -0,0 +1,32 @@
|
||||||
|
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: curl
|
||||||
|
#
|
||||||
|
# Docs: https://github.com/UnicornGlobal/spellcheck-github-actions
|
||||||
|
matrix:
|
||||||
|
- name: Markdown
|
||||||
|
expect_match: false
|
||||||
|
apsell:
|
||||||
|
mode: en
|
||||||
|
dictionary:
|
||||||
|
wordlists:
|
||||||
|
- wordlist.txt
|
||||||
|
output: wordlist.dic
|
||||||
|
encoding: utf-8
|
||||||
|
pipeline:
|
||||||
|
- pyspelling.filters.markdown:
|
||||||
|
markdown_extensions:
|
||||||
|
- markdown.extensions.extra:
|
||||||
|
- pyspelling.filters.html:
|
||||||
|
comments: true
|
||||||
|
attributes:
|
||||||
|
- title
|
||||||
|
- alt
|
||||||
|
ignores:
|
||||||
|
- ':matches(code, pre)'
|
||||||
|
- 'code'
|
||||||
|
- 'pre'
|
||||||
|
- 'strong'
|
||||||
|
- 'em'
|
||||||
|
sources:
|
||||||
|
- '**/*.md|!docs/BINDINGS.md'
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: curl
|
||||||
|
|
||||||
|
# Number of days of inactivity before an issue becomes stale
|
||||||
|
daysUntilStale: 180
|
||||||
|
# Number of days of inactivity before a stale issue is closed
|
||||||
|
daysUntilClose: 14
|
||||||
|
# Issues with these labels will never be considered stale
|
||||||
|
exemptLabels:
|
||||||
|
- pinned
|
||||||
|
- security
|
||||||
|
# Label to use when marking an issue as stale
|
||||||
|
staleLabel: stale
|
||||||
|
# Comment to post when marking an issue as stale. Set to `false` to disable
|
||||||
|
markComment: >
|
||||||
|
This issue has been automatically marked as stale because it has not had
|
||||||
|
recent activity. It will be closed if no further activity occurs. Thank you
|
||||||
|
for your contributions.
|
||||||
|
# Comment to post when closing a stale issue. Set to `false` to disable
|
||||||
|
closeComment: false
|
||||||
|
|
@ -0,0 +1,41 @@
|
||||||
|
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: curl
|
||||||
|
|
||||||
|
name: AppVeyor Status Report
|
||||||
|
|
||||||
|
on:
|
||||||
|
status
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.event.sha }}-${{ github.event.target_url }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
permissions: {}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
split:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: ${{ github.event.sender.login == 'appveyor[bot]' }}
|
||||||
|
permissions:
|
||||||
|
statuses: write
|
||||||
|
steps:
|
||||||
|
- name: Create individual AppVeyor build statuses
|
||||||
|
if: ${{ github.event.sha && github.event.target_url }}
|
||||||
|
env:
|
||||||
|
APPVEYOR_COMMIT_SHA: ${{ github.event.sha }}
|
||||||
|
APPVEYOR_TARGET_URL: ${{ github.event.target_url }}
|
||||||
|
APPVEYOR_REPOSITORY: ${{ github.event.repository.full_name }}
|
||||||
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
run: |
|
||||||
|
echo ${APPVEYOR_TARGET_URL} | sed 's/\/project\//\/api\/projects\//' | xargs -t -n1 curl -s | \
|
||||||
|
jq -c '.build.jobs[] | {target_url: ($target_url + "/job/" + .jobId),
|
||||||
|
context: (.name | sub("^(Environment: )?"; "AppVeyor / ")),
|
||||||
|
state: (.status | sub("queued"; "pending")
|
||||||
|
| sub("starting"; "pending")
|
||||||
|
| sub("running"; "pending")
|
||||||
|
| sub("failed"; "failure")
|
||||||
|
| sub("cancelled"; "error")),
|
||||||
|
description: .status}' \
|
||||||
|
--arg target_url ${APPVEYOR_TARGET_URL} | tee /dev/stderr | parallel --pipe -j 1 -N 1 \
|
||||||
|
gh api --silent --input - repos/${APPVEYOR_REPOSITORY}/statuses/${APPVEYOR_COMMIT_SHA}
|
||||||
|
|
@ -0,0 +1,152 @@
|
||||||
|
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: curl
|
||||||
|
|
||||||
|
name: Linux AWS-LC
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
- '*/ci'
|
||||||
|
paths-ignore:
|
||||||
|
- '**/*.md'
|
||||||
|
- '.azure-pipelines.yml'
|
||||||
|
- '.circleci/**'
|
||||||
|
- '.cirrus.yml'
|
||||||
|
- 'appveyor.yml'
|
||||||
|
- 'packages/**'
|
||||||
|
- 'plan9/**'
|
||||||
|
- 'projects/**'
|
||||||
|
- 'winbuild/**'
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
paths-ignore:
|
||||||
|
- '**/*.md'
|
||||||
|
- '.azure-pipelines.yml'
|
||||||
|
- '.circleci/**'
|
||||||
|
- '.cirrus.yml'
|
||||||
|
- 'appveyor.yml'
|
||||||
|
- 'packages/**'
|
||||||
|
- 'plan9/**'
|
||||||
|
- 'projects/**'
|
||||||
|
- 'winbuild/**'
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
# Hardcoded workflow filename as workflow name above is just Linux again
|
||||||
|
group: awslc-${{ github.event.pull_request.number || github.sha }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
permissions: {}
|
||||||
|
|
||||||
|
env:
|
||||||
|
MAKEFLAGS: -j 3
|
||||||
|
awslc-version: 1.13.0
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
autoconf:
|
||||||
|
name: awslc (autoconf)
|
||||||
|
runs-on: 'ubuntu-latest'
|
||||||
|
timeout-minutes: 30
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- run: |
|
||||||
|
sudo apt-get update --yes
|
||||||
|
sudo apt-get install --yes libtool autoconf automake pkg-config stunnel4
|
||||||
|
# ensure we don't pick up openssl in this build
|
||||||
|
sudo apt remove --yes libssl-dev
|
||||||
|
sudo python3 -m pip install impacket
|
||||||
|
name: 'install prereqs and impacket'
|
||||||
|
|
||||||
|
- name: cache awslc
|
||||||
|
uses: actions/cache@v3
|
||||||
|
id: cache-awslc
|
||||||
|
env:
|
||||||
|
cache-name: cache-awslc
|
||||||
|
with:
|
||||||
|
path: /home/runner/awslc
|
||||||
|
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.awslc-version }}
|
||||||
|
|
||||||
|
- name: build awslc
|
||||||
|
if: steps.cache-awslc.outputs.cache-hit != 'true'
|
||||||
|
run: |
|
||||||
|
curl -LOsSf --retry 6 --retry-connrefused --max-time 999 \
|
||||||
|
https://github.com/awslabs/aws-lc/archive/refs/tags/v${{ env.awslc-version }}.tar.gz
|
||||||
|
tar xzf v${{ env.awslc-version }}.tar.gz
|
||||||
|
mkdir aws-lc-${{ env.awslc-version }}-build
|
||||||
|
cd aws-lc-${{ env.awslc-version }}-build
|
||||||
|
cmake -DCMAKE_INSTALL_PREFIX=$HOME/awslc ../aws-lc-${{ env.awslc-version }}
|
||||||
|
cmake --build . --parallel
|
||||||
|
cmake --install .
|
||||||
|
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- run: autoreconf -fi
|
||||||
|
name: 'autoreconf'
|
||||||
|
|
||||||
|
- run: |
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
../configure --enable-warnings --enable-werror --with-openssl=$HOME/awslc
|
||||||
|
cd ..
|
||||||
|
name: 'configure out-of-tree'
|
||||||
|
|
||||||
|
- run: make -C build V=1
|
||||||
|
name: 'make'
|
||||||
|
|
||||||
|
- run: make -C build V=1 examples
|
||||||
|
name: 'make examples'
|
||||||
|
|
||||||
|
- run: make -C build V=1 -C tests
|
||||||
|
name: 'make tests'
|
||||||
|
|
||||||
|
- run: make -C build V=1 test-ci
|
||||||
|
name: 'run tests'
|
||||||
|
|
||||||
|
cmake:
|
||||||
|
name: awslc (cmake)
|
||||||
|
runs-on: 'ubuntu-latest'
|
||||||
|
timeout-minutes: 15
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install cmake stunnel4
|
||||||
|
# ensure we don't pick up openssl in this build
|
||||||
|
sudo apt remove --yes libssl-dev
|
||||||
|
sudo python3 -m pip install impacket
|
||||||
|
name: 'install prereqs and impacket'
|
||||||
|
|
||||||
|
- name: cache awslc
|
||||||
|
uses: actions/cache@v3
|
||||||
|
id: cache-awslc
|
||||||
|
env:
|
||||||
|
cache-name: cache-awslc
|
||||||
|
with:
|
||||||
|
path: /home/runner/awslc
|
||||||
|
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.awslc-version }}
|
||||||
|
|
||||||
|
- name: build awslc
|
||||||
|
if: steps.cache-awslc.outputs.cache-hit != 'true'
|
||||||
|
run: |
|
||||||
|
curl -LOsSf --retry 6 --retry-connrefused --max-time 999 \
|
||||||
|
https://github.com/awslabs/aws-lc/archive/refs/tags/v${{ env.awslc-version }}.tar.gz
|
||||||
|
tar xzf v${{ env.awslc-version }}.tar.gz
|
||||||
|
mkdir aws-lc-${{ env.awslc-version }}-build
|
||||||
|
cd aws-lc-${{ env.awslc-version }}-build
|
||||||
|
cmake -DCMAKE_INSTALL_PREFIX=$HOME/awslc ../aws-lc-${{ env.awslc-version }}
|
||||||
|
cmake --build . --parallel
|
||||||
|
cmake --install .
|
||||||
|
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
# CMAKE_COMPILE_WARNING_AS_ERROR is available in cmake 3.24 or later
|
||||||
|
- run: cmake -Bbuild -DOPENSSL_ROOT_DIR=$HOME/awslc -DBUILD_SHARED_LIBS=ON -DCMAKE_COMPILE_WARNING_AS_ERROR=ON .
|
||||||
|
name: 'cmake generate out-of-tree'
|
||||||
|
|
||||||
|
- run: cmake --build build --parallel
|
||||||
|
name: 'cmake build'
|
||||||
|
|
||||||
|
- run: cmake --install build --prefix $HOME/curl --strip
|
||||||
|
name: 'cmake install'
|
||||||
|
|
@ -0,0 +1,80 @@
|
||||||
|
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: curl
|
||||||
|
|
||||||
|
name: CodeQL
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
- '*/ci'
|
||||||
|
paths-ignore:
|
||||||
|
- '**/*.md'
|
||||||
|
- '.azure-pipelines.yml'
|
||||||
|
- '.circleci/**'
|
||||||
|
- '.cirrus.yml'
|
||||||
|
- 'appveyor.yml'
|
||||||
|
- 'docs/**'
|
||||||
|
- 'packages/**'
|
||||||
|
- 'plan9/**'
|
||||||
|
- 'projects/**'
|
||||||
|
- 'tests/data/**'
|
||||||
|
- 'winbuild/**'
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
paths-ignore:
|
||||||
|
- '**/*.md'
|
||||||
|
- '.azure-pipelines.yml'
|
||||||
|
- '.circleci/**'
|
||||||
|
- '.cirrus.yml'
|
||||||
|
- 'appveyor.yml'
|
||||||
|
- 'docs/**'
|
||||||
|
- 'packages/**'
|
||||||
|
- 'plan9/**'
|
||||||
|
- 'projects/**'
|
||||||
|
- 'tests/data/**'
|
||||||
|
- 'winbuild/**'
|
||||||
|
schedule:
|
||||||
|
- cron: '0 0 * * 4'
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}
|
||||||
|
|
||||||
|
permissions: {}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
codeql:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
security-events: write
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
# Initializes the CodeQL tools for scanning.
|
||||||
|
- name: Initialize CodeQL
|
||||||
|
uses: github/codeql-action/init@v2
|
||||||
|
with:
|
||||||
|
languages: cpp
|
||||||
|
queries: security-extended
|
||||||
|
|
||||||
|
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||||
|
# If this step fails, then you should remove it and run the build manually (see below)
|
||||||
|
- name: Autobuild
|
||||||
|
uses: github/codeql-action/autobuild@v2
|
||||||
|
|
||||||
|
# ℹ️ Command-line programs to run using the OS shell.
|
||||||
|
# 📚 https://git.io/JvXDl
|
||||||
|
|
||||||
|
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
|
||||||
|
# and modify them (or add more) to build your code if your project
|
||||||
|
# uses a compiled language
|
||||||
|
|
||||||
|
#- run: |
|
||||||
|
# make bootstrap
|
||||||
|
# make release
|
||||||
|
|
||||||
|
- name: Perform CodeQL Analysis
|
||||||
|
uses: github/codeql-action/analyze@v2
|
||||||
|
|
@ -0,0 +1,50 @@
|
||||||
|
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: curl
|
||||||
|
|
||||||
|
name: Fuzzer
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
- '*/ci'
|
||||||
|
paths-ignore:
|
||||||
|
- '**/*.md'
|
||||||
|
- '**/CMakeLists.txt'
|
||||||
|
- '.azure-pipelines.yml'
|
||||||
|
- '.circleci/**'
|
||||||
|
- '.cirrus.yml'
|
||||||
|
- 'appveyor.yml'
|
||||||
|
- 'CMake/**'
|
||||||
|
- 'packages/**'
|
||||||
|
- 'plan9/**'
|
||||||
|
- 'projects/**'
|
||||||
|
- 'tests/data/**'
|
||||||
|
- 'winbuild/**'
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
paths-ignore:
|
||||||
|
- '**/*.md'
|
||||||
|
- '**/CMakeLists.txt'
|
||||||
|
- '.azure-pipelines.yml'
|
||||||
|
- '.circleci/**'
|
||||||
|
- '.cirrus.yml'
|
||||||
|
- 'appveyor.yml'
|
||||||
|
- 'CMake/**'
|
||||||
|
- 'packages/**'
|
||||||
|
- 'plan9/**'
|
||||||
|
- 'projects/**'
|
||||||
|
- 'tests/data/**'
|
||||||
|
- 'winbuild/**'
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
permissions: {}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
Fuzzing:
|
||||||
|
uses: curl/curl-fuzzer/.github/workflows/ci.yml@master
|
||||||
|
|
@ -0,0 +1,67 @@
|
||||||
|
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: curl
|
||||||
|
|
||||||
|
name: Hacktoberfest
|
||||||
|
|
||||||
|
on:
|
||||||
|
# this must not ever run on any other branch than master
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
# this should not run in parallel, so just run one at a time
|
||||||
|
group: ${{ github.workflow }}
|
||||||
|
|
||||||
|
permissions: {}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
# add hacktoberfest-accepted label to PRs opened starting from September 30th
|
||||||
|
# till November 1st which are closed via commit reference from master branch.
|
||||||
|
merged:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
# requires issues AND pull-requests write permissions to edit labels on PRs!
|
||||||
|
issues: write
|
||||||
|
pull-requests: write
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 100
|
||||||
|
|
||||||
|
- name: Check whether repo participates in Hacktoberfest
|
||||||
|
run: |
|
||||||
|
gh config set prompt disabled && echo "label=$(
|
||||||
|
gh repo view --json repositoryTopics --jq '.repositoryTopics[].name' | grep '^hacktoberfest$')" >> $GITHUB_OUTPUT
|
||||||
|
id: check
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Search relevant commit message lines starting with Closes/Merges
|
||||||
|
run: |
|
||||||
|
git log --format=email ${{ github.event.before }}..${{ github.event.after }} | \
|
||||||
|
grep -Ei "^Close[sd]? " | sort | uniq | tee log
|
||||||
|
if: steps.check.outputs.label == 'hacktoberfest'
|
||||||
|
|
||||||
|
- name: Search for Number-based PR references
|
||||||
|
run: |
|
||||||
|
grep -Eo "#([0-9]+)" log | cut -d# -f2 | sort | uniq | xargs -t -n1 -I{} \
|
||||||
|
gh pr view {} --json number,createdAt \
|
||||||
|
--jq '{number, opened: .createdAt} | [.number, .opened] | join(":")' | tee /dev/stderr | \
|
||||||
|
grep -Eo '^([0-9]+):[0-9]{4}-(09-30T|10-|11-01T)' | cut -d: -f1 | sort | uniq | xargs -t -n1 -I {} \
|
||||||
|
gh pr edit {} --add-label 'hacktoberfest-accepted'
|
||||||
|
if: steps.check.outputs.label == 'hacktoberfest'
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Search for URL-based PR references
|
||||||
|
run: |
|
||||||
|
grep -Eo "github.com/(.+)/(.+)/pull/([0-9]+)" log | sort | uniq | xargs -t -n1 -I{} \
|
||||||
|
gh pr view "https://{}" --json number,createdAt \
|
||||||
|
--jq '{number, opened: .createdAt} | [.number, .opened] | join(":")' | tee /dev/stderr | \
|
||||||
|
grep -Eo '^([0-9]+):[0-9]{4}-(09-30T|10-|11-01T)' | cut -d: -f1 | sort | uniq | xargs -t -n1 -I {} \
|
||||||
|
gh pr edit {} --add-label 'hacktoberfest-accepted'
|
||||||
|
if: steps.check.outputs.label == 'hacktoberfest'
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
@ -0,0 +1,28 @@
|
||||||
|
# Copyright (C) Daniel Fandrich, <dan@coneharvesters.com>, et al.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: curl
|
||||||
|
|
||||||
|
# This workflow will triage pull requests and apply a label based on the
|
||||||
|
# paths that are modified in the pull request.
|
||||||
|
#
|
||||||
|
# To use this workflow, you will need to set up a .github/labeler.yml
|
||||||
|
# file with configuration. For more information, see:
|
||||||
|
# https://github.com/actions/labeler
|
||||||
|
|
||||||
|
name: Labeler
|
||||||
|
on: [pull_request_target]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
label:
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
pull-requests: write
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/labeler@v4
|
||||||
|
with:
|
||||||
|
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||||
|
# Workaround for actions/labeler#112
|
||||||
|
sync-labels: ''
|
||||||
|
|
@ -0,0 +1,36 @@
|
||||||
|
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: curl
|
||||||
|
|
||||||
|
name: Markdown links
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
- '*/ci'
|
||||||
|
paths:
|
||||||
|
- '.github/workflows/linkcheck.yml'
|
||||||
|
- '**.md'
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
paths:
|
||||||
|
- '.github/workflows/linkcheck.yml'
|
||||||
|
- '**.md'
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
permissions: {}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
# Docs: https://github.com/marketplace/actions/markdown-link-check
|
||||||
|
check:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: gaurav-nelson/github-action-markdown-link-check@v1
|
||||||
|
with:
|
||||||
|
use-quiet-mode: 'yes'
|
||||||
|
|
@ -0,0 +1,411 @@
|
||||||
|
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: curl
|
||||||
|
|
||||||
|
name: Linux
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
- '*/ci'
|
||||||
|
paths-ignore:
|
||||||
|
- '**/*.md'
|
||||||
|
- '.azure-pipelines.yml'
|
||||||
|
- '.circleci/**'
|
||||||
|
- '.cirrus.yml'
|
||||||
|
- 'appveyor.yml'
|
||||||
|
- 'packages/**'
|
||||||
|
- 'plan9/**'
|
||||||
|
- 'projects/**'
|
||||||
|
- 'winbuild/**'
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
paths-ignore:
|
||||||
|
- '**/*.md'
|
||||||
|
- '.azure-pipelines.yml'
|
||||||
|
- '.circleci/**'
|
||||||
|
- '.cirrus.yml'
|
||||||
|
- 'appveyor.yml'
|
||||||
|
- 'packages/**'
|
||||||
|
- 'plan9/**'
|
||||||
|
- 'projects/**'
|
||||||
|
- 'winbuild/**'
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
permissions: {}
|
||||||
|
|
||||||
|
env:
|
||||||
|
MAKEFLAGS: -j 3
|
||||||
|
bearssl-version: 0.6
|
||||||
|
libressl-version: v3.7.3
|
||||||
|
mbedtls-version: v3.4.0
|
||||||
|
mod_h2-version: v2.0.21
|
||||||
|
msh3-version: v0.6.0
|
||||||
|
openssl3-version: openssl-3.1.1
|
||||||
|
quictls-version: OpenSSL_1_1_1t+quic
|
||||||
|
rustls-version: v0.10.0
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
autotools:
|
||||||
|
name: ${{ matrix.build.name }}
|
||||||
|
runs-on: 'ubuntu-latest'
|
||||||
|
container: ${{ matrix.build.container }}
|
||||||
|
timeout-minutes: 90
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
build:
|
||||||
|
- name: bearssl
|
||||||
|
install_packages: zlib1g-dev valgrind
|
||||||
|
install_steps: bearssl pytest
|
||||||
|
configure: LDFLAGS="-Wl,-rpath,$HOME/bearssl/lib" --with-bearssl=$HOME/bearssl --enable-debug
|
||||||
|
|
||||||
|
- name: bearssl-clang
|
||||||
|
install_packages: zlib1g-dev clang
|
||||||
|
install_steps: bearssl
|
||||||
|
configure: CC=clang LDFLAGS="-Wl,-rpath,$HOME/bearssl/lib" --with-bearssl=$HOME/bearssl --enable-debug
|
||||||
|
|
||||||
|
- name: libressl
|
||||||
|
install_packages: zlib1g-dev valgrind
|
||||||
|
install_steps: libressl pytest
|
||||||
|
configure: LDFLAGS="-Wl,-rpath,$HOME/libressl/lib" --with-openssl=$HOME/libressl --enable-debug
|
||||||
|
|
||||||
|
- name: libressl-clang
|
||||||
|
install_packages: zlib1g-dev clang
|
||||||
|
install_steps: libressl
|
||||||
|
configure: CC=clang LDFLAGS="-Wl,-rpath,$HOME/libressl/lib" --with-openssl=$HOME/libressl --enable-debug
|
||||||
|
|
||||||
|
- name: mbedtls
|
||||||
|
install_packages: libnghttp2-dev valgrind
|
||||||
|
install_steps: mbedtls pytest
|
||||||
|
configure: LDFLAGS="-Wl,-rpath,$HOME/mbedtls/lib" --with-mbedtls=$HOME/mbedtls --enable-debug
|
||||||
|
|
||||||
|
- name: mbedtls-clang
|
||||||
|
install_packages: libnghttp2-dev clang
|
||||||
|
install_steps: mbedtls
|
||||||
|
configure: CC=clang LDFLAGS="-Wl,-rpath,$HOME/mbedtls/lib" --with-mbedtls=$HOME/mbedtls --enable-debug
|
||||||
|
|
||||||
|
- name: msh3
|
||||||
|
install_packages: zlib1g-dev valgrind
|
||||||
|
install_steps: quictls msh3
|
||||||
|
configure: LDFLAGS="-Wl,-rpath,$HOME/msh3/lib -Wl,-rpath,$HOME/quictls/lib" --with-msh3=$HOME/msh3 --with-openssl=$HOME/quictls --enable-debug
|
||||||
|
|
||||||
|
- name: openssl3
|
||||||
|
install_packages: zlib1g-dev valgrind
|
||||||
|
install_steps: gcc-11 openssl3 pytest
|
||||||
|
configure: LDFLAGS="-Wl,-rpath,$HOME/openssl3/lib64" --with-openssl=$HOME/openssl3 --enable-debug --enable-websockets
|
||||||
|
|
||||||
|
- name: openssl3-O3
|
||||||
|
install_packages: zlib1g-dev valgrind
|
||||||
|
install_steps: gcc-11 openssl3
|
||||||
|
configure: CFLAGS=-O3 LDFLAGS="-Wl,-rpath,$HOME/openssl3/lib64" --with-openssl=$HOME/openssl3 --enable-debug --enable-websockets
|
||||||
|
|
||||||
|
- name: openssl3-clang
|
||||||
|
install_packages: zlib1g-dev clang
|
||||||
|
install_steps: openssl3
|
||||||
|
configure: CC=clang LDFLAGS="-Wl,-rpath,$HOME/openssl3/lib64" --with-openssl=$HOME/openssl3 --enable-debug --enable-websockets
|
||||||
|
|
||||||
|
- name: address-sanitizer
|
||||||
|
install_packages: zlib1g-dev libssh2-1-dev clang libssl-dev libubsan1 libasan8 libtsan2
|
||||||
|
install_steps: pytest
|
||||||
|
configure: >
|
||||||
|
CC=clang
|
||||||
|
CFLAGS="-fsanitize=address,undefined,signed-integer-overflow -fno-sanitize-recover=undefined,integer -Wformat -Werror=format-security -Werror=array-bounds -g"
|
||||||
|
LDFLAGS="-fsanitize=address,undefined -fno-sanitize-recover=undefined,integer"
|
||||||
|
LIBS="-ldl -lubsan"
|
||||||
|
--with-openssl --enable-debug --enable-websockets
|
||||||
|
|
||||||
|
- name: memory-sanitizer
|
||||||
|
install_packages: clang
|
||||||
|
install_steps:
|
||||||
|
configure: >
|
||||||
|
CC=clang
|
||||||
|
CFLAGS="-fsanitize=memory -Wformat -Werror=format-security -Werror=array-bounds -g"
|
||||||
|
LDFLAGS="-fsanitize=memory"
|
||||||
|
LIBS="-ldl"
|
||||||
|
--without-ssl --without-zlib --without-brotli --without-zstd --without-libpsl --without-nghttp2 --enable-debug --enable-websocketsx
|
||||||
|
|
||||||
|
- name: event-based
|
||||||
|
install_packages: libssh-dev valgrind
|
||||||
|
configure: --enable-debug --disable-shared --disable-threaded-resolver --with-libssh --with-openssl
|
||||||
|
tflags: -n -e '!TLS-SRP'
|
||||||
|
|
||||||
|
- name: hyper
|
||||||
|
install_steps: rust hyper valgrind
|
||||||
|
configure: LDFLAGS="-Wl,-rpath,$HOME/hyper/target/debug" --with-openssl --with-hyper=$HOME/hyper --enable-debug --enable-websockets
|
||||||
|
|
||||||
|
- name: rustls
|
||||||
|
install_steps: rust rustls pytest valgrind
|
||||||
|
configure: --with-rustls=$HOME/rustls --enable-debug
|
||||||
|
|
||||||
|
- name: Intel compiler - without SSL
|
||||||
|
install_packages: zlib1g-dev valgrind
|
||||||
|
install_steps: intel
|
||||||
|
configure: CC=icc --enable-debug --without-ssl
|
||||||
|
|
||||||
|
- name: Intel compiler - OpenSSL
|
||||||
|
install_packages: zlib1g-dev libssl-dev valgrind
|
||||||
|
install_steps: intel
|
||||||
|
configure: CC=icc --enable-debug --with-openssl
|
||||||
|
|
||||||
|
- name: Slackware-openssl-with-gssapi-gcc
|
||||||
|
# These are essentially the same flags used to build the curl Slackware package
|
||||||
|
# https://ftpmirror.infania.net/slackware/slackware64-current/source/n/curl/curl.SlackBuild
|
||||||
|
configure: --with-openssl --with-libssh2 --with-gssapi --enable-ares --enable-static=no --without-ca-bundle --with-ca-path=/etc/ssl/certs
|
||||||
|
# Docker Hub image that `container-job` executes in
|
||||||
|
container: 'andy5995/slackware-build-essential:15.0'
|
||||||
|
|
||||||
|
- name: Alpine MUSL
|
||||||
|
configure: --enable-debug --enable-websockets --with-ssl --with-libssh2 --with-libidn2 --with-gssapi --enable-ldap --with-libpsl
|
||||||
|
container: 'alpine:3.18'
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- if: matrix.build.container == null
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install libtool autoconf automake pkg-config stunnel4 libpsl-dev libbrotli-dev libzstd-dev ${{ matrix.build.install_packages }}
|
||||||
|
sudo python3 -m pip install impacket
|
||||||
|
name: 'install prereqs and impacket'
|
||||||
|
|
||||||
|
- if: startsWith(matrix.build.container, 'alpine')
|
||||||
|
run: |
|
||||||
|
apk add --no-cache build-base autoconf automake libtool perl openssl-dev libssh2-dev zlib-dev brotli-dev zstd-dev libidn2-dev openldap-dev heimdal-dev libpsl-dev py3-impacket py3-asn1 py3-six py3-pycryptodomex perl-time-hires openssh stunnel sudo
|
||||||
|
name: 'install dependencies'
|
||||||
|
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- if: contains(matrix.build.install_steps, 'gcc-11')
|
||||||
|
run: |
|
||||||
|
sudo add-apt-repository ppa:ubuntu-toolchain-r/ppa
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install gcc-11
|
||||||
|
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 100
|
||||||
|
sudo update-alternatives --set gcc /usr/bin/gcc-11
|
||||||
|
gcc --version
|
||||||
|
name: 'install gcc-11'
|
||||||
|
|
||||||
|
- name: cache bearssl
|
||||||
|
if: contains(matrix.build.install_steps, 'bearssl')
|
||||||
|
uses: actions/cache@v3
|
||||||
|
id: cache-bearssl
|
||||||
|
env:
|
||||||
|
cache-name: cache-bearssl
|
||||||
|
with:
|
||||||
|
path: /home/runner/bearssl
|
||||||
|
key: ${{ runner.os }}-build-${{ env.cache-name }}-bearssl-${{ env.bearssl-version }}
|
||||||
|
|
||||||
|
- name: 'build bearssl'
|
||||||
|
if: contains(matrix.build.install_steps, 'bearssl') && steps.cache-bearssl.outputs.cache-hit != 'true'
|
||||||
|
run: |
|
||||||
|
curl -LOsSf --retry 6 --retry-connrefused --max-time 999 https://bearssl.org/bearssl-${{ env.bearssl-version }}.tar.gz
|
||||||
|
tar -xzf bearssl-${{ env.bearssl-version }}.tar.gz
|
||||||
|
cd bearssl-${{ env.bearssl-version }}
|
||||||
|
make
|
||||||
|
mkdir -p $HOME/bearssl/lib $HOME/bearssl/include
|
||||||
|
cp inc/*.h $HOME/bearssl/include
|
||||||
|
cp build/libbearssl.* $HOME/bearssl/lib
|
||||||
|
|
||||||
|
- name: cache libressl
|
||||||
|
if: contains(matrix.build.install_steps, 'libressl')
|
||||||
|
uses: actions/cache@v3
|
||||||
|
id: cache-libressl
|
||||||
|
env:
|
||||||
|
cache-name: cache-libressl
|
||||||
|
with:
|
||||||
|
path: /home/runner/libressl
|
||||||
|
key: ${{ runner.os }}-build-${{ env.cache-name }}-libressl-${{ env.libressl-version }}
|
||||||
|
|
||||||
|
- name: 'build libressl'
|
||||||
|
if: contains(matrix.build.install_steps, 'libressl') && steps.cache-libressl.outputs.cache-hit != 'true'
|
||||||
|
run: |
|
||||||
|
git clone --quiet --depth=1 -b ${{ env.libressl-version }} https://github.com/libressl-portable/portable.git libressl-git
|
||||||
|
cd libressl-git
|
||||||
|
./autogen.sh
|
||||||
|
./configure --prefix=$HOME/libressl
|
||||||
|
make install
|
||||||
|
|
||||||
|
- name: cache mbedtls
|
||||||
|
if: contains(matrix.build.install_steps, 'mbedtls')
|
||||||
|
uses: actions/cache@v3
|
||||||
|
id: cache-mbedtls
|
||||||
|
env:
|
||||||
|
cache-name: cache-mbedtls
|
||||||
|
with:
|
||||||
|
path: /home/runner/mbedtls
|
||||||
|
key: ${{ runner.os }}-build-${{ env.cache-name }}-mbedtls-${{ env.mbedtls-version }}
|
||||||
|
|
||||||
|
- name: 'build mbedtls'
|
||||||
|
if: contains(matrix.build.install_steps, 'mbedtls') && steps.cache-mbedtls.outputs.cache-hit != 'true'
|
||||||
|
run: |
|
||||||
|
git clone --quiet --depth=1 -b ${{ env.mbedtls-version }} https://github.com/ARMmbed/mbedtls
|
||||||
|
cd mbedtls
|
||||||
|
make DESTDIR=$HOME/mbedtls install
|
||||||
|
|
||||||
|
- name: cache openssl3
|
||||||
|
if: contains(matrix.build.install_steps, 'openssl3')
|
||||||
|
uses: actions/cache@v3
|
||||||
|
id: cache-openssl3
|
||||||
|
env:
|
||||||
|
cache-name: cache-openssl3
|
||||||
|
with:
|
||||||
|
path: /home/runner/openssl3
|
||||||
|
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.openssl3-version }}
|
||||||
|
|
||||||
|
- name: 'install openssl3'
|
||||||
|
if: contains(matrix.build.install_steps, 'openssl3') && steps.cache-openssl3.outputs.cache-hit != 'true'
|
||||||
|
run: |
|
||||||
|
git clone --quiet --depth=1 -b ${{ env.openssl3-version }} https://github.com/openssl/openssl
|
||||||
|
cd openssl
|
||||||
|
./config enable-tls1_3 --prefix=$HOME/openssl3
|
||||||
|
make -j1 install_sw
|
||||||
|
|
||||||
|
- name: cache quictls
|
||||||
|
if: contains(matrix.build.install_steps, 'quictls')
|
||||||
|
uses: actions/cache@v3
|
||||||
|
id: cache-quictls
|
||||||
|
env:
|
||||||
|
cache-name: cache-quictls
|
||||||
|
with:
|
||||||
|
path: /home/runner/quictls
|
||||||
|
key: ${{ runner.os }}-build-${{ env.cache-name }}-quictls-${{ env.quictls-version }}
|
||||||
|
|
||||||
|
- name: 'build quictls'
|
||||||
|
if: contains(matrix.build.install_steps, 'quictls') && steps.cache-quictls.outputs.cache-hit != 'true'
|
||||||
|
run: |
|
||||||
|
git clone --quiet --depth=1 -b ${{ env.quictls-version }} https://github.com/quictls/openssl
|
||||||
|
cd openssl
|
||||||
|
./config enable-tls1_3 --prefix=$HOME/quictls
|
||||||
|
make -j1 install_sw
|
||||||
|
|
||||||
|
- name: cache msh3
|
||||||
|
if: contains(matrix.build.install_steps, 'msh3')
|
||||||
|
uses: actions/cache@v3
|
||||||
|
id: cache-msh3
|
||||||
|
env:
|
||||||
|
cache-name: cache-msh3
|
||||||
|
with:
|
||||||
|
path: /home/runner/msh3
|
||||||
|
key: ${{ runner.os }}-build-${{ env.cache-name }}-msh3-${{ env.msh3-version }}
|
||||||
|
|
||||||
|
- name: 'build msh3'
|
||||||
|
if: contains(matrix.build.install_steps, 'msh3') && steps.cache-msh3.outputs.cache-hit != 'true'
|
||||||
|
run: |
|
||||||
|
git clone --quiet -b ${{ env.msh3-version }} --depth=1 --recursive https://github.com/nibanks/msh3
|
||||||
|
cd msh3 && mkdir build && cd build
|
||||||
|
cmake -G 'Unix Makefiles' -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=$HOME/msh3 ..
|
||||||
|
cmake --build .
|
||||||
|
cmake --install .
|
||||||
|
|
||||||
|
- if: contains(matrix.build.install_steps, 'rust')
|
||||||
|
run: |
|
||||||
|
cd $HOME
|
||||||
|
curl -sSf --compressed https://sh.rustup.rs/ | sh -s -- -y
|
||||||
|
source $HOME/.cargo/env
|
||||||
|
rustup toolchain install nightly
|
||||||
|
name: 'install rust'
|
||||||
|
|
||||||
|
- name: cache rustls
|
||||||
|
if: contains(matrix.build.install_steps, 'rustls')
|
||||||
|
uses: actions/cache@v3
|
||||||
|
id: cache-rustls
|
||||||
|
env:
|
||||||
|
cache-name: cache-rustls
|
||||||
|
with:
|
||||||
|
path: /home/runner/rustls
|
||||||
|
key: ${{ runner.os }}-build-${{ env.cache-name }}-rustls-${{ env.rustls-version }}
|
||||||
|
|
||||||
|
- name: 'build rustls'
|
||||||
|
if: contains(matrix.build.install_steps, 'rustls') && steps.cache-rustls.outputs.cache-hit != 'true'
|
||||||
|
run: |
|
||||||
|
git clone --quiet --depth=1 -b ${{ env.rustls-version }} --recursive https://github.com/rustls/rustls-ffi.git
|
||||||
|
cd rustls-ffi
|
||||||
|
make DESTDIR=$HOME/rustls install
|
||||||
|
|
||||||
|
- if: contains(matrix.build.install_steps, 'hyper')
|
||||||
|
run: |
|
||||||
|
cd $HOME
|
||||||
|
git clone --quiet --depth=1 https://github.com/hyperium/hyper.git
|
||||||
|
cd $HOME/hyper
|
||||||
|
RUSTFLAGS="--cfg hyper_unstable_ffi" cargo +nightly rustc --features client,http1,http2,ffi -Z unstable-options --crate-type cdylib
|
||||||
|
echo "LD_LIBRARY_PATH=$HOME/hyper/target/debug:/usr/local/lib" >> $GITHUB_ENV
|
||||||
|
name: 'install hyper'
|
||||||
|
|
||||||
|
- if: contains(matrix.build.install_steps, 'intel')
|
||||||
|
run: |
|
||||||
|
cd /tmp
|
||||||
|
curl -sSf --compressed https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | sudo apt-key add -
|
||||||
|
sudo add-apt-repository "deb https://apt.repos.intel.com/oneapi all main"
|
||||||
|
sudo apt install --no-install-recommends intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic
|
||||||
|
source /opt/intel/oneapi/setvars.sh
|
||||||
|
printenv >> $GITHUB_ENV
|
||||||
|
name: 'install Intel compilers'
|
||||||
|
|
||||||
|
- if: contains(matrix.build.install_steps, 'pytest')
|
||||||
|
run: |
|
||||||
|
sudo apt-get install apache2 apache2-dev libnghttp2-dev
|
||||||
|
sudo python3 -m pip install -r tests/http/requirements.txt
|
||||||
|
name: 'install pytest and apach2-dev'
|
||||||
|
|
||||||
|
- name: cache mod_h2
|
||||||
|
if: contains(matrix.build.install_steps, 'pytest')
|
||||||
|
uses: actions/cache@v3
|
||||||
|
id: cache-mod_h2
|
||||||
|
env:
|
||||||
|
cache-name: cache-mod_h2
|
||||||
|
with:
|
||||||
|
path: /home/runner/mod_h2
|
||||||
|
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.mod_h2-version }}
|
||||||
|
|
||||||
|
- name: 'build mod_h2'
|
||||||
|
if: contains(matrix.build.install_steps, 'pytest') && steps.cache-mod_h2.outputs.cache-hit != 'true'
|
||||||
|
run: |
|
||||||
|
cd $HOME
|
||||||
|
git clone --quiet --depth=1 -b ${{ env.mod_h2-version }} https://github.com/icing/mod_h2
|
||||||
|
cd mod_h2
|
||||||
|
autoreconf -fi
|
||||||
|
./configure
|
||||||
|
make
|
||||||
|
|
||||||
|
- name: 'install mod_h2'
|
||||||
|
if: contains(matrix.build.install_steps, 'pytest')
|
||||||
|
run: |
|
||||||
|
cd $HOME/mod_h2
|
||||||
|
sudo make install
|
||||||
|
|
||||||
|
- run: autoreconf -fi
|
||||||
|
name: 'autoreconf'
|
||||||
|
|
||||||
|
- run: ./configure --enable-warnings --enable-werror ${{ matrix.build.configure }}
|
||||||
|
name: 'configure'
|
||||||
|
|
||||||
|
- run: make V=1
|
||||||
|
name: 'make'
|
||||||
|
|
||||||
|
- run: ./src/curl -V
|
||||||
|
name: 'check curl -V output'
|
||||||
|
|
||||||
|
- run: make V=1 examples
|
||||||
|
name: 'make examples'
|
||||||
|
|
||||||
|
- run: make V=1 -C tests
|
||||||
|
name: 'make tests'
|
||||||
|
|
||||||
|
- run: make V=1 test-ci
|
||||||
|
name: 'run tests'
|
||||||
|
env:
|
||||||
|
TFLAGS: "${{ matrix.build.tflags }}"
|
||||||
|
|
||||||
|
- if: contains(matrix.build.install_steps, 'pytest')
|
||||||
|
# run for `tests` directory, so pytest does not pick up any other
|
||||||
|
# packages we might have built here
|
||||||
|
run:
|
||||||
|
pytest -v tests
|
||||||
|
name: 'run pytest'
|
||||||
|
env:
|
||||||
|
TFLAGS: "${{ matrix.build.tflags }}"
|
||||||
|
CURL_CI: github
|
||||||
|
|
@ -0,0 +1,93 @@
|
||||||
|
# Copyright (C) Dan Fandrich
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: curl
|
||||||
|
|
||||||
|
name: Linux 32-bit
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
- '*/ci'
|
||||||
|
paths-ignore:
|
||||||
|
- '**/*.md'
|
||||||
|
- '**/CMakeLists.txt'
|
||||||
|
- '.azure-pipelines.yml'
|
||||||
|
- '.circleci/**'
|
||||||
|
- '.cirrus.yml'
|
||||||
|
- 'appveyor.yml'
|
||||||
|
- 'CMake/**'
|
||||||
|
- 'packages/**'
|
||||||
|
- 'plan9/**'
|
||||||
|
- 'projects/**'
|
||||||
|
- 'winbuild/**'
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
paths-ignore:
|
||||||
|
- '**/*.md'
|
||||||
|
- '**/CMakeLists.txt'
|
||||||
|
- '.azure-pipelines.yml'
|
||||||
|
- '.circleci/**'
|
||||||
|
- '.cirrus.yml'
|
||||||
|
- 'appveyor.yml'
|
||||||
|
- 'CMake/**'
|
||||||
|
- 'packages/**'
|
||||||
|
- 'plan9/**'
|
||||||
|
- 'projects/**'
|
||||||
|
- 'winbuild/**'
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
permissions: {}
|
||||||
|
|
||||||
|
env:
|
||||||
|
MAKEFLAGS: -j 3
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
linux-i686:
|
||||||
|
name: ${{ matrix.build.name }}
|
||||||
|
runs-on: 'ubuntu-22.04'
|
||||||
|
timeout-minutes: 90
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
build:
|
||||||
|
- name: Linux i686
|
||||||
|
install_packages: gcc-11-i686-linux-gnu libssl-dev:i386 zlib1g-dev:i386 libpsl-dev:i386 libbrotli-dev:i386 libzstd-dev:i386
|
||||||
|
configure: --enable-debug --enable-websockets --with-openssl --host=i686-linux-gnu CC=i686-linux-gnu-gcc-11 PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig CPPFLAGS=-I/usr/include/i386-linux-gnu LDFLAGS=-L/usr/lib/i386-linux-gnu
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- run: |
|
||||||
|
sudo dpkg --add-architecture i386
|
||||||
|
sudo apt-get update -y
|
||||||
|
sudo apt-get install -y --no-install-suggests --no-install-recommends libtool autoconf automake pkg-config stunnel4 ${{ matrix.build.install_packages }}
|
||||||
|
sudo python3 -m pip install impacket
|
||||||
|
name: 'install prereqs'
|
||||||
|
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- run: autoreconf -fi
|
||||||
|
name: 'autoreconf'
|
||||||
|
|
||||||
|
- run: ./configure --enable-warnings --enable-werror ${{ matrix.build.configure }}
|
||||||
|
name: 'configure'
|
||||||
|
|
||||||
|
- run: make V=1
|
||||||
|
name: 'make'
|
||||||
|
|
||||||
|
- run: ./src/curl -V
|
||||||
|
name: 'check curl -V output'
|
||||||
|
|
||||||
|
- run: make V=1 examples
|
||||||
|
name: 'make examples'
|
||||||
|
|
||||||
|
- run: make V=1 -C tests
|
||||||
|
name: 'make tests'
|
||||||
|
|
||||||
|
- run: make V=1 test-ci
|
||||||
|
name: 'run tests'
|
||||||
|
env:
|
||||||
|
TFLAGS: "${{ matrix.build.tflags }}"
|
||||||
|
|
@ -0,0 +1,239 @@
|
||||||
|
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: curl
|
||||||
|
|
||||||
|
name: macOS
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
- '*/ci'
|
||||||
|
paths-ignore:
|
||||||
|
- '**/*.md'
|
||||||
|
- '.azure-pipelines.yml'
|
||||||
|
- '.circleci/**'
|
||||||
|
- '.cirrus.yml'
|
||||||
|
- 'appveyor.yml'
|
||||||
|
- 'packages/**'
|
||||||
|
- 'plan9/**'
|
||||||
|
- 'projects/**'
|
||||||
|
- 'winbuild/**'
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
paths-ignore:
|
||||||
|
- '**/*.md'
|
||||||
|
- '.azure-pipelines.yml'
|
||||||
|
- '.circleci/**'
|
||||||
|
- '.cirrus.yml'
|
||||||
|
- 'appveyor.yml'
|
||||||
|
- 'packages/**'
|
||||||
|
- 'plan9/**'
|
||||||
|
- 'projects/**'
|
||||||
|
- 'winbuild/**'
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
permissions: {}
|
||||||
|
|
||||||
|
env:
|
||||||
|
DEVELOPER_DIR: /Applications/Xcode_14.0.1.app/Contents/Developer
|
||||||
|
MAKEFLAGS: -j 5
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
autotools:
|
||||||
|
name: ${{ matrix.build.name }}
|
||||||
|
runs-on: 'macos-latest'
|
||||||
|
timeout-minutes: 90
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
build:
|
||||||
|
- name: normal
|
||||||
|
install: nghttp2
|
||||||
|
configure: --without-ssl --enable-websockets
|
||||||
|
macosx-version-min: 10.9
|
||||||
|
- name: debug
|
||||||
|
install: nghttp2
|
||||||
|
configure: --enable-debug --without-ssl --enable-websockets
|
||||||
|
macosx-version-min: 10.9
|
||||||
|
- name: libssh2
|
||||||
|
install: nghttp2 libssh2
|
||||||
|
configure: --enable-debug --with-libssh2 --without-ssl --enable-websockets
|
||||||
|
macosx-version-min: 10.9
|
||||||
|
- name: libssh-c-ares
|
||||||
|
install: openssl nghttp2 libssh
|
||||||
|
configure: --enable-debug --with-libssh --with-openssl=/usr/local/opt/openssl --enable-ares --enable-websockets
|
||||||
|
macosx-version-min: 10.9
|
||||||
|
- name: libssh
|
||||||
|
install: openssl nghttp2 libssh
|
||||||
|
configure: --enable-debug --with-libssh --with-openssl=/usr/local/opt/openssl --enable-websockets
|
||||||
|
macosx-version-min: 10.9
|
||||||
|
- name: c-ares
|
||||||
|
install: nghttp2
|
||||||
|
configure: --enable-debug --enable-ares --without-ssl --enable-websockets
|
||||||
|
macosx-version-min: 10.9
|
||||||
|
- name: HTTP only
|
||||||
|
install: nghttp2
|
||||||
|
configure: |
|
||||||
|
--enable-debug \
|
||||||
|
--enable-maintainer-mode \
|
||||||
|
--disable-alt-svc \
|
||||||
|
--disable-dict \
|
||||||
|
--disable-file \
|
||||||
|
--disable-ftp \
|
||||||
|
--disable-gopher \
|
||||||
|
--disable-imap \
|
||||||
|
--disable-ldap \
|
||||||
|
--disable-pop3 \
|
||||||
|
--disable-rtmp \
|
||||||
|
--disable-rtsp \
|
||||||
|
--disable-scp \
|
||||||
|
--disable-sftp \
|
||||||
|
--disable-shared \
|
||||||
|
--disable-smb \
|
||||||
|
--disable-smtp \
|
||||||
|
--disable-telnet \
|
||||||
|
--disable-tftp \
|
||||||
|
--disable-unix-sockets \
|
||||||
|
--without-brotli \
|
||||||
|
--without-gssapi \
|
||||||
|
--without-libidn2 \
|
||||||
|
--without-libpsl \
|
||||||
|
--without-librtmp \
|
||||||
|
--without-libssh2 \
|
||||||
|
--without-nghttp2 \
|
||||||
|
--without-ntlm-auth \
|
||||||
|
--without-ssl \
|
||||||
|
--without-zlib \
|
||||||
|
--without-zstd
|
||||||
|
macosx-version-min: 10.15
|
||||||
|
- name: SecureTransport http2
|
||||||
|
install: nghttp2
|
||||||
|
configure: --enable-debug --with-secure-transport --enable-websockets
|
||||||
|
macosx-version-min: 10.8
|
||||||
|
- name: gcc SecureTransport
|
||||||
|
configure: CC=gcc-12 --enable-debug --with-secure-transport --enable-websockets
|
||||||
|
macosx-version-min: 10.8
|
||||||
|
- name: OpenSSL http2
|
||||||
|
install: nghttp2 openssl
|
||||||
|
configure: --enable-debug --with-openssl=/usr/local/opt/openssl --enable-websockets
|
||||||
|
macosx-version-min: 10.9
|
||||||
|
- name: LibreSSL http2
|
||||||
|
install: nghttp2 libressl
|
||||||
|
configure: --enable-debug --with-openssl=/usr/local/opt/libressl --enable-websockets
|
||||||
|
macosx-version-min: 10.9
|
||||||
|
- name: torture
|
||||||
|
install: nghttp2 openssl
|
||||||
|
configure: --enable-debug --disable-shared --disable-threaded-resolver --with-openssl=/usr/local/opt/openssl --enable-websockets
|
||||||
|
tflags: -n -t --shallow=25 !FTP
|
||||||
|
macosx-version-min: 10.9
|
||||||
|
- name: torture-ftp
|
||||||
|
install: nghttp2 openssl
|
||||||
|
configure: --enable-debug --disable-shared --disable-threaded-resolver --with-openssl=/usr/local/opt/openssl --enable-websockets
|
||||||
|
tflags: -n -t --shallow=20 FTP
|
||||||
|
macosx-version-min: 10.9
|
||||||
|
- name: macOS 10.15
|
||||||
|
install: nghttp2 libssh2 openssl
|
||||||
|
configure: --enable-debug --disable-ldap --with-openssl=/usr/local/opt/openssl --enable-websockets
|
||||||
|
macosx-version-min: 10.15
|
||||||
|
steps:
|
||||||
|
- run: echo libtool autoconf automake pkg-config ${{ matrix.build.install }} | xargs -Ix -n1 echo brew '"x"' > /tmp/Brewfile
|
||||||
|
name: 'brew bundle'
|
||||||
|
|
||||||
|
# Run this command with retries because of spurious failures seen
|
||||||
|
# while running the tests, for example
|
||||||
|
# https://github.com/curl/curl/runs/4095721123?check_suite_focus=true
|
||||||
|
- run: "while [[ $? == 0 ]]; do for i in 1 2 3; do brew update && brew bundle install --no-lock --file /tmp/Brewfile && break 2 || { echo Error: wait to try again; sleep 10; } done; false Too many retries; done"
|
||||||
|
name: 'brew install'
|
||||||
|
|
||||||
|
- run: |
|
||||||
|
case "${{ matrix.build.install }}" in
|
||||||
|
*openssl*)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
if test -d /usr/local/include/openssl; then
|
||||||
|
brew unlink openssl
|
||||||
|
fi;;
|
||||||
|
esac
|
||||||
|
name: 'brew unlink openssl'
|
||||||
|
|
||||||
|
- run: python3 -m pip install impacket
|
||||||
|
name: 'pip3 install'
|
||||||
|
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- run: autoreconf -fi
|
||||||
|
name: 'autoreconf'
|
||||||
|
|
||||||
|
- run: ./configure --enable-warnings --enable-werror ${{ matrix.build.configure }}
|
||||||
|
name: 'configure'
|
||||||
|
env:
|
||||||
|
CFLAGS: "-mmacosx-version-min=${{ matrix.build.macosx-version-min }}"
|
||||||
|
|
||||||
|
- run: make V=1
|
||||||
|
name: 'make'
|
||||||
|
|
||||||
|
- run: make V=1 examples
|
||||||
|
name: 'make examples'
|
||||||
|
|
||||||
|
- run: make V=1 -C tests
|
||||||
|
name: 'make tests'
|
||||||
|
|
||||||
|
- run: make V=1 test-ci
|
||||||
|
name: 'run tests'
|
||||||
|
env:
|
||||||
|
TFLAGS: "${{ matrix.build.tflags }} ~1452"
|
||||||
|
|
||||||
|
cmake:
|
||||||
|
name: cmake ${{ matrix.compiler.CC }} ${{ matrix.build.name }}
|
||||||
|
runs-on: 'macos-latest'
|
||||||
|
env: ${{ matrix.compiler }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
compiler:
|
||||||
|
- CC: clang
|
||||||
|
CXX: clang++
|
||||||
|
CFLAGS: "-mmacosx-version-min=10.15 -Wno-deprecated-declarations"
|
||||||
|
- CC: gcc-12
|
||||||
|
CXX: g++-12
|
||||||
|
CFLAGS: "-mmacosx-version-min=10.15 -Wno-error=undef -Wno-error=conversion"
|
||||||
|
build:
|
||||||
|
- name: OpenSSL
|
||||||
|
install: nghttp2 openssl
|
||||||
|
generate: -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DCURL_DISABLE_LDAP=ON -DCURL_DISABLE_LDAPS=ON
|
||||||
|
- name: LibreSSL
|
||||||
|
install: nghttp2 libressl
|
||||||
|
generate: -DOPENSSL_ROOT_DIR=/usr/local/opt/libressl -DCURL_DISABLE_LDAP=ON -DCURL_DISABLE_LDAPS=ON -DCMAKE_UNITY_BUILD=ON
|
||||||
|
- name: libssh2
|
||||||
|
install: nghttp2 openssl libssh2
|
||||||
|
generate: -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DCURL_USE_LIBSSH2=ON -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=ON
|
||||||
|
steps:
|
||||||
|
- run: echo libtool autoconf automake pkg-config ${{ matrix.build.install }} | xargs -Ix -n1 echo brew '"x"' > /tmp/Brewfile
|
||||||
|
name: 'brew bundle'
|
||||||
|
|
||||||
|
- run: "while [[ $? == 0 ]]; do for i in 1 2 3; do brew update && brew bundle install --no-lock --file /tmp/Brewfile && break 2 || { echo Error: wait to try again; sleep 10; } done; false Too many retries; done"
|
||||||
|
name: 'brew install'
|
||||||
|
|
||||||
|
- run: |
|
||||||
|
case "${{ matrix.build.install }}" in
|
||||||
|
*openssl*)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
if test -d /usr/local/include/openssl; then
|
||||||
|
brew unlink openssl
|
||||||
|
fi;;
|
||||||
|
esac
|
||||||
|
name: 'brew unlink openssl'
|
||||||
|
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- run: cmake -S. -Bbuild -DCURL_WERROR=ON -DPICKY_COMPILER=ON ${{ matrix.build.generate }}
|
||||||
|
name: 'cmake generate'
|
||||||
|
|
||||||
|
- run: cmake --build build
|
||||||
|
name: 'cmake build'
|
||||||
|
|
@ -0,0 +1,279 @@
|
||||||
|
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: curl
|
||||||
|
|
||||||
|
name: ngtcp2-linux
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
- '*/ci'
|
||||||
|
paths-ignore:
|
||||||
|
- '**/*.md'
|
||||||
|
- '**/CMakeLists.txt'
|
||||||
|
- '.azure-pipelines.yml'
|
||||||
|
- '.circleci/**'
|
||||||
|
- '.cirrus.yml'
|
||||||
|
- 'appveyor.yml'
|
||||||
|
- 'CMake/**'
|
||||||
|
- 'packages/**'
|
||||||
|
- 'plan9/**'
|
||||||
|
- 'projects/**'
|
||||||
|
- 'winbuild/**'
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
paths-ignore:
|
||||||
|
- '**/*.md'
|
||||||
|
- '**/CMakeLists.txt'
|
||||||
|
- '.azure-pipelines.yml'
|
||||||
|
- '.circleci/**'
|
||||||
|
- '.cirrus.yml'
|
||||||
|
- 'appveyor.yml'
|
||||||
|
- 'CMake/**'
|
||||||
|
- 'packages/**'
|
||||||
|
- 'plan9/**'
|
||||||
|
- 'projects/**'
|
||||||
|
- 'winbuild/**'
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
# Hardcoded workflow filename as workflow name above is just Linux again
|
||||||
|
group: ngtcp2-${{ github.event.pull_request.number || github.sha }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
permissions: {}
|
||||||
|
|
||||||
|
env:
|
||||||
|
MAKEFLAGS: -j 3
|
||||||
|
quictls-version: 3.0.10+quic
|
||||||
|
gnutls-version: 3.8.0
|
||||||
|
wolfssl-version: master
|
||||||
|
nghttp3-version: v0.15.0
|
||||||
|
ngtcp2-version: v0.19.1
|
||||||
|
nghttp2-version: v1.56.0
|
||||||
|
mod_h2-version: v2.0.21
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
autotools:
|
||||||
|
name: ${{ matrix.build.name }}
|
||||||
|
runs-on: 'ubuntu-latest'
|
||||||
|
timeout-minutes: 60
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
build:
|
||||||
|
- name: quictls
|
||||||
|
configure: >-
|
||||||
|
PKG_CONFIG_PATH="$HOME/nghttpx/lib/pkgconfig" LDFLAGS="-Wl,-rpath,$HOME/nghttpx/lib"
|
||||||
|
--with-ngtcp2=$HOME/nghttpx --enable-warnings --enable-werror --enable-debug
|
||||||
|
--with-test-nghttpx="$HOME/nghttpx/bin/nghttpx"
|
||||||
|
--with-openssl=$HOME/nghttpx
|
||||||
|
- name: gnutls
|
||||||
|
configure: >-
|
||||||
|
PKG_CONFIG_PATH="$HOME/nghttpx/lib/pkgconfig" LDFLAGS="-Wl,-rpath,$HOME/nghttpx/lib"
|
||||||
|
--with-ngtcp2=$HOME/nghttpx --enable-warnings --enable-werror --enable-debug
|
||||||
|
--with-test-nghttpx="$HOME/nghttpx/bin/nghttpx"
|
||||||
|
--with-gnutls=$HOME/nghttpx
|
||||||
|
- name: wolfssl
|
||||||
|
configure: >-
|
||||||
|
PKG_CONFIG_PATH="$HOME/nghttpx/lib/pkgconfig" LDFLAGS="-Wl,-rpath,$HOME/nghttpx/lib"
|
||||||
|
--with-ngtcp2=$HOME/nghttpx --enable-warnings --enable-werror --enable-debug
|
||||||
|
--with-test-nghttpx="$HOME/nghttpx/bin/nghttpx"
|
||||||
|
--with-wolfssl=$HOME/nghttpx
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install libtool autoconf automake pkg-config stunnel4 \
|
||||||
|
libpsl-dev libbrotli-dev libzstd-dev zlib1g-dev libev-dev libc-ares-dev \
|
||||||
|
nettle-dev libp11-kit-dev libtspi-dev libunistring-dev guile-2.2-dev libtasn1-bin \
|
||||||
|
libtasn1-6-dev libidn2-0-dev gawk gperf libtss2-dev dns-root-data bison gtk-doc-tools \
|
||||||
|
texinfo texlive texlive-extra-utils autopoint libev-dev \
|
||||||
|
apache2 apache2-dev libnghttp2-dev
|
||||||
|
name: 'install prereqs and impacket, pytest, crypto, apache2'
|
||||||
|
|
||||||
|
- name: cache quictls
|
||||||
|
uses: actions/cache@v3
|
||||||
|
id: cache-quictls
|
||||||
|
env:
|
||||||
|
cache-name: cache-quictls
|
||||||
|
with:
|
||||||
|
path: /home/runner/quictls
|
||||||
|
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.quictls-version }}
|
||||||
|
|
||||||
|
- if: steps.cache-quictls.outputs.cache-hit != 'true'
|
||||||
|
run: |
|
||||||
|
cd $HOME
|
||||||
|
git clone --quiet --depth=1 -b openssl-${{ env.quictls-version }} https://github.com/quictls/openssl quictls
|
||||||
|
cd quictls
|
||||||
|
./config --prefix=$HOME/nghttpx --libdir=$HOME/nghttpx/lib
|
||||||
|
make
|
||||||
|
name: 'build quictls'
|
||||||
|
|
||||||
|
- run: |
|
||||||
|
cd $HOME/quictls
|
||||||
|
make -j1 install_sw
|
||||||
|
name: 'install quictls'
|
||||||
|
|
||||||
|
|
||||||
|
- name: cache gnutls
|
||||||
|
uses: actions/cache@v3
|
||||||
|
id: cache-gnutls
|
||||||
|
env:
|
||||||
|
cache-name: cache-gnutls
|
||||||
|
with:
|
||||||
|
path: /home/runner/gnutls
|
||||||
|
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.gnutls-version }}
|
||||||
|
|
||||||
|
- if: steps.cache-gnutls.outputs.cache-hit != 'true'
|
||||||
|
run: |
|
||||||
|
cd $HOME
|
||||||
|
git clone --quiet --depth=1 -b ${{ env.gnutls-version }} https://github.com/gnutls/gnutls.git
|
||||||
|
cd gnutls
|
||||||
|
./bootstrap
|
||||||
|
./configure --prefix=$HOME/nghttpx \
|
||||||
|
PKG_CONFIG_PATH="$HOME/nghttpx/lib/pkgconfig" LDFLAGS="-Wl,-rpath,$HOME/nghttpx/lib -L$HOME/nghttpx/lib" \
|
||||||
|
--with-included-libtasn1 --with-included-unistring \
|
||||||
|
--disable-guile --disable-doc --disable-tests --disable-tools
|
||||||
|
make
|
||||||
|
name: 'build gnutls'
|
||||||
|
|
||||||
|
- run: |
|
||||||
|
cd $HOME/gnutls
|
||||||
|
make install
|
||||||
|
name: 'install gnutls'
|
||||||
|
|
||||||
|
|
||||||
|
- name: cache wolfssl
|
||||||
|
uses: actions/cache@v3
|
||||||
|
id: cache-wolfssl
|
||||||
|
env:
|
||||||
|
cache-name: cache-wolfssl
|
||||||
|
with:
|
||||||
|
path: /home/runner/wolfssl
|
||||||
|
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.wolfssl-version }}
|
||||||
|
|
||||||
|
- if: steps.cache-wolfssl.outputs.cache-hit != 'true' || ${{ env.wolfssl-version }} == 'master'
|
||||||
|
run: |
|
||||||
|
cd $HOME
|
||||||
|
rm -rf wolfssl
|
||||||
|
git clone --quiet --depth=1 -b ${{ env.wolfssl-version }} https://github.com/wolfSSL/wolfssl.git
|
||||||
|
cd wolfssl
|
||||||
|
./autogen.sh
|
||||||
|
./configure --enable-all --enable-quic --prefix=$HOME/nghttpx
|
||||||
|
make
|
||||||
|
name: 'build wolfssl'
|
||||||
|
|
||||||
|
- run: |
|
||||||
|
cd $HOME/wolfssl
|
||||||
|
make install
|
||||||
|
name: 'install wolfssl'
|
||||||
|
|
||||||
|
|
||||||
|
- name: cache nghttp3
|
||||||
|
uses: actions/cache@v3
|
||||||
|
id: cache-nghttp3
|
||||||
|
env:
|
||||||
|
cache-name: cache-nghttp3
|
||||||
|
with:
|
||||||
|
path: /home/runner/nghttp3
|
||||||
|
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.nghttp3-version }}
|
||||||
|
|
||||||
|
- if: steps.cache-nghttp3.outputs.cache-hit != 'true'
|
||||||
|
run: |
|
||||||
|
cd $HOME
|
||||||
|
git clone --quiet --depth=1 -b ${{ env.nghttp3-version }} https://github.com/ngtcp2/nghttp3
|
||||||
|
cd nghttp3
|
||||||
|
autoreconf -fi
|
||||||
|
./configure --prefix=$HOME/nghttpx PKG_CONFIG_PATH="$HOME/nghttpx/lib/pkgconfig" --enable-lib-only
|
||||||
|
make
|
||||||
|
name: 'build nghttp3'
|
||||||
|
|
||||||
|
- run: |
|
||||||
|
cd $HOME/nghttp3
|
||||||
|
make install
|
||||||
|
name: 'install nghttp3'
|
||||||
|
|
||||||
|
# depends on all other cached libs built so far
|
||||||
|
- run: |
|
||||||
|
git clone --quiet --depth=1 -b ${{ env.ngtcp2-version }} https://github.com/ngtcp2/ngtcp2
|
||||||
|
cd ngtcp2
|
||||||
|
autoreconf -fi
|
||||||
|
./configure --prefix=$HOME/nghttpx PKG_CONFIG_PATH="$HOME/nghttpx/lib/pkgconfig" --enable-lib-only --with-openssl --with-gnutls --with-wolfssl
|
||||||
|
make install
|
||||||
|
name: 'install ngtcp2'
|
||||||
|
|
||||||
|
# depends on all other cached libs built so far
|
||||||
|
- run: |
|
||||||
|
git clone --quiet --depth=1 -b ${{ env.nghttp2-version }} https://github.com/nghttp2/nghttp2
|
||||||
|
cd nghttp2
|
||||||
|
autoreconf -fi
|
||||||
|
./configure --prefix=$HOME/nghttpx PKG_CONFIG_PATH="$HOME/nghttpx/lib/pkgconfig" --enable-http3
|
||||||
|
make install
|
||||||
|
name: 'install nghttp2'
|
||||||
|
|
||||||
|
- name: cache mod_h2
|
||||||
|
uses: actions/cache@v3
|
||||||
|
id: cache-mod_h2
|
||||||
|
env:
|
||||||
|
cache-name: cache-mod_h2
|
||||||
|
with:
|
||||||
|
path: /home/runner/mod_h2
|
||||||
|
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.mod_h2-version }}
|
||||||
|
|
||||||
|
- if: steps.cache-mod_h2.outputs.cache-hit != 'true'
|
||||||
|
run: |
|
||||||
|
cd $HOME
|
||||||
|
git clone --quiet --depth=1 -b ${{ env.mod_h2-version }} https://github.com/icing/mod_h2
|
||||||
|
cd mod_h2
|
||||||
|
autoreconf -fi
|
||||||
|
./configure
|
||||||
|
make
|
||||||
|
name: 'build mod_h2'
|
||||||
|
|
||||||
|
- run: |
|
||||||
|
cd $HOME/mod_h2
|
||||||
|
sudo make install
|
||||||
|
name: 'install mod_h2'
|
||||||
|
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- run: |
|
||||||
|
sudo python3 -m pip install -r tests/requirements.txt -r tests/http/requirements.txt
|
||||||
|
name: 'install python test prereqs'
|
||||||
|
|
||||||
|
- run: autoreconf -fi
|
||||||
|
name: 'autoreconf'
|
||||||
|
|
||||||
|
- run: ./configure ${{ matrix.build.configure }}
|
||||||
|
name: 'configure'
|
||||||
|
|
||||||
|
- run: make V=1
|
||||||
|
name: 'make'
|
||||||
|
|
||||||
|
- run: make V=1 examples
|
||||||
|
name: 'make examples'
|
||||||
|
|
||||||
|
- run: make V=1 -C tests
|
||||||
|
name: 'make tests'
|
||||||
|
|
||||||
|
- run: make V=1 test-ci
|
||||||
|
name: 'run tests'
|
||||||
|
env:
|
||||||
|
TFLAGS: "${{ matrix.build.tflags }}"
|
||||||
|
|
||||||
|
- run: pytest -v tests
|
||||||
|
name: 'run pytest'
|
||||||
|
env:
|
||||||
|
TFLAGS: "${{ matrix.build.tflags }}"
|
||||||
|
CURL_CI: github
|
||||||
|
|
||||||
|
- run: pytest -v tests
|
||||||
|
name: 'run pytest with slowed network'
|
||||||
|
env:
|
||||||
|
# 33% of sends are EAGAINed
|
||||||
|
CURL_DBG_SOCK_WBLOCK: 33
|
||||||
|
# only 80% of data > 10 bytes is send
|
||||||
|
CURL_DBG_SOCK_WPARTIAL: 80
|
||||||
|
CURL_CI: github
|
||||||
|
|
@ -0,0 +1,68 @@
|
||||||
|
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: curl
|
||||||
|
|
||||||
|
name: proselint
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
- '*/ci'
|
||||||
|
paths:
|
||||||
|
- '.github/workflows/proselint.yml'
|
||||||
|
- '**.md'
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
paths:
|
||||||
|
- '.github/workflows/proselint.yml'
|
||||||
|
- '**.md'
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
permissions: {}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
check:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: install prereqs
|
||||||
|
run: sudo apt-get install python3-proselint
|
||||||
|
|
||||||
|
# config file help: https://github.com/amperser/proselint/
|
||||||
|
- name: create proselint config
|
||||||
|
run: |
|
||||||
|
cat <<JSON > $HOME/.proselintrc
|
||||||
|
{
|
||||||
|
"checks": {
|
||||||
|
"typography.diacritical_marks": false,
|
||||||
|
"typography.symbols": false,
|
||||||
|
"annotations.misc": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
JSON
|
||||||
|
|
||||||
|
- name: check prose
|
||||||
|
run: a=`git ls-files '*.md' | grep -v docs/CHECKSRC.md` && proselint $a README
|
||||||
|
|
||||||
|
# This is for CHECKSRC and files with aggressive exclamation mark needs
|
||||||
|
- name: create second proselint config
|
||||||
|
run: |
|
||||||
|
cat <<JSON > $HOME/.proselintrc
|
||||||
|
{
|
||||||
|
"checks": {
|
||||||
|
"typography.diacritical_marks": false,
|
||||||
|
"typography.symbols": false,
|
||||||
|
"typography.exclamation": false,
|
||||||
|
"annotations.misc": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
JSON
|
||||||
|
|
||||||
|
- name: check special prose
|
||||||
|
run: a=docs/CHECKSRC.md && proselint $a
|
||||||
|
|
@ -0,0 +1,209 @@
|
||||||
|
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: curl
|
||||||
|
|
||||||
|
name: quiche
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
- '*/ci'
|
||||||
|
paths-ignore:
|
||||||
|
- '**/*.md'
|
||||||
|
- '**/CMakeLists.txt'
|
||||||
|
- '.azure-pipelines.yml'
|
||||||
|
- '.circleci/**'
|
||||||
|
- '.cirrus.yml'
|
||||||
|
- 'appveyor.yml'
|
||||||
|
- 'CMake/**'
|
||||||
|
- 'packages/**'
|
||||||
|
- 'plan9/**'
|
||||||
|
- 'projects/**'
|
||||||
|
- 'winbuild/**'
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
paths-ignore:
|
||||||
|
- '**/*.md'
|
||||||
|
- '**/CMakeLists.txt'
|
||||||
|
- '.azure-pipelines.yml'
|
||||||
|
- '.circleci/**'
|
||||||
|
- '.cirrus.yml'
|
||||||
|
- 'appveyor.yml'
|
||||||
|
- 'CMake/**'
|
||||||
|
- 'packages/**'
|
||||||
|
- 'plan9/**'
|
||||||
|
- 'projects/**'
|
||||||
|
- 'winbuild/**'
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
# Hardcoded workflow filename as workflow name above is just Linux again
|
||||||
|
group: quiche-${{ github.event.pull_request.number || github.sha }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
permissions: {}
|
||||||
|
|
||||||
|
env:
|
||||||
|
MAKEFLAGS: -j 3
|
||||||
|
openssl-version: 3.0.10+quic
|
||||||
|
nghttp3-version: v0.15.0
|
||||||
|
ngtcp2-version: v0.19.1
|
||||||
|
nghttp2-version: v1.56.0
|
||||||
|
quiche-version: 0.17.2
|
||||||
|
mod_h2-version: v2.0.21
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
autotools:
|
||||||
|
name: ${{ matrix.build.name }}
|
||||||
|
runs-on: 'ubuntu-latest'
|
||||||
|
timeout-minutes: 60
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
build:
|
||||||
|
- name: quiche
|
||||||
|
install: >-
|
||||||
|
libpsl-dev libbrotli-dev libzstd-dev zlib1g-dev libev-dev libc-ares-dev
|
||||||
|
install_steps: pytest
|
||||||
|
configure: >-
|
||||||
|
LDFLAGS="-Wl,-rpath,/home/runner/quiche/target/release"
|
||||||
|
--with-openssl=/home/runner/quiche/quiche/deps/boringssl/src
|
||||||
|
--enable-debug
|
||||||
|
--with-quiche=/home/runner/quiche/target/release
|
||||||
|
--with-test-nghttpx="$HOME/nghttpx/bin/nghttpx"
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install libtool autoconf automake pkg-config stunnel4 ${{ matrix.build.install }}
|
||||||
|
sudo apt-get install apache2 apache2-dev libnghttp2-dev
|
||||||
|
name: 'install prereqs and impacket, pytest, crypto'
|
||||||
|
|
||||||
|
- name: cache nghttpx
|
||||||
|
uses: actions/cache@v3
|
||||||
|
id: cache-nghttpx
|
||||||
|
env:
|
||||||
|
cache-name: cache-nghttpx
|
||||||
|
with:
|
||||||
|
path: /home/runner/nghttpx
|
||||||
|
key: ${{ runner.os }}-build-${{ env.cache-name }}-openssl-${{ env.openssl-version }}-nghttp3-${{ env.nghttp3-version }}-ngtcp2-${{ env.ngtcp2-version }}-nghttp2-${{ env.nghttp2-version }}
|
||||||
|
|
||||||
|
- if: steps.cache-nghttpx.outputs.cache-hit != 'true'
|
||||||
|
run: |
|
||||||
|
git clone --quiet --depth=1 -b openssl-${{ env.openssl-version }} https://github.com/quictls/openssl
|
||||||
|
cd openssl
|
||||||
|
./config --prefix=$HOME/nghttpx --libdir=$HOME/nghttpx/lib
|
||||||
|
make -j1 install_sw
|
||||||
|
name: 'install quictls'
|
||||||
|
|
||||||
|
- if: steps.cache-nghttpx.outputs.cache-hit != 'true'
|
||||||
|
run: |
|
||||||
|
git clone --quiet --depth=1 -b ${{ env.nghttp3-version }} https://github.com/ngtcp2/nghttp3
|
||||||
|
cd nghttp3
|
||||||
|
autoreconf -fi
|
||||||
|
./configure --prefix=$HOME/nghttpx PKG_CONFIG_PATH="$HOME/nghttpx/lib/pkgconfig" --enable-lib-only
|
||||||
|
make install
|
||||||
|
name: 'install nghttp3'
|
||||||
|
|
||||||
|
- if: steps.cache-nghttpx.outputs.cache-hit != 'true'
|
||||||
|
run: |
|
||||||
|
git clone --quiet --depth=1 -b ${{ env.ngtcp2-version }} https://github.com/ngtcp2/ngtcp2
|
||||||
|
cd ngtcp2
|
||||||
|
autoreconf -fi
|
||||||
|
./configure --prefix=$HOME/nghttpx PKG_CONFIG_PATH="$HOME/nghttpx/lib/pkgconfig" --enable-lib-only --with-openssl
|
||||||
|
make install
|
||||||
|
name: 'install ngtcp2'
|
||||||
|
|
||||||
|
- if: steps.cache-nghttpx.outputs.cache-hit != 'true'
|
||||||
|
run: |
|
||||||
|
git clone --quiet --depth=1 -b ${{ env.nghttp2-version }} https://github.com/nghttp2/nghttp2
|
||||||
|
cd nghttp2
|
||||||
|
autoreconf -fi
|
||||||
|
./configure --prefix=$HOME/nghttpx PKG_CONFIG_PATH="$HOME/nghttpx/lib/pkgconfig" --enable-http3
|
||||||
|
make install
|
||||||
|
name: 'install nghttp2'
|
||||||
|
|
||||||
|
- name: cache quiche
|
||||||
|
uses: actions/cache@v3
|
||||||
|
id: cache-quiche
|
||||||
|
env:
|
||||||
|
cache-name: cache-quiche
|
||||||
|
with:
|
||||||
|
path: /home/runner/quiche
|
||||||
|
key: ${{ runner.os }}-build-${{ env.cache-name }}-quiche-${{ env.quiche-version }}
|
||||||
|
|
||||||
|
- if: steps.cache-quiche.outputs.cache-hit != 'true'
|
||||||
|
run: |
|
||||||
|
cd $HOME
|
||||||
|
git clone --quiet --depth=1 -b ${{ env.quiche-version }} --recursive https://github.com/cloudflare/quiche.git
|
||||||
|
cd quiche
|
||||||
|
#### Work-around https://github.com/curl/curl/issues/7927 #######
|
||||||
|
#### See https://github.com/alexcrichton/cmake-rs/issues/131 ####
|
||||||
|
sed -i -e 's/cmake = "0.1"/cmake = "=0.1.45"/' quiche/Cargo.toml
|
||||||
|
|
||||||
|
cargo build -v --package quiche --release --features ffi,pkg-config-meta,qlog --verbose
|
||||||
|
mkdir -v quiche/deps/boringssl/src/lib
|
||||||
|
ln -vnf $(find target/release -name libcrypto.a -o -name libssl.a) quiche/deps/boringssl/src/lib/
|
||||||
|
|
||||||
|
# include dir
|
||||||
|
# /home/runner/quiche/quiche/deps/boringssl/src/include
|
||||||
|
# lib dir
|
||||||
|
# /home/runner/quiche/quiche/deps/boringssl/src/lib
|
||||||
|
name: 'build quiche and boringssl'
|
||||||
|
|
||||||
|
- name: cache mod_h2
|
||||||
|
uses: actions/cache@v3
|
||||||
|
id: cache-mod_h2
|
||||||
|
env:
|
||||||
|
cache-name: cache-mod_h2
|
||||||
|
with:
|
||||||
|
path: /home/runner/mod_h2
|
||||||
|
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.mod_h2-version }}
|
||||||
|
|
||||||
|
- if: steps.cache-mod_h2.outputs.cache-hit != 'true'
|
||||||
|
run: |
|
||||||
|
cd $HOME
|
||||||
|
git clone --quiet --depth=1 -b ${{ env.mod_h2-version }} https://github.com/icing/mod_h2
|
||||||
|
cd mod_h2
|
||||||
|
autoreconf -fi
|
||||||
|
./configure
|
||||||
|
make
|
||||||
|
name: 'build mod_h2'
|
||||||
|
|
||||||
|
- run: |
|
||||||
|
cd $HOME/mod_h2
|
||||||
|
sudo make install
|
||||||
|
name: 'install mod_h2'
|
||||||
|
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- run: |
|
||||||
|
sudo python3 -m pip install -r tests/requirements.txt -r tests/http/requirements.txt
|
||||||
|
name: 'install python test prereqs'
|
||||||
|
|
||||||
|
- run: autoreconf -fi
|
||||||
|
name: 'autoreconf'
|
||||||
|
|
||||||
|
- run: ./configure ${{ matrix.build.configure }}
|
||||||
|
name: 'configure'
|
||||||
|
|
||||||
|
- run: make V=1
|
||||||
|
name: 'make'
|
||||||
|
|
||||||
|
- run: make V=1 examples
|
||||||
|
name: 'make examples'
|
||||||
|
|
||||||
|
- run: make V=1 -C tests
|
||||||
|
name: 'make tests'
|
||||||
|
|
||||||
|
- run: make V=1 test-ci
|
||||||
|
name: 'run tests'
|
||||||
|
env:
|
||||||
|
TFLAGS: "${{ matrix.build.tflags }}"
|
||||||
|
|
||||||
|
- run: pytest -v tests
|
||||||
|
name: 'run pytest'
|
||||||
|
env:
|
||||||
|
TFLAGS: "${{ matrix.build.tflags }}"
|
||||||
|
CURL_CI: github
|
||||||
|
|
@ -0,0 +1,29 @@
|
||||||
|
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
# SPDX-FileCopyrightText: 2022 Free Software Foundation Europe e.V. <https://fsfe.org>
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: curl
|
||||||
|
|
||||||
|
name: REUSE compliance
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
- '*/ci'
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
permissions: {}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
check:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- name: REUSE Compliance Check
|
||||||
|
uses: fsfe/reuse-action@v1
|
||||||
|
|
@ -0,0 +1,66 @@
|
||||||
|
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: curl
|
||||||
|
|
||||||
|
name: spell
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
paths:
|
||||||
|
- '**.md'
|
||||||
|
- '**.3'
|
||||||
|
- '**.1'
|
||||||
|
- '**/spellcheck.yml'
|
||||||
|
- '**/spellcheck.yaml'
|
||||||
|
- '**/wordlist.txt'
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
paths:
|
||||||
|
- '**.md'
|
||||||
|
- '**.3'
|
||||||
|
- '**.1'
|
||||||
|
- '**/spellcheck.yml'
|
||||||
|
- '**/spellcheck.yaml'
|
||||||
|
- '**/wordlist.txt'
|
||||||
|
|
||||||
|
permissions: {}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
check:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: install pandoc
|
||||||
|
run: sudo apt-get install pandoc
|
||||||
|
|
||||||
|
- name: build curl.1
|
||||||
|
run: |
|
||||||
|
autoreconf -fi
|
||||||
|
./configure --without-ssl
|
||||||
|
make -C docs
|
||||||
|
|
||||||
|
- name: strip "uncheckable" sections from .3 pages
|
||||||
|
run: find docs -name "*.3" -size +40c | sed 's/\.3//' | xargs -t -n1 -I OO ./.github/scripts/cleanspell.pl OO.3 OO.33
|
||||||
|
|
||||||
|
- name: convert .3 man pages to markdown
|
||||||
|
run: find docs -name "*.33" -size +40c | sed 's/\.33//' | xargs -t -n1 -I OO pandoc -f man -t markdown OO.33 -o OO.md
|
||||||
|
|
||||||
|
- name: convert .1 man pages to markdown
|
||||||
|
run: find docs -name "*.1" -size +40c | sed 's/\.1//' | xargs -t -n1 -I OO pandoc OO.1 -o OO.md
|
||||||
|
|
||||||
|
- name: trim the curl.1 markdown file
|
||||||
|
run: |
|
||||||
|
perl -pi -e 's/^ .*//' docs/curl.md
|
||||||
|
perl -pi -e 's/\-\-[\a-z0-9-]*//ig' docs/curl.md
|
||||||
|
perl -pi -e 's!https://[a-z0-9%/.-]*!!ig' docs/curl.md
|
||||||
|
|
||||||
|
- name: setup the custom wordlist
|
||||||
|
run: grep -v '^#' .github/scripts/spellcheck.words > wordlist.txt
|
||||||
|
|
||||||
|
- name: Check Spelling
|
||||||
|
uses: rojopolis/spellcheck-github-actions@v0
|
||||||
|
with:
|
||||||
|
config_path: .github/scripts/spellcheck.yaml
|
||||||
|
|
@ -0,0 +1,92 @@
|
||||||
|
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: curl
|
||||||
|
|
||||||
|
name: Linux torture
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
- '*/ci'
|
||||||
|
paths-ignore:
|
||||||
|
- '**/*.md'
|
||||||
|
- '**/CMakeLists.txt'
|
||||||
|
- '.azure-pipelines.yml'
|
||||||
|
- '.circleci/**'
|
||||||
|
- '.cirrus.yml'
|
||||||
|
- 'appveyor.yml'
|
||||||
|
- 'CMake/**'
|
||||||
|
- 'packages/**'
|
||||||
|
- 'plan9/**'
|
||||||
|
- 'projects/**'
|
||||||
|
- 'winbuild/**'
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
paths-ignore:
|
||||||
|
- '**/*.md'
|
||||||
|
- '**/CMakeLists.txt'
|
||||||
|
- '.azure-pipelines.yml'
|
||||||
|
- '.circleci/**'
|
||||||
|
- '.cirrus.yml'
|
||||||
|
- 'appveyor.yml'
|
||||||
|
- 'CMake/**'
|
||||||
|
- 'packages/**'
|
||||||
|
- 'plan9/**'
|
||||||
|
- 'projects/**'
|
||||||
|
- 'winbuild/**'
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
# Hardcoded workflow filename as workflow name above is just Linux again
|
||||||
|
group: torture-${{ github.event.pull_request.number || github.sha }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
permissions: {}
|
||||||
|
|
||||||
|
env:
|
||||||
|
MAKEFLAGS: -j 3
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
autotools:
|
||||||
|
name: ${{ matrix.build.name }}
|
||||||
|
runs-on: 'ubuntu-latest'
|
||||||
|
timeout-minutes: 90
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
build:
|
||||||
|
- name: torture
|
||||||
|
install: libpsl-dev libbrotli-dev libzstd-dev zlib1g-dev libnghttp2-dev libssh2-1-dev libc-ares-dev
|
||||||
|
configure: --with-openssl --enable-debug --enable-ares --enable-websockets
|
||||||
|
tflags: -n -t --shallow=25 !FTP
|
||||||
|
- name: torture-ftp
|
||||||
|
install: libpsl-dev libbrotli-dev libzstd-dev zlib1g-dev libnghttp2-dev libssh2-1-dev libc-ares-dev
|
||||||
|
configure: --with-openssl --enable-debug --enable-ares
|
||||||
|
tflags: -n -t --shallow=20 FTP
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install libtool autoconf automake pkg-config stunnel4 ${{ matrix.build.install }}
|
||||||
|
sudo python3 -m pip install impacket
|
||||||
|
name: 'install prereqs and impacket'
|
||||||
|
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- run: autoreconf -fi
|
||||||
|
name: 'autoreconf'
|
||||||
|
|
||||||
|
- run: ./configure --enable-warnings --enable-werror ${{ matrix.build.configure }}
|
||||||
|
name: 'configure'
|
||||||
|
|
||||||
|
- run: make V=1
|
||||||
|
name: 'make'
|
||||||
|
|
||||||
|
- run: make V=1 -C tests
|
||||||
|
name: 'make tests'
|
||||||
|
|
||||||
|
- run: make V=1 test-torture
|
||||||
|
name: 'run tests'
|
||||||
|
env:
|
||||||
|
TFLAGS: "${{ matrix.build.tflags }}"
|
||||||
|
|
@ -0,0 +1,105 @@
|
||||||
|
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: curl
|
||||||
|
|
||||||
|
name: Linux wolfSSL
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
- '*/ci'
|
||||||
|
paths-ignore:
|
||||||
|
- '**/*.md'
|
||||||
|
- '**/CMakeLists.txt'
|
||||||
|
- '.azure-pipelines.yml'
|
||||||
|
- '.circleci/**'
|
||||||
|
- '.cirrus.yml'
|
||||||
|
- 'appveyor.yml'
|
||||||
|
- 'CMake/**'
|
||||||
|
- 'packages/**'
|
||||||
|
- 'plan9/**'
|
||||||
|
- 'projects/**'
|
||||||
|
- 'winbuild/**'
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
paths-ignore:
|
||||||
|
- '**/*.md'
|
||||||
|
- '**/CMakeLists.txt'
|
||||||
|
- '.azure-pipelines.yml'
|
||||||
|
- '.circleci/**'
|
||||||
|
- '.cirrus.yml'
|
||||||
|
- 'appveyor.yml'
|
||||||
|
- 'CMake/**'
|
||||||
|
- 'packages/**'
|
||||||
|
- 'plan9/**'
|
||||||
|
- 'projects/**'
|
||||||
|
- 'winbuild/**'
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
# Hardcoded workflow filename as workflow name above is just Linux again
|
||||||
|
group: wolfssl-${{ github.event.pull_request.number || github.sha }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
permissions: {}
|
||||||
|
|
||||||
|
env:
|
||||||
|
MAKEFLAGS: -j 3
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
autotools:
|
||||||
|
name: ${{ matrix.build.name }}
|
||||||
|
runs-on: 'ubuntu-latest'
|
||||||
|
timeout-minutes: 60
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
build:
|
||||||
|
- name: wolfssl (configured with --enable-all)
|
||||||
|
install:
|
||||||
|
configure: LDFLAGS="-Wl,-rpath,$HOME/wssl/lib" --with-wolfssl=$HOME/wssl --enable-debug
|
||||||
|
wolfssl-configure: --enable-all
|
||||||
|
- name: wolfssl (configured with --enable-opensslextra)
|
||||||
|
install:
|
||||||
|
configure: LDFLAGS="-Wl,-rpath,$HOME/wssl/lib" --with-wolfssl=$HOME/wssl --enable-debug
|
||||||
|
wolfssl-configure: --enable-opensslextra
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install libtool autoconf automake pkg-config stunnel4 ${{ matrix.build.install }}
|
||||||
|
sudo python3 -m pip install impacket
|
||||||
|
name: 'install prereqs and impacket'
|
||||||
|
|
||||||
|
- run: |
|
||||||
|
WOLFSSL_VER=5.6.3
|
||||||
|
curl -LOsSf --retry 6 --retry-connrefused --max-time 999 https://github.com/wolfSSL/wolfssl/archive/v$WOLFSSL_VER-stable.tar.gz
|
||||||
|
tar -xzf v$WOLFSSL_VER-stable.tar.gz
|
||||||
|
cd wolfssl-$WOLFSSL_VER-stable
|
||||||
|
./autogen.sh
|
||||||
|
./configure --enable-tls13 ${{ matrix.build.wolfssl-configure }} --enable-harden --prefix=$HOME/wssl
|
||||||
|
make install
|
||||||
|
name: 'install wolfssl'
|
||||||
|
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- run: autoreconf -fi
|
||||||
|
name: 'autoreconf'
|
||||||
|
|
||||||
|
- run: ./configure --enable-warnings --enable-werror ${{ matrix.build.configure }}
|
||||||
|
name: 'configure'
|
||||||
|
|
||||||
|
- run: make V=1
|
||||||
|
name: 'make'
|
||||||
|
|
||||||
|
- run: make V=1 examples
|
||||||
|
name: 'make examples'
|
||||||
|
|
||||||
|
- run: make V=1 -C tests
|
||||||
|
name: 'make tests'
|
||||||
|
|
||||||
|
- run: make V=1 test-ci
|
||||||
|
name: 'run tests'
|
||||||
|
env:
|
||||||
|
TFLAGS: "${{ matrix.build.tflags }}"
|
||||||
|
|
@ -0,0 +1,67 @@
|
||||||
|
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: curl
|
||||||
|
|
||||||
|
*.asc
|
||||||
|
*.dll
|
||||||
|
*.exe
|
||||||
|
*.exp
|
||||||
|
*.la
|
||||||
|
*.lib
|
||||||
|
*.lo
|
||||||
|
*.o
|
||||||
|
*.obj
|
||||||
|
*.pdb
|
||||||
|
*.pyc
|
||||||
|
*~
|
||||||
|
.*.sw?
|
||||||
|
.cproject
|
||||||
|
.deps
|
||||||
|
.dirstamp
|
||||||
|
.libs
|
||||||
|
.project
|
||||||
|
.settings
|
||||||
|
/.vs
|
||||||
|
/bld/
|
||||||
|
/build/
|
||||||
|
/builds/
|
||||||
|
/stats/
|
||||||
|
__pycache__
|
||||||
|
CHANGES.dist
|
||||||
|
Debug
|
||||||
|
INSTALL
|
||||||
|
Makefile
|
||||||
|
Makefile.in
|
||||||
|
Release
|
||||||
|
TAGS
|
||||||
|
aclocal.m4
|
||||||
|
aclocal.m4.bak
|
||||||
|
autom4te.cache
|
||||||
|
compile
|
||||||
|
config.cache
|
||||||
|
config.guess
|
||||||
|
config.log
|
||||||
|
config.status
|
||||||
|
config.sub
|
||||||
|
configure
|
||||||
|
curl-*.tar.bz2
|
||||||
|
curl-*.tar.gz
|
||||||
|
curl-*.tar.xz
|
||||||
|
curl-*.zip
|
||||||
|
curl-config
|
||||||
|
depcomp
|
||||||
|
install-sh
|
||||||
|
libcurl.pc
|
||||||
|
libtool
|
||||||
|
ltmain.sh
|
||||||
|
missing
|
||||||
|
mkinstalldirs
|
||||||
|
tags
|
||||||
|
test-driver
|
||||||
|
scripts/_curl
|
||||||
|
scripts/curl.fish
|
||||||
|
curl_fuzzer
|
||||||
|
curl_fuzzer_seed_corpus.zip
|
||||||
|
libstandaloneengine.a
|
||||||
|
tests/string
|
||||||
|
tests/config
|
||||||
|
|
@ -0,0 +1,108 @@
|
||||||
|
Guenter Knauf <lists@gknw.net> <gk@gknw.de>
|
||||||
|
Gisle Vanem <gisle.vanem@gmail.com> <gvanem@yahoo.no>
|
||||||
|
Gisle Vanem <gisle.vanem@gmail.com> <gvanem@broadpark.no>
|
||||||
|
Alessandro Ghedini <alessandro@ghedini.me> <alessandro@cloudflare.com>
|
||||||
|
Alessandro Ghedini <alessandro@ghedini.me> <al3xbio@gmail.com>
|
||||||
|
Björn Stenberg <bjorn@haxx.se>
|
||||||
|
Björn Stenberg <bjorn@haxx.se> <bjst@bjorn>
|
||||||
|
Viktor Szakats <commit@vsz.me> <commit@vszakats.net>
|
||||||
|
Viktor Szakats <commit@vsz.me> <vszakats@users.noreply.github.com>
|
||||||
|
Daniel Gustafsson <daniel@yesql.se> <dgustafsson@pivotal.io>
|
||||||
|
Daniel Gustafsson <daniel@yesql.se> <daniel@hobbit.se>
|
||||||
|
Linus Nielsen <linus@haxx.se>
|
||||||
|
Yamada Yasuharu <yasuharu.yamada@access-company.com>
|
||||||
|
Ulion <ulion2002@gmail.com>
|
||||||
|
Tim Rühsen <tim.ruehsen@gmx.de>
|
||||||
|
Steve Holme <steve_holme@hotmail.com> <steven.holme@cubic.com>
|
||||||
|
Claes Jakobsson <claes@surfar.nu> <claes@versed.se>
|
||||||
|
Sergei Nikulov <sergey.nikulov@gmail.com> <snikulov@users.noreply.github.com>
|
||||||
|
Patrick Monnerat <patrick@monnerat.net> <Patrick.Monnerat@datasphere.ch>
|
||||||
|
Patrick Monnerat <patrick@monnerat.net> <patrick.monnerat@dh.com>
|
||||||
|
Patrick Monnerat <patrick@monnerat.net> <pm@datasphere.ch>
|
||||||
|
Patrick Monnerat <patrick@monnerat.net> <monnerat@users.noreply.github.com>
|
||||||
|
Nick Zitzmann <nickzman@gmail.com> <nick@chronosnet.com>
|
||||||
|
Peter Wu <peter@lekensteyn.nl> <peter_at_lekensteyn.nl>
|
||||||
|
David Woodhouse <David.Woodhouse@intel.com> <dwmw2@infradead.org>
|
||||||
|
Marcel Raad <Marcel.Raad@teamviewer.com> <raad@teamviewer.com>
|
||||||
|
Marcel Raad <Marcel.Raad@teamviewer.com> <MarcelRaad@users.noreply.github.com>
|
||||||
|
Marcel Raad <Marcel.Raad@teamviewer.com> <marcelraad@users.sf.net>
|
||||||
|
Anthony Bryan <anthonybryan@gmail.com> <ant@localhost.localdomain>
|
||||||
|
Travis Burtrum <admin@moparisthebest.com>
|
||||||
|
Dmitry Kostjuchenko <dmitrykos@neutroncode.com>
|
||||||
|
Richard Alcock <richard.alcock@gmail.com>
|
||||||
|
Richard Alcock <richard.alcock@gmail.com> <richard.alcock@mathworks.co.uk>
|
||||||
|
Jan Ehrhardt <github@ehrhardt.nl>
|
||||||
|
Florin Petriuc <petriuc.florin@gmail.com> <pfl@northq.com>
|
||||||
|
Pavel Pavlov <pavlov.pavel@gmail.com>
|
||||||
|
Jason Juang <jasjuang@gmail.com>
|
||||||
|
Carlo Teubner <carlo.teubner@gmail.com>
|
||||||
|
Joel Depooter <joel.depooter@safe.com>
|
||||||
|
Sebastian Mundry <mundry@outlook.com>
|
||||||
|
Rainer Canavan <rainer.canavan@sevenval.com> <canavan@users.noreply.github.com>
|
||||||
|
Dan Fandrich <dan@coneharvesters.com>
|
||||||
|
Henrik S. Gaßmann <henrik@gassmann.onl>
|
||||||
|
Jiří Malák <malak.jiri@gmail.com>
|
||||||
|
Nick Zitzmann <nickzman@gmail.com>
|
||||||
|
Kees Dekker <kees.dekker@infor.com>
|
||||||
|
Max Savenkov <max.savenkov@gmail.com>
|
||||||
|
Daniel Jelinski <daniel.jelinski@thomsonreuters.com> <30433125+djelinski@users.noreply.github.com>
|
||||||
|
Amit Katyal <amkatyal@cisco.com>
|
||||||
|
Giorgos Oikonomou <giorgos.n.oikonomou@gmail.com>
|
||||||
|
Evgeny Grin (Karlson2k) <k2k@narod.ru> <k2k@yandex.ru>
|
||||||
|
Evgeny Grin (Karlson2k) <k2k@narod.ru>
|
||||||
|
Peter Pih <railsnewbie257@gmail.com>
|
||||||
|
Anton Malov <malov.anton@gmail.com>
|
||||||
|
Marquis de Muesli <marquis.de.muesli@gmail.com>
|
||||||
|
Kyohei Kadota <lufia@lufia.org>
|
||||||
|
Lucas Pardue <lucaspardue.24.7@gmail.com> <lucas@cloudflare.com>
|
||||||
|
Massimiliano Fantuzzi <superfantuz@gmail.com>
|
||||||
|
Niall O'Reilly <Niall.oReilly@ucd.ie>
|
||||||
|
Mohammad Hasbini <mohammad.hasbini@gmail.com>
|
||||||
|
Andrew Ishchuk <andrew_ishchuk@office.targem.ru>
|
||||||
|
Nicolas Guillier <59726521+nicoguillier@users.noreply.github.com>
|
||||||
|
Julian Z <julianz@example.com> <jzinn@users.noreply.github.com>
|
||||||
|
Jessa Chandler <jessachandler@gmail.com>
|
||||||
|
Gökhan Şengün <gsengun@linux-5d7d.site> <gokhansengun@gmai.com>
|
||||||
|
Svyatoslav Mishyn <juef@openmailbox.org>
|
||||||
|
Douglas Steinwand <dzs-curl@dzs.fx.org>
|
||||||
|
James Fuller <jim@webcomposite.com>
|
||||||
|
Don J Olmstead <don.j.olmstead@gmail.com>
|
||||||
|
Nicolas Sterchele <sterchelen@gmail.com>
|
||||||
|
Sergey Raevskiy <ccik@inbox.ru>
|
||||||
|
SecuritySense on github <si@securitysense.co.uk>
|
||||||
|
Mipsters on github <tomaviv57@gmail.com>
|
||||||
|
Pavel Novikov <paul.skeptic@yandex.ru>
|
||||||
|
apique13 on github <apique@PC42.isdom.isoft.fr>
|
||||||
|
Daniel Hwang <danielleehwang@gmail.com>
|
||||||
|
Jon Rumsey <jrumsey@uk.ibm.com>
|
||||||
|
Tobias Nyholm <tobias.nyholm@gmail.com>
|
||||||
|
Timur Artikov <t.artikov@2gis.ru>
|
||||||
|
Michał Antoniak <47522782+MAntoniak@users.noreply.github.com>
|
||||||
|
Gleb Ivanovsky <gl.ivanovsky@gmail.com>
|
||||||
|
Max Dymond <max.dymond@microsoft.com> <max.dymond@metaswitch.com>
|
||||||
|
Max Dymond <max.dymond@microsoft.com> <cmeister2@gmail.com>
|
||||||
|
Abhinav Singh <theawless@gmail.com>
|
||||||
|
Malik Idrees Hasan Khan <77000356+MalikIdreesHasanKhan@users.noreply.github.com>
|
||||||
|
Yongkang Huang <hyk68691@hotmail.com>
|
||||||
|
Xiaoke Wang <xkernel.wang@foxmail.com>
|
||||||
|
Philip H <47042125+pheiduck@users.noreply.github.com>
|
||||||
|
neutric on github <5984479+neutric@users.noreply.github.com>
|
||||||
|
Jan-Piet Mens <jp@mens.de>
|
||||||
|
Henrik Holst <henrik.holst@millistream.com>
|
||||||
|
Christian Schmitz <support@monkeybreadsoftware.de>
|
||||||
|
Max Mehl <max.mehl@fsfe.org>
|
||||||
|
rzrymiak on github <106121613+rzrymiak@users.noreply.github.com>
|
||||||
|
Oliver Roberts <oliver@futaura.co.uk>
|
||||||
|
opensignature on github <antonio@piumarossa.it>
|
||||||
|
Cering on github <gfypm@qq.com>
|
||||||
|
a1346054 on github <36859588+a1346054@users.noreply.github.com>
|
||||||
|
zhanghu on xiaomi <zhanghu6@xiaomi.com>
|
||||||
|
Philip Heiduck <pheiduck@Philips-MBP.lan> <47042125+pheiduck@users.noreply.github.com>
|
||||||
|
bsergean on github <bsergean@gmail.com>
|
||||||
|
Stefan Eissing <stefan@eissing.org> <stefan.eissing@greenbytes.de>
|
||||||
|
Michael Musset <mickamusset@gmail.com>
|
||||||
|
Andy Alt <arch_stanton5995@protonmail.com>
|
||||||
|
Thomas1664 on github <46387399+Thomas1664@users.noreply.github.com>
|
||||||
|
dengjfzh on github <dengjfzh@gmail.com>
|
||||||
|
Brad Harder <brad.harder@gmail.com>
|
||||||
|
Derzsi Dániel <daniel@tohka.us>
|
||||||
|
|
@ -0,0 +1,98 @@
|
||||||
|
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||||
|
Upstream-Name: curl
|
||||||
|
Upstream-Contact: Daniel Stenberg <daniel@haxx.se>
|
||||||
|
Source: https://curl.se
|
||||||
|
|
||||||
|
# Tests
|
||||||
|
Files: tests/data/test* tests/certs/* tests/stunnel.pem tests/valgrind.supp
|
||||||
|
Copyright: Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
License: curl
|
||||||
|
|
||||||
|
# Markdown documentation in docs/
|
||||||
|
Files: docs/*.md
|
||||||
|
Copyright: Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
License: curl
|
||||||
|
|
||||||
|
# Docs in docs/
|
||||||
|
Files: docs/FAQ docs/INSTALL docs/INSTALL.cmake docs/KNOWN_BUGS docs/MAIL-ETIQUETTE docs/THANKS docs/TODO docs/cmdline-opts/page-footer docs/libcurl/curl_multi_socket_all.3 docs/libcurl/curl_strnequal.3 docs/libcurl/symbols-in-versions docs/options-in-versions
|
||||||
|
Copyright: Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
License: curl
|
||||||
|
|
||||||
|
# Windows
|
||||||
|
Files: projects/Windows/*
|
||||||
|
Copyright: Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
License: curl
|
||||||
|
|
||||||
|
Files: libcurl.def
|
||||||
|
Copyright: Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
License: curl
|
||||||
|
|
||||||
|
# Single files we do not want to edit directly
|
||||||
|
Files: CHANGES
|
||||||
|
Copyright: Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
License: curl
|
||||||
|
|
||||||
|
Files: GIT-INFO
|
||||||
|
Copyright: Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
License: curl
|
||||||
|
|
||||||
|
Files: RELEASE-NOTES
|
||||||
|
Copyright: Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
License: curl
|
||||||
|
|
||||||
|
# checksrc control files
|
||||||
|
Files: lib/.checksrc docs/examples/.checksrc tests/libtest/.checksrc
|
||||||
|
Copyright: Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
License: curl
|
||||||
|
|
||||||
|
Files: lib/libcurl.plist.in
|
||||||
|
Copyright: Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
License: curl
|
||||||
|
|
||||||
|
Files: lib/libcurl.vers.in
|
||||||
|
Copyright: Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
License: curl
|
||||||
|
|
||||||
|
Files: packages/OS400/README.OS400
|
||||||
|
Copyright: Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
License: curl
|
||||||
|
|
||||||
|
Files: packages/vms/build_vms.com
|
||||||
|
Copyright: Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
License: curl
|
||||||
|
|
||||||
|
Files: packages/vms/curl_release_note_start.txt
|
||||||
|
Copyright: Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
License: curl
|
||||||
|
|
||||||
|
Files: packages/vms/curlmsg.sdl
|
||||||
|
Copyright: Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
License: curl
|
||||||
|
|
||||||
|
Files: packages/vms/macro32_exactcase.patch
|
||||||
|
Copyright: Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
License: curl
|
||||||
|
|
||||||
|
Files: packages/vms/readme
|
||||||
|
Copyright: Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
License: curl
|
||||||
|
|
||||||
|
Files: plan9/README
|
||||||
|
Copyright: Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
License: curl
|
||||||
|
|
||||||
|
Files: projects/wolfssl_override.props
|
||||||
|
Copyright: Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
License: curl
|
||||||
|
|
||||||
|
Files: README
|
||||||
|
Copyright: Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
License: curl
|
||||||
|
|
||||||
|
Files: .github/ISSUE_TEMPLATE/bug_report.md
|
||||||
|
Copyright: Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
License: curl
|
||||||
|
|
||||||
|
Files: .mailmap
|
||||||
|
Copyright: Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
License: curl
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
See https://curl.se/changes.html for the edited and human readable online
|
||||||
|
version of what has changed over the years in different curl releases.
|
||||||
|
|
||||||
|
Generate a CHANGES file like the one present in every release like this:
|
||||||
|
|
||||||
|
$ git log --pretty=fuller --no-color --date=short --decorate=full | \
|
||||||
|
./scripts/log2changes.pl
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
#
|
||||||
|
# This software is licensed as described in the file COPYING, which
|
||||||
|
# you should have received as part of this distribution. The terms
|
||||||
|
# are also available at https://curl.se/docs/copyright.html.
|
||||||
|
#
|
||||||
|
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
# copies of the Software, and permit persons to whom the Software is
|
||||||
|
# furnished to do so, under the terms of the COPYING file.
|
||||||
|
#
|
||||||
|
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
# KIND, either express or implied.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: curl
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
@CMAKE_CONFIGURABLE_FILE_CONTENT@
|
||||||
|
|
@ -0,0 +1,78 @@
|
||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
#
|
||||||
|
# This software is licensed as described in the file COPYING, which
|
||||||
|
# you should have received as part of this distribution. The terms
|
||||||
|
# are also available at https://curl.se/docs/copyright.html.
|
||||||
|
#
|
||||||
|
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
# copies of the Software, and permit persons to whom the Software is
|
||||||
|
# furnished to do so, under the terms of the COPYING file.
|
||||||
|
#
|
||||||
|
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
# KIND, either express or implied.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: curl
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
include(CheckCSourceCompiles)
|
||||||
|
|
||||||
|
option(CURL_HIDDEN_SYMBOLS "Set to ON to hide libcurl internal symbols (=hide all symbols that aren't officially external)." ON)
|
||||||
|
mark_as_advanced(CURL_HIDDEN_SYMBOLS)
|
||||||
|
|
||||||
|
if(CURL_HIDDEN_SYMBOLS)
|
||||||
|
set(SUPPORTS_SYMBOL_HIDING FALSE)
|
||||||
|
|
||||||
|
if(CMAKE_C_COMPILER_ID MATCHES "Clang" AND NOT MSVC)
|
||||||
|
set(SUPPORTS_SYMBOL_HIDING TRUE)
|
||||||
|
set(_SYMBOL_EXTERN "__attribute__ ((__visibility__ (\"default\")))")
|
||||||
|
set(_CFLAG_SYMBOLS_HIDE "-fvisibility=hidden")
|
||||||
|
elseif(CMAKE_COMPILER_IS_GNUCC)
|
||||||
|
if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 3.4)
|
||||||
|
# note: this is considered buggy prior to 4.0 but the autotools don't care, so let's ignore that fact
|
||||||
|
set(SUPPORTS_SYMBOL_HIDING TRUE)
|
||||||
|
set(_SYMBOL_EXTERN "__attribute__ ((__visibility__ (\"default\")))")
|
||||||
|
set(_CFLAG_SYMBOLS_HIDE "-fvisibility=hidden")
|
||||||
|
endif()
|
||||||
|
elseif(CMAKE_C_COMPILER_ID MATCHES "SunPro" AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 8.0)
|
||||||
|
set(SUPPORTS_SYMBOL_HIDING TRUE)
|
||||||
|
set(_SYMBOL_EXTERN "__global")
|
||||||
|
set(_CFLAG_SYMBOLS_HIDE "-xldscope=hidden")
|
||||||
|
elseif(CMAKE_C_COMPILER_ID MATCHES "Intel" AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 9.0)
|
||||||
|
# note: this should probably just check for version 9.1.045 but I'm not 100% sure
|
||||||
|
# so let's do it the same way autotools do.
|
||||||
|
set(SUPPORTS_SYMBOL_HIDING TRUE)
|
||||||
|
set(_SYMBOL_EXTERN "__attribute__ ((__visibility__ (\"default\")))")
|
||||||
|
set(_CFLAG_SYMBOLS_HIDE "-fvisibility=hidden")
|
||||||
|
check_c_source_compiles("#include <stdio.h>
|
||||||
|
int main (void) { printf(\"icc fvisibility bug test\"); return 0; }" _no_bug)
|
||||||
|
if(NOT _no_bug)
|
||||||
|
set(SUPPORTS_SYMBOL_HIDING FALSE)
|
||||||
|
set(_SYMBOL_EXTERN "")
|
||||||
|
set(_CFLAG_SYMBOLS_HIDE "")
|
||||||
|
endif()
|
||||||
|
elseif(MSVC)
|
||||||
|
set(SUPPORTS_SYMBOL_HIDING TRUE)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(HIDES_CURL_PRIVATE_SYMBOLS ${SUPPORTS_SYMBOL_HIDING})
|
||||||
|
elseif(MSVC)
|
||||||
|
if(NOT CMAKE_VERSION VERSION_LESS 3.7)
|
||||||
|
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE) #present since 3.4.3 but broken
|
||||||
|
set(HIDES_CURL_PRIVATE_SYMBOLS FALSE)
|
||||||
|
else()
|
||||||
|
message(WARNING "Hiding private symbols regardless CURL_HIDDEN_SYMBOLS being disabled.")
|
||||||
|
set(HIDES_CURL_PRIVATE_SYMBOLS TRUE)
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
set(HIDES_CURL_PRIVATE_SYMBOLS FALSE)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(CURL_CFLAG_SYMBOLS_HIDE ${_CFLAG_SYMBOLS_HIDE})
|
||||||
|
set(CURL_EXTERN_SYMBOL ${_SYMBOL_EXTERN})
|
||||||
|
|
@ -0,0 +1,532 @@
|
||||||
|
/***************************************************************************
|
||||||
|
* _ _ ____ _
|
||||||
|
* Project ___| | | | _ \| |
|
||||||
|
* / __| | | | |_) | |
|
||||||
|
* | (__| |_| | _ <| |___
|
||||||
|
* \___|\___/|_| \_\_____|
|
||||||
|
*
|
||||||
|
* Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
*
|
||||||
|
* This software is licensed as described in the file COPYING, which
|
||||||
|
* you should have received as part of this distribution. The terms
|
||||||
|
* are also available at https://curl.se/docs/copyright.html.
|
||||||
|
*
|
||||||
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
* copies of the Software, and permit persons to whom the Software is
|
||||||
|
* furnished to do so, under the terms of the COPYING file.
|
||||||
|
*
|
||||||
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
* KIND, either express or implied.
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: curl
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
|
#ifdef TIME_WITH_SYS_TIME
|
||||||
|
/* Time with sys/time test */
|
||||||
|
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/time.h>
|
||||||
|
#include <time.h>
|
||||||
|
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
if ((struct tm *) 0)
|
||||||
|
return 0;
|
||||||
|
;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_FCNTL_O_NONBLOCK
|
||||||
|
|
||||||
|
/* headers for FCNTL_O_NONBLOCK test */
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
/* */
|
||||||
|
#if defined(sun) || defined(__sun__) || \
|
||||||
|
defined(__SUNPRO_C) || defined(__SUNPRO_CC)
|
||||||
|
# if defined(__SVR4) || defined(__srv4__)
|
||||||
|
# define PLATFORM_SOLARIS
|
||||||
|
# else
|
||||||
|
# define PLATFORM_SUNOS4
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
#if (defined(_AIX) || defined(__xlC__)) && !defined(_AIX41)
|
||||||
|
# define PLATFORM_AIX_V3
|
||||||
|
#endif
|
||||||
|
/* */
|
||||||
|
#if defined(PLATFORM_SUNOS4) || defined(PLATFORM_AIX_V3)
|
||||||
|
#error "O_NONBLOCK does not work on this platform"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
/* O_NONBLOCK source test */
|
||||||
|
int flags = 0;
|
||||||
|
if(0 != fcntl(0, F_SETFL, flags | O_NONBLOCK))
|
||||||
|
return 1;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* tests for gethostbyname_r */
|
||||||
|
#if defined(HAVE_GETHOSTBYNAME_R_3_REENTRANT) || \
|
||||||
|
defined(HAVE_GETHOSTBYNAME_R_5_REENTRANT) || \
|
||||||
|
defined(HAVE_GETHOSTBYNAME_R_6_REENTRANT)
|
||||||
|
# define _REENTRANT
|
||||||
|
/* no idea whether _REENTRANT is always set, just invent a new flag */
|
||||||
|
# define TEST_GETHOSTBYFOO_REENTRANT
|
||||||
|
#endif
|
||||||
|
#if defined(HAVE_GETHOSTBYNAME_R_3) || \
|
||||||
|
defined(HAVE_GETHOSTBYNAME_R_5) || \
|
||||||
|
defined(HAVE_GETHOSTBYNAME_R_6) || \
|
||||||
|
defined(TEST_GETHOSTBYFOO_REENTRANT)
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <netdb.h>
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
char *address = "example.com";
|
||||||
|
int length = 0;
|
||||||
|
int type = 0;
|
||||||
|
struct hostent h;
|
||||||
|
int rc = 0;
|
||||||
|
#if defined(HAVE_GETHOSTBYNAME_R_3) || \
|
||||||
|
defined(HAVE_GETHOSTBYNAME_R_3_REENTRANT)
|
||||||
|
struct hostent_data hdata;
|
||||||
|
#elif defined(HAVE_GETHOSTBYNAME_R_5) || \
|
||||||
|
defined(HAVE_GETHOSTBYNAME_R_5_REENTRANT) || \
|
||||||
|
defined(HAVE_GETHOSTBYNAME_R_6) || \
|
||||||
|
defined(HAVE_GETHOSTBYNAME_R_6_REENTRANT)
|
||||||
|
char buffer[8192];
|
||||||
|
int h_errnop;
|
||||||
|
struct hostent *hp;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(HAVE_GETHOSTBYNAME_R_3) || \
|
||||||
|
defined(HAVE_GETHOSTBYNAME_R_3_REENTRANT)
|
||||||
|
rc = gethostbyname_r(address, &h, &hdata);
|
||||||
|
#elif defined(HAVE_GETHOSTBYNAME_R_5) || \
|
||||||
|
defined(HAVE_GETHOSTBYNAME_R_5_REENTRANT)
|
||||||
|
rc = gethostbyname_r(address, &h, buffer, 8192, &h_errnop);
|
||||||
|
(void)hp; /* not used for test */
|
||||||
|
#elif defined(HAVE_GETHOSTBYNAME_R_6) || \
|
||||||
|
defined(HAVE_GETHOSTBYNAME_R_6_REENTRANT)
|
||||||
|
rc = gethostbyname_r(address, &h, buffer, 8192, &hp, &h_errnop);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
(void)length;
|
||||||
|
(void)type;
|
||||||
|
(void)rc;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_SOCKLEN_T
|
||||||
|
#ifdef _WIN32
|
||||||
|
#include <ws2tcpip.h>
|
||||||
|
#else
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/socket.h>
|
||||||
|
#endif
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
if ((socklen_t *) 0)
|
||||||
|
return 0;
|
||||||
|
if (sizeof (socklen_t))
|
||||||
|
return 0;
|
||||||
|
;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_IN_ADDR_T
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/socket.h>
|
||||||
|
#include <arpa/inet.h>
|
||||||
|
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
if ((in_addr_t *) 0)
|
||||||
|
return 0;
|
||||||
|
if (sizeof (in_addr_t))
|
||||||
|
return 0;
|
||||||
|
;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_BOOL_T
|
||||||
|
#ifdef HAVE_SYS_TYPES_H
|
||||||
|
#include <sys/types.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_STDBOOL_H
|
||||||
|
#include <stdbool.h>
|
||||||
|
#endif
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
if (sizeof (bool *) )
|
||||||
|
return 0;
|
||||||
|
;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef STDC_HEADERS
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <stdarg.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <float.h>
|
||||||
|
int main() { return 0; }
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_FILE_OFFSET_BITS
|
||||||
|
#ifdef _FILE_OFFSET_BITS
|
||||||
|
#undef _FILE_OFFSET_BITS
|
||||||
|
#endif
|
||||||
|
#define _FILE_OFFSET_BITS 64
|
||||||
|
#include <sys/types.h>
|
||||||
|
/* Check that off_t can represent 2**63 - 1 correctly.
|
||||||
|
We can't simply define LARGE_OFF_T to be 9223372036854775807,
|
||||||
|
since some C++ compilers masquerading as C compilers
|
||||||
|
incorrectly reject 9223372036854775807. */
|
||||||
|
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
|
||||||
|
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
|
||||||
|
&& LARGE_OFF_T % 2147483647 == 1)
|
||||||
|
? 1 : -1];
|
||||||
|
int main () { ; return 0; }
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_IOCTLSOCKET
|
||||||
|
/* includes start */
|
||||||
|
#ifdef HAVE_WINDOWS_H
|
||||||
|
# ifndef WIN32_LEAN_AND_MEAN
|
||||||
|
# define WIN32_LEAN_AND_MEAN
|
||||||
|
# endif
|
||||||
|
# include <windows.h>
|
||||||
|
# ifdef HAVE_WINSOCK2_H
|
||||||
|
# include <winsock2.h>
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
|
||||||
|
/* ioctlsocket source code */
|
||||||
|
int socket;
|
||||||
|
unsigned long flags = ioctlsocket(socket, FIONBIO, &flags);
|
||||||
|
|
||||||
|
;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_IOCTLSOCKET_CAMEL
|
||||||
|
/* includes start */
|
||||||
|
#ifdef HAVE_WINDOWS_H
|
||||||
|
# ifndef WIN32_LEAN_AND_MEAN
|
||||||
|
# define WIN32_LEAN_AND_MEAN
|
||||||
|
# endif
|
||||||
|
# include <windows.h>
|
||||||
|
# ifdef HAVE_WINSOCK2_H
|
||||||
|
# include <winsock2.h>
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
|
||||||
|
/* IoctlSocket source code */
|
||||||
|
if(0 != IoctlSocket(0, 0, 0))
|
||||||
|
return 1;
|
||||||
|
;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_IOCTLSOCKET_CAMEL_FIONBIO
|
||||||
|
/* includes start */
|
||||||
|
#ifdef HAVE_WINDOWS_H
|
||||||
|
# ifndef WIN32_LEAN_AND_MEAN
|
||||||
|
# define WIN32_LEAN_AND_MEAN
|
||||||
|
# endif
|
||||||
|
# include <windows.h>
|
||||||
|
# ifdef HAVE_WINSOCK2_H
|
||||||
|
# include <winsock2.h>
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
|
||||||
|
/* IoctlSocket source code */
|
||||||
|
long flags = 0;
|
||||||
|
if(0 != IoctlSocket(0, FIONBIO, &flags))
|
||||||
|
return 1;
|
||||||
|
;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_IOCTLSOCKET_FIONBIO
|
||||||
|
/* includes start */
|
||||||
|
#ifdef HAVE_WINDOWS_H
|
||||||
|
# ifndef WIN32_LEAN_AND_MEAN
|
||||||
|
# define WIN32_LEAN_AND_MEAN
|
||||||
|
# endif
|
||||||
|
# include <windows.h>
|
||||||
|
# ifdef HAVE_WINSOCK2_H
|
||||||
|
# include <winsock2.h>
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
|
||||||
|
int flags = 0;
|
||||||
|
if(0 != ioctlsocket(0, FIONBIO, &flags))
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_IOCTL_FIONBIO
|
||||||
|
/* headers for FIONBIO test */
|
||||||
|
/* includes start */
|
||||||
|
#ifdef HAVE_SYS_TYPES_H
|
||||||
|
# include <sys/types.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_UNISTD_H
|
||||||
|
# include <unistd.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_SYS_SOCKET_H
|
||||||
|
# include <sys/socket.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_SYS_IOCTL_H
|
||||||
|
# include <sys/ioctl.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_STROPTS_H
|
||||||
|
# include <stropts.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
|
||||||
|
int flags = 0;
|
||||||
|
if(0 != ioctl(0, FIONBIO, &flags))
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_IOCTL_SIOCGIFADDR
|
||||||
|
/* headers for FIONBIO test */
|
||||||
|
/* includes start */
|
||||||
|
#ifdef HAVE_SYS_TYPES_H
|
||||||
|
# include <sys/types.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_UNISTD_H
|
||||||
|
# include <unistd.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_SYS_SOCKET_H
|
||||||
|
# include <sys/socket.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_SYS_IOCTL_H
|
||||||
|
# include <sys/ioctl.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_STROPTS_H
|
||||||
|
# include <stropts.h>
|
||||||
|
#endif
|
||||||
|
#include <net/if.h>
|
||||||
|
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
struct ifreq ifr;
|
||||||
|
if(0 != ioctl(0, SIOCGIFADDR, &ifr))
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_SETSOCKOPT_SO_NONBLOCK
|
||||||
|
/* includes start */
|
||||||
|
#ifdef HAVE_WINDOWS_H
|
||||||
|
# ifndef WIN32_LEAN_AND_MEAN
|
||||||
|
# define WIN32_LEAN_AND_MEAN
|
||||||
|
# endif
|
||||||
|
# include <windows.h>
|
||||||
|
# ifdef HAVE_WINSOCK2_H
|
||||||
|
# include <winsock2.h>
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
/* includes start */
|
||||||
|
#ifdef HAVE_SYS_TYPES_H
|
||||||
|
# include <sys/types.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_SYS_SOCKET_H
|
||||||
|
# include <sys/socket.h>
|
||||||
|
#endif
|
||||||
|
/* includes end */
|
||||||
|
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
if(0 != setsockopt(0, SOL_SOCKET, SO_NONBLOCK, 0, 0))
|
||||||
|
return 1;
|
||||||
|
;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_GLIBC_STRERROR_R
|
||||||
|
#include <string.h>
|
||||||
|
#include <errno.h>
|
||||||
|
|
||||||
|
void check(char c) {}
|
||||||
|
|
||||||
|
int
|
||||||
|
main () {
|
||||||
|
char buffer[1024];
|
||||||
|
/* This will not compile if strerror_r does not return a char* */
|
||||||
|
check(strerror_r(EACCES, buffer, sizeof(buffer))[0]);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_POSIX_STRERROR_R
|
||||||
|
#include <string.h>
|
||||||
|
#include <errno.h>
|
||||||
|
|
||||||
|
/* float, because a pointer can't be implicitly cast to float */
|
||||||
|
void check(float f) {}
|
||||||
|
|
||||||
|
int
|
||||||
|
main () {
|
||||||
|
char buffer[1024];
|
||||||
|
/* This will not compile if strerror_r does not return an int */
|
||||||
|
check(strerror_r(EACCES, buffer, sizeof(buffer)));
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_FSETXATTR_6
|
||||||
|
#include <sys/xattr.h> /* header from libc, not from libattr */
|
||||||
|
int
|
||||||
|
main() {
|
||||||
|
fsetxattr(0, 0, 0, 0, 0, 0);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_FSETXATTR_5
|
||||||
|
#include <sys/xattr.h> /* header from libc, not from libattr */
|
||||||
|
int
|
||||||
|
main() {
|
||||||
|
fsetxattr(0, 0, 0, 0, 0);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_CLOCK_GETTIME_MONOTONIC
|
||||||
|
#include <time.h>
|
||||||
|
int
|
||||||
|
main() {
|
||||||
|
struct timespec ts = {0, 0};
|
||||||
|
clock_gettime(CLOCK_MONOTONIC, &ts);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_BUILTIN_AVAILABLE
|
||||||
|
int
|
||||||
|
main() {
|
||||||
|
if(__builtin_available(macOS 10.12, *)) {}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_VARIADIC_MACROS_C99
|
||||||
|
#define c99_vmacro3(first, ...) fun3(first, __VA_ARGS__)
|
||||||
|
#define c99_vmacro2(first, ...) fun2(first, __VA_ARGS__)
|
||||||
|
|
||||||
|
int fun3(int arg1, int arg2, int arg3);
|
||||||
|
int fun2(int arg1, int arg2);
|
||||||
|
|
||||||
|
int fun3(int arg1, int arg2, int arg3) {
|
||||||
|
return arg1 + arg2 + arg3;
|
||||||
|
}
|
||||||
|
int fun2(int arg1, int arg2) {
|
||||||
|
return arg1 + arg2;
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
main() {
|
||||||
|
int res3 = c99_vmacro3(1, 2, 3);
|
||||||
|
int res2 = c99_vmacro2(1, 2);
|
||||||
|
(void)res3;
|
||||||
|
(void)res2;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_VARIADIC_MACROS_GCC
|
||||||
|
#define gcc_vmacro3(first, args...) fun3(first, args)
|
||||||
|
#define gcc_vmacro2(first, args...) fun2(first, args)
|
||||||
|
|
||||||
|
int fun3(int arg1, int arg2, int arg3);
|
||||||
|
int fun2(int arg1, int arg2);
|
||||||
|
|
||||||
|
int fun3(int arg1, int arg2, int arg3) {
|
||||||
|
return arg1 + arg2 + arg3;
|
||||||
|
}
|
||||||
|
int fun2(int arg1, int arg2) {
|
||||||
|
return arg1 + arg2;
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
main() {
|
||||||
|
int res3 = gcc_vmacro3(1, 2, 3);
|
||||||
|
int res2 = gcc_vmacro2(1, 2);
|
||||||
|
(void)res3;
|
||||||
|
(void)res2;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_ATOMIC
|
||||||
|
/* includes start */
|
||||||
|
#ifdef HAVE_SYS_TYPES_H
|
||||||
|
# include <sys/types.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_UNISTD_H
|
||||||
|
# include <unistd.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_STDATOMIC_H
|
||||||
|
# include <stdatomic.h>
|
||||||
|
#endif
|
||||||
|
/* includes end */
|
||||||
|
|
||||||
|
int
|
||||||
|
main() {
|
||||||
|
_Atomic int i = 1;
|
||||||
|
i = 0; /* Force an atomic-write operation. */
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_WIN32_WINNT
|
||||||
|
/* includes start */
|
||||||
|
#ifdef WIN32
|
||||||
|
# include "../lib/setup-win32.h"
|
||||||
|
#endif
|
||||||
|
/* includes end */
|
||||||
|
|
||||||
|
#define enquote(x) #x
|
||||||
|
#define expand(x) enquote(x)
|
||||||
|
#pragma message("_WIN32_WINNT=" expand(_WIN32_WINNT))
|
||||||
|
|
||||||
|
int
|
||||||
|
main() {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
@ -0,0 +1,32 @@
|
||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
#
|
||||||
|
# This software is licensed as described in the file COPYING, which
|
||||||
|
# you should have received as part of this distribution. The terms
|
||||||
|
# are also available at https://curl.se/docs/copyright.html.
|
||||||
|
#
|
||||||
|
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
# copies of the Software, and permit persons to whom the Software is
|
||||||
|
# furnished to do so, under the terms of the COPYING file.
|
||||||
|
#
|
||||||
|
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
# KIND, either express or implied.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: curl
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
find_path(BEARSSL_INCLUDE_DIRS bearssl.h)
|
||||||
|
|
||||||
|
find_library(BEARSSL_LIBRARY bearssl)
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(BEARSSL DEFAULT_MSG
|
||||||
|
BEARSSL_INCLUDE_DIRS BEARSSL_LIBRARY)
|
||||||
|
|
||||||
|
mark_as_advanced(BEARSSL_INCLUDE_DIRS BEARSSL_LIBRARY)
|
||||||
|
|
@ -0,0 +1,43 @@
|
||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
#
|
||||||
|
# This software is licensed as described in the file COPYING, which
|
||||||
|
# you should have received as part of this distribution. The terms
|
||||||
|
# are also available at https://curl.se/docs/copyright.html.
|
||||||
|
#
|
||||||
|
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
# copies of the Software, and permit persons to whom the Software is
|
||||||
|
# furnished to do so, under the terms of the COPYING file.
|
||||||
|
#
|
||||||
|
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
# KIND, either express or implied.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: curl
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
|
||||||
|
find_path(BROTLI_INCLUDE_DIR "brotli/decode.h")
|
||||||
|
|
||||||
|
find_library(BROTLICOMMON_LIBRARY NAMES brotlicommon)
|
||||||
|
find_library(BROTLIDEC_LIBRARY NAMES brotlidec)
|
||||||
|
|
||||||
|
find_package_handle_standard_args(Brotli
|
||||||
|
FOUND_VAR
|
||||||
|
BROTLI_FOUND
|
||||||
|
REQUIRED_VARS
|
||||||
|
BROTLIDEC_LIBRARY
|
||||||
|
BROTLICOMMON_LIBRARY
|
||||||
|
BROTLI_INCLUDE_DIR
|
||||||
|
FAIL_MESSAGE
|
||||||
|
"Could NOT find Brotli"
|
||||||
|
)
|
||||||
|
|
||||||
|
set(BROTLI_INCLUDE_DIRS ${BROTLI_INCLUDE_DIR})
|
||||||
|
set(BROTLI_LIBRARIES ${BROTLICOMMON_LIBRARY} ${BROTLIDEC_LIBRARY})
|
||||||
|
|
@ -0,0 +1,47 @@
|
||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
#
|
||||||
|
# This software is licensed as described in the file COPYING, which
|
||||||
|
# you should have received as part of this distribution. The terms
|
||||||
|
# are also available at https://curl.se/docs/copyright.html.
|
||||||
|
#
|
||||||
|
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
# copies of the Software, and permit persons to whom the Software is
|
||||||
|
# furnished to do so, under the terms of the COPYING file.
|
||||||
|
#
|
||||||
|
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
# KIND, either express or implied.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: curl
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
# - Find c-ares
|
||||||
|
# Find the c-ares includes and library
|
||||||
|
# This module defines
|
||||||
|
# CARES_INCLUDE_DIR, where to find ares.h, etc.
|
||||||
|
# CARES_LIBRARIES, the libraries needed to use c-ares.
|
||||||
|
# CARES_FOUND, If false, do not try to use c-ares.
|
||||||
|
# also defined, but not for general use are
|
||||||
|
# CARES_LIBRARY, where to find the c-ares library.
|
||||||
|
|
||||||
|
find_path(CARES_INCLUDE_DIR ares.h)
|
||||||
|
|
||||||
|
set(CARES_NAMES ${CARES_NAMES} cares)
|
||||||
|
find_library(CARES_LIBRARY
|
||||||
|
NAMES ${CARES_NAMES}
|
||||||
|
)
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(CARES
|
||||||
|
REQUIRED_VARS CARES_LIBRARY CARES_INCLUDE_DIR)
|
||||||
|
|
||||||
|
mark_as_advanced(
|
||||||
|
CARES_LIBRARY
|
||||||
|
CARES_INCLUDE_DIR
|
||||||
|
)
|
||||||
|
|
@ -0,0 +1,312 @@
|
||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
#
|
||||||
|
# This software is licensed as described in the file COPYING, which
|
||||||
|
# you should have received as part of this distribution. The terms
|
||||||
|
# are also available at https://curl.se/docs/copyright.html.
|
||||||
|
#
|
||||||
|
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
# copies of the Software, and permit persons to whom the Software is
|
||||||
|
# furnished to do so, under the terms of the COPYING file.
|
||||||
|
#
|
||||||
|
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
# KIND, either express or implied.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: curl
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
# - Try to find the GSS Kerberos library
|
||||||
|
# Once done this will define
|
||||||
|
#
|
||||||
|
# GSS_ROOT_DIR - Set this variable to the root installation of GSS
|
||||||
|
#
|
||||||
|
# Read-Only variables:
|
||||||
|
# GSS_FOUND - system has the Heimdal library
|
||||||
|
# GSS_FLAVOUR - "MIT" or "Heimdal" if anything found.
|
||||||
|
# GSS_INCLUDE_DIR - the Heimdal include directory
|
||||||
|
# GSS_LIBRARIES - The libraries needed to use GSS
|
||||||
|
# GSS_LINK_DIRECTORIES - Directories to add to linker search path
|
||||||
|
# GSS_LINKER_FLAGS - Additional linker flags
|
||||||
|
# GSS_COMPILER_FLAGS - Additional compiler flags
|
||||||
|
# GSS_VERSION - This is set to version advertised by pkg-config or read from manifest.
|
||||||
|
# In case the library is found but no version info available it'll be set to "unknown"
|
||||||
|
|
||||||
|
set(_MIT_MODNAME mit-krb5-gssapi)
|
||||||
|
set(_HEIMDAL_MODNAME heimdal-gssapi)
|
||||||
|
|
||||||
|
include(CheckIncludeFile)
|
||||||
|
include(CheckIncludeFiles)
|
||||||
|
include(CheckTypeSize)
|
||||||
|
|
||||||
|
set(_GSS_ROOT_HINTS
|
||||||
|
"${GSS_ROOT_DIR}"
|
||||||
|
"$ENV{GSS_ROOT_DIR}"
|
||||||
|
)
|
||||||
|
|
||||||
|
# try to find library using system pkg-config if user didn't specify root dir
|
||||||
|
if(NOT GSS_ROOT_DIR AND NOT "$ENV{GSS_ROOT_DIR}")
|
||||||
|
if(UNIX)
|
||||||
|
find_package(PkgConfig QUIET)
|
||||||
|
pkg_search_module(_GSS_PKG ${_MIT_MODNAME} ${_HEIMDAL_MODNAME})
|
||||||
|
list(APPEND _GSS_ROOT_HINTS "${_GSS_PKG_PREFIX}")
|
||||||
|
elseif(WIN32)
|
||||||
|
list(APPEND _GSS_ROOT_HINTS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MIT\\Kerberos;InstallDir]")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(NOT _GSS_FOUND) #not found by pkg-config. Let's take more traditional approach.
|
||||||
|
find_file(_GSS_CONFIGURE_SCRIPT
|
||||||
|
NAMES
|
||||||
|
"krb5-config"
|
||||||
|
HINTS
|
||||||
|
${_GSS_ROOT_HINTS}
|
||||||
|
PATH_SUFFIXES
|
||||||
|
bin
|
||||||
|
NO_CMAKE_PATH
|
||||||
|
NO_CMAKE_ENVIRONMENT_PATH
|
||||||
|
)
|
||||||
|
|
||||||
|
# if not found in user-supplied directories, maybe system knows better
|
||||||
|
find_file(_GSS_CONFIGURE_SCRIPT
|
||||||
|
NAMES
|
||||||
|
"krb5-config"
|
||||||
|
PATH_SUFFIXES
|
||||||
|
bin
|
||||||
|
)
|
||||||
|
|
||||||
|
if(_GSS_CONFIGURE_SCRIPT)
|
||||||
|
execute_process(
|
||||||
|
COMMAND ${_GSS_CONFIGURE_SCRIPT} "--cflags" "gssapi"
|
||||||
|
OUTPUT_VARIABLE _GSS_CFLAGS
|
||||||
|
RESULT_VARIABLE _GSS_CONFIGURE_FAILED
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
|
)
|
||||||
|
message(STATUS "CFLAGS: ${_GSS_CFLAGS}")
|
||||||
|
if(NOT _GSS_CONFIGURE_FAILED) # 0 means success
|
||||||
|
# should also work in an odd case when multiple directories are given
|
||||||
|
string(STRIP "${_GSS_CFLAGS}" _GSS_CFLAGS)
|
||||||
|
string(REGEX REPLACE " +-I" ";" _GSS_CFLAGS "${_GSS_CFLAGS}")
|
||||||
|
string(REGEX REPLACE " +-([^I][^ \\t;]*)" ";-\\1" _GSS_CFLAGS "${_GSS_CFLAGS}")
|
||||||
|
|
||||||
|
foreach(_flag ${_GSS_CFLAGS})
|
||||||
|
if(_flag MATCHES "^-I.*")
|
||||||
|
string(REGEX REPLACE "^-I" "" _val "${_flag}")
|
||||||
|
list(APPEND _GSS_INCLUDE_DIR "${_val}")
|
||||||
|
else()
|
||||||
|
list(APPEND _GSS_COMPILER_FLAGS "${_flag}")
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
execute_process(
|
||||||
|
COMMAND ${_GSS_CONFIGURE_SCRIPT} "--libs" "gssapi"
|
||||||
|
OUTPUT_VARIABLE _GSS_LIB_FLAGS
|
||||||
|
RESULT_VARIABLE _GSS_CONFIGURE_FAILED
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
|
)
|
||||||
|
message(STATUS "LDFLAGS: ${_GSS_LIB_FLAGS}")
|
||||||
|
|
||||||
|
if(NOT _GSS_CONFIGURE_FAILED) # 0 means success
|
||||||
|
# this script gives us libraries and link directories. Blah. We have to deal with it.
|
||||||
|
string(STRIP "${_GSS_LIB_FLAGS}" _GSS_LIB_FLAGS)
|
||||||
|
string(REGEX REPLACE " +-(L|l)" ";-\\1" _GSS_LIB_FLAGS "${_GSS_LIB_FLAGS}")
|
||||||
|
string(REGEX REPLACE " +-([^Ll][^ \\t;]*)" ";-\\1" _GSS_LIB_FLAGS "${_GSS_LIB_FLAGS}")
|
||||||
|
|
||||||
|
foreach(_flag ${_GSS_LIB_FLAGS})
|
||||||
|
if(_flag MATCHES "^-l.*")
|
||||||
|
string(REGEX REPLACE "^-l" "" _val "${_flag}")
|
||||||
|
list(APPEND _GSS_LIBRARIES "${_val}")
|
||||||
|
elseif(_flag MATCHES "^-L.*")
|
||||||
|
string(REGEX REPLACE "^-L" "" _val "${_flag}")
|
||||||
|
list(APPEND _GSS_LINK_DIRECTORIES "${_val}")
|
||||||
|
else()
|
||||||
|
list(APPEND _GSS_LINKER_FLAGS "${_flag}")
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
execute_process(
|
||||||
|
COMMAND ${_GSS_CONFIGURE_SCRIPT} "--version"
|
||||||
|
OUTPUT_VARIABLE _GSS_VERSION
|
||||||
|
RESULT_VARIABLE _GSS_CONFIGURE_FAILED
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
|
)
|
||||||
|
|
||||||
|
# older versions may not have the "--version" parameter. In this case we just don't care.
|
||||||
|
if(_GSS_CONFIGURE_FAILED)
|
||||||
|
set(_GSS_VERSION 0)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
execute_process(
|
||||||
|
COMMAND ${_GSS_CONFIGURE_SCRIPT} "--vendor"
|
||||||
|
OUTPUT_VARIABLE _GSS_VENDOR
|
||||||
|
RESULT_VARIABLE _GSS_CONFIGURE_FAILED
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
|
)
|
||||||
|
|
||||||
|
# older versions may not have the "--vendor" parameter. In this case we just don't care.
|
||||||
|
if(_GSS_CONFIGURE_FAILED)
|
||||||
|
set(GSS_FLAVOUR "Heimdal") # most probably, shouldn't really matter
|
||||||
|
else()
|
||||||
|
if(_GSS_VENDOR MATCHES ".*H|heimdal.*")
|
||||||
|
set(GSS_FLAVOUR "Heimdal")
|
||||||
|
else()
|
||||||
|
set(GSS_FLAVOUR "MIT")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
else() # either there is no config script or we are on a platform that doesn't provide one (Windows?)
|
||||||
|
|
||||||
|
find_path(_GSS_INCLUDE_DIR
|
||||||
|
NAMES
|
||||||
|
"gssapi/gssapi.h"
|
||||||
|
HINTS
|
||||||
|
${_GSS_ROOT_HINTS}
|
||||||
|
PATH_SUFFIXES
|
||||||
|
include
|
||||||
|
inc
|
||||||
|
)
|
||||||
|
|
||||||
|
if(_GSS_INCLUDE_DIR) #jay, we've found something
|
||||||
|
set(CMAKE_REQUIRED_INCLUDES "${_GSS_INCLUDE_DIR}")
|
||||||
|
check_include_files( "gssapi/gssapi_generic.h;gssapi/gssapi_krb5.h" _GSS_HAVE_MIT_HEADERS)
|
||||||
|
|
||||||
|
if(_GSS_HAVE_MIT_HEADERS)
|
||||||
|
set(GSS_FLAVOUR "MIT")
|
||||||
|
else()
|
||||||
|
# prevent compiling the header - just check if we can include it
|
||||||
|
list(APPEND CMAKE_REQUIRED_DEFINITIONS -D__ROKEN_H__)
|
||||||
|
check_include_file( "roken.h" _GSS_HAVE_ROKEN_H)
|
||||||
|
|
||||||
|
check_include_file( "heimdal/roken.h" _GSS_HAVE_HEIMDAL_ROKEN_H)
|
||||||
|
if(_GSS_HAVE_ROKEN_H OR _GSS_HAVE_HEIMDAL_ROKEN_H)
|
||||||
|
set(GSS_FLAVOUR "Heimdal")
|
||||||
|
endif()
|
||||||
|
list(REMOVE_ITEM CMAKE_REQUIRED_DEFINITIONS -D__ROKEN_H__)
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
# I'm not convinced if this is the right way but this is what autotools do at the moment
|
||||||
|
find_path(_GSS_INCLUDE_DIR
|
||||||
|
NAMES
|
||||||
|
"gssapi.h"
|
||||||
|
HINTS
|
||||||
|
${_GSS_ROOT_HINTS}
|
||||||
|
PATH_SUFFIXES
|
||||||
|
include
|
||||||
|
inc
|
||||||
|
)
|
||||||
|
|
||||||
|
if(_GSS_INCLUDE_DIR)
|
||||||
|
set(GSS_FLAVOUR "Heimdal")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# if we have headers, check if we can link libraries
|
||||||
|
if(GSS_FLAVOUR)
|
||||||
|
set(_GSS_LIBDIR_SUFFIXES "")
|
||||||
|
set(_GSS_LIBDIR_HINTS ${_GSS_ROOT_HINTS})
|
||||||
|
get_filename_component(_GSS_CALCULATED_POTENTIAL_ROOT "${_GSS_INCLUDE_DIR}" PATH)
|
||||||
|
list(APPEND _GSS_LIBDIR_HINTS ${_GSS_CALCULATED_POTENTIAL_ROOT})
|
||||||
|
|
||||||
|
if(WIN32)
|
||||||
|
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||||
|
list(APPEND _GSS_LIBDIR_SUFFIXES "lib/AMD64")
|
||||||
|
if(GSS_FLAVOUR STREQUAL "MIT")
|
||||||
|
set(_GSS_LIBNAME "gssapi64")
|
||||||
|
else()
|
||||||
|
set(_GSS_LIBNAME "libgssapi")
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
list(APPEND _GSS_LIBDIR_SUFFIXES "lib/i386")
|
||||||
|
if(GSS_FLAVOUR STREQUAL "MIT")
|
||||||
|
set(_GSS_LIBNAME "gssapi32")
|
||||||
|
else()
|
||||||
|
set(_GSS_LIBNAME "libgssapi")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
list(APPEND _GSS_LIBDIR_SUFFIXES "lib;lib64") # those suffixes are not checked for HINTS
|
||||||
|
if(GSS_FLAVOUR STREQUAL "MIT")
|
||||||
|
set(_GSS_LIBNAME "gssapi_krb5")
|
||||||
|
else()
|
||||||
|
set(_GSS_LIBNAME "gssapi")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_library(_GSS_LIBRARIES
|
||||||
|
NAMES
|
||||||
|
${_GSS_LIBNAME}
|
||||||
|
HINTS
|
||||||
|
${_GSS_LIBDIR_HINTS}
|
||||||
|
PATH_SUFFIXES
|
||||||
|
${_GSS_LIBDIR_SUFFIXES}
|
||||||
|
)
|
||||||
|
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
if(_GSS_PKG_${_MIT_MODNAME}_VERSION)
|
||||||
|
set(GSS_FLAVOUR "MIT")
|
||||||
|
set(_GSS_VERSION _GSS_PKG_${_MIT_MODNAME}_VERSION)
|
||||||
|
else()
|
||||||
|
set(GSS_FLAVOUR "Heimdal")
|
||||||
|
set(_GSS_VERSION _GSS_PKG_${_MIT_HEIMDAL}_VERSION)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(GSS_INCLUDE_DIR ${_GSS_INCLUDE_DIR})
|
||||||
|
set(GSS_LIBRARIES ${_GSS_LIBRARIES})
|
||||||
|
set(GSS_LINK_DIRECTORIES ${_GSS_LINK_DIRECTORIES})
|
||||||
|
set(GSS_LINKER_FLAGS ${_GSS_LINKER_FLAGS})
|
||||||
|
set(GSS_COMPILER_FLAGS ${_GSS_COMPILER_FLAGS})
|
||||||
|
set(GSS_VERSION ${_GSS_VERSION})
|
||||||
|
|
||||||
|
if(GSS_FLAVOUR)
|
||||||
|
if(NOT GSS_VERSION AND GSS_FLAVOUR STREQUAL "Heimdal")
|
||||||
|
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||||
|
set(HEIMDAL_MANIFEST_FILE "Heimdal.Application.amd64.manifest")
|
||||||
|
else()
|
||||||
|
set(HEIMDAL_MANIFEST_FILE "Heimdal.Application.x86.manifest")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(EXISTS "${GSS_INCLUDE_DIR}/${HEIMDAL_MANIFEST_FILE}")
|
||||||
|
file(STRINGS "${GSS_INCLUDE_DIR}/${HEIMDAL_MANIFEST_FILE}" heimdal_version_str
|
||||||
|
REGEX "^.*version=\"[0-9]\\.[^\"]+\".*$")
|
||||||
|
|
||||||
|
string(REGEX MATCH "[0-9]\\.[^\"]+"
|
||||||
|
GSS_VERSION "${heimdal_version_str}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(NOT GSS_VERSION)
|
||||||
|
set(GSS_VERSION "Heimdal Unknown")
|
||||||
|
endif()
|
||||||
|
elseif(NOT GSS_VERSION AND GSS_FLAVOUR STREQUAL "MIT")
|
||||||
|
get_filename_component(_MIT_VERSION "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MIT\\Kerberos\\SDK\\CurrentVersion;VersionString]" NAME CACHE)
|
||||||
|
if(WIN32 AND _MIT_VERSION)
|
||||||
|
set(GSS_VERSION "${_MIT_VERSION}")
|
||||||
|
else()
|
||||||
|
set(GSS_VERSION "MIT Unknown")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
|
||||||
|
set(_GSS_REQUIRED_VARS GSS_LIBRARIES GSS_FLAVOUR)
|
||||||
|
|
||||||
|
find_package_handle_standard_args(GSS
|
||||||
|
REQUIRED_VARS
|
||||||
|
${_GSS_REQUIRED_VARS}
|
||||||
|
VERSION_VAR
|
||||||
|
GSS_VERSION
|
||||||
|
FAIL_MESSAGE
|
||||||
|
"Could NOT find GSS, try to set the path to GSS root folder in the system variable GSS_ROOT_DIR"
|
||||||
|
)
|
||||||
|
|
||||||
|
mark_as_advanced(GSS_INCLUDE_DIR GSS_LIBRARIES)
|
||||||
|
|
@ -0,0 +1,45 @@
|
||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
#
|
||||||
|
# This software is licensed as described in the file COPYING, which
|
||||||
|
# you should have received as part of this distribution. The terms
|
||||||
|
# are also available at https://curl.se/docs/copyright.html.
|
||||||
|
#
|
||||||
|
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
# copies of the Software, and permit persons to whom the Software is
|
||||||
|
# furnished to do so, under the terms of the COPYING file.
|
||||||
|
#
|
||||||
|
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
# KIND, either express or implied.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: curl
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
# - Try to find the libpsl library
|
||||||
|
# Once done this will define
|
||||||
|
#
|
||||||
|
# LIBPSL_FOUND - system has the libpsl library
|
||||||
|
# LIBPSL_INCLUDE_DIR - the libpsl include directory
|
||||||
|
# LIBPSL_LIBRARY - the libpsl library name
|
||||||
|
|
||||||
|
find_path(LIBPSL_INCLUDE_DIR libpsl.h)
|
||||||
|
|
||||||
|
find_library(LIBPSL_LIBRARY NAMES psl libpsl)
|
||||||
|
|
||||||
|
if(LIBPSL_INCLUDE_DIR)
|
||||||
|
file(STRINGS "${LIBPSL_INCLUDE_DIR}/libpsl.h" libpsl_version_str REGEX "^#define[\t ]+PSL_VERSION[\t ]+\"(.*)\"")
|
||||||
|
string(REGEX REPLACE "^.*\"([^\"]+)\"" "\\1" LIBPSL_VERSION "${libpsl_version_str}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(LibPSL
|
||||||
|
REQUIRED_VARS LIBPSL_LIBRARY LIBPSL_INCLUDE_DIR
|
||||||
|
VERSION_VAR LIBPSL_VERSION)
|
||||||
|
|
||||||
|
mark_as_advanced(LIBPSL_INCLUDE_DIR LIBPSL_LIBRARY)
|
||||||
|
|
@ -0,0 +1,45 @@
|
||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
#
|
||||||
|
# This software is licensed as described in the file COPYING, which
|
||||||
|
# you should have received as part of this distribution. The terms
|
||||||
|
# are also available at https://curl.se/docs/copyright.html.
|
||||||
|
#
|
||||||
|
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
# copies of the Software, and permit persons to whom the Software is
|
||||||
|
# furnished to do so, under the terms of the COPYING file.
|
||||||
|
#
|
||||||
|
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
# KIND, either express or implied.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: curl
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
# - Try to find the libssh2 library
|
||||||
|
# Once done this will define
|
||||||
|
#
|
||||||
|
# LIBSSH2_FOUND - system has the libssh2 library
|
||||||
|
# LIBSSH2_INCLUDE_DIR - the libssh2 include directory
|
||||||
|
# LIBSSH2_LIBRARY - the libssh2 library name
|
||||||
|
|
||||||
|
find_path(LIBSSH2_INCLUDE_DIR libssh2.h)
|
||||||
|
|
||||||
|
find_library(LIBSSH2_LIBRARY NAMES ssh2 libssh2)
|
||||||
|
|
||||||
|
if(LIBSSH2_INCLUDE_DIR)
|
||||||
|
file(STRINGS "${LIBSSH2_INCLUDE_DIR}/libssh2.h" libssh2_version_str REGEX "^#define[\t ]+LIBSSH2_VERSION[\t ]+\"(.*)\"")
|
||||||
|
string(REGEX REPLACE "^.*\"([^\"]+)\"" "\\1" LIBSSH2_VERSION "${libssh2_version_str}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(LibSSH2
|
||||||
|
REQUIRED_VARS LIBSSH2_LIBRARY LIBSSH2_INCLUDE_DIR
|
||||||
|
VERSION_VAR LIBSSH2_VERSION)
|
||||||
|
|
||||||
|
mark_as_advanced(LIBSSH2_INCLUDE_DIR LIBSSH2_LIBRARY)
|
||||||
|
|
@ -0,0 +1,70 @@
|
||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
#
|
||||||
|
# This software is licensed as described in the file COPYING, which
|
||||||
|
# you should have received as part of this distribution. The terms
|
||||||
|
# are also available at https://curl.se/docs/copyright.html.
|
||||||
|
#
|
||||||
|
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
# copies of the Software, and permit persons to whom the Software is
|
||||||
|
# furnished to do so, under the terms of the COPYING file.
|
||||||
|
#
|
||||||
|
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
# KIND, either express or implied.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: curl
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
#[=======================================================================[.rst:
|
||||||
|
FindMSH3
|
||||||
|
----------
|
||||||
|
|
||||||
|
Find the msh3 library
|
||||||
|
|
||||||
|
Result Variables
|
||||||
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
``MSH3_FOUND``
|
||||||
|
System has msh3
|
||||||
|
``MSH3_INCLUDE_DIRS``
|
||||||
|
The msh3 include directories.
|
||||||
|
``MSH3_LIBRARIES``
|
||||||
|
The libraries needed to use msh3
|
||||||
|
#]=======================================================================]
|
||||||
|
if(UNIX)
|
||||||
|
find_package(PkgConfig QUIET)
|
||||||
|
pkg_search_module(PC_MSH3 libmsh3)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_path(MSH3_INCLUDE_DIR msh3.h
|
||||||
|
HINTS
|
||||||
|
${PC_MSH3_INCLUDEDIR}
|
||||||
|
${PC_MSH3_INCLUDE_DIRS}
|
||||||
|
)
|
||||||
|
|
||||||
|
find_library(MSH3_LIBRARY NAMES msh3
|
||||||
|
HINTS
|
||||||
|
${PC_MSH3_LIBDIR}
|
||||||
|
${PC_MSH3_LIBRARY_DIRS}
|
||||||
|
)
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(MSH3
|
||||||
|
REQUIRED_VARS
|
||||||
|
MSH3_LIBRARY
|
||||||
|
MSH3_INCLUDE_DIR
|
||||||
|
)
|
||||||
|
|
||||||
|
if(MSH3_FOUND)
|
||||||
|
set(MSH3_LIBRARIES ${MSH3_LIBRARY})
|
||||||
|
set(MSH3_INCLUDE_DIRS ${MSH3_INCLUDE_DIR})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
mark_as_advanced(MSH3_INCLUDE_DIRS MSH3_LIBRARIES)
|
||||||
|
|
@ -0,0 +1,36 @@
|
||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
#
|
||||||
|
# This software is licensed as described in the file COPYING, which
|
||||||
|
# you should have received as part of this distribution. The terms
|
||||||
|
# are also available at https://curl.se/docs/copyright.html.
|
||||||
|
#
|
||||||
|
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
# copies of the Software, and permit persons to whom the Software is
|
||||||
|
# furnished to do so, under the terms of the COPYING file.
|
||||||
|
#
|
||||||
|
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
# KIND, either express or implied.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: curl
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
find_path(MBEDTLS_INCLUDE_DIRS mbedtls/ssl.h)
|
||||||
|
|
||||||
|
find_library(MBEDTLS_LIBRARY mbedtls)
|
||||||
|
find_library(MBEDX509_LIBRARY mbedx509)
|
||||||
|
find_library(MBEDCRYPTO_LIBRARY mbedcrypto)
|
||||||
|
|
||||||
|
set(MBEDTLS_LIBRARIES "${MBEDTLS_LIBRARY}" "${MBEDX509_LIBRARY}" "${MBEDCRYPTO_LIBRARY}")
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(MbedTLS DEFAULT_MSG
|
||||||
|
MBEDTLS_INCLUDE_DIRS MBEDTLS_LIBRARY MBEDX509_LIBRARY MBEDCRYPTO_LIBRARY)
|
||||||
|
|
||||||
|
mark_as_advanced(MBEDTLS_INCLUDE_DIRS MBEDTLS_LIBRARY MBEDX509_LIBRARY MBEDCRYPTO_LIBRARY)
|
||||||
|
|
@ -0,0 +1,41 @@
|
||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
#
|
||||||
|
# This software is licensed as described in the file COPYING, which
|
||||||
|
# you should have received as part of this distribution. The terms
|
||||||
|
# are also available at https://curl.se/docs/copyright.html.
|
||||||
|
#
|
||||||
|
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
# copies of the Software, and permit persons to whom the Software is
|
||||||
|
# furnished to do so, under the terms of the COPYING file.
|
||||||
|
#
|
||||||
|
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
# KIND, either express or implied.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: curl
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
|
||||||
|
find_path(NGHTTP2_INCLUDE_DIR "nghttp2/nghttp2.h")
|
||||||
|
|
||||||
|
find_library(NGHTTP2_LIBRARY NAMES nghttp2)
|
||||||
|
|
||||||
|
find_package_handle_standard_args(NGHTTP2
|
||||||
|
FOUND_VAR
|
||||||
|
NGHTTP2_FOUND
|
||||||
|
REQUIRED_VARS
|
||||||
|
NGHTTP2_LIBRARY
|
||||||
|
NGHTTP2_INCLUDE_DIR
|
||||||
|
)
|
||||||
|
|
||||||
|
set(NGHTTP2_INCLUDE_DIRS ${NGHTTP2_INCLUDE_DIR})
|
||||||
|
set(NGHTTP2_LIBRARIES ${NGHTTP2_LIBRARY})
|
||||||
|
|
||||||
|
mark_as_advanced(NGHTTP2_INCLUDE_DIRS NGHTTP2_LIBRARIES)
|
||||||
|
|
@ -0,0 +1,78 @@
|
||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
#
|
||||||
|
# This software is licensed as described in the file COPYING, which
|
||||||
|
# you should have received as part of this distribution. The terms
|
||||||
|
# are also available at https://curl.se/docs/copyright.html.
|
||||||
|
#
|
||||||
|
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
# copies of the Software, and permit persons to whom the Software is
|
||||||
|
# furnished to do so, under the terms of the COPYING file.
|
||||||
|
#
|
||||||
|
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
# KIND, either express or implied.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: curl
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
#[=======================================================================[.rst:
|
||||||
|
FindNGHTTP3
|
||||||
|
----------
|
||||||
|
|
||||||
|
Find the nghttp3 library
|
||||||
|
|
||||||
|
Result Variables
|
||||||
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
``NGHTTP3_FOUND``
|
||||||
|
System has nghttp3
|
||||||
|
``NGHTTP3_INCLUDE_DIRS``
|
||||||
|
The nghttp3 include directories.
|
||||||
|
``NGHTTP3_LIBRARIES``
|
||||||
|
The libraries needed to use nghttp3
|
||||||
|
``NGHTTP3_VERSION``
|
||||||
|
version of nghttp3.
|
||||||
|
#]=======================================================================]
|
||||||
|
|
||||||
|
if(UNIX)
|
||||||
|
find_package(PkgConfig QUIET)
|
||||||
|
pkg_search_module(PC_NGHTTP3 libnghttp3)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_path(NGHTTP3_INCLUDE_DIR nghttp3/nghttp3.h
|
||||||
|
HINTS
|
||||||
|
${PC_NGHTTP3_INCLUDEDIR}
|
||||||
|
${PC_NGHTTP3_INCLUDE_DIRS}
|
||||||
|
)
|
||||||
|
|
||||||
|
find_library(NGHTTP3_LIBRARY NAMES nghttp3
|
||||||
|
HINTS
|
||||||
|
${PC_NGHTTP3_LIBDIR}
|
||||||
|
${PC_NGHTTP3_LIBRARY_DIRS}
|
||||||
|
)
|
||||||
|
|
||||||
|
if(PC_NGHTTP3_VERSION)
|
||||||
|
set(NGHTTP3_VERSION ${PC_NGHTTP3_VERSION})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(NGHTTP3
|
||||||
|
REQUIRED_VARS
|
||||||
|
NGHTTP3_LIBRARY
|
||||||
|
NGHTTP3_INCLUDE_DIR
|
||||||
|
VERSION_VAR NGHTTP3_VERSION
|
||||||
|
)
|
||||||
|
|
||||||
|
if(NGHTTP3_FOUND)
|
||||||
|
set(NGHTTP3_LIBRARIES ${NGHTTP3_LIBRARY})
|
||||||
|
set(NGHTTP3_INCLUDE_DIRS ${NGHTTP3_INCLUDE_DIR})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
mark_as_advanced(NGHTTP3_INCLUDE_DIRS NGHTTP3_LIBRARIES)
|
||||||
|
|
@ -0,0 +1,115 @@
|
||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
#
|
||||||
|
# This software is licensed as described in the file COPYING, which
|
||||||
|
# you should have received as part of this distribution. The terms
|
||||||
|
# are also available at https://curl.se/docs/copyright.html.
|
||||||
|
#
|
||||||
|
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
# copies of the Software, and permit persons to whom the Software is
|
||||||
|
# furnished to do so, under the terms of the COPYING file.
|
||||||
|
#
|
||||||
|
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
# KIND, either express or implied.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: curl
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
#[=======================================================================[.rst:
|
||||||
|
FindNGTCP2
|
||||||
|
----------
|
||||||
|
|
||||||
|
Find the ngtcp2 library
|
||||||
|
|
||||||
|
This module accepts optional COMPONENTS to control the crypto library (these are
|
||||||
|
mutually exclusive)::
|
||||||
|
|
||||||
|
OpenSSL: Use libngtcp2_crypto_quictls
|
||||||
|
GnuTLS: Use libngtcp2_crypto_gnutls
|
||||||
|
|
||||||
|
Result Variables
|
||||||
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
``NGTCP2_FOUND``
|
||||||
|
System has ngtcp2
|
||||||
|
``NGTCP2_INCLUDE_DIRS``
|
||||||
|
The ngtcp2 include directories.
|
||||||
|
``NGTCP2_LIBRARIES``
|
||||||
|
The libraries needed to use ngtcp2
|
||||||
|
``NGTCP2_VERSION``
|
||||||
|
version of ngtcp2.
|
||||||
|
#]=======================================================================]
|
||||||
|
|
||||||
|
if(UNIX)
|
||||||
|
find_package(PkgConfig QUIET)
|
||||||
|
pkg_search_module(PC_NGTCP2 libngtcp2)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_path(NGTCP2_INCLUDE_DIR ngtcp2/ngtcp2.h
|
||||||
|
HINTS
|
||||||
|
${PC_NGTCP2_INCLUDEDIR}
|
||||||
|
${PC_NGTCP2_INCLUDE_DIRS}
|
||||||
|
)
|
||||||
|
|
||||||
|
find_library(NGTCP2_LIBRARY NAMES ngtcp2
|
||||||
|
HINTS
|
||||||
|
${PC_NGTCP2_LIBDIR}
|
||||||
|
${PC_NGTCP2_LIBRARY_DIRS}
|
||||||
|
)
|
||||||
|
|
||||||
|
if(PC_NGTCP2_VERSION)
|
||||||
|
set(NGTCP2_VERSION ${PC_NGTCP2_VERSION})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(NGTCP2_FIND_COMPONENTS)
|
||||||
|
set(NGTCP2_CRYPTO_BACKEND "")
|
||||||
|
foreach(component IN LISTS NGTCP2_FIND_COMPONENTS)
|
||||||
|
if(component MATCHES "^(BoringSSL|quictls|wolfSSL|GnuTLS)")
|
||||||
|
if(NGTCP2_CRYPTO_BACKEND)
|
||||||
|
message(FATAL_ERROR "NGTCP2: Only one crypto library can be selected")
|
||||||
|
endif()
|
||||||
|
set(NGTCP2_CRYPTO_BACKEND ${component})
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
if(NGTCP2_CRYPTO_BACKEND)
|
||||||
|
string(TOLOWER "ngtcp2_crypto_${NGTCP2_CRYPTO_BACKEND}" _crypto_library)
|
||||||
|
if(UNIX)
|
||||||
|
pkg_search_module(PC_${_crypto_library} lib${_crypto_library})
|
||||||
|
endif()
|
||||||
|
find_library(${_crypto_library}_LIBRARY
|
||||||
|
NAMES
|
||||||
|
${_crypto_library}
|
||||||
|
HINTS
|
||||||
|
${PC_${_crypto_library}_LIBDIR}
|
||||||
|
${PC_${_crypto_library}_LIBRARY_DIRS}
|
||||||
|
)
|
||||||
|
if(${_crypto_library}_LIBRARY)
|
||||||
|
set(NGTCP2_${NGTCP2_CRYPTO_BACKEND}_FOUND TRUE)
|
||||||
|
set(NGTCP2_CRYPTO_LIBRARY ${${_crypto_library}_LIBRARY})
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(NGTCP2
|
||||||
|
REQUIRED_VARS
|
||||||
|
NGTCP2_LIBRARY
|
||||||
|
NGTCP2_INCLUDE_DIR
|
||||||
|
VERSION_VAR NGTCP2_VERSION
|
||||||
|
HANDLE_COMPONENTS
|
||||||
|
)
|
||||||
|
|
||||||
|
if(NGTCP2_FOUND)
|
||||||
|
set(NGTCP2_LIBRARIES ${NGTCP2_LIBRARY} ${NGTCP2_CRYPTO_LIBRARY})
|
||||||
|
set(NGTCP2_INCLUDE_DIRS ${NGTCP2_INCLUDE_DIR})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
mark_as_advanced(NGTCP2_INCLUDE_DIRS NGTCP2_LIBRARIES)
|
||||||
|
|
@ -0,0 +1,70 @@
|
||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
#
|
||||||
|
# This software is licensed as described in the file COPYING, which
|
||||||
|
# you should have received as part of this distribution. The terms
|
||||||
|
# are also available at https://curl.se/docs/copyright.html.
|
||||||
|
#
|
||||||
|
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
# copies of the Software, and permit persons to whom the Software is
|
||||||
|
# furnished to do so, under the terms of the COPYING file.
|
||||||
|
#
|
||||||
|
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
# KIND, either express or implied.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: curl
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
#[=======================================================================[.rst:
|
||||||
|
FindQUICHE
|
||||||
|
----------
|
||||||
|
|
||||||
|
Find the quiche library
|
||||||
|
|
||||||
|
Result Variables
|
||||||
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
``QUICHE_FOUND``
|
||||||
|
System has quiche
|
||||||
|
``QUICHE_INCLUDE_DIRS``
|
||||||
|
The quiche include directories.
|
||||||
|
``QUICHE_LIBRARIES``
|
||||||
|
The libraries needed to use quiche
|
||||||
|
#]=======================================================================]
|
||||||
|
if(UNIX)
|
||||||
|
find_package(PkgConfig QUIET)
|
||||||
|
pkg_search_module(PC_QUICHE quiche)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_path(QUICHE_INCLUDE_DIR quiche.h
|
||||||
|
HINTS
|
||||||
|
${PC_QUICHE_INCLUDEDIR}
|
||||||
|
${PC_QUICHE_INCLUDE_DIRS}
|
||||||
|
)
|
||||||
|
|
||||||
|
find_library(QUICHE_LIBRARY NAMES quiche
|
||||||
|
HINTS
|
||||||
|
${PC_QUICHE_LIBDIR}
|
||||||
|
${PC_QUICHE_LIBRARY_DIRS}
|
||||||
|
)
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(QUICHE
|
||||||
|
REQUIRED_VARS
|
||||||
|
QUICHE_LIBRARY
|
||||||
|
QUICHE_INCLUDE_DIR
|
||||||
|
)
|
||||||
|
|
||||||
|
if(QUICHE_FOUND)
|
||||||
|
set(QUICHE_LIBRARIES ${QUICHE_LIBRARY})
|
||||||
|
set(QUICHE_INCLUDE_DIRS ${QUICHE_INCLUDE_DIR})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
mark_as_advanced(QUICHE_INCLUDE_DIRS QUICHE_LIBRARIES)
|
||||||
|
|
@ -0,0 +1,36 @@
|
||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
#
|
||||||
|
# This software is licensed as described in the file COPYING, which
|
||||||
|
# you should have received as part of this distribution. The terms
|
||||||
|
# are also available at https://curl.se/docs/copyright.html.
|
||||||
|
#
|
||||||
|
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
# copies of the Software, and permit persons to whom the Software is
|
||||||
|
# furnished to do so, under the terms of the COPYING file.
|
||||||
|
#
|
||||||
|
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
# KIND, either express or implied.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: curl
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
find_path(WolfSSL_INCLUDE_DIR NAMES wolfssl/ssl.h)
|
||||||
|
find_library(WolfSSL_LIBRARY NAMES wolfssl)
|
||||||
|
mark_as_advanced(WolfSSL_INCLUDE_DIR WolfSSL_LIBRARY)
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(WolfSSL
|
||||||
|
REQUIRED_VARS WolfSSL_INCLUDE_DIR WolfSSL_LIBRARY
|
||||||
|
)
|
||||||
|
|
||||||
|
if(WolfSSL_FOUND)
|
||||||
|
set(WolfSSL_INCLUDE_DIRS ${WolfSSL_INCLUDE_DIR})
|
||||||
|
set(WolfSSL_LIBRARIES ${WolfSSL_LIBRARY})
|
||||||
|
endif()
|
||||||
|
|
@ -0,0 +1,71 @@
|
||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
#
|
||||||
|
# This software is licensed as described in the file COPYING, which
|
||||||
|
# you should have received as part of this distribution. The terms
|
||||||
|
# are also available at https://curl.se/docs/copyright.html.
|
||||||
|
#
|
||||||
|
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
# copies of the Software, and permit persons to whom the Software is
|
||||||
|
# furnished to do so, under the terms of the COPYING file.
|
||||||
|
#
|
||||||
|
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
# KIND, either express or implied.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: curl
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
#[=======================================================================[.rst:
|
||||||
|
FindZstd
|
||||||
|
----------
|
||||||
|
|
||||||
|
Find the zstd library
|
||||||
|
|
||||||
|
Result Variables
|
||||||
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
``Zstd_FOUND``
|
||||||
|
System has zstd
|
||||||
|
``Zstd_INCLUDE_DIRS``
|
||||||
|
The zstd include directories.
|
||||||
|
``Zstd_LIBRARIES``
|
||||||
|
The libraries needed to use zstd
|
||||||
|
#]=======================================================================]
|
||||||
|
|
||||||
|
if(UNIX)
|
||||||
|
find_package(PkgConfig QUIET)
|
||||||
|
pkg_search_module(PC_Zstd libzstd)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_path(Zstd_INCLUDE_DIR zstd.h
|
||||||
|
HINTS
|
||||||
|
${PC_Zstd_INCLUDEDIR}
|
||||||
|
${PC_Zstd_INCLUDE_DIRS}
|
||||||
|
)
|
||||||
|
|
||||||
|
find_library(Zstd_LIBRARY NAMES zstd
|
||||||
|
HINTS
|
||||||
|
${PC_Zstd_LIBDIR}
|
||||||
|
${PC_Zstd_LIBRARY_DIRS}
|
||||||
|
)
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(Zstd
|
||||||
|
REQUIRED_VARS
|
||||||
|
Zstd_LIBRARY
|
||||||
|
Zstd_INCLUDE_DIR
|
||||||
|
)
|
||||||
|
|
||||||
|
if(Zstd_FOUND)
|
||||||
|
set(Zstd_LIBRARIES ${Zstd_LIBRARY})
|
||||||
|
set(Zstd_INCLUDE_DIRS ${Zstd_INCLUDE_DIR})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
mark_as_advanced(Zstd_INCLUDE_DIRS Zstd_LIBRARIES)
|
||||||
|
|
@ -0,0 +1,122 @@
|
||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
#
|
||||||
|
# This software is licensed as described in the file COPYING, which
|
||||||
|
# you should have received as part of this distribution. The terms
|
||||||
|
# are also available at https://curl.se/docs/copyright.html.
|
||||||
|
#
|
||||||
|
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
# copies of the Software, and permit persons to whom the Software is
|
||||||
|
# furnished to do so, under the terms of the COPYING file.
|
||||||
|
#
|
||||||
|
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
# KIND, either express or implied.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: curl
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
#File defines convenience macros for available feature testing
|
||||||
|
|
||||||
|
# This macro checks if the symbol exists in the library and if it
|
||||||
|
# does, it prepends library to the list. It is intended to be called
|
||||||
|
# multiple times with a sequence of possibly dependent libraries in
|
||||||
|
# order of least-to-most-dependent. Some libraries depend on others
|
||||||
|
# to link correctly.
|
||||||
|
macro(check_library_exists_concat LIBRARY SYMBOL VARIABLE)
|
||||||
|
check_library_exists("${LIBRARY};${CURL_LIBS}" ${SYMBOL} "${CMAKE_LIBRARY_PATH}"
|
||||||
|
${VARIABLE})
|
||||||
|
if(${VARIABLE})
|
||||||
|
set(CURL_LIBS ${LIBRARY} ${CURL_LIBS})
|
||||||
|
endif()
|
||||||
|
endmacro()
|
||||||
|
|
||||||
|
# Check if header file exists and add it to the list.
|
||||||
|
# This macro is intended to be called multiple times with a sequence of
|
||||||
|
# possibly dependent header files. Some headers depend on others to be
|
||||||
|
# compiled correctly.
|
||||||
|
macro(check_include_file_concat FILE VARIABLE)
|
||||||
|
check_include_files("${CURL_INCLUDES};${FILE}" ${VARIABLE})
|
||||||
|
if(${VARIABLE})
|
||||||
|
set(CURL_INCLUDES ${CURL_INCLUDES} ${FILE})
|
||||||
|
set(CURL_TEST_DEFINES "${CURL_TEST_DEFINES} -D${VARIABLE}")
|
||||||
|
endif()
|
||||||
|
endmacro()
|
||||||
|
|
||||||
|
# For other curl specific tests, use this macro.
|
||||||
|
macro(curl_internal_test CURL_TEST)
|
||||||
|
if(NOT DEFINED "${CURL_TEST}")
|
||||||
|
set(MACRO_CHECK_FUNCTION_DEFINITIONS
|
||||||
|
"-D${CURL_TEST} ${CURL_TEST_DEFINES} ${CMAKE_REQUIRED_FLAGS}")
|
||||||
|
if(CMAKE_REQUIRED_LIBRARIES)
|
||||||
|
set(CURL_TEST_ADD_LIBRARIES
|
||||||
|
"-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
message(STATUS "Performing Curl Test ${CURL_TEST}")
|
||||||
|
try_compile(${CURL_TEST}
|
||||||
|
${CMAKE_BINARY_DIR}
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/CMake/CurlTests.c
|
||||||
|
CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS}
|
||||||
|
"${CURL_TEST_ADD_LIBRARIES}"
|
||||||
|
OUTPUT_VARIABLE OUTPUT)
|
||||||
|
if(${CURL_TEST})
|
||||||
|
set(${CURL_TEST} 1 CACHE INTERNAL "Curl test ${FUNCTION}")
|
||||||
|
message(STATUS "Performing Curl Test ${CURL_TEST} - Success")
|
||||||
|
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
|
||||||
|
"Performing Curl Test ${CURL_TEST} passed with the following output:\n"
|
||||||
|
"${OUTPUT}\n")
|
||||||
|
else()
|
||||||
|
message(STATUS "Performing Curl Test ${CURL_TEST} - Failed")
|
||||||
|
set(${CURL_TEST} "" CACHE INTERNAL "Curl test ${FUNCTION}")
|
||||||
|
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
|
||||||
|
"Performing Curl Test ${CURL_TEST} failed with the following output:\n"
|
||||||
|
"${OUTPUT}\n")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
endmacro()
|
||||||
|
|
||||||
|
macro(curl_nroff_check)
|
||||||
|
find_program(NROFF NAMES gnroff nroff)
|
||||||
|
if(NROFF)
|
||||||
|
# Need a way to write to stdin, this will do
|
||||||
|
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/nroff-input.txt" "test")
|
||||||
|
# Tests for a valid nroff option to generate a manpage
|
||||||
|
foreach(_MANOPT "-man" "-mandoc")
|
||||||
|
execute_process(COMMAND "${NROFF}" ${_MANOPT}
|
||||||
|
OUTPUT_VARIABLE NROFF_MANOPT_OUTPUT
|
||||||
|
INPUT_FILE "${CMAKE_CURRENT_BINARY_DIR}/nroff-input.txt"
|
||||||
|
ERROR_QUIET)
|
||||||
|
# Save the option if it was valid
|
||||||
|
if(NROFF_MANOPT_OUTPUT)
|
||||||
|
message("Found *nroff option: -- ${_MANOPT}")
|
||||||
|
set(NROFF_MANOPT ${_MANOPT})
|
||||||
|
set(NROFF_USEFUL ON)
|
||||||
|
break()
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
# No need for the temporary file
|
||||||
|
file(REMOVE "${CMAKE_CURRENT_BINARY_DIR}/nroff-input.txt")
|
||||||
|
if(NOT NROFF_USEFUL)
|
||||||
|
message(WARNING "Found no *nroff option to get plaintext from man pages")
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
message(WARNING "Found no *nroff program")
|
||||||
|
endif()
|
||||||
|
endmacro()
|
||||||
|
|
||||||
|
macro(optional_dependency DEPENDENCY)
|
||||||
|
set(CURL_${DEPENDENCY} AUTO CACHE STRING "Build curl with ${DEPENDENCY} support (AUTO, ON or OFF)")
|
||||||
|
set_property(CACHE CURL_${DEPENDENCY} PROPERTY STRINGS AUTO ON OFF)
|
||||||
|
|
||||||
|
if(CURL_${DEPENDENCY} STREQUAL AUTO)
|
||||||
|
find_package(${DEPENDENCY})
|
||||||
|
elseif(CURL_${DEPENDENCY})
|
||||||
|
find_package(${DEPENDENCY} REQUIRED)
|
||||||
|
endif()
|
||||||
|
endmacro()
|
||||||
|
|
@ -0,0 +1,135 @@
|
||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
#
|
||||||
|
# This software is licensed as described in the file COPYING, which
|
||||||
|
# you should have received as part of this distribution. The terms
|
||||||
|
# are also available at https://curl.se/docs/copyright.html.
|
||||||
|
#
|
||||||
|
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
# copies of the Software, and permit persons to whom the Software is
|
||||||
|
# furnished to do so, under the terms of the COPYING file.
|
||||||
|
#
|
||||||
|
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
# KIND, either express or implied.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: curl
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
include(CheckCSourceCompiles)
|
||||||
|
# The begin of the sources (macros and includes)
|
||||||
|
set(_source_epilogue "#undef inline")
|
||||||
|
|
||||||
|
macro(add_header_include check header)
|
||||||
|
if(${check})
|
||||||
|
set(_source_epilogue "${_source_epilogue}\n#include <${header}>")
|
||||||
|
endif()
|
||||||
|
endmacro()
|
||||||
|
|
||||||
|
set(signature_call_conv)
|
||||||
|
if(HAVE_WINDOWS_H)
|
||||||
|
add_header_include(HAVE_WINSOCK2_H "winsock2.h")
|
||||||
|
add_header_include(HAVE_WINDOWS_H "windows.h")
|
||||||
|
set(_source_epilogue
|
||||||
|
"${_source_epilogue}\n#ifndef WIN32_LEAN_AND_MEAN\n#define WIN32_LEAN_AND_MEAN\n#endif")
|
||||||
|
set(signature_call_conv "PASCAL")
|
||||||
|
if(WIN32)
|
||||||
|
set(CMAKE_REQUIRED_LIBRARIES ws2_32)
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
add_header_include(HAVE_SYS_TYPES_H "sys/types.h")
|
||||||
|
add_header_include(HAVE_SYS_SOCKET_H "sys/socket.h")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
|
||||||
|
|
||||||
|
check_c_source_compiles("${_source_epilogue}
|
||||||
|
int main(void) {
|
||||||
|
int flag = MSG_NOSIGNAL;
|
||||||
|
(void)flag;
|
||||||
|
return 0;
|
||||||
|
}" HAVE_MSG_NOSIGNAL)
|
||||||
|
|
||||||
|
if(NOT HAVE_WINDOWS_H)
|
||||||
|
add_header_include(HAVE_SYS_TIME_H "sys/time.h")
|
||||||
|
add_header_include(TIME_WITH_SYS_TIME "time.h")
|
||||||
|
add_header_include(HAVE_TIME_H "time.h")
|
||||||
|
endif()
|
||||||
|
check_c_source_compiles("${_source_epilogue}
|
||||||
|
int main(void) {
|
||||||
|
struct timeval ts;
|
||||||
|
ts.tv_sec = 0;
|
||||||
|
ts.tv_usec = 0;
|
||||||
|
(void)ts;
|
||||||
|
return 0;
|
||||||
|
}" HAVE_STRUCT_TIMEVAL)
|
||||||
|
|
||||||
|
if(HAVE_WINDOWS_H)
|
||||||
|
set(CMAKE_EXTRA_INCLUDE_FILES winsock2.h)
|
||||||
|
else()
|
||||||
|
set(CMAKE_EXTRA_INCLUDE_FILES)
|
||||||
|
if(HAVE_SYS_SOCKET_H)
|
||||||
|
set(CMAKE_EXTRA_INCLUDE_FILES sys/socket.h)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
check_type_size("struct sockaddr_storage" SIZEOF_STRUCT_SOCKADDR_STORAGE)
|
||||||
|
if(HAVE_SIZEOF_STRUCT_SOCKADDR_STORAGE)
|
||||||
|
set(HAVE_STRUCT_SOCKADDR_STORAGE 1)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
unset(CMAKE_TRY_COMPILE_TARGET_TYPE)
|
||||||
|
|
||||||
|
if(NOT CMAKE_CROSSCOMPILING)
|
||||||
|
if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "iOS")
|
||||||
|
# only try this on non-apple platforms
|
||||||
|
|
||||||
|
# if not cross-compilation...
|
||||||
|
include(CheckCSourceRuns)
|
||||||
|
set(CMAKE_REQUIRED_FLAGS "")
|
||||||
|
if(HAVE_SYS_POLL_H)
|
||||||
|
set(CMAKE_REQUIRED_FLAGS "-DHAVE_SYS_POLL_H")
|
||||||
|
elseif(HAVE_POLL_H)
|
||||||
|
set(CMAKE_REQUIRED_FLAGS "-DHAVE_POLL_H")
|
||||||
|
endif()
|
||||||
|
check_c_source_runs("
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <sys/time.h>
|
||||||
|
|
||||||
|
#ifdef HAVE_SYS_POLL_H
|
||||||
|
# include <sys/poll.h>
|
||||||
|
#elif HAVE_POLL_H
|
||||||
|
# include <poll.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
if(0 != poll(0, 0, 10)) {
|
||||||
|
return 1; /* fail */
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
/* detect the 10.12 poll() breakage */
|
||||||
|
struct timeval before, after;
|
||||||
|
int rc;
|
||||||
|
size_t us;
|
||||||
|
|
||||||
|
gettimeofday(&before, NULL);
|
||||||
|
rc = poll(NULL, 0, 500);
|
||||||
|
gettimeofday(&after, NULL);
|
||||||
|
|
||||||
|
us = (after.tv_sec - before.tv_sec) * 1000000 +
|
||||||
|
(after.tv_usec - before.tv_usec);
|
||||||
|
|
||||||
|
if(us < 400000) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}" HAVE_POLL_FINE)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
@ -0,0 +1,197 @@
|
||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
#
|
||||||
|
# This software is licensed as described in the file COPYING, which
|
||||||
|
# you should have received as part of this distribution. The terms
|
||||||
|
# are also available at https://curl.se/docs/copyright.html.
|
||||||
|
#
|
||||||
|
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
# copies of the Software, and permit persons to whom the Software is
|
||||||
|
# furnished to do so, under the terms of the COPYING file.
|
||||||
|
#
|
||||||
|
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
# KIND, either express or implied.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: curl
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
include(CheckCCompilerFlag)
|
||||||
|
|
||||||
|
if(PICKY_COMPILER)
|
||||||
|
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang")
|
||||||
|
|
||||||
|
# https://clang.llvm.org/docs/DiagnosticsReference.html
|
||||||
|
# https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
|
||||||
|
|
||||||
|
# WPICKY_ENABLE = Options we want to enable as-is.
|
||||||
|
# WPICKY_DETECT = Options we want to test first and enable if available.
|
||||||
|
|
||||||
|
# Prefer the -Wextra alias with clang.
|
||||||
|
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
|
||||||
|
set(WPICKY_ENABLE "-Wextra")
|
||||||
|
else()
|
||||||
|
set(WPICKY_ENABLE "-W")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
list(APPEND WPICKY_ENABLE
|
||||||
|
-Wall -pedantic
|
||||||
|
)
|
||||||
|
|
||||||
|
# ----------------------------------
|
||||||
|
# Add new options here, if in doubt:
|
||||||
|
# ----------------------------------
|
||||||
|
set(WPICKY_DETECT
|
||||||
|
)
|
||||||
|
|
||||||
|
# Assume these options always exist with both clang and gcc.
|
||||||
|
# Require clang 3.0 / gcc 2.95 or later.
|
||||||
|
list(APPEND WPICKY_ENABLE
|
||||||
|
-Wbad-function-cast # clang 3.0 gcc 2.95
|
||||||
|
-Wconversion # clang 3.0 gcc 2.95
|
||||||
|
-Winline # clang 1.0 gcc 1.0
|
||||||
|
-Wmissing-declarations # clang 1.0 gcc 2.7
|
||||||
|
-Wmissing-prototypes # clang 1.0 gcc 1.0
|
||||||
|
-Wnested-externs # clang 1.0 gcc 2.7
|
||||||
|
-Wno-long-long # clang 1.0 gcc 2.95
|
||||||
|
-Wno-multichar # clang 1.0 gcc 2.95
|
||||||
|
-Wpointer-arith # clang 1.0 gcc 1.4
|
||||||
|
-Wshadow # clang 1.0 gcc 2.95
|
||||||
|
-Wsign-compare # clang 1.0 gcc 2.95
|
||||||
|
-Wundef # clang 1.0 gcc 2.95
|
||||||
|
-Wunused # clang 1.1 gcc 2.95
|
||||||
|
-Wwrite-strings # clang 1.0 gcc 1.4
|
||||||
|
)
|
||||||
|
|
||||||
|
# Always enable with clang, version dependent with gcc
|
||||||
|
set(WPICKY_COMMON_OLD
|
||||||
|
-Wcast-align # clang 1.0 gcc 4.2
|
||||||
|
-Wdeclaration-after-statement # clang 1.0 gcc 3.4
|
||||||
|
-Wempty-body # clang 3.0 gcc 4.3
|
||||||
|
-Wendif-labels # clang 1.0 gcc 3.3
|
||||||
|
-Wfloat-equal # clang 1.0 gcc 2.96 (3.0)
|
||||||
|
-Wignored-qualifiers # clang 3.0 gcc 4.3
|
||||||
|
-Wno-format-nonliteral # clang 1.0 gcc 2.96 (3.0)
|
||||||
|
-Wno-sign-conversion # clang 3.0 gcc 4.3
|
||||||
|
-Wno-system-headers # clang 1.0 gcc 3.0
|
||||||
|
-Wstrict-prototypes # clang 1.0 gcc 3.3
|
||||||
|
-Wtype-limits # clang 3.0 gcc 4.3
|
||||||
|
-Wvla # clang 2.8 gcc 4.3
|
||||||
|
)
|
||||||
|
|
||||||
|
set(WPICKY_COMMON
|
||||||
|
-Wdouble-promotion # clang 3.6 gcc 4.6 appleclang 6.3
|
||||||
|
-Wenum-conversion # clang 3.2 gcc 10.0 appleclang 4.6 g++ 11.0
|
||||||
|
-Wunused-const-variable # clang 3.4 gcc 6.0 appleclang 5.1
|
||||||
|
)
|
||||||
|
|
||||||
|
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
|
||||||
|
list(APPEND WPICKY_ENABLE
|
||||||
|
${WPICKY_COMMON_OLD}
|
||||||
|
-Wshift-sign-overflow # clang 2.9
|
||||||
|
-Wshorten-64-to-32 # clang 1.0
|
||||||
|
)
|
||||||
|
# Enable based on compiler version
|
||||||
|
if((CMAKE_C_COMPILER_ID STREQUAL "Clang" AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 3.6) OR
|
||||||
|
(CMAKE_C_COMPILER_ID STREQUAL "AppleClang" AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 6.3))
|
||||||
|
list(APPEND WPICKY_ENABLE
|
||||||
|
${WPICKY_COMMON}
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
if((CMAKE_C_COMPILER_ID STREQUAL "Clang" AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 3.9) OR
|
||||||
|
(CMAKE_C_COMPILER_ID STREQUAL "AppleClang" AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 8.3))
|
||||||
|
list(APPEND WPICKY_ENABLE
|
||||||
|
-Wcomma # clang 3.9 appleclang 8.3
|
||||||
|
-Wmissing-variable-declarations # clang 3.2 appleclang 4.6
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
if((CMAKE_C_COMPILER_ID STREQUAL "Clang" AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 7.0) OR
|
||||||
|
(CMAKE_C_COMPILER_ID STREQUAL "AppleClang" AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 10.3))
|
||||||
|
list(APPEND WPICKY_ENABLE
|
||||||
|
-Wassign-enum # clang 7.0 appleclang 10.3
|
||||||
|
-Wextra-semi-stmt # clang 7.0 appleclang 10.3
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
else() # gcc
|
||||||
|
list(APPEND WPICKY_DETECT
|
||||||
|
${WPICKY_COMMON}
|
||||||
|
)
|
||||||
|
# Enable based on compiler version
|
||||||
|
if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.3)
|
||||||
|
list(APPEND WPICKY_ENABLE
|
||||||
|
${WPICKY_COMMON_OLD}
|
||||||
|
-Wmissing-parameter-type # gcc 4.3
|
||||||
|
-Wold-style-declaration # gcc 4.3
|
||||||
|
-Wstrict-aliasing=3 # gcc 4.0
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.5 AND MINGW)
|
||||||
|
list(APPEND WPICKY_ENABLE
|
||||||
|
-Wno-pedantic-ms-format # gcc 4.5 (mingw-only)
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.8)
|
||||||
|
list(APPEND WPICKY_ENABLE
|
||||||
|
-Wformat=2 # clang 3.0 gcc 4.8 (clang part-default, enabling it fully causes -Wformat-nonliteral warnings)
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 5.0)
|
||||||
|
list(APPEND WPICKY_ENABLE
|
||||||
|
-Warray-bounds=2 -ftree-vrp # clang 3.0 gcc 5.0 (clang default: -Warray-bounds)
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 6.0)
|
||||||
|
list(APPEND WPICKY_ENABLE
|
||||||
|
-Wduplicated-cond # gcc 6.0
|
||||||
|
-Wnull-dereference # clang 3.0 gcc 6.0 (clang default)
|
||||||
|
-fdelete-null-pointer-checks
|
||||||
|
-Wshift-negative-value # clang 3.7 gcc 6.0 (clang default)
|
||||||
|
-Wshift-overflow=2 # clang 3.0 gcc 6.0 (clang default: -Wshift-overflow)
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 7.0)
|
||||||
|
list(APPEND WPICKY_ENABLE
|
||||||
|
-Walloc-zero # gcc 7.0
|
||||||
|
-Wduplicated-branches # gcc 7.0
|
||||||
|
-Wformat-overflow=2 # gcc 7.0
|
||||||
|
-Wformat-truncation=1 # gcc 7.0
|
||||||
|
-Wrestrict # gcc 7.0
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 10.0)
|
||||||
|
list(APPEND WPICKY_ENABLE
|
||||||
|
-Warith-conversion # gcc 10.0
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
#
|
||||||
|
|
||||||
|
unset(WPICKY)
|
||||||
|
|
||||||
|
foreach(_CCOPT ${WPICKY_ENABLE})
|
||||||
|
set(WPICKY "${WPICKY} ${_CCOPT}")
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
foreach(_CCOPT ${WPICKY_DETECT})
|
||||||
|
# surprisingly, CHECK_C_COMPILER_FLAG needs a new variable to store each new
|
||||||
|
# test result in.
|
||||||
|
string(MAKE_C_IDENTIFIER "OPT${_CCOPT}" _optvarname)
|
||||||
|
# GCC only warns about unknown -Wno- options if there are also other diagnostic messages,
|
||||||
|
# so test for the positive form instead
|
||||||
|
string(REPLACE "-Wno-" "-W" _CCOPT_ON "${_CCOPT}")
|
||||||
|
check_c_compiler_flag(${_CCOPT_ON} ${_optvarname})
|
||||||
|
if(${_optvarname})
|
||||||
|
set(WPICKY "${WPICKY} ${_CCOPT}")
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
message(STATUS "Picky compiler options:${WPICKY}")
|
||||||
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${WPICKY}")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
@ -0,0 +1,127 @@
|
||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
#
|
||||||
|
# This software is licensed as described in the file COPYING, which
|
||||||
|
# you should have received as part of this distribution. The terms
|
||||||
|
# are also available at https://curl.se/docs/copyright.html.
|
||||||
|
#
|
||||||
|
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
# copies of the Software, and permit persons to whom the Software is
|
||||||
|
# furnished to do so, under the terms of the COPYING file.
|
||||||
|
#
|
||||||
|
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
# KIND, either express or implied.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: curl
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
if(NOT UNIX)
|
||||||
|
if(WIN32)
|
||||||
|
|
||||||
|
set(HAVE_WINDOWS_H 1)
|
||||||
|
set(HAVE_WS2TCPIP_H 1)
|
||||||
|
set(HAVE_WINSOCK2_H 1)
|
||||||
|
|
||||||
|
if(MINGW)
|
||||||
|
set(HAVE_SNPRINTF 1)
|
||||||
|
set(HAVE_UNISTD_H 1)
|
||||||
|
set(HAVE_INTTYPES_H 1)
|
||||||
|
set(HAVE_STRTOLL 1)
|
||||||
|
elseif(MSVC)
|
||||||
|
if(NOT MSVC_VERSION LESS 1800)
|
||||||
|
set(HAVE_INTTYPES_H 1)
|
||||||
|
set(HAVE_STRTOLL 1)
|
||||||
|
else()
|
||||||
|
set(HAVE_INTTYPES_H 0)
|
||||||
|
set(HAVE_STRTOLL 0)
|
||||||
|
endif()
|
||||||
|
if(NOT MSVC_VERSION LESS 1900)
|
||||||
|
set(HAVE_SNPRINTF 1)
|
||||||
|
else()
|
||||||
|
set(HAVE_SNPRINTF 0)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(HAVE_LIBSOCKET 0)
|
||||||
|
set(HAVE_GETHOSTNAME 1)
|
||||||
|
set(HAVE_LIBZ 0)
|
||||||
|
|
||||||
|
set(HAVE_ARPA_INET_H 0)
|
||||||
|
set(HAVE_ARPA_TFTP_H 0)
|
||||||
|
set(HAVE_FCNTL_H 1)
|
||||||
|
set(HAVE_IFADDRS_H 0)
|
||||||
|
set(HAVE_IO_H 1)
|
||||||
|
set(HAVE_NETDB_H 0)
|
||||||
|
set(HAVE_NETINET_IN_H 0)
|
||||||
|
set(HAVE_NETINET_TCP_H 0)
|
||||||
|
set(HAVE_NET_IF_H 0)
|
||||||
|
set(HAVE_IOCTL_SIOCGIFADDR 0)
|
||||||
|
set(HAVE_POLL_H 0)
|
||||||
|
set(HAVE_PWD_H 0)
|
||||||
|
set(HAVE_SETJMP_H 1)
|
||||||
|
set(HAVE_SIGNAL_H 1)
|
||||||
|
set(HAVE_STDLIB_H 1)
|
||||||
|
set(HAVE_STRINGS_H 0)
|
||||||
|
set(HAVE_STRING_H 1)
|
||||||
|
set(HAVE_SYS_FILIO_H 0)
|
||||||
|
set(HAVE_SYS_IOCTL_H 0)
|
||||||
|
set(HAVE_SYS_PARAM_H 0)
|
||||||
|
set(HAVE_SYS_POLL_H 0)
|
||||||
|
set(HAVE_SYS_RESOURCE_H 0)
|
||||||
|
set(HAVE_SYS_SELECT_H 0)
|
||||||
|
set(HAVE_SYS_SOCKET_H 0)
|
||||||
|
set(HAVE_SYS_SOCKIO_H 0)
|
||||||
|
set(HAVE_SYS_STAT_H 1)
|
||||||
|
set(HAVE_SYS_TIME_H 0)
|
||||||
|
set(HAVE_SYS_TYPES_H 1)
|
||||||
|
set(HAVE_SYS_UN_H 0)
|
||||||
|
set(HAVE_SYS_UTIME_H 1)
|
||||||
|
set(HAVE_TERMIOS_H 0)
|
||||||
|
set(HAVE_TERMIO_H 0)
|
||||||
|
set(HAVE_TIME_H 1)
|
||||||
|
set(HAVE_UTIME_H 0)
|
||||||
|
|
||||||
|
set(HAVE_SOCKET 1)
|
||||||
|
set(HAVE_SELECT 1)
|
||||||
|
set(HAVE_STRDUP 1)
|
||||||
|
set(HAVE_STRICMP 1)
|
||||||
|
set(HAVE_STRCMPI 1)
|
||||||
|
set(HAVE_GETTIMEOFDAY 0)
|
||||||
|
set(HAVE_CLOSESOCKET 1)
|
||||||
|
set(HAVE_SIGSETJMP 0)
|
||||||
|
set(HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1)
|
||||||
|
set(HAVE_GETPASS_R 0)
|
||||||
|
set(HAVE_GETPWUID 0)
|
||||||
|
set(HAVE_GETEUID 0)
|
||||||
|
set(HAVE_UTIME 1)
|
||||||
|
set(HAVE_GMTIME_R 0)
|
||||||
|
set(HAVE_GETHOSTBYNAME_R 0)
|
||||||
|
set(HAVE_SIGNAL 1)
|
||||||
|
set(HAVE_LINUX_TCP_H 0)
|
||||||
|
set(HAVE_GLIBC_STRERROR_R 0)
|
||||||
|
set(HAVE_MACH_ABSOLUTE_TIME 0)
|
||||||
|
|
||||||
|
set(HAVE_GETHOSTBYNAME_R_3 0)
|
||||||
|
set(HAVE_GETHOSTBYNAME_R_3_REENTRANT 0)
|
||||||
|
set(HAVE_GETHOSTBYNAME_R_5 0)
|
||||||
|
set(HAVE_GETHOSTBYNAME_R_5_REENTRANT 0)
|
||||||
|
set(HAVE_GETHOSTBYNAME_R_6 0)
|
||||||
|
set(HAVE_GETHOSTBYNAME_R_6_REENTRANT 0)
|
||||||
|
|
||||||
|
set(TIME_WITH_SYS_TIME 0)
|
||||||
|
set(HAVE_O_NONBLOCK 0)
|
||||||
|
set(HAVE_IN_ADDR_T 0)
|
||||||
|
set(STDC_HEADERS 1)
|
||||||
|
|
||||||
|
set(HAVE_SIGACTION 0)
|
||||||
|
set(HAVE_MACRO_SIGSETJMP 0)
|
||||||
|
else()
|
||||||
|
message("This file should be included on Windows platform only")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
@ -0,0 +1,35 @@
|
||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
#
|
||||||
|
# This software is licensed as described in the file COPYING, which
|
||||||
|
# you should have received as part of this distribution. The terms
|
||||||
|
# are also available at https://curl.se/docs/copyright.html.
|
||||||
|
#
|
||||||
|
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
# copies of the Software, and permit persons to whom the Software is
|
||||||
|
# furnished to do so, under the terms of the COPYING file.
|
||||||
|
#
|
||||||
|
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
# KIND, either express or implied.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: curl
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
# File containing various utilities
|
||||||
|
|
||||||
|
# Returns a list of arguments that evaluate to true
|
||||||
|
function(count_true output_count_var)
|
||||||
|
set(lst_len 0)
|
||||||
|
foreach(option_var IN LISTS ARGN)
|
||||||
|
if(${option_var})
|
||||||
|
math(EXPR lst_len "${lst_len} + 1")
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
set(${output_count_var} ${lst_len} PARENT_SCOPE)
|
||||||
|
endfunction()
|
||||||
|
|
@ -0,0 +1,49 @@
|
||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
#
|
||||||
|
# This software is licensed as described in the file COPYING, which
|
||||||
|
# you should have received as part of this distribution. The terms
|
||||||
|
# are also available at https://curl.se/docs/copyright.html.
|
||||||
|
#
|
||||||
|
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
# copies of the Software, and permit persons to whom the Software is
|
||||||
|
# furnished to do so, under the terms of the COPYING file.
|
||||||
|
#
|
||||||
|
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
# KIND, either express or implied.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: curl
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
if(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
|
||||||
|
message(FATAL_ERROR "Cannot find install manifest: @CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(NOT DEFINED CMAKE_INSTALL_PREFIX)
|
||||||
|
set(CMAKE_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@")
|
||||||
|
endif()
|
||||||
|
message(${CMAKE_INSTALL_PREFIX})
|
||||||
|
|
||||||
|
file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)
|
||||||
|
string(REGEX REPLACE "\n" ";" files "${files}")
|
||||||
|
foreach(file ${files})
|
||||||
|
message(STATUS "Uninstalling $ENV{DESTDIR}${file}")
|
||||||
|
if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
|
||||||
|
exec_program(
|
||||||
|
"@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\""
|
||||||
|
OUTPUT_VARIABLE rm_out
|
||||||
|
RETURN_VALUE rm_retval
|
||||||
|
)
|
||||||
|
if(NOT "${rm_retval}" STREQUAL 0)
|
||||||
|
message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}")
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
message(STATUS "File $ENV{DESTDIR}${file} does not exist.")
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
|
@ -0,0 +1,38 @@
|
||||||
|
#***************************************************************************
|
||||||
|
# _ _ ____ _
|
||||||
|
# Project ___| | | | _ \| |
|
||||||
|
# / __| | | | |_) | |
|
||||||
|
# | (__| |_| | _ <| |___
|
||||||
|
# \___|\___/|_| \_\_____|
|
||||||
|
#
|
||||||
|
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
|
#
|
||||||
|
# This software is licensed as described in the file COPYING, which
|
||||||
|
# you should have received as part of this distribution. The terms
|
||||||
|
# are also available at https://curl.se/docs/copyright.html.
|
||||||
|
#
|
||||||
|
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||||
|
# copies of the Software, and permit persons to whom the Software is
|
||||||
|
# furnished to do so, under the terms of the COPYING file.
|
||||||
|
#
|
||||||
|
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
# KIND, either express or implied.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: curl
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
@PACKAGE_INIT@
|
||||||
|
|
||||||
|
include(CMakeFindDependencyMacro)
|
||||||
|
if(@USE_OPENSSL@)
|
||||||
|
find_dependency(OpenSSL @OPENSSL_VERSION_MAJOR@)
|
||||||
|
endif()
|
||||||
|
if(@USE_ZLIB@)
|
||||||
|
find_dependency(ZLIB @ZLIB_VERSION_MAJOR@)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
include("${CMAKE_CURRENT_LIST_DIR}/@TARGETS_EXPORT_NAME@.cmake")
|
||||||
|
check_required_components("@PROJECT_NAME@")
|
||||||
|
|
||||||
|
# Alias for either shared or static library
|
||||||
|
add_library(@PROJECT_NAME@::libcurl ALIAS @PROJECT_NAME@::@LIB_SELECTED@)
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,22 @@
|
||||||
|
COPYRIGHT AND PERMISSION NOTICE
|
||||||
|
|
||||||
|
Copyright (c) 1996 - 2023, Daniel Stenberg, <daniel@haxx.se>, and many
|
||||||
|
contributors, see the THANKS file.
|
||||||
|
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Permission to use, copy, modify, and distribute this software for any purpose
|
||||||
|
with or without fee is hereby granted, provided that the above copyright
|
||||||
|
notice and this permission notice appear in all copies.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN
|
||||||
|
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||||
|
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||||
|
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
|
||||||
|
OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
Except as contained in this notice, the name of a copyright holder shall not
|
||||||
|
be used in advertising or otherwise to promote the sale, use or other dealings
|
||||||
|
in this Software without prior written authorization of the copyright holder.
|
||||||
|
|
@ -0,0 +1,44 @@
|
||||||
|
_ _ ____ _
|
||||||
|
___| | | | _ \| |
|
||||||
|
/ __| | | | |_) | |
|
||||||
|
| (__| |_| | _ <| |___
|
||||||
|
\___|\___/|_| \_\_____|
|
||||||
|
|
||||||
|
GIT-INFO
|
||||||
|
|
||||||
|
This file is only present in git - never in release archives. It contains
|
||||||
|
information about other files and things that the git repository keeps in its
|
||||||
|
inner sanctum.
|
||||||
|
|
||||||
|
To build in environments that support configure, after having extracted
|
||||||
|
everything from git, do this:
|
||||||
|
|
||||||
|
autoreconf -fi
|
||||||
|
./configure --with-openssl
|
||||||
|
make
|
||||||
|
|
||||||
|
Daniel uses a ./configure line similar to this for easier development:
|
||||||
|
|
||||||
|
./configure --disable-shared --enable-debug --enable-maintainer-mode
|
||||||
|
|
||||||
|
In environments that don't support configure (i.e. Microsoft), do this:
|
||||||
|
|
||||||
|
buildconf.bat
|
||||||
|
|
||||||
|
|
||||||
|
REQUIREMENTS
|
||||||
|
|
||||||
|
For autoreconf and configure (not buildconf.bat) to work, you need the
|
||||||
|
following software installed:
|
||||||
|
|
||||||
|
o autoconf 2.57 (or later)
|
||||||
|
o automake 1.7 (or later)
|
||||||
|
o libtool 1.4.2 (or later)
|
||||||
|
o GNU m4 (required by autoconf)
|
||||||
|
|
||||||
|
o nroff + perl
|
||||||
|
|
||||||
|
If you don't have nroff and perl and you for some reason don't want to
|
||||||
|
install them, you can rename the source file src/tool_hugehelp.c.cvs to
|
||||||
|
src/tool_hugehelp.c and avoid having to generate this file. This will
|
||||||
|
give you a stubbed version of the file that doesn't contain actual content.
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
Copyright (c) <year> <owner>.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
BSD-4-Clause (University of California-Specific)
|
||||||
|
|
||||||
|
Copyright [various years] The Regents of the University of California. All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
3. All advertising materials mentioning features or use of this software must display the following acknowledgement: This product includes software developed by the University of California, Berkeley and its contributors.
|
||||||
|
|
||||||
|
4. Neither the name of the University nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue