GithubHelp home page GithubHelp logo

Comments (56)

allen-zeng avatar allen-zeng commented on June 3, 2024 51

Confirmed - updated Assets.car and all is right again!
Here is Assets.car.zip if you don't want to go through the trouble yourself.

Thanks @cjheng for the investigations!

from better-xcode-ibeam-cursor.

cjheng avatar cjheng commented on June 3, 2024 32

Now that Xcode 7.3 has been released I took another look through the DVTKit.framework resources and noticed Assets.car (full path: /Applications/Xcode.app/Contents/SharedFrameworks/DVTKit.framework/Versions/A/Resources/Assets.car) which contains, among many other assets, DVTIbeamCursor.png and [email protected].

Unfortunately I don't have experience working with .car files but I eventually found https://github.com/alexzielenski/ThemeEngine. The application seems to be designed to work with Photoshop, but based on alexzielenski/ThemeEngine#23 (comment) I managed to replace [email protected] via drag and drop. After backing up the original Assets.car and replacing it with a modified version Xcode 7.3 appears to use the replaced cursor png.

from better-xcode-ibeam-cursor.

sokobania avatar sokobania commented on June 3, 2024 4

I also confirm @cjheng's solution worked for me.

I just had to fix a compile error which I can't remember precisely: NonNull something...
I just double clicked the Xcode suggestion to fix it.
I also had to go to ThemeKit.framework > Targets > ThemeEngine > General > Embedded binaries and remove the ../../[etc.]/DerivedData

Then menu Product > Run

Once inside ThemeEngine:
menu File > open /Applications/Xcode.app/Contents/SharedFrameworks/DVTKit.framework/Versions/A/Resources/Assets.car
Find DVTIbeamCursor.
Click on the icon to the right.
Drag from the finder your DVTIbeamCursor.tiff to the icon on the right.
Menu File > Save
Restart Xcode. :-)
Thank you very much!

from better-xcode-ibeam-cursor.

ebaker355 avatar ebaker355 commented on June 3, 2024 3

I have added a PR to update the install.sh script, using the Assets.car file that was added in this thread (thanks @allen-zeng!)

from better-xcode-ibeam-cursor.

ntpeters avatar ntpeters commented on June 3, 2024 3

@fbara this hasn't been merged yet, you need to grab it from @ebaker355's fork:

curl -L https://raw.githubusercontent.com/ebaker355/better-xcode-ibeam-cursor/master/install.sh

Once you have install.sh downloaded, you also need to open it up and update the GITHUB_URL to also point to @ebaker355's fork:

GITHUB_URL="https://raw.githubusercontent.com/ebaker355/better-xcode-ibeam-cursor/master"

After this it should work!

from better-xcode-ibeam-cursor.

danipralea avatar danipralea commented on June 3, 2024 1

I can confirm @cjheng's solution is a working one. Thank you!

from better-xcode-ibeam-cursor.

ebaker355 avatar ebaker355 commented on June 3, 2024 1

@oliverfoggin Sure. The easiest way to test the script:

curl -O https://raw.githubusercontent.com/ebaker355/better-xcode-ibeam-cursor/master/install.sh
chmod a+x install.sh

Edit the GITHUB_URL constant path (line 4), change "egold" to "ebaker355" (this is only needed until the PR is merged; it allows the script to find the patch files in my fork).

Then, simply:

./install.sh

The output should be similar to:

Updating I-beam cursor for Xcode at path /Applications/Xcode.app/Contents/SharedFrameworks/DVTKit.framework/Resources
Downloading cursor patch file to /tmp/Assets.car-Xcode-7.3.bspatch
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1431  100  1431    0     0   1553      0 --:--:-- --:--:-- --:--:--  1552
Downloaded successfully.
Creating backup of Assets.car -> backup-Assets.car
Xcode has been patched successfully. Please restart Xcode and have fun!

from better-xcode-ibeam-cursor.

