Building companion9x

A fork of eePe. It's aim is to provide one tool that works with ALL firmwares!
bertrand35
9x Developer
Posts: 2764
Joined: Fri Dec 30, 2011 11:11 pm
Country: -

Re: Building companion9x

Post by bertrand35 »

Hi Carl and Groot,
May I close issue 29 then? It seems to me that everything is working on the Mac side?
Thanks for your help!
Bertrand.

ccpetersen
Posts: 42
Joined: Tue Dec 27, 2011 7:54 pm
Country: -

Re: Building companion9x

Post by ccpetersen »

Sure.

Minor problem with CMakeList.txt; the target "addframeworks" fails if make is run more than once because the qt_menu.nib/.svn directory is copied into the Resource directory. Complicated by the "clean" target not removing companion.app.

Code: Select all

replace: COMMAND cp -R ${PROJECT_SOURCE_DIR}/../macbuild/qt_menu.nib companion9x.app/Contents/Resources

with:    COMMAND rsync -r --exclude=.svn ../macbuild/qt_menu.nib/ companion9x.app/Contents/Resources/qt_menu.nib
Romolo
9x Developer
Posts: 1109
Joined: Sat Dec 31, 2011 12:11 am
Country: -
Location: Massa (MS), Tuscany, Italy

Re: Building companion9x

Post by Romolo »

Hi, may you try to add SDL devel and test if joystick support works also under MACOS ?
ccpetersen
Posts: 42
Joined: Tue Dec 27, 2011 7:54 pm
Country: -

Re: Building companion9x

Post by ccpetersen »

Unfortunately I don't own a joystick to test with. :(
User avatar
GrootWitbaas
Posts: 358
Joined: Tue Dec 27, 2011 8:57 pm
Country: -
Location: Germany

Re: Building companion9x

Post by GrootWitbaas »

ccpetersen wrote:Sure.

Minor problem with CMakeList.txt; the target "addframeworks" fails if make is run more than once because the qt_menu.nib/.svn directory is copied into the Resource directory. Complicated by the "clean" target not removing companion.app.

Code: Select all

replace: COMMAND cp -R ${PROJECT_SOURCE_DIR}/../macbuild/qt_menu.nib companion9x.app/Contents/Resources

with:    COMMAND rsync -r --exclude=.svn ../macbuild/qt_menu.nib/ companion9x.app/Contents/Resources/qt_menu.nib

The line above did not work correctly, but I have changed it to

Code: Select all

COMMAND rsync -r --exclude=.svn ${PROJECT_SOURCE_DIR}/../macbuild/qt_menu.nib companion9x.app/Contents/Resources
Should do the same, but please report back.

Will test SDL now.

Initial test of SDL works fine (used PS3 controller for test)
General trouble maker and wannabee Dev

ccpetersen
Posts: 42
Joined: Tue Dec 27, 2011 7:54 pm
Country: -

Re: Building companion9x

Post by ccpetersen »

Nope, your rsync command line copies the "contents" of qt_menu.nib to the Resource directory not the qt_menu.nib folder. The app crashes if you do that. The original line I posted works as expected.
User avatar
GrootWitbaas
Posts: 358
Joined: Tue Dec 27, 2011 8:57 pm
Country: -
Location: Germany

Re: Building companion9x

Post by GrootWitbaas »

The line you posted creates a error in Xcode, i'll post it now.

Code: Select all

mkdir -p companion9x.app/Contents/translations


