Thread 'Compiling the example_app on Windows'

Message boards : API : Compiling the example_app on Windows
Message board moderation

To post messages, you must log in.

AuthorMessage
deleteAccountPlease

Send message
Joined: 14 Mar 13
Posts: 13
Belgium
Message 48579 - Posted: 10 Apr 2013, 16:49:37 UTC

Hi,

The example_app uses "upper_case.cpp" as its foundation and I'm able to compile these .cpp files to their executables. (using the make-command)

I want to modify my application (upper_case) to a new one and thus update the files found in /boinc-trunk/samples/example_app/bin to their newer versions.

The mac and linux are of no importance to me, only the Windowsx64 application is (/22489/windows_x86_64.exe)

According to this webpage: http://boinc.berkeley.edu/trac/wiki/CompileApp
the /boinc-trunk/win_build/boinc_samples.sln should be able to recompile the "upper_case.exe"-file to the "/22489/windows_x86_64.exe"-file and thus update the application.

Am I seeing this correctly untill now? Or is there another option that is much more straight-forward and easy?

The problem is that I have no idea how to run this .sln-file in my debian6 VM?

Thnx in advance,

Resk
ID: 48579 · Report as offensive
ProfileJord
Volunteer tester
Help desk expert
Avatar

Send message
Joined: 29 Aug 05
Posts: 15560
Netherlands
Message 48580 - Posted: 10 Apr 2013, 17:03:15 UTC - in response to Message 48579.  
Last modified: 10 Apr 2013, 17:04:16 UTC

You can't. The sln (or solution) file is for Visual Studio.
There is however a converter, I see: http://code.google.com/p/make-it-so/

But checking the source code, I see that the example apps come pre-built these days. Just make sure you download boincv2, it'll then be in samples/example_app/bin/22489

Can also be checked with the browser link: http://boinc.berkeley.edu/trac/browser/boinc-v2/samples/example_app/bin/22489
ID: 48580 · Report as offensive
deleteAccountPlease

Send message
Joined: 14 Mar 13
Posts: 13
Belgium
Message 48583 - Posted: 10 Apr 2013, 23:39:47 UTC
Last modified: 11 Apr 2013, 0:11:49 UTC

These sample apps come indeed preinstalled inside the debian6 VM.

Let me try to ask my question in another way: (sorry about this)
I have an application (.exe) in one of my directories and want to create a working downloadable application for it that can run on a windowsx64 client.

