Compiling Angband 3.0.9 w/ xcode on OSX

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Iemortal
    Rookie
    • Sep 2007
    • 5

    Compiling Angband 3.0.9 w/ xcode on OSX

    sorry to ask silly questions.
    but mac knowlage is hard to come by and i've never been shy.

    I'm working on compiling angband 3.0.9 in xcode. 2.4.1
    sigh.
    I'm kinda a 'newbie' at this. so bare with me. I'm not sure what i'm doing wrong........

    my project is a basic ' carbon app ' type.

    i am using the main-crb.c

    i removed all other main.XXX files.
    and all the other files that did not go with the mac.

    I found very little to change in the src files. this may be my mistake...

    or maybe i took to many files out.

    as for the distructions in the main-crb.c

    * For the best compatibility with the Classic ports and my PEF Carbon
    * ports, my_fopen, fd_make and fd_open [in util.c] should call
    * (void)fsetfileinfo(buf, _fcreator, _ftype);

    i did not find 'my_open' , 'fd_make' or 'fd_open' in [ util.c ] file.

    * when a file is successfully opened. Or you'll see odd icons for some files
    * in the lib folder. In order to do so, extern.h should contain these lines,
    *
    * extern int fsetfileinfo(char *path, u32b fcreator, u32b ftype);
    * extern u32b _fcreator;
    * extern u32b _ftype;
    * And enable the four FILE_TYPE macros in h-config.h for defined(MACH_O_CARBON)

    I also did not find a h-config.h file

    *
    * The "angband" binary must be arranged this way for it to work:
    *
    * lib/ <- the lib folder
    * Angband (OS X).app/
    * Contents/
    * MacOS/
    * angband <- the binary you've just compiled
    * Info.plist <- to be explained below
    * Resources/
    * Angband.icns
    * Data.icns
    * Edit.icns
    * Save.icns
    * 8x8.png <- 8x8 tiles
    * 16x16.png <- 16x16 tiles
    * angband.rsrc <- see below
    *

    thats what it said it should look like and
    looking inside a pre-compiled angband thats indeed what it looks like

    Now in my xcode project this is what i built.

    Level 1 Angband project folder
    * Level 2 MacOS/
    level 3 4 icon,
    level 3 osx_tables.h,
    level 3 /English.|proj
    level 4 Main.nib
    are in this directory,
    * Level 2 Info.plist
    * Level 2 Resources/
    level 3 files from the src
    level 3 /lib
    Level 2 /frameworks
    level 3 /linked frameworks
    level 4 Cocoa.framework
    level 3 /linked frameworks
    level 4 appkit.framework
    level 4 Coredata.framework
    level 4 Foundation.framework
    Level 2 /Products
    level 3 angband.app
    Level 1 Targets
    Level 1 Executables
    Level 1 errors and warnings
    Level 1 Find results
    Level 1 Bookmarks
    Level 1 SCM
    Level 1 Project Symbols
    Level 1 Implementation Files
    Level 1 NIB Files

    it makes an app.

    and it only gets one warning......

    Building target “Angband” of project “Angband” with configuration “Debug” — (1 warning)
    Checking Dependencieswarning: no rule to process file '$(BUILT_PRODUCTS_DIR)/../../../../Angband/Makefile.inc' of type sourcecode.pascal for architecture ppc
    warning: no rule to process file '$(BUILT_PRODUCTS_DIR)/../../../../Angband/Makefile.inc' of type sourcecode.pascal for architecture ppc
    Build succeeded (1 warning)


    but the app does not do anything.

    and there is also a ' PkgInfo ' file in the Contents of the Build.

    everything else is where it should be.

    i feel that i just havent changed the write things inside the files of the src.

    but there is very little documentation around for mac compiling .

    or that something i took out needs to be there.

    or both.

    there are so many files that seem to need be needed.

    any help would be great.

    I want to get better at this. and i so do love angband.

    tanks for your time.

    Jacob
    rookcastleman@gmail.com
  • Iemortal
    Rookie
    • Sep 2007
    • 5

    #2
    Success... Sorta.

    Ok so i sorta got it to work.

    I had to compile it in terminal... but all my xcode changed were applied.

    and... it's smaller than the pre-compiled one i downloaded.

    2.8 meg's vs. the 3.4 meg's.

    i would still like to gather any knowlage other mac users have gained with compiling and editing the code. so i can add it to the help files i'm making for osx users.

    and being a apple-phile i still want to get it to work with xcode.

    i'm thinking the frameworks may be the problem. and that i did not have the right one-ones added to the project.

    i want to also try and make a cocoa version so as to have the tray style to the window to put say my equip list and inventory lists in.

    gonna take a brake for a bit. my mouse hand hurts.

    iemortal

    Comment

    • Big Al
      Swordsman
      • Apr 2007
      • 327

      #3
      I don't have time to make a full reply right now, but would like to say that:
      I've been using xCode to edit 'band sources for a couple years now. I've never figured out how to get xCode to compile though; I always just go 'make -f makefile.osx' or something similar in the terminal. If you do get it compiling in xcode, let me know how.
      Come play Metroplexity!
      Un, V MX H- D c-- f- PV s- d+ P++ M+
      c-- S I++ So+ B+ ac- !GHB SQ RQ+ V+

      Comment

      • rdermyer
        Apprentice
        • Jul 2007
        • 79

        #4
        I have a little experience with xCode, but we never worked with makefiles or multiple file programs, so I haven't tried to do any compiling myself.
        Is your build for intel macs? Do you think you could post it if it is?
        Last edited by rdermyer; September 27, 2007, 20:16.

        Comment

        • Iemortal
          Rookie
          • Sep 2007
          • 5

          #5
          My Build....Final Fantasy: ANGBAND!

          Wow the more i learn of the "guts" of angband

          the more i feel i have a new crack-like addiction...

          as for my project.

          i'm on a Powerbook G4 the old Titanium.

          i may* be able to build for intel if i can figure out this xcode.

          it has the functions in the project styles but comipling dosent work as of now.

          i'm compiling with terminal.

          I'm Building a Vanilla 3.0.9 based ' Final Fantasy ' Theme Variant.

          or thats the idea anyway.

          i have added to my version two new ranged weapons....

          ADD- ' Instruments ' and ' Notes '
          ~ ' Instruments ' go in the SHOOTING slot.
          ~ ' Insturments ' will use 'Notes' as ' Ammo '
          ~ there are 3 types

          ' Instruments ' (x2),
          ' Wind Instruments ' (x3),
          and
          ' String Instruments ' (x4)

          ##############################################
          examples:
          N:xxx:& Onion Recorder~
          G:}:u
          I:xx:xx:xx
          W:1:0:5:5
          A:0/0
          F:SHOW_MODS
          D: The Onion Recorder is the Insturment Bards start with.
          D: It's a simple Insturment, But capable of playing most Notes.

          N:xxx:& Onion Notes
          G:{:U
          I:xx:xx:xx
          W:1:0:4:20
          M:100:6d7
          A:0/0
          P:0:1d2:0:0:0
          F:SHOW_MODS
          D: Onion Notes are The most Basic of Sheet Music.
          ##############################################

          ADD-' Tomes ' and ' Pages '
          ~ ' Tomes ' will go in the SHOOTING Slot
          ~ ' Tomes ' will use 'Pages' as ' Ammo '
          ~ there are 3 types

          ' Dictionaries ' (x2),
          ' Manuals ' (x3),
          and
          ' Tomes ' (x4)
          ##############################################
          examples:
          N:xxx:& Onion Dictionary~
          G:$:u
          I:xx:xx:xx
          W:0:0:50:1000
          A:0/0
          P:0:1d6:0:0:0
          F:SHOW_MODS | EASY_KNOW
          D: Words are mightier that swords, or so they say...
          D: And with a Tome this is very true.

          N:xxx:& Onion Pages
          G:{:U
          I:xx:xx:xx
          W:1:0:4:20
          M:100:6d7
          A:0/0
          P:0:1d2:0:0:0
          F:SHOW_MODS
          D: Onion Pages contain arcane words of power.
          ##############################################

          I think i have now coded them correctly.

          I've been working on INVEN_LITE to add some more Lamps of the mundane type as well as Materia Orbs that will be lites but as of yet i cant get any off them to ' Lite '.

          other things i'd doing are

          ADD- New Classes

          ~ RED MAGE
          ~ MONK
          ~ NINJA
          ~ SAMURAI
          ~ BARD
          ~ LANCER
          ~ GREEN MAGE/GEOMANCER *NEW MAGIC*
          ~ TIME MAGE *NEW MAGIC*
          ~ SUMMONER
          ~ ENGINEER
          ~ ASSASSIN
          ~ DANCER

          Also like the idea of a CHEMIST.
          that can mix potions and put them in those empty bottles!

          ADD- New Races

          ~ MOGGLE
          ~ TARU-TARU
          ~ MITHRA
          ~ GALKA
          ~ VIERA
          ~ BANGA
          ~ SEEQ
          ~ YAGUDO
          ~ ANTICA
          ~ GIGAS
          ~ GOBLIN
          ~ QUADAV
          ~ SAHAGIN
          ~ TONBERRIES

          ALT- Raiseing the starting equipment from 4 items to 8
          ADD- ' Onion ' type starting gear.

          ADD- Various extra items to existing Types, i.e. more staves and sticks.

          ADD- New Food
          ~like in FF XI that effects the user in some way for a time.

          ADD-Shuriken
          ~Throwing Weapon

          ADD-Shuriken
          ~Weapon - Throwing

          ADD-Metsubushi- [ Bombs ]
          ~Weapon - Throwing

          ADD-Ninjaken
          ~ Weapon - Ninja Sword

          ADD-Kodachi-
          ~Weapon - Short Sword

          ADD-Wakizashi
          ~Weapon <but goes in the GUARD slot>
          ~Would have special bonuses, but not be used as a weapon.

          ADD-Knuckles
          ~Weapon - hand to hand

          ADD-Claws
          ~Weapon - hand to hand

          ADD-Katars
          ~Weapon - hand to hand

          ADD-Cestus
          ~Weapon - hand to hand

          ADD-Bags
          ~Weapon - an alternate weapon for mages and girls.

          ADD-Armlets, Bangles,
          ~Mainly Just Alternate Shields

          ADD-Mantles
          ~Mainly Just Alternate Cloaks

          ##############################################
          Big changes
          ##############################################

          ##############################################
          Alter the listing of ' Equipment ' for Logical/flexable use.
          ##############################################

          #define INVEN_WIELD 24 [a] 1
          #define INVEN_GUARD 25 [b] 2 <was INVEN_SHEILD>
          #define INVEN_SHOOT 26 [c] 3
          #define INVEN_AMMO 27 [d] 4
          #define INVEN_THROW 28 [e] 5
          #define INVEN_HEAD 29 [f] 6
          #define INVEN_NECK 30 [g] 7
          #define INVEN_OUTER 31 [h] 8
          #define INVEN_BODY 32 [i] 8 <upper body armor>
          #define INVEN_LEGS 33 [j] 9 <lower body armor>
          #define INVEN_RIGHT 34 [k] 10 <right ring>
          #define INVEN_LEFT 35 [l] 11 <left ring>
          #define INVEN_HANDS 36 [m] 12
          #define INVEN_FEET 37 [n] 13
          #define INVEN_ACCS1 38 [o] 14
          #define INVEN_ACCS2 39 [p] 15
          #define INVEN_LITE 40 [q] 16


          ALT/NEW- INVEN_BODY and INVEN_LEGS
          ~Spliting existing AC bonuses for INVEN_BODY roughly in half.
          ~Adding INVEN_LEGS to bring AC total back up.

          ALT/NEW- INVEN_ASSC
          ~This is to allow a place in the Equip for various other items.
          ~Some of the Items are....
          -Belts
          -Girdles
          -Earings
          -Perfumes
          -Glasses
          -Corsages
          -Bracelets
          -Watches

          ##############################################
          ADD NEW STORES
          ##############################################

          ~ Curiousity shop
          sells things of a magic nature but as the Black Market not a normal store.

          ~ Boutique
          sells not metal armors

          ~ Inn
          sells food and some basics.

          ~ Music Shop
          sells Musical 'Insurments' and 'NOTES'

          ~ Book Store
          Sells Spell Books, 'TOMES' and 'PAGES'.

          ~ Library
          Can store books as the 'HOME' stores items.

          ~ Pawn Shop
          Can sell items that you can then latter buy back.


          well thats the starting list anyway of TODO's.

          Comment

          • Nick
            Vanilla maintainer
            • Apr 2007
            • 9637

            #6
            Originally posted by Iemortal
            I'm Building a Vanilla 3.0.9 based ' Final Fantasy ' Theme Variant.
            Excellent! Good luck.

            One word of caution - it's not unknown (see the game currently known as ToME) for variants to be pursued for breach of copyright (or whatever - some licencing thing, anyway). It might be best to consider your variant name with that in mind.

            Also, you may be interested in the development mailing list
            One for the Dark Lord on his dark throne
            In the Land of Mordor where the Shadows lie.

            Comment

            • Iemortal
              Rookie
              • Sep 2007
              • 5

              #7
              Yikes! I only sorta thought about that.

              Thanks for the word of warning.

              I'm building it really just for myself. and as a learning exp.
              at first i didnt think i could do all that much to the game.

              but i'm finding i'm smarter than i thought. lol.

              i'm calling the project file Myband right now. lol.

              for lack of a better name or concept when i started messing with the insides.

              maybe 'omegaband' would be better.

              i'd *hope* the 'powers that be' would spare little ol me.
              with this game being one you can't make for money.
              but then it is 'the man' *giggle*

              maybe i should write to square and ask about it.
              better to ask them first b-4 they come to me.

              Thanks for the encouragement.
              it's as i said more for the fun of codeing.

              god i did say that.

              i am a nerd.
              as if my unholy love of star trek and AD&D didnt already make me one.

              Comment

              • Nick
                Vanilla maintainer
                • Apr 2007
                • 9637

                #8
                Originally posted by Iemortal
                maybe i should write to square and ask about it.
                better to ask them first b-4 they come to me.
                I'd be inclined towards calling it something innocuous and denying all knowledge if anyone complains

                i am a nerd.
                as if my unholy love of star trek and AD&D didnt already make me one.
                Not to mention your avatar...
                One for the Dark Lord on his dark throne
                In the Land of Mordor where the Shadows lie.

                Comment

                • jtwadsworth
                  Rookie
                  • Apr 2011
                  • 18

                  #9
                  If I wanted to work in Xcode, how would I load the current angband files into it and work through that interface?

                  jtw

                  Comment

                  Working...
                  😀
                  😂
                  🥰
                  😘
                  🤢
                  😎
                  😞
                  😡
                  👍
                  👎