tomaskraina avatar tomaskraina commented on June 3, 2024

That would explain why running the script doesn't change the cursor in Xcode 7.3b2

from better-xcode-ibeam-cursor.

maxsz avatar maxsz commented on June 3, 2024

There is another Ibeam file here: /Applications/Xcode-beta.app/Contents/OtherFrameworks/XcodeEdit.framework/Versions/A/Resources/TIbeam.tiff, but replacing it doesn't change anything.

from better-xcode-ibeam-cursor.

allen-zeng avatar allen-zeng commented on June 3, 2024

Same problem with Xcode 7.3b4

from better-xcode-ibeam-cursor.

hirad avatar hirad commented on June 3, 2024

+1

from better-xcode-ibeam-cursor.

egold avatar egold commented on June 3, 2024

Welcoming pull requests for this that are backwards compatible to Xcode pre-7.3 :) @tobatha @tomaskraina @maxsz @allen-zeng @hirad

from better-xcode-ibeam-cursor.

hirad avatar hirad commented on June 3, 2024

Well... I spent a long time looking for the new location of the cursor file. Haven't been able to find it yet.

from better-xcode-ibeam-cursor.

ClintChil avatar ClintChil commented on June 3, 2024

Huzzah! Will test this in the AM. Thanks for sharing!

from better-xcode-ibeam-cursor.

tobatha avatar tobatha commented on June 3, 2024

pull a request & update the tutorial then, i guess~ lol
thank you guys, anyway!

from better-xcode-ibeam-cursor.

spritekitbook avatar spritekitbook commented on June 3, 2024

So awesome, thank you!

Looking for the I-Beam all the time using my theme was getting old. Appreciate it.

from better-xcode-ibeam-cursor.

LogicException avatar LogicException commented on June 3, 2024

Great work, thank's a lot

from better-xcode-ibeam-cursor.

v-i-s-h-a-l avatar v-i-s-h-a-l commented on June 3, 2024

Applications/Xcode.app/Contents/SharedFrameworks/DVTKit.framework/Versions/A/Resources/Assets.car

deleting this Assets.car file does the work for me (may be because I had already installed the i-beam cursor in Xcode 7.2).

update: It worked for a while but later Xcode would not even start and crash on launch. So, I replaced the new Assets.car file at the above mentioned location.

from better-xcode-ibeam-cursor.

fbara avatar fbara commented on June 3, 2024

When I ran the script in the tutorial I got cp: /Applications/Xcode.app/Contents/SharedFrameworks/DVTKit.framework/Resources/DVTIbeamCursor.tiff: No such file or directory.

After that, the terminal result looks like it changed the cursor but I can't really see a difference: Copying the improved ibeam cursor to the correct location Removing downloaded image.

from better-xcode-ibeam-cursor.

egold avatar egold commented on June 3, 2024

@ebaker355 I'm really interested in your binary diff script. It sounds like a good enough solution. Please reopen your pull request once you have it working. Thanks!

from better-xcode-ibeam-cursor.

egold avatar egold commented on June 3, 2024

Updated README to reflect this manual workaround. Thanks all for looking into it.

from better-xcode-ibeam-cursor.

ebaker355 avatar ebaker355 commented on June 3, 2024

The PR has been reopened with the updated install script. Sorry it took so long!

from better-xcode-ibeam-cursor.

oliverfoggin avatar oliverfoggin commented on June 3, 2024

Please could you provide instructions on how to use your updated install script? Thanks

from better-xcode-ibeam-cursor.

oliverfoggin avatar oliverfoggin commented on June 3, 2024

@ebaker355 thanks. At the moment when I do that I get the output...

Olivers-MBP:Documents oliverfoggin$ ./install.sh
Updating I-beam cursor for Xcode at path /Applications/Xcode.app/Contents/SharedFrameworks/DVTKit.framework/Resources
Downloading cursor replacement file to /tmp/DVTIbeamCursor.tiff
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100     9  100     9    0     0     27      0 --:--:-- --:--:-- --:--:--    27
Download failed.

