Code Monkey home page Code Monkey logo

Comments (4)

naos avatar naos commented on September 26, 2024

I've finally managed to build it by making following changes:
[Please note that these are quick & dirty hacks and not final solutions for building iSoul for 32-bit 10.6 platform]

1.

it is necessary to change build settings for ALL the projects and targets

Base SDK: change from Mac OS X 10.7 to Mac OS X 10.6
Architectures: change from 64-bit Intel to 32-bit Intel

2.

in the file iSoul>museek.xcodeproj>libevent.xcodeproj>Classes>include>event2>util.h

change following code from:

#if EVENT__SIZEOF_SIZE_T == 8
#define EV_SIZE_MAX EV_UINT64_MAX
#define EV_SSIZE_MAX EV_INT64_MAX
#elif EVENT__SIZEOF_SIZE_T == 4
#define EV_SIZE_MAX EV_UINT32_MAX
#define EV_SSIZE_MAX EV_INT32_MAX
#elif defined(EVENT_IN_DOXYGEN_)
#define EV_SIZE_MAX ...
#define EV_SSIZE_MAX ...
#else
#error "No way to define SIZE_MAX"
#endif

to:

// #if EVENT__SIZEOF_SIZE_T == 8
// #define EV_SIZE_MAX EV_UINT64_MAX
// #define EV_SSIZE_MAX EV_INT64_MAX
// #elif EVENT__SIZEOF_SIZE_T == 4
#define EV_SIZE_MAX EV_UINT32_MAX
#define EV_SSIZE_MAX EV_INT32_MAX
// #elif defined(EVENT_IN_DOXYGEN_)
// #define EV_SIZE_MAX ...
// #define EV_SSIZE_MAX ...
// #else
// #error "No way to define SIZE_MAX"
// #endif

3.

in the file iSoul>museek.xcodeproj>libevent.xcodeproj>Classes>evutil_rand.c

change following code from:

static void
ev_arc4random_buf(void *buf, size_t n)
{
#ifdef EVENT__HAVE_ARC4RANDOM_BUF
    return arc4random_buf(buf, n);
#else
    unsigned char *b = buf;
    /* Make sure that we start out with b at a 4-byte alignment; plenty
     * of CPUs care about this for 32-bit access. */
    if (n >= 4 && ((ev_uintptr_t)b) & 3) {
        ev_uint32_t u = arc4random();
        int n_bytes = 4 - (((ev_uintptr_t)b) & 3);
        memcpy(b, &u, n_bytes);
        b += n_bytes;
        n -= n_bytes;
    }
    while (n >= 4) {
        *(ev_uint32_t*)b = arc4random();
        b += 4;
        n -= 4;
    }
    if (n) {
        ev_uint32_t u = arc4random();
        memcpy(b, &u, n);
    }
#endif
}

to:

static void
ev_arc4random_buf(void *buf, size_t n)
{
// #ifdef EVENT__HAVE_ARC4RANDOM_BUF
//     return arc4random_buf(buf, n);
// #else
    unsigned char *b = buf;
    /* Make sure that we start out with b at a 4-byte alignment; plenty
     * of CPUs care about this for 32-bit access. */
    if (n >= 4 && ((ev_uintptr_t)b) & 3) {
        ev_uint32_t u = arc4random();
        int n_bytes = 4 - (((ev_uintptr_t)b) & 3);
        memcpy(b, &u, n_bytes);
        b += n_bytes;
        n -= n_bytes;
    }
    while (n >= 4) {
        *(ev_uint32_t*)b = arc4random();
        b += 4;
        n -= 4;
    }
    if (n) {
        ev_uint32_t u = arc4random();
        memcpy(b, &u, n);
    }
// #endif
}

4.

in the file iSoul>Port Map.xcodeproj>miniupnpc>miniupnp.c

change following code from:

#ifdef HAS_IP_MREQN
                /* was not an ip address, try with an interface name */
                struct ip_mreqn reqn;   /* only defined with -D_BSD_SOURCE or -D_GNU_SOURCE */

to:

