m_thread

  • *****
  • 87
  • GCS is my home
    • LibrePilot
Re: Trying to build source on Windows
« Reply #15 on: July 31, 2015, 11:29:58 am »
Mark

When you installed msysgit on your Windows box. Did you install it in C:\Git as the instructions said? Or was it installed somewhere else by default?

/F

Mark

  • *
  • 8
Re: Trying to build source on Windows
« Reply #16 on: July 31, 2015, 11:46:39 am »
Hi m_thread yes I did do that and f5soh I'm using windows command line

Ok I think I've found the problem, I've tweaked D:\Source\LibrePilot\ground\uavobjgenerator\main.cpp
The command line being passed in is
-Java
D:/Source/LibrePilot/shared/uavobjectdefinition
D:/Source/LibrePilot
THe source code does
bool do_java       = (arguments_stringlist.removeAll("-java") > 0);

This means that do_java is not being set as the code is expecting a lower case j
No clue where the -Java is being passed from so I've just changed main.cpp to look for "-Java", maybe the code should lowecase everything?
« Last Edit: July 31, 2015, 11:53:30 am by Mark »

f5soh

  • *****
  • 4572
    • LibrePilot
Re: Trying to build source on Windows
« Reply #17 on: July 31, 2015, 12:39:13 pm »
I see nothing wrong, Makefile call generator with "-java" and command option uses "-java"
all lowercase.

Why your system display with "-Java" ?

Mark

  • *
  • 8
Re: Trying to build source on Windows
« Reply #18 on: July 31, 2015, 01:12:31 pm »
I don't know, I'm going to have to go through how the whole creation of the makefile's work, I'll let you know when I figure it out, thanks for helping me though m_thread and f5soh.

f5soh

  • *****
  • 4572
    • LibrePilot
Re: Trying to build source on Windows
« Reply #19 on: July 31, 2015, 01:14:42 pm »
Inside Makefile there is only "-java"

Here 'make uavobjects' works here in both cases : git bash or win cmd

Mark

  • *
  • 8
Re: Trying to build source on Windows
« Reply #20 on: July 31, 2015, 02:20:20 pm »
Yes it's extremely odd.  tools\bin\make uavobjects_java V=1 converts the lowercase java into Java the "variable" $* is clearly changing I can see from the the CD and mkdir commands

( cd D:/Source/LibrePilot/build/uavobject-synthetics/Java && \
    D:/Source/LibrePilot/build/uavobjgenerator/uavobjgenerator.exe -Java D:/Source/LibrePilot/sha
/uavobjectdefinition D:/Source/LibrePilot ; \
)

I'm gonna have to figure out why now as it's so odd

Finally figured it out, it's actually make.exe doing it this is a minimal make file
foo_%:
   echo $*

D:\Source\LibrePilot>tools\bin\makeorig foo_java -f Makefile.small
echo Java
Java
Thats the output
Now with make version 4.1
D:\Source\LibrePilot>tools\bin\make4.1 foo_java -f Makefile.small
echo java
java
« Last Edit: August 03, 2015, 03:11:03 pm by Mark »

Re: Trying to build source on Windows
« Reply #21 on: August 14, 2015, 08:47:41 am »
I've been trying to build in Win10 and get an error (screen shot attached).

I downloaded the zip and unpacked it to c:/code - open gitbash and go to c:/code/LibrePilot - then followed the steps here installing the toolchains etc : https://wiki.openpilot.org/display/WIKI/Windows+-+Building+and+Packaging

tools/bin/make all package - looks like everything is working, but get errors at the end (screen shot attached). Can't find the gcs.exe in any of the folders

Is there a download source for the windows binery somewhere? I'd like to test fly it.

Thanks

f5soh

  • *****
  • 4572
    • LibrePilot
Re: Trying to build source on Windows
« Reply #22 on: August 14, 2015, 11:29:37 am »
In fact git commit hash is used so building from zip archive don't work.

You should clone repo using :
git clone https://bitbucket.org/librepilot/librepilot.git

Re: Trying to build source on Windows
« Reply #23 on: August 14, 2015, 03:55:19 pm »
Okay cool I'll give that a shot

Re: Trying to build source on Windows
« Reply #24 on: August 14, 2015, 04:25:30 pm »
Looks like the clone operation worked, but now I can't checkout next branch - already exists, nor install tool chains.( see attached screen shot)

Sorry this all is not intuitive to me, but I can follow instructions for the most part - would appreciate a kick in the right direction.

Thanks

f5soh

  • *****
  • 4572
    • LibrePilot
Re: Trying to build source on Windows
« Reply #25 on: August 14, 2015, 04:40:57 pm »
try a simple 'git checkout next'

'git status' give you some info

check dir contents and files under ./make/scripts/

Without win_sdk_install.sh you can't do more...



Re: Trying to build source on Windows
« Reply #26 on: August 14, 2015, 06:27:37 pm »
try a simple 'git checkout next'

That was it - successfully built in Win10.

Thanks f5soh

f5soh

  • *****
  • 4572
    • LibrePilot
Re: Trying to build source on Windows
« Reply #27 on: August 14, 2015, 06:40:08 pm »
Nice, enjoy :D