After some searching, might have found a way how to do this?
http://boinc.berkeley.edu/trac/wiki/WrapperApp
I have no idea though, how to get the this wrapper inside my VM (ftp command doesn't work in debian :( )

I'll keep you updated on my progress....

PS: the app I want to wrap is a modified version of the "upper_case.cpp"-file hence the confusion.
ID: 48583 · Report as offensive
ProfileJord
Volunteer tester
Help desk expert
Avatar

Send message
Joined: 29 Aug 05
Posts: 15560
Netherlands
Message 48585 - Posted: 11 Apr 2013, 1:17:00 UTC - in response to Message 48583.  

I have no idea though, how to get the this wrapper inside my VM (ftp command doesn't work in debian :( )

It's not on an FTP server anyway. You need Git, which most Linux distros have installed by default. And then you can just download the whole source code, so you're up-to-date and have everything available to you.
ID: 48585 · Report as offensive
ChristianB
Volunteer developer
Volunteer tester

Send message
Joined: 4 Jul 12
Posts: 321
Germany
Message 48588 - Posted: 11 Apr 2013, 9:12:42 UTC

In order to build your own windows executables you either need Visual Studio or mingw to cross compile.

If you already have an .exe file and want to use the wrapper feature you can use the SSH service in the debian6 VM to insert your files. Just use an FTP-Tool like Filezilla and connect using the SFTP Protocol. Username and Passwort is the same as you login with. Information is available on the page you linked to in your post.
ID: 48588 · Report as offensive
deleteAccountPlease

Send message
Joined: 14 Mar 13
Posts: 13
Belgium
Message 48589 - Posted: 11 Apr 2013, 9:43:39 UTC - in response to Message 48588.  
Last modified: 11 Apr 2013, 10:38:32 UTC

In order to build your own windows executables you either need Visual Studio or mingw to cross compile.

If you already have an .exe file and want to use the wrapper feature you can use the SSH service in the debian6 VM to insert your files. Just use an FTP-Tool like Filezilla and connect using the SFTP Protocol. Username and Passwort is the same as you login with. Information is available on the page you linked to in your post.


Seems I'm misinterpreting the usage of the wrapper. After some reading I think the wrapper is just a way of making application that were never ment to be run in BOINC, work in BOINC. Which is not something I want/Am looking for.

Plan of action:
- rewrite the modified version of upper_case.cpp in my W7 OS
- Compile this modified version in my W7 OS (using visual basic)
- Put this compiled .exe in a FileZilla server in my W7 OS
- Connect to the server in my debian6 VM using sftp and get the .exe file
- Place .exe-file in the correct directory
- Working product?

@Ageless: I'm not quite sure what reinstalling/redownloading the entire BOINC source would change since I already have it installed on my debian6 VM? And browsing through http://boinc.berkeley.edu/trac/browser/boinc-v2?order=name does not show any major changes compared to the BOINC server I have installed now.
ID: 48589 · Report as offensive
deleteAccountPlease

Send message
Joined: 14 Mar 13
Posts: 13
Belgium
Message 48590 - Posted: 11 Apr 2013, 11:29:20 UTC - in response to Message 48589.  
Last modified: 11 Apr 2013, 11:43:22 UTC

@Ageless: I think I see what you ment now as this wiki entry: http://boinc.berkeley.edu/trac/wiki/CompileApp describes the usage of this .git utility.

Seems I need to download the boinc source on my W7 x64 to succesfully open the .sln and compile the modified version of upper_case.cpp.

I will try to do this and succesfully follow the entries described in the link above.

Updated plan of action:
- download the boinc source using git on my W7 OS
- rewrite the modified version of upper_case.cpp in my W7 OS
- Compile this modified version in my W7 OS (using visual basic) on the boinc_samples.sln file
- Put this compiled .exe in a FileZilla server in my W7 OS
- Connect to the server in my debian6 VM using sftp and get the .exe file
- Place .exe-file in the correct directory
- Working product?

(I hope this is the correct way of proceeding?)

Sorry for my confusing questions and thnx for answering to a noob like me.
ID: 48590 · Report as offensive
ProfileJord
Volunteer tester
Help desk expert
Avatar

Send message
Joined: 29 Aug 05
Posts: 15560
Netherlands
Message 48591 - Posted: 11 Apr 2013, 11:34:06 UTC - in response to Message 48589.  

@Ageless: I'm not quite sure what reinstalling/redownloading the entire BOINC source would change since I already have it installed on my debian6 VM? And browsing through http://boinc.berkeley.edu/trac/browser/boinc-v2?order=name does not show any major changes compared to the BOINC server I have installed now.

I think I read your intention wrong. It was late, I read ftp and thought you tried to use an FTP client to get the example apps from the web site. All I did was point out they were in the source code. Sorry for the confusion.
ID: 48591 · Report as offensive
ChristianB
Volunteer developer
Volunteer tester

Send message
Joined: 4 Jul 12
Posts: 321
Germany
Message 48594 - Posted: 11 Apr 2013, 19:53:11 UTC - in response to Message 48590.  

Seems I need to download the boinc source on my W7 x64 to succesfully open the .sln and compile the modified version of upper_case.cpp.

Please be aware that this "git thing" is a source control system that will overwrite your changes to upper_case.cpp next time you update the source code. A better way is to copy the file and make the changes there. Maybe you can copy the Windows examples and modify them within Visual Studio for C++ (not Visual Basic!)

I will try to do this and succesfully follow the entries described in the link above.

Updated plan of action:
- download the boinc source using git on my W7 OS
- rewrite the modified version of upper_case.cpp in my W7 OS
- Compile this modified version in my W7 OS (using visual basic) on the boinc_samples.sln file
- Put this compiled .exe in a FileZilla server in my W7 OS
- Connect to the server in my debian6 VM using sftp and get the .exe file
- Place .exe-file in the correct directory
- Working product?

(I hope this is the correct way of proceeding?)

No it's not.

- download the boinc source using git on Win7
- copy the Windows example files (including boinc_samples.sln)
- Compile this modified version in Win7 (using visual Studio!)
- Connect to the server in my debian6 VM using FileZilla Client (sftp) and put the .exe file in the correct directory
- run the appropriate commands inside the debian6 VM to update the applications

And of course my usual questions:
- What's your programming / Linux experience?
- What kind of application do you want to run?
- What documentation did you read before posting?
- Any suggestions for improving the documentation?

Regards
Christian
ID: 48594 · Report as offensive
deleteAccountPlease

Send message
Joined: 14 Mar 13
Posts: 13
Belgium
Message 48595 - Posted: 11 Apr 2013, 21:06:58 UTC - in response to Message 48594.  
Last modified: 11 Apr 2013, 21:14:56 UTC


No it's not.

- download the boinc source using git on Win7 (done)
- copy the Windows example files (including boinc_samples.sln) (done)
- Compile this modified version in Win7 (using visual Studio!) (works for 32-bit, but having problems with getting the version for 64-bit)
I ment visual studio, but wrote visual basic by mistake
- Connect to the server in my debian6 VM using FileZilla Client (sftp) and put the .exe file in the correct directory (filezilla server has been configured and is ready to be contacted)
- run the appropriate commands inside the debian6 VM to update the applications (I think the commands that you are referring to are 'bin/xadd' and 'bin/update_versions' if I'm correct)

And of course my usual questions:
- What's your programming / Linux experience?
Programming is okay I guess. Very decent skills in Java and halfbaked in C++.
My Linux experience is limited to this debian6 VM.

- What kind of application do you want to run?
I simply want to modify the u2.cpp to have a different function.
The classical version converts a string of characters to upper case, but
the modified application will calculate the factorial of a given number (given in the input file). I have already modified the sample_work_generator to fit my needs. (which was surprisingly easy using the make command)

- What documentation did you read before posting?
I have read the following documents before posting:
- http://boinc.berkeley.edu/trac/wiki/CompileApp (only after noticing that the wrapper didn't fit my needs)
- http://boinc.berkeley.edu/trac/wiki/WrapperApp (turned out to be useless)
- the quickstart page
- http://boinc.berkeley.edu/trac/wiki/DesktopGrid
- http://boinc.berkeley.edu/trac/wiki/ServerIntro
- http://boinc.berkeley.edu/trac/wiki/VmServer
- a whole bunch of others that were of lesser importance

- Any suggestions for improving the documentation?
It is in my opinion very noob-unfriendly, which scares newbies away. After getting a lil bit accustomed to BOINC it is a lot better, but stays unclear.
Regards
Christian


Not really sure what is different in your to-do checklist beyond the visual basic error I made.

I have suceeded in compiling the 32-bit version of the example application, but 64-bit stays bugging out. (Probably because Visual Studio 2005 has some problems with the 64-bit architecture?)

On a related note: Is the 32-bit version of the example application called windows_intelx86? And the 64-bit version windows_x86_64? (Seems logical to me)

Thanks for your precious time & I'll keep you updated,

Resk
ID: 48595 · Report as offensive
ChristianB
Volunteer developer
Volunteer tester

Send message
Joined: 4 Jul 12
Posts: 321
Germany
Message 48598 - Posted: 12 Apr 2013, 10:02:13 UTC - in response to Message 48595.  

- Connect to the server in my debian6 VM using FileZilla Client (sftp) and put the .exe file in the correct directory (filezilla server has been configured and is ready to be contacted)

What I meant is: You don't need a FileZilla Server on your Win7 Host. You just need an FTP-Client that can SFTP into the debian6 VM. There is already an OpenSSH Server running that will accept the SFTP requests. This way you push your files into the VM, as you try to pull the files into the VM. With my approach you don't need to enter commands inside the VM.

- run the appropriate commands inside the debian6 VM to update the applications (I think the commands that you are referring to are 'bin/xadd' and 'bin/update_versions' if I'm correct)

Yes, that's correct. Assuming that you created the correct directories and placed the correct files inside the PROJECT_ROOT/apps directory. Please see the manuals for xadd and update_versions.

As a linux beginner I would suggest to read some basic command references like this one.

- Any suggestions for improving the documentation?
It is in my opinion very noob-unfriendly, which scares newbies away. After getting a lil bit accustomed to BOINC it is a lot better, but stays unclear.

That is true for all the technical documentation about software, can you be more specific?

I have suceeded in compiling the 32-bit version of the example application, but 64-bit stays bugging out. (Probably because Visual Studio 2005 has some problems with the 64-bit architecture?)

Maybe this msdn article can help you?

On a related note: Is the 32-bit version of the example application called windows_intelx86? And the 64-bit version windows_x86_64? (Seems logical to me)

Yes, that is correct. See BoincPlatforms.
ID: 48598 · Report as offensive
deleteAccountPlease

Send message
Joined: 14 Mar 13
Posts: 13
Belgium
Message 48603 - Posted: 12 Apr 2013, 13:32:25 UTC - in response to Message 48598.  
Last modified: 12 Apr 2013, 13:33:59 UTC


What I meant is: You don't need a FileZilla Server on your Win7 Host. You just need an FTP-Client that can SFTP into the debian6 VM. There is already an OpenSSH Server running that will accept the SFTP requests. This way you push your files into the VM, as you try to pull the files into the VM. With my approach you don't need to enter commands inside the VM.

worked perfectly :D


That is true for all the technical documentation about software, can you be more specific?

There's a red line missing, the wiki is a bunch of documents that has no overarching story. This makes it dificult to find the correct files.
ID: 48603 · Report as offensive
ChristianB
Volunteer developer
Volunteer tester

Send message
Joined: 4 Jul 12
Posts: 321
Germany
Message 48606 - Posted: 12 Apr 2013, 15:47:08 UTC

We have two pages that contain all the other pages in small groups in order to create such an arch:

For people creating projects/developing apps: ProjectMain

For people participating in the development of BOINC itself: SoftwareDevelopment

The first page should be the starting point from which to start. Building a story is a little bit difficult because there are a lot of different use cases. I also thought it would be good to have a chapter-like manual with links to previous and next pages but that's hard to maintain.
ID: 48606 · Report as offensive
deleteAccountPlease

Send message
Joined: 14 Mar 13
Posts: 13
Belgium
Message 48628 - Posted: 14 Apr 2013, 7:31:15 UTC - in response to Message 48606.  

Everything is perfectly working now :D


The first page should be the starting point from which to start. Building a story is a little bit difficult because there are a lot of different use cases. I also thought it would be good to have a chapter-like manual with links to previous and next pages but that's hard to maintain.


Indeed, you have only that much resources to work with as a freesource project.
The pages you linked to are more of the genre index lists and without having any prior information about the different BOINC terms it's difficult to find anything back in there without reading a large chunk to find what you are looking for.
ID: 48628 · Report as offensive

Message boards : API : Compiling the example_app on Windows

Copyright © 2024 University of California.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.