#ifdef HAS_IP_MREQN
                struct ip_mreqn {
                    struct in_addr imr_multiaddr; /* IP multicast group address */
                    struct in_addr imr_address;   /* IP address of local interface */
                    int            imr_ifindex;   /* interface index */
                };
                /* was not an ip address, try with an interface name */
                struct ip_mreqn reqn;   /* only defined with -D_BSD_SOURCE or -D_GNU_SOURCE */

5.

in the file iSoul>Controllers>SearchViewController.m

change following code from:

case vwFolder:
    [self setView:folderView];
    DNSLog(@"folder tree has %lu children", [[treeRoot children] count]);
    [treeController rearrangeObjects];
    DNSLog(@"folder tree has %lu children", [[treeRoot children] count]);
    [outlineView reloadData];
    break;

to:

case vwFolder:
    [self setView:folderView];
    DNSLog(@"folder tree has %u children", [[treeRoot children] count]);
    [treeController rearrangeObjects];
    DNSLog(@"folder tree has %u children", [[treeRoot children] count]);
    [outlineView reloadData];
    break;

also change:

debug_NSLog(@"downloading %lu results", [selected count]);

to:

debug_NSLog(@"downloading %u results", [selected count]);

6.

in the file iSoul>Controllers>DataStore.m

change following code from:

debug_NSLog(@"adding new search with index %lu", kSearchIndexStart + sidebarSortIndex);

to:

debug_NSLog(@"adding new search with index %u", kSearchIndexStart + sidebarSortIndex);

also change:

debug_NSLog(@"adding new wishlist item with index %lu", kWishIndexStart + sidebarSortIndex);

to:

debug_NSLog(@"adding new wishlist item with index %u", kWishIndexStart + sidebarSortIndex);

7.

in the file iSoul>Controllers>ChatViewController.m

change following code from:

DNSLog(@"NEW %lu", newMessagesCount);

to:

DNSLog(@"NEW %u", newMessagesCount);

8.

in the file iSoul>Controllers>DownloadViewController.m

change following code from:

debug_NSLog(@"requesting %lu queue updates", [queuedTransfers count]);

to:

debug_NSLog(@"requesting %u queue updates", [queuedTransfers count]);

also change:

debug_NSLog(@"removing %lu transfers", [transfersToRemove count]);

to:

debug_NSLog(@"removing %u transfers", [transfersToRemove count]);

also change:

debug_NSLog(@"pausing %lu transfers", [selectedTransfers count]);

to:

debug_NSLog(@"pausing %u transfers", [selectedTransfers count]);

also change:

debug_NSLog(@"resuming %lu transfers", [selectedTransfers count]);

to:

debug_NSLog(@"resuming %u transfers", [selectedTransfers count]);

9.

in the file iSoul>Controllers>MainWindowController.m

change following code from:

debug_NSLog(@"joining %lu rooms", [selected count]);

to:

debug_NSLog(@"joining %u rooms", [selected count]);

10.

in the file iSoul>Controllers>MuseekdConnectionController.m

change following code from:

double squareSize = MIN(originalSize.width, originalSize.height);

to:

float squareSize = MIN(originalSize.width, originalSize.height);

also change:

debug_NSLog(@"added room %@ with %lu users and %lu tickers", 
            [room name], [[room users] count], [[room tickers] count]);

to:

debug_NSLog(@"added room %@ with %u users and %u tickers", 
            [room name], [[room users] count], [[room tickers] count]);

also change:

debug_NSLog(@"stopping searching for %@, obtained %lu results", 
            [ticket searchTerm], [[ticket files] count]);

to:

debug_NSLog(@"stopping searching for %@, obtained %u results", 
            [ticket searchTerm], [[ticket files] count]);

also change:

debug_NSLog(@"received museek message with code 0x%04lx", code);

to:

debug_NSLog(@"received museek message with code 0x%04x", code);

11.

in the file iSoul>Controllers>PrefsWindowController.m

change following code from:

- (IBAction)showImagePicker:(id)sender
{
    IKPictureTaker * pictureTaker = [IKPictureTaker pictureTaker];
    [pictureTaker beginPictureTakerSheetForWindow:[self window] 
                                     withDelegate:self 
                                   didEndSelector:@selector(pictureTakerDidEnd:returnCode:contextInfo:) 
                                      contextInfo:nil];
}