I tried with sudo also.

I'll take a look through the install.sh to see if I can work out what's happening.

Thanks

from better-xcode-ibeam-cursor.

ebaker355 avatar ebaker355 commented on June 3, 2024

@oliverfoggin ah, i see you're testing it with an older (< 7.3) version of Xcode... that's good, as I was only able to test with 7.3.

Oh, I think I know the cause... one minute, please, and I'll update the script.

from better-xcode-ibeam-cursor.

oliverfoggin avatar oliverfoggin commented on June 3, 2024

@ebaker355 Xcode Version 7.3 (7D175)

New install (from AppStore) on a new computer so no updates applied.

from better-xcode-ibeam-cursor.

ebaker355 avatar ebaker355 commented on June 3, 2024

Strange... is there both a DVTIbeamCursor.tiff and an Assets.car file in your /Applications/Xcode.app/Contents/SharedFrameworks/DVTKit.framework/Resources path?

from better-xcode-ibeam-cursor.

oliverfoggin avatar oliverfoggin commented on June 3, 2024

Yeah I have both of those files. However, when I try to download this file... https://raw.githubusercontent.com/ebaker355/better-xcode-ibeam-cursor/master/patches/DVTIbeamCursor.tiff manually I get a damaged file. Could that be the problem?

from better-xcode-ibeam-cursor.

ebaker355 avatar ebaker355 commented on June 3, 2024

Yes... i have the wrong path to the updated DVTIbeamCursor.tiff file in the script. I am currently updating the script to fix that.

But, its puzzling, because, I thought that DVTIbeamCursor.tiff file was no longer used in Xcode 7.3. Please try moving that file out of the Xcode directory, then re-run the script. It should update the Assets.car file.

from better-xcode-ibeam-cursor.

oliverfoggin avatar oliverfoggin commented on June 3, 2024

That worked! Thanks. I renamed the DVTIbeamCursor.tiff file and then got the output...

Updating I-beam cursor for Xcode at path /Applications/Xcode.app/Contents/SharedFrameworks/DVTKit.framework/Resources
Downloading file Assets.car-Xcode-7.3.bspatch
Downloading cursor patch file to /tmp/Assets.car-Xcode-7.3.bspatch
Downloading from - https://raw.githubusercontent.com/ebaker355/better-xcode-ibeam-cursor/master/patches/Assets.car-Xcode-7.3.bspatch
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1431  100  1431    0     0   4459      0 --:--:-- --:--:-- --:--:--  4471
Downloaded successfully.
Creating backup of Assets.car -> backup-Assets.car

(I added some extra debugging lines to the script).

Restarting Xcode then got the new cursor thanks :D

from better-xcode-ibeam-cursor.

ebaker355 avatar ebaker355 commented on June 3, 2024

Awesome! Glad it worked.

So, as of now, the script assumes that either the Assets.car file or the DVTIbeamCursor.tiff file exists, but not both. The Assets.car file is new with Xcode 7.3. It checks for the existence of the tiff file first, but I'm thinking it should check for Assets.car first.

Also, the script will only update one file or the other. I'm wondering if it should update both files, if they both exist.

Anyone have thoughts on this?

from better-xcode-ibeam-cursor.

oliverfoggin avatar oliverfoggin commented on June 3, 2024

I agree that it should probably check for the Assets.car file first and use that to assume 7.3+.

I did manually update the .tiff file but it had no effect on the cursor in Xcode. I can't say for certain that it isn't used anywhere else though? Is it left behind as a legacy item in that particular framework maybe?

I don't see there being any harm in updating both files though.

from better-xcode-ibeam-cursor.

ebaker355 avatar ebaker355 commented on June 3, 2024

@oliverfoggin Wondering... did you update to Xcode 7.3 thru the App Store? That may have left the older file behind. For my installation, I removed the old Xcode.app directory, and installed 7.3 from the .dmg file.

