Programming on Windows

Discussion in 'iOS Development' started by MethosMage, Nov 30, 2007.

  1. MethosMage

    MethosMage New Member

    Joined:
    Nov 19, 2007
    Messages:
    53
    Likes Received:
    0
    Does anyone know of a tutorial or could type a tutorial of how to start programming on a Windows for te Ipod touch? I have searched and only found guides for Mac users, but I use windows and would enjoy at least being able to tweak around with some programs. Please and thank you
  2. Paintball

    Paintball New Member

    Joined:
    Oct 19, 2007
    Messages:
    368
    Likes Received:
    7
    Yes, it is possible. But it can be difficult to compile the toolchain. It really just takes awhile. Here is the link to a guide on how to build it. Then, once thats built, you can compile the programs you write and be on your way. By the way, where it needs the iphone filesystem, just manually manage your music in itunes, delete it all, then open WinSCP and copy EVERYTHING to a folder on your computer. Other than that, just follow those directions exactly.
  3. eok

    eok New Member

    Joined:
    Sep 24, 2007
    Messages:
    98
    Likes Received:
    0
  4. welshboy

    welshboy New Member

    Joined:
    Dec 2, 2007
    Messages:
    264
    Likes Received:
    0
    Device:
    iPhone 3GS (Black)
    im download winchain now, is it anygood? how would i go about installing new libraries? as it says on their site it doesnt come with a lot, also does this come with an iphone filsystem? or do i have to get my own? i want to code on an iPod touch not an iPhone, do i have to replace anything with the filsystem files i have now?
  5. marvo

    marvo New Member

    Joined:
    Oct 25, 2007
    Messages:
    77
    Likes Received:
    0
  6. Commander147

    Commander147 Member

    Joined:
    Oct 10, 2007
    Messages:
    78
    Likes Received:
    4
    Device:
    iPhone 4 (Black)
    ya mine freezes too but which files should be in the Hello.app directory? I think i am missing a file
  7. marvo

    marvo New Member

    Joined:
    Oct 25, 2007
    Messages:
    77
    Likes Received:
    0
    you should have the hello application file, an Info.plist file, and you should also put an icon in there(icon.png). thats really all you need for the hello world application.

    I would also like to note that the makefile for the hello world app gives me an error something like "missing seperator" and that i may have meant tabs instead of 8 spaces or something.

    so what i do is use the handy program generator that comes with winchain that creats a skeleton apps files and a makefile with it. the makefile that is generated looks like this:

    Code:
    INFOPLIST_FILE=Info.plist
    SOURCES=\
    	main.m \
    	hello.m
    
    CC=/usr/local/bin/arm-apple-darwin-gcc
    CFLAGS=-g -O2 -Wall
    LD=$(CC)
    LDFLAGS=-lobjc -framework CoreFoundation -framework Foundation -framework UIKit -framework LayerKit
    PRODUCT_NAME=hello
    SRCROOT=/iphone-apps/hello
    
    WRAPPER_NAME=$(PRODUCT_NAME).app
    EXECUTABLE_NAME=$(PRODUCT_NAME)
    SOURCES_ABS=$(addprefix $(SRCROOT)/,$(SOURCES))
    INFOPLIST_ABS=$(addprefix $(SRCROOT)/,$(INFOPLIST_FILE))
    OBJECTS=\
    	$(patsubst %.c,%.o,$(filter %.c,$(SOURCES))) \
    	$(patsubst %.cc,%.o,$(filter %.cc,$(SOURCES))) \
    	$(patsubst %.cpp,%.o,$(filter %.cpp,$(SOURCES))) \
    	$(patsubst %.m,%.o,$(filter %.m,$(SOURCES))) \
    	$(patsubst %.mm,%.o,$(filter %.mm,$(SOURCES)))
    OBJECTS_ABS=$(addprefix $(CONFIGURATION_TEMP_DIR)/,$(OBJECTS))
    APP_ABS=$(BUILT_PRODUCTS_DIR)/$(WRAPPER_NAME)
    PRODUCT_ABS=$(APP_ABS)/$(EXECUTABLE_NAME)
    
    all: $(PRODUCT_ABS)
    
    $(PRODUCT_ABS): $(APP_ABS) $(OBJECTS_ABS)
    	$(LD) $(LDFLAGS) -o $(PRODUCT_ABS) $(OBJECTS_ABS)
    
    $(APP_ABS): $(INFOPLIST_ABS)
    	mkdir -p $(APP_ABS)
    	cp $(INFOPLIST_ABS) $(APP_ABS)/
    
    $(CONFIGURATION_TEMP_DIR)/%.o: $(SRCROOT)/%.m
    	mkdir -p $(dir $@)
    	$(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
    
    clean:
    	echo rm -f $(OBJECTS_ABS)
    	echo rm -rf $(APP_ABS)
    
    I have never dealt with makefiles before so im not really sure how to edit them myself, but as you can see theres alot more there.

    The code does compile and it does launch on the ipod. It freezes on the default image. (would be Default.png if i were to include one) then i have to restart the ipod.
  8. Bruinsfan452

    Bruinsfan452 New Member

    Joined:
    Nov 23, 2007
    Messages:
    15
    Likes Received:
    0
    Device:
    2G iPod touch
    hi i have very minimal programming experince in C++ but i would like to learn how to do this where should i start??
  9. Commander147

    Commander147 Member

    Joined:
    Oct 10, 2007
    Messages:
    78
    Likes Received:
    4
    Device:
    iPhone 4 (Black)
    Well i had make file errors also but i just opened the makefile up using NOTEPAD the one provided by windows not the C++ one. i went to the lines it was reffering to and backspaced the spaces before the code and just hit tab instead. BTW it would say like make - (somenumber) the number is the line number you have to edit the spaces before the code out of and replace them with tabs. THere are like 4 errors i think but you have to keep compiling to find them all. I still can't fix the freeze.

    Bruinsfan452
    get these files first
    http://code.google.com/p/winchain/
  10. Pyrofer

    Pyrofer New Member

    Joined:
    Oct 2, 2007
    Messages:
    162
    Likes Received:
    0
    I too compiled helloworld, and just get it crash when I run it.
    It doesnt seem to appear properly on springboard either. Have to run from term or a launcher prog.
    Crashes tho.
    Anyone get it working?

Share This Page