cp -r /Users/grootwitbaas/companion9x/trunk/mac/*.qm companion9x.app/Contents/translations


rsync -r --exclude=.svn ../macbuild/qt_menu.nib/ companion9x.app/Contents/Resources/qt_menu.nib


rsync: mkdir "/Users/grootwitbaas/companion9x/trunk/mac/companion9x.app/Contents/Resources/qt_menu.nib" failed: No such file or directory (2)


rsync error: error in file IO (code 11) at /SourceCache/rsync/rsync-42/rsync/main.c(544) [receiver=2.6.9]


rsync: connection unexpectedly closed (8 bytes received so far) [sender]


rsync error: error in rsync protocol data stream (code 12) at /SourceCache/rsync/rsync-42/rsync/io.c(452) [sender=2.6.9]


make: *** [addframeworks_buildpart_0] Error 12


Command /bin/sh failed with exit code 2

General trouble maker and wannabee Dev
ccpetersen
Posts: 42
Joined: Tue Dec 27, 2011 7:54 pm
Country: -

Re: Building companion9x

Post by ccpetersen »

Sorry I have no interest in using Xcode or the dmg image. I rely on cmake and make to produce the app for testing here daily. I'm writing my own version of 9x transmitter firmware and I need an up to the minute companion9x for combined testing.

Please do not break the cmake build process as it stands now.
ccpetersen
Posts: 42
Joined: Tue Dec 27, 2011 7:54 pm
Country: -

Re: Building companion9x

Post by ccpetersen »

Looks like some shell script error. Do the "companion.app/Contents/Resources" directories exist when this shell script is run?

GrootWitbaas wrote:The line you posted creates a error in Xcode, i'll post it now.

Code: Select all

mkdir -p companion9x.app/Contents/translations


cp -r /Users/grootwitbaas/companion9x/trunk/mac/*.qm companion9x.app/Contents/translations


rsync -r --exclude=.svn ../macbuild/qt_menu.nib/ companion9x.app/Contents/Resources/qt_menu.nib


rsync: mkdir "/Users/grootwitbaas/companion9x/trunk/mac/companion9x.app/Contents/Resources/qt_menu.nib" failed: No such file or directory (2)


rsync error: error in file IO (code 11) at /SourceCache/rsync/rsync-42/rsync/main.c(544) [receiver=2.6.9]


rsync: connection unexpectedly closed (8 bytes received so far) [sender]


rsync error: error in rsync protocol data stream (code 12) at /SourceCache/rsync/rsync-42/rsync/io.c(452) [sender=2.6.9]


make: *** [addframeworks_buildpart_0] Error 12


Command /bin/sh failed with exit code 2

User avatar
GrootWitbaas
Posts: 358
Joined: Tue Dec 27, 2011 8:57 pm
Country: -
Location: Germany

Re: Building companion9x

Post by GrootWitbaas »

Ok so if the line I have does not work for you, please see if the -f will at least work for both. I tested it in xCode and it worked.

We have reverted the changes and included a -f option so the current line is

Code: Select all

COMMAND cp -rf ${PROJECT_SOURCE_DIR}/../macbuild/qt_menu.nib companion9x.app/Contents/Resources
This should overwrite if there was a build before. This should work for both.

I am no Dev and I do this as a hobby. I try only my best, and am sorry if my lack of coding experience created problems for you.
General trouble maker and wannabee Dev
ccpetersen
Posts: 42
Joined: Tue Dec 27, 2011 7:54 pm
Country: -

Re: Building companion9x

Post by ccpetersen »

Yes, the -Rf switch will work. The reason I went with rsync is that the .svn directory really has no place in the app bundle. Perhaps deleting it after the copy would clean things up and allow both build methodologies to work.

Edit: After some thought I still think rsync is the correct tool to use here. What you need to do is figure out why it's failing in your build context. The man page lists a plethora of options which might overcome whatever issues you encounter.
User avatar
GrootWitbaas
Posts: 358
Joined: Tue Dec 27, 2011 8:57 pm
Country: -
Location: Germany

Re: Building companion9x

Post by GrootWitbaas »

Ok so before I break the CMakeList.txt and you cron job, could you please check if the following works for you.

Code: Select all

COMMAND rsync -r --exclude=.svn  ${PROJECT_SOURCE_DIR}/../macbuild/qt_menu.nib companion9x.app/Contents/Resources/
This copies the complete qt_menu.nib to Resources without the .svn.

If it does not break you cron job then I will commit

Also I have moved the line up from the "addframeworks POST_BUILD" to "addframworks ALL" section

Edit: corrected the line of code :oops:
General trouble maker and wannabee Dev
ccpetersen
Posts: 42
Joined: Tue Dec 27, 2011 7:54 pm
Country: -

Re: Building companion9x

Post by ccpetersen »

Yep, looks broken.

I'll tell you what - I've been wanting to change over from macports to homebrew (uses qt 4.8 and other niceties) so why don't I just maintain my own build process and you can do what you want with the wiki MacBuild and CMakeList.txt. I'll just maintain my own.
bertrand35
9x Developer
Posts: 2764
Joined: Fri Dec 30, 2011 11:11 pm
Country: -

Re: Building companion9x

Post by bertrand35 »

Carl,
Would you like to tell us what is wrong? Groot did a great work to offer to all non-developers a clean dmg so that it's now really easy to install.
If really needed, it should be easy to test inside the CMakeLists.txt whether the generator used is XCode or not and write different code for you. But we need to know what you are missing, and what are the errors you are facing!
Thanks for your help,
Bertrand.

Post Reply

Return to “companion9x”