Thanks for all your testing, btw! :D

from better-xcode-ibeam-cursor.

oliverfoggin avatar oliverfoggin commented on June 3, 2024

@ebaker355 I'm on a brand new computer that I only got on Monday and I installed Xcode 7.3 straight from the AppStore.

No updates have been applied to Xcode. Just a straight install from AppStore.

Thanks

from better-xcode-ibeam-cursor.

ebaker355 avatar ebaker355 commented on June 3, 2024

@oliverfoggin Ok, thanks!

The script has been updated to look for Assets.car before DVTIbeamCursor.tiff. It still only updates the first one of these files that is found.

from better-xcode-ibeam-cursor.

kartikthapar avatar kartikthapar commented on June 3, 2024

Does anybody have clear instructions as to how to get this to work? I have tried the steps above but my download still fails (irrespective of the presence of .car or .tiff)

cc: @ebaker355 @oliverfoggin

from better-xcode-ibeam-cursor.

ebaker355 avatar ebaker355 commented on June 3, 2024

@kartikthapar I'm sorry you're experiencing difficulties with the script. Can you please paste your Terminal session here? Perhaps I can help troubleshoot. Thanks!

from better-xcode-ibeam-cursor.

sokobania avatar sokobania commented on June 3, 2024

@ebaker355 Instead of checking for the existence of both files, wouldn't it be better to check first for the version of Xcode (if it's possible)?
And then, according to the version, do whatever seems needed (AND check for the existence of THE file to change).

from better-xcode-ibeam-cursor.

ebaker355 avatar ebaker355 commented on June 3, 2024

