Open Easen opened 13 years ago
Thanks for doing this @easen! What is the purpose of the make-wrapper.sh file btw?
I should have explained... XCode 4.0 doesn't allow you to include the 3 needed shell environment variables, if you tick use 'Building settings in Environment' in XCode it will include all load of predefined compiler and linker flags which conflict with theos. This is where make-wrapper.sh comes in, instead of running the native /usr/bin/make in XCode I've configured to use this wrapper, which sets the required environment variables without XCode injecting a load of rubbish and then executes /usr/bin/make.
It's a bit hacky I know, but until XCode fixes this bug (which I think they wont) this is the only way I found to get around this issue.
Ahh I see now. So that handles building the project, but to package it up and install it you would still have to run make package install
from the terminal.
Which coincidentally makes the project....so I guess my next question is, is there a way to hook into Xcode's native "Build and Run"?
Being an optional workflow for building the project, even though incomplete, it doesn't look like there's much harm in using Xcode in this fashion.
I don't know about the "Build and Run" option, I think you can't because it's an external target.
However in XCode 4 you could create a new target based on the target I've already created and set the arguments to package install
. The only thing I can see which would be missing from this workflow would be the IP address of the iPhone device export THEOS_DEVICE_IP=192.168.x.x
, which would have to be set in the make-wrapper.sh
I've had good luck using THEOS_DEVICE_IP=iphone-4.local
as I named my phone "iPhone 4" in iTunes.
Really original I know.
Really really great work Marc!
We should definitely look into grabbing the Build & Run and deploying the packaged to the device...
This works better if you set a shell variable of MNProjectRoot
for your project filepath. The first error I encountered when setting this up was that it couldn't find your system's filepath :)
I also think it's a better idea to not include the shell variable for the SDK version. I'm running 4.3 but you were running 4.2. We already have it set in the readme that the developer needs to add these for themselves so redeclaring them in make-wrapper.sh
causes conflicts. Coincidentally the other shell vars set are ok as those should never change.
Actually I take it back, you're right....those variables HAVE to be set in that script. Drats.
The "Directory" field may actually be left empty, that way Xcode will use the actual project folder by default.
Also in order to be able to run make package
you might have to add the following for make to be able to invoke dpkg:
export PATH=$PATH:/opt/local/bin
In my case I've linked the "Build" action to make package install
and "Clean" to make clean
:
if [ "$ACTION" == "clean" ] then /usr/bin/make clean else /usr/bin/make package install fi
Hi Peter,
How are you?
Once again I've been a bit busy, I managed to create a XCode project for MobileNotifier and hooked in the build and clean functions. I'm guessing that you code in vim, I'm familiar with vim but I prefer to use XCode for iPhone projects this is why I created the XCode project. Please have a look and let me know what you think.
Cheers, Marc