libimobiledevice / libirecovery

Library and utility to talk to iBoot/iBSS via USB on Mac OS X, Windows, and Linux
https://libimobiledevice.org
GNU Lesser General Public License v2.1
550 stars 207 forks source link

Allow building "--without-tools" and fix "--with-dummy" #120

Closed DanTheMann15 closed 10 months ago

DanTheMann15 commented 11 months ago

When building tsschecker and some other libs, it isn't necessary to build the libirecovery tools, which requires readline. so giving the option to skip building tools will help make it easier to compile tsschecker (and related tools).

this PR also fixes --with-dummy because for some reason it wasn't working correctly. see this patch for more info: https://gist.github.com/1Conan/2d015aad17f87f171b32ebfd9f48fb96

nikias commented 10 months ago

Merged the without tools part with f2a166b01445fe412b5bff1b71256aebd62d1fcb. The dummy part doesn't really make sense to me, could you elaborate?

DanTheMann15 commented 10 months ago

it relocates the #ifndef USE_DUMMY conditional to be above this bit of code

IRECV_API void irecv_init(void)
 {
    thread_once(&init_once, _irecv_init);
@@ -958,7 +959,6 @@ IRECV_API void irecv_exit(void)
    thread_once(&deinit_once, _irecv_deinit);
 }

@1Conan probably did this because there was an issue with compilation when using --with-dummy to build tsschecker and other tools, but the patch is now about 3 years old and i didn't encounter issues compiling tsschecker with the newest commit using the parameters --with-dummy --without-tools --without-udev

i believe we can just close this pull request, but revisit it if this little change does indeed do something helpful or if 1Conan can tell us why he essentially disabled these few lines of code when you pass --with-dummy.