-
Notifications
You must be signed in to change notification settings - Fork 6.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[tinyfiledialogs] 3.6.3 -> 3.8.8 #17343
Conversation
@SamuelMarks , thaks for your contribution |
@JonLiu1993 No worries. On a related note I tried to make this header-only, by removing the vcpkg_fail_port_install(ON_TARGET "uwp")
set(TINYFILEDIALOGS_VERSION "3.8.7")
set(SOURCE_PATH "${CURRENT_BUILDTREES_DIR}/src/tinyfiledialogs-${TINYFILEDIALOGS_VERSION}")
vcpkg_from_git(
OUT_SOURCE_PATH "${SOURCE_PATH}"
URL "https://git.code.sf.net/p/tinyfiledialogs/code"
REF "ab6f4f916aaa95d05247ffa66a30867e7f55e875"
)
# tinyfiledialogs.amalgamation.h
file(READ "${${SOURCE_PATH}}/tinyfiledialogs.c" _c)
file(READ "${${SOURCE_PATH}}/tinyfiledialogs.h" _h)
string(FIND "${_c}" "char tinyfd_version" _c_source_idx)
string(SUBSTRING "${_c}" 0 "${_c_source_idx}" _c_source_head)
string(SUBSTRING "${_c}" "${_c_source_idx}" -1 _c_source)
file(WRITE "${SOURCE_PATH}/tinyfiledialogs.h" "${_h}" "${_c_source_head}" "${_c_source}")
file(INSTALL "${SOURCE_PATH}/tinyfiledialogs.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include")
file(READ "${CURRENT_PACKAGES_DIR}/include/tinyfiledialogs.h" _contents)
string(SUBSTRING "${_contents}" 0 1024 _contents)
file(WRITE "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" "${_contents}")
vcpkg_copy_pdbs() But currently getting a bunch too many |
@SamuelMarks What problem did you encounter? |
So the code in this PR works. It just requires a library linkage. I'm trying to get it working without that extra step by combining the .c and .h file into one, but that gives me these errors:
Is there a trick to this? - Like maybe walking the symbols ensuring the prototypes appear at the top and the implementations at the bottom, and no duplication? |
@JackBoosY As it stands however, this can definitely be merged into master. |
I want to know why you need to do this, can you explain more? |
There's no real reason for it. I just think that seeing as there are no external dependencies it would be nice if this library were header-only. That way it's simpler to manage its dependency. Also |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR!
Co-authored-by: Robert Schumacher <[email protected]>
Co-authored-by: Robert Schumacher <[email protected]>
Co-authored-by: Robert Schumacher <[email protected]>
Co-authored-by: Robert Schumacher <[email protected]>
Co-authored-by: Robert Schumacher <[email protected]>
Please merge with master before requesting a build again to get the current MacOS build fleet |
Co-authored-by: Jack·Boos·Yu <[email protected]>
@SamuelMarks I can't push to your branch, so would you mind making the changes I suggested? I know they're unrelated to your PR but might as well while you're making changes :) |
Co-authored-by: nicole mazzuca <[email protected]>
Co-authored-by: nicole mazzuca <[email protected]>
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
For |
Good idea, @SamuelMarks, can you try it? |
@JonLiu1993 Hmm, I'm not sure if that will work. How do I pin it to a certain version? There's no version number on the zip archive, and I can't see a way—correct me if you find one—for specifying |
Co-authored-by: Jack·Boos·Yu <[email protected]>
Describe the pull request
https://sourceforge.net/p/tinyfiledialogs/code/ci/ab6f4f916aaa95d05247ffa66a30867e7f55e875/tree/
He didn't release a new zip so gotta change from
vcpkg_from_sourceforge
[which lists this package as an example] withvcpkg_download_distfile
… not sure if there's a better way. Maybe it needs to be actually cloned rather than a snapshot downloaded? - Or maybe it needs to follow redirects? (likecurl
's-L
flag).EDIT: Switched to
vcpkg_from_git
; which seems to make the whole thing work.What does your PR fix?
Upgrades the version
Which triplets are supported/not supported? Have you updated the CI baseline?
<all / linux, windows, ...>, <Yes/No>
Does your PR follow the maintainer guide?
Your answer
If you have added/updated a port: Have you run
./vcpkg x-add-version --all
and committed the result?Yes
If you are still working on the PR, open it as a Draft: https://github.blog/2019-02-14-introducing-draft-pull-requests/
WiP, test with:
CMakeLists.txt
EDIT: I was able to get it to work like so, but the help text doesn't tell the user to do this: