Author Topic: Problems making CB for OSX from wiki instructions  (Read 29999 times)

bnilsson

  • Guest
Re: Problems making CB for OSX from wiki instructions
« Reply #15 on: September 25, 2006, 02:53:49 pm »
So, where does this take us?
Assuming that the load process is the way it is for a good reason, what's missing is the generation of the proper files with the proper names in the proper places?

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2750
Re: Problems making CB for OSX from wiki instructions
« Reply #16 on: September 25, 2006, 03:07:55 pm »
So, where does this take us?
Assuming that the load process is the way it is for a good reason, what's missing is the generation of the proper files with the proper names in the proper places?


The manifest files are delivered in SVN. And with the usual SVN build, the manifest is ziped into pluginname.zip by update.bat or ./update .

What the MAC build needs to do is: zip the manifest.xml that accompanies all plugins into a pluginname.zip and place it into .../share/codeblocks .

On my OSX10.3, the names in .../share/codeblocks/plugins end up being pluginname.so . So I changed ./update to simply zip the manifest from .../trunk/src/plugins/pluginname/manifest.xml to .../trunk/src/devel/share/codeblocks .

Dont forget the contribs if you use any. I ziped the ones I use by hand.


Code
echo Compressing plugins lib resources //(pecan 2006/9/23)
${ZIPCMD} -j9 ${RESDIR}/libastyle.zip plugins/astyle/resources/manifest.xml  > /dev/null
${ZIPCMD} -j9 ${RESDIR}/libautosave.zip plugins/autosave/manifest.xml  > /dev/null
${ZIPCMD} -j9 ${RESDIR}/libclasswizard.zip plugins/classwizard/resources/manifest.xml  > /dev/null
${ZIPCMD} -j9 ${RESDIR}/libcodecompletion.zip plugins/codecompletion/resources/manifest.xml  > /dev/null
${ZIPCMD} -j9 ${RESDIR}/libcompiler.zip plugins/compilergcc/resources/manifest.xml  > /dev/null
${ZIPCMD} -j9 ${RESDIR}/libdefaultmimehandler.zip plugins/defaultmimehandler/resources/manifest.xml  > /dev/null
${ZIPCMD} -j9 ${RESDIR}/libdebugger.zip plugins/debuggergdb/resources/manifest.xml  > /dev/null
${ZIPCMD} -j9 ${RESDIR}/libscriptedwizard.zip plugins/scriptedwizard/resources/manifest.xml > /dev/null
${ZIPCMD} -j9 ${RESDIR}/libtodo.zip plugins/todo/resources/manifest.xml  > /dev/null
« Last Edit: September 25, 2006, 03:10:35 pm by Pecan »

Offline afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
Re: Problems making CB for OSX from wiki instructions
« Reply #17 on: September 25, 2006, 04:07:43 pm »
I still don't see why the zip names can't be the same on Linux and Macintosh,
i.e. why we shouldn't strip the "lib" prefix from the so before looking for a zip...

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2750
Re: Problems making CB for OSX from wiki instructions
« Reply #18 on: September 25, 2006, 04:42:22 pm »
I still don't see why the zip names can't be the same on Linux and Macintosh,
i.e. why we shouldn't strip the "lib" prefix from the so before looking for a zip...

I think you can. Then you don't have to mess with the ./update.
But you'd have to do a rename of plugins or some such.

Wait. Doesn't MAC memorize the .so libname in the lib somehow? I seem to remember getting into trouble doing a lib rename. But maybe that was just on a .dylib.

If the rename works on MAC, the the search for the manifest will work the same for Linux and MAC.

For me (I use a home grown Codeblocks-unixMac.cbp), I can simply change the project file to output the libname without the lib. Then it'll all works as delivered.

« Last Edit: September 25, 2006, 04:47:34 pm by Pecan »

Offline afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
Re: Problems making CB for OSX from wiki instructions
« Reply #19 on: September 25, 2006, 04:56:24 pm »
Ehrm, I did not suggest replacing the bundle name (libplugin.so)
all I suggested was to make it look for a "plugin.zip" instead...

Did you look at the patch ? I just changed "GTK" to "GTK || Mac"
and it works just like before, when using the regular autoconf.

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2750
Re: Problems making CB for OSX from wiki instructions
« Reply #20 on: September 25, 2006, 05:33:01 pm »
Ehrm, I did not suggest replacing the bundle name (libplugin.so)
all I suggested was to make it look for a "plugin.zip" instead...

Did you look at the patch ? I just changed "GTK" to "GTK || Mac"
and it works just like before, when using the regular autoconf.
Excellent !!

Offline afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
Re: Problems making CB for OSX from wiki instructions
« Reply #21 on: September 25, 2006, 05:44:31 pm »
I think that someone just "forgot" to add a wxMac codepath
when the logic was rewritten with the new manifest search...

The good ole "if (Windows) else (Linux)" logic strikes again ;-)

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Problems making CB for OSX from wiki instructions
« Reply #22 on: September 25, 2006, 06:08:45 pm »
Quote
Ehrm, I did not suggest replacing the bundle name (libplugin.so)
all I suggested was to make it look for a "plugin.zip" instead...

That's how it works.

Quote
think that someone just "forgot" to add a wxMac codepath
when the logic was rewritten with the new manifest search...

No, I did not "forget" it. I just don't have any experience whatsoever with Macs. So sue me...
Be patient!
This bug will be fixed soon...

Offline afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
Re: Problems making CB for OSX from wiki instructions
« Reply #23 on: September 25, 2006, 06:10:46 pm »
No, I did not "forget" it. I just don't have any experience whatsoever with Macs. So sue me...

Sorry, it wasn't meant as critique... We're happy to patch.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Problems making CB for OSX from wiki instructions
« Reply #24 on: September 25, 2006, 06:26:30 pm »
No, I did not "forget" it. I just don't have any experience whatsoever with Macs. So sue me...

Sorry, it wasn't meant as critique... We're happy to patch.

That, I know ;).
Be patient!
This bug will be fixed soon...

bnilsson

  • Guest
Re: Problems making CB for OSX from wiki instructions
« Reply #25 on: September 25, 2006, 10:18:38 pm »
I built CB with the adviced patches,

./configure --enable-contrib --prefix=$HOME
make
make install

I bundled using the shell script and moving all installation to Contents, nothing except icon in Resources.
CB crashed at startup.
I removed all plugins from share/codeblocks and CB started but complained about plugins failed to load.

I moved plugins back one by one, and found that the any of these plugins made CB crash:

codecompletion.zip
scriptedwizard.zip
todo.zip
wxsmith.zip

However, I did not need to do any manual zipping of manifests, so this seems to work.

One observation was that it complains about "not found" in two passes, first pass on libcodecompletion.zip, second pass on libprofiler.zip, libscriptedwizard.zip, libtodo.zip, libwxsmith.zip.

profiler.zip was actually missing from the set.



 


Offline afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
Re: Problems making CB for OSX from wiki instructions
« Reply #26 on: September 25, 2006, 11:18:36 pm »
profiler.zip was actually missing from the set.

src/plugins/contrib/profiler builds its resources as CBProfiler.zip, not profiler.zip
I believe it (CBProfiler) is also the name of the plugin, from the manifest.xml file.

Code
lib_LTLIBRARIES = libprofiler.la
pkgdata_DATA = CBProfiler.zip

Exception to prove the rule, I suppose...

bnilsson

  • Guest
Re: Problems making CB for OSX from wiki instructions
« Reply #27 on: September 25, 2006, 11:49:24 pm »
CBProfiler.zip was there alright, but it was apparently missed by the loader.
If I manually create profiler.zip from its manifest and put it in share/codeblocks, I do not get the load fail on libprofiler.zip.

I also found that the keybinder.zip plugin makes CB crash at quit.


bnilsson

  • Guest
Re: Problems making CB for OSX from wiki instructions
« Reply #28 on: September 25, 2006, 11:52:46 pm »
Would it be of any interest if I posted some (parts of) crash reports?
The report shows rather clearly the chain of events and where the crash occurs.
Or maybe some of you already have reproduced the crashes?

takeshimiya

  • Guest
Re: Problems making CB for OSX from wiki instructions
« Reply #29 on: September 25, 2006, 11:57:03 pm »
afb: could you release a new universal .dmg? I'm getting in the C::B Debug pane lots of "Start here link not found" all the time. Also I can't compile even the most basic program with C::B, it seems to hang while launching gcc.

Also, I've tried to use your macport from the wiki, unfortunately it fails when applying the patches, seems they're outdated (or already applied?).

My platform is MacOS X 10.4.6 Intel (dual core), and I have the Xcode dev. tools 2.4 installed, plus all C::B dependencies installed from straight MacPorts (wxWidgets, etc).