- (void) pictureTakerDidEnd:(IKPictureTaker *) picker
                 returnCode:(NSInteger) code
                contextInfo:(void*) contextInfo
{
    if(code == NSOKButton)
    {
        [imageWell setImage:[picker outputImage]];
        [[NSUserDefaults standardUserDefaults] setValue:[[picker outputImage] TIFFRepresentation] forKey:@"UserImage"];
        // notifying the imageWell
        [self userImageChanged:imageWell];
    }
}

to:

- (void) pictureTakerDidEnd:(IKPictureTaker *) picker
                 returnCode:(NSInteger) code
                contextInfo:(void*) contextInfo
{
    if(code == NSOKButton)
    {
        [imageWell setImage:[picker outputImage]];
        [[NSUserDefaults standardUserDefaults] setValue:[[picker outputImage] TIFFRepresentation] forKey:@"UserImage"];
        // notifying the imageWell
        [self userImageChanged:imageWell];
    }
}

- (IBAction)showImagePicker:(id)sender
{
    IKPictureTaker * pictureTaker = [IKPictureTaker pictureTaker];
    [pictureTaker beginPictureTakerSheetForWindow:[self window] 
                                     withDelegate:self 
                                   didEndSelector:@selector(pictureTakerDidEnd:returnCode:contextInfo:) 
                                      contextInfo:nil];
}

12.

in the file iSoul>Views>BadgeCell.m

change following code from:

[[NSColor colorWithCalibratedRed:.53 green:.60 blue:.74 alpha:1.0] set];

to:

[[NSColor colorWithCalibratedRed:.53f green:.60f blue:.74f alpha:1.0] set];

13.

in the file iSoul>Views>DownloadProgressCell.m

change following code from:

#define kProgressXOffset        10.0
#define kProgressYOffset        4.0
#define kCaptionHeight          13.0
#define kCaptionYOffset         2.0

to:

#define kProgressXOffset        10.0f
#define kProgressYOffset        4.0f
#define kCaptionHeight          13.0
#define kCaptionYOffset         2.0

14.

in the file iSoul>Views>BubbleTextView.m

change following code from:

#define kIconBuffer         10.0
#define kIconSize           32.0
#define kUsernameHeight     15.0

#define kBalloonPadLeft     13.0
#define kBalloonPadRight    6.0
#define kBalloonPadTop      3.0
#define kBalloonPadBottom   6.0

#define kBalloonHeight      46.0
#define kBalloonWidth       77.0
#define kBalloonTail        19.0
#define kBalloonEnd         10.0
#define kBalloonBottom      14.0
#define kBalloonTop         9.0

to:

#define kIconBuffer         10.0f
#define kIconSize           32.0f
#define kUsernameHeight     15.0

#define kBalloonPadLeft     13.0f
#define kBalloonPadRight    6.0f
#define kBalloonPadTop      3.0f
#define kBalloonPadBottom   6.0f

#define kBalloonHeight      46.0
#define kBalloonWidth       77.0
#define kBalloonTail        19.0f
#define kBalloonEnd         10.0f
#define kBalloonBottom      14.0f
#define kBalloonTop         9.0f

15.

Now you can build it!

from isoul.

djbe avatar djbe commented on September 26, 2024

Ah, there is a reason we set the base SDK and architectures to those values, as both @arranger1044 and I use Lion as our main OS. We dropped 32-bit support quite a while ago, and iSoul runs on SL despite the base SDK value (it's just helpful for us for deprecation warnings), it's the target OS that's important.

I don't see a reason to actually change this in the current codebase, but you could maintain a fork if you want. I'll add some requirements to the main page for building iSoul.

from isoul.

naos avatar naos commented on September 26, 2024

32-bit support is still necessary for me because I'm currently not able to afford the new machine. As long as you don't make any significant changes to the codebase, like some "Lion only" features, I think I'll be able to build future versions also.

from isoul.

djbe avatar djbe commented on September 26, 2024

AFAIK the current codebase is 32-bit compatible, and if you want you can maintain a fork. But we don't use it because:

  • Less headaches concerning warnings and such
  • Much faster build times (half)
  • Needed for Lion SDK

from isoul.

Related Issues (20)

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.