Retro JUCE


#1

Hi Guys, I am revisiting some code I write 4 years ago (2014) that worked really well with components communicating via DatagramSockets. Alas with the current version of JUCE that I am using (4.3.1) the code will no longer build. Is there any way I can obtain an old version of juce. At the least, I would like the following code to build, so I suspect 3.?.?.

void CAdvertThread::run ()
{
if (pParent == nullptr)
return;
DBG (“CAdvertThread run”);
DatagramSocket socket (GENESYS_ADVERT_PORT, true);
string advert = ADVERT_MESSAGE;
int ticks = 5000;
//
IPAddress::findAllAddresses (addresses);
for (int i=0 ; i<addresses.size () ; i++) {
IPAddress ip = addresses[i];
if (ip == IPAddress::local ())
continue;
myIP = ip;
break;
}
DBG ("IP Address " << myIP.toString ());
int idx = advert.length ();
advert += " ";
advert[idx++] = myIP.address[0];
advert[idx++] = myIP.address[1];
advert[idx++] = myIP.address[2];
advert[idx++] = myIP.address[3];
DBG ("Advert Message = " << String::toHexString (advert.c_str (), advert.length ()));
socket.bindToPort (GENESYS_ADVERT_PORT);
socket.connect (“255.255.255.255”, GENESYS_ADVERT_PORT);
//
while (!threadShouldExit () && pParent->IsRunning ()) {
if (ticks > pParent->getSleep ()) {
if (!socket.waitUntilReady (false, 1000)) {
DBG (“T/O ready”);
continue;
}
/int written =/ socket.write (advert.c_str (), advert.length ());
ticks = 0;
pParent->incSleep ();
//DBG ("Call Me " << written);
}
ticks += 50;
Thread::sleep (50);
}
DBG (“AdvertThread finished\n”);
}


#2

You are ahead of your time :wink:

If you clone the github repository, you can go back to any point in time using git checkout <sha1>

On the github you look for either the hash of the version of for the tag and run the checkout.

You can also click on releases, where you find a download link to every version:

HTH


#3

The releases are tagged and you can grab them from GitHub here.

EDIT: what @daniel said