@sokobania Good question! The problems I saw with that approach were:

  • I'm not certain how to retrieve Xcode's version from within a script (may be simple, but I just haven't looked into it)
  • If I did have the version, I'd have to parse it (including betas), then somehow know which action to take based on the version. For example, this original issue may have started with 7.3beta2, or, it may have started earlier, but no one noticed the issue until beta 2.

I think the file approach is more flexible for these reasons. We take the extra step of validating the SHA's of the files we find, to ensure our patches are compatible. That way, if future versions of Xcode use new versions of these files, or if the files are replaced (or renamed), we can simply generate new patches and update the script as needed.

from better-xcode-ibeam-cursor.

ebaker355 avatar ebaker355 commented on June 3, 2024

I have added support for Xcode 7.3.1 to the PR.

Anyone experiencing issues with the installer?

from better-xcode-ibeam-cursor.

oliverfoggin avatar oliverfoggin commented on June 3, 2024

Just updated to 7.3.1 and had to run the script again. I made sure to get the latest version and change egold to ebaker355.

Anyway, it worked perfectly.

Thanks

from better-xcode-ibeam-cursor.

pwinde avatar pwinde commented on June 3, 2024

I had an issue with the installer for 7.3.1.

File checksum mismatch.
Assets.car - c5422358f21247b31921b1e9fee421e2c7c84c41
Patch cannot be applied.

Turned out that the install script got confused with the path to xcode and used path to an previously installed beta. Deleting the old beta fixed the issue.

from better-xcode-ibeam-cursor.

pwinde avatar pwinde commented on June 3, 2024

My bad. The installation actually worked for the released version of Xcode but I when I saw the error for the beta I assumed that it was for the released version.

from better-xcode-ibeam-cursor.

fbara avatar fbara commented on June 3, 2024

@sjolin I had to rerun the script again for 7.3.1, too, but it didn't work for me. I restarted Xcode, also.

MacBookPro:~ fbara$ curl -L https://raw.githubusercontent.com/egold/better-xcode-ibeam-cursor/master/install.sh | bash 
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1161  100  1161    0     0   3132      0 --:--:-- --:--:-- --:--:--  3137
Downloading new image
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 31380  100 31380    0     0  90650      0 --:--:-- --:--:-- --:--:-- 90956
Backing up the original cursor that ships with xcode to ./backup-DVTIbeamCursor.tiff
Copying the improved ibeam cursor to the correct location
Removing downloaded image
Done - restart Xcode and have fun!

from better-xcode-ibeam-cursor.

claybridges avatar claybridges commented on June 3, 2024

@ebaker355 Beautiful shell scripting. Once I changed the GITHUB_URL, it worked like a charm. I kiss you!

from better-xcode-ibeam-cursor.

ebaker355 avatar ebaker355 commented on June 3, 2024

@sjolin Hmm, it looks like the script updated the wrong file for Xcode 7.3.1. It should be updating Assets.car, not DVTIbeamCursor.tiff. Strange. I will run some tests to see what's happening there. Either way, DVTIbeamCursor.tiff is no longer used by Xcode, so that would explain why Xcode isn't using the updated cursor.

@claybridges Great to hear! Thanks!

from better-xcode-ibeam-cursor.

ntpeters avatar ntpeters commented on June 3, 2024

Worked perfectly for me as well!

from better-xcode-ibeam-cursor.

fbara avatar fbara commented on June 3, 2024

I ran the script again (Xcode 7.3.1) but don't see the updated cursor. I don't know if the install.sh has been updated with what everyone has been discussing for the last few weeks.

MacBookPro:~ fbara$ curl -L https://raw.githubusercontent.com/egold/better-xcode-ibeam-cursor/master/install.sh | bash 
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1161  100  1161    0     0   1412      0 --:--:-- --:--:-- --:--:--  1412
Downloading new image
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 31380  100 31380    0     0  41080      0 --:--:-- --:--:-- --:--:-- 41073
Backing up the original cursor that ships with xcode to ./backup-DVTIbeamCursor.tiff
Password:
Copying the improved ibeam cursor to the correct location
Removing downloaded image
Done - restart Xcode and have fun!

from better-xcode-ibeam-cursor.

fbara avatar fbara commented on June 3, 2024

Thanks @ntpeters, that worked! I thought it was already merged, sorry.

from better-xcode-ibeam-cursor.

egold avatar egold commented on June 3, 2024

Fixed in #17 -- thanks @ebaker355 !

from better-xcode-ibeam-cursor.

collinhundley avatar collinhundley commented on June 3, 2024

Anybody having problems with this on Xcode 8? Replacing Assets.car doesn't seem to work for me anymore.

from better-xcode-ibeam-cursor.

CrazyGoose avatar CrazyGoose commented on June 3, 2024

Yes, no longer working for me either in Xcode 8.

from better-xcode-ibeam-cursor.

AtharvaVaidya avatar AtharvaVaidya commented on June 3, 2024

I get this if I try to install it for Xcode 8:

Updating I-beam cursor for Xcode at path /Applications/Xcode.app/Contents/SharedFrameworks/DVTKit.framework/Resources
File checksum mismatch.
Assets.car - 0c5e6b6ec4619acb461cbc46ab7498eae32534b0
Patch cannot be applied.

from better-xcode-ibeam-cursor.

sokobania avatar sokobania commented on June 3, 2024

@AtharvaVaidya This is a good news!
Thank you for having tried to apply the patch (I could not find enough time to test it).
And I would also like to thank ebaker355 for having delivered a patch that does NOT break Xcode when applied to a new version!
While waiting for the next release (for Xcode 8), you could try cjheng's solution (Mar 22) which I commented on Mar 25.

from better-xcode-ibeam-cursor.

nrivard avatar nrivard commented on June 3, 2024

ThemeEngine isn't buildable in xcode 8 and seems to assert whenever i try to open the Assets.car file, so this is unlikely to work in the near future.

from better-xcode-ibeam-cursor.

spattisson avatar spattisson commented on June 3, 2024

Any ideas for a solution that works in xcode of recent updates? I'm now on Version 10.2.1 and constantly loosing my mouse cursor when its over a dark terminal background.

from better-xcode-ibeam-cursor.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.