I don’t know what the right name for it is: by “document directory” then I mean the place where cod(ify|ea) stores its programs.
What I’d like to do is turn that into a BZR repository for my programs, but this will involve having a
.bzr directory at the root and I’d like to know if that’s going to be a Bad Idea. With cod(ify|ea) try to read that directory or will it just ignore it?
If no-one knows, I’d be happy to do the experiment but thought it might be a reasonable idea to ask first in case it all went horribly wrong.
There’s no direct file system access yet by Codea - so if you’re jailbroken, or using iExplore to move files around, you should be fine - the extra stuff should be ignored. Problem is, it can’t be accessed by your code either, so there’s not a lot of good in it yet.
Codify will only look for directories with the extension “.codify” in your Documents directory. The next version uses the extension “.codea” (and converts anything called “.codify” over automatically).
Great. I was trying to do the same. Mount my iPad’s filesystem into my Linux laptop’s filesystem and use Git on the laptop to version the project and push it toGitHub.
But I couldn’t get the Linux iOS filesystem packages to mount my iPad 2
Nat, that’s exactly what I’m doing (okay, with bzr instead of git). I’m using
libimobiledevice to mount Codify’s document directory and then I can access it just as part of the regular filesystem.
I’m using Debian. I downloaded the latest version of
libimobiledevice from their website. Then I had to recompile
ifuse against this. It doesn’t mount automatically because I didn’t recompile whatever it is that normally mounts stuff, but with
ifuse then everything works perfectly.
!!! Sweet! I’ve been using iExplorer, which is nice and free and easy and buggy and requires OS X - but my main environment is ubuntu, so this sounds perfect once it’s set up.
Hmm - got the ipad to mount, but Codify is not showing up as an app that shares documents. I suspect the libimobiledevice I’m using (that was already installed, oddly enough) is too old for ios5. I’m going to try a source install. Andrew, if you had tips or a pointer to a good URL about installing and using libimobiledevice, I’d sure love to see/hear it.
I agree that the documentation is somewhat lacking! You need to get the source code from http://www.libimobiledevice.org/. Then you need to compile whatever you plan on using to mount the device against that library. I compiled ifuse since it’s a command-line tool and I feel much happier with command-line stuff.
I’ve managed to get it all compiled, but when I do an ifuse mount, I get the generic shared ipad stuff (DCIM, Photos, Podcasts, and so on), not the Apps. When I look at Apps, I don’t see Codify there, I presume because Codify isn’t a “file upload/download” app that would show up in itunes.
Can I ask a favor of you? When you mount your ipad, can you tell me exactly what are you doing on the command line? Either you’re doing what I’m doing (“ifuse /media/ipad”) and it’s working for you, or you’re doing something different - either way, it should help me figure out what’s wrong on my end. And - are you running iOS5, or still 4.3? (I am thinking another possibility is that iOS5 support just isn’t 100% there yet)
Heh. Story of my life. Get stuck for hours, write an email asking for help, click “post” - and my spine says “You know, what about this?”.
ifuse --appid com.twolivesleft.Codify /media/ipad
And I’m in. W00T!
Interestingly enough - that only gets me the Codify Documents directory - you can’t among other things, get to the sprite data that way. I wonder if there’s a way to mount the entire app? other than archiving, editing, then re-installing (if that even works)
Yup, that’s almost exactly what I do.
I have a directory
$HOME/local/share/iPadApps where I have subdirectories corresponding to each app and I mount them there as I often have several open at a time. I also have a script so that I don’t have to remember the appid each time as well. There’s a command - don’t remember exactly what it is - that lists all the appids of the installed apps on your iPad.
I’m on iOS5, by the way.
I don’t think it’s possible to mount the entire app. I think that libimobiledevice is an interface to the iOS5 native way of accessing app directories so on a non-jailbroken device then it works in step with what iOS5 is happy with. But I’m new to this myself so it may be that there’s a sneaky way to do it!
The iExplorer program for OS X shows the whole app - also without jailbreak. No idea if it’s using these same libraries, or something else. Not that it matters - aside from custom sprites (an itch I have scratched enough I’ll wait for real support for it), being inside the app itself is dangerous play anyway - this lets me do what I want - modify app, plug into computer, “git push” and now it’s in github. or, presumably, git clone and boom, someone else’s app without cut and paste. SWEET.
If Emacs is your editor of choice, you might be interested in the lua mode. It’s not in the standard suite but I found it at http://immerrr.github.com/lua-mode/.
Lol, I use vim, support lua out-of-the-box. LET THE EDITOR WARS BEGIN! En-garde!
j/k, I do use vim, but used to use emacs a ton (it was the editor of choice on the Atari ST). I’m very old-school, in that I rarely use any language-specific features on an editor - if you get used to them, poof, they’re gone on the next platform (like the iPad). I do a ton of unix admin professionally, and often end up where emacs isn’t installed, so vi wins by default. But more power to good editors - if you can control your environment, they can dramatically increase productivity.
Forget the editor wars (I use vim as well as emacs), it’s the VCS I’m interested in. I’m finding that bzr doesn’t work well with the filesystem access that libimobiledevice allows. There’s something it’s doing that it’s not allowed to do and that’s causing problems.
How’re you doing with git? Does that work with libimobiledevice?
I have yet to try it (day job) - but I’ll report back later today.
Yup - git works. Cloned email@example.com:bortels/HersheyCodea.git into “GitTest.codify”, deleted the conf.lua in that project (I need to look how to make loveCodify happy and still have that there), and it runs fine. Made sure Codify was stopped before I did it - I’ve had issues that I think may be related to trying to modify it while it was running in the past.
Feh. I spoke too soon. I could check it out on the ipad, and run it from the ipad - but as soon as you modify tabs, it clobbers the .git directory (!) and makes an Info.plist - so you can’t push changes back up.
Not a HUGE big deal - it just means I need to rsync things back and forth. But “meh”.
The clobbering was a “feature” that we put in to ensure project consistency. It has come back to bite us when trying stuff a few times. Basically anything that doesn’t end in plist or lua will get deleted on save. Maybe we should just remove this.