New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compiling source code 3.4.5 #46

Open
drew345 opened this Issue Jan 25, 2017 · 13 comments

Comments

Projects
None yet
2 participants
@drew345

drew345 commented Jan 25, 2017

The mBlock 3.4.5 source code has been released now (currently as s branch off the main one). Thought I would start this thread about how to compile and run the code! I got the source code compiled with no errors, but it cannot connect to the mBot or Arduino on the serial port. Under “Connect / Serial Port“, it is just blank, no serial ports show up. The Arduino IDE can see the boards, and the released mBlock 3.4.5 software (from mBlock website) can see the boards. Only the compiled source code of mBlock here cannot see the serial ports.

I compiled the source code with the instructions here:
HOW TO COMPILE SOURCE CODE OF MBLOCK USING FLASH BUILDER.docx

And I exported the completed project as a desktop APP (including Adobe AIR). No errors, and it ran so well, I thought everything was fine! Until I found that the compiled mBlock cannot see any board connected as a serial port.

I examined the compiled-exported mBlock with a released version downloaded directly from mBlock and found the following folders were missing from the compiled-exported version:

  • /arduino directory
  • /drivers ch341 directory
  • /usbserial directory

I put those three directories into the mBlock folder of the complied-exported version and ran the program again, but still no luck. The compiled-exported mBlock version cannot see the boards on the serial ports.

Can anyone replicate or get past this step??

Thanks,
Andrew

@arsh09

This comment has been minimized.

Show comment
Hide comment
@arsh09

arsh09 Jan 27, 2017

Hello Andrew,
I am not sure where did you get the code for 3.4.5. I downloaded the code for the older version (I guess it is 3.2.1) and then I noticed that it has a lot of bugs like the was Arduino folder when I clicked the 'Arduino IDE' option So I put it there.

About Serial Port, I have noticed that there are three extensions Serial, Bluetooth and AirHID. As mentioned in the -app.xml file as follow

cc.makeblock.AIRSerial
cc.makeblock.BluetoothExt
cc.makeblock.AirHID
but it gives the error that FB can not load the Air HID extension, though when I change the 'cc' in airHID with 'com'. The code compiles in Debug mode and but the Bluetooth option in Connect is grayed out and no serial port is shown.

If I release the build, after installation, the windows throws 'exe is not a valid win32 error'.

I will be really glad if you could tell where you get the source code of 3.4.5?

Thank you

Edit: My bad, I found the code in the branch. Will report back once I successfully build it

arsh09 commented Jan 27, 2017

Hello Andrew,
I am not sure where did you get the code for 3.4.5. I downloaded the code for the older version (I guess it is 3.2.1) and then I noticed that it has a lot of bugs like the was Arduino folder when I clicked the 'Arduino IDE' option So I put it there.

About Serial Port, I have noticed that there are three extensions Serial, Bluetooth and AirHID. As mentioned in the -app.xml file as follow

cc.makeblock.AIRSerial
cc.makeblock.BluetoothExt
cc.makeblock.AirHID
but it gives the error that FB can not load the Air HID extension, though when I change the 'cc' in airHID with 'com'. The code compiles in Debug mode and but the Bluetooth option in Connect is grayed out and no serial port is shown.

If I release the build, after installation, the windows throws 'exe is not a valid win32 error'.

I will be really glad if you could tell where you get the source code of 3.4.5?

Thank you

Edit: My bad, I found the code in the branch. Will report back once I successfully build it

@arsh09

This comment has been minimized.

Show comment
Hide comment
@arsh09

arsh09 Jan 27, 2017

Andrew,
I did compile the code with 13 warnings. And I can see the com-port after compilation. I am on Windows so I used the three ANEs ending with 'win'. But I can not export the build. I don't know what is going wrong in it. It builds the export but I am unable to run the mBlock Application. It gives me this error.. Can you help? Are you using the self-created certificate?

untitled

arsh09 commented Jan 27, 2017

Andrew,
I did compile the code with 13 warnings. And I can see the com-port after compilation. I am on Windows so I used the three ANEs ending with 'win'. But I can not export the build. I don't know what is going wrong in it. It builds the export but I am unable to run the mBlock Application. It gives me this error.. Can you help? Are you using the self-created certificate?

untitled

@drew345

This comment has been minimized.

Show comment
Hide comment
@drew345

drew345 Jan 27, 2017

drew345 commented Jan 27, 2017

@arsh09

This comment has been minimized.

Show comment
Hide comment
@arsh09

arsh09 Jan 27, 2017

Andrew
I just noticed on another laptop that you would need to install the drivers to get the com-port. The option is inside the Connect drop down menu. Though you will need to put the Arduino files into the bin-debug folder (or better into the src folder, which will be copied to bin-debug).

My issue is that I can release the export build but I can not run the application after its installation (or if I use the captive runtime option during the build process then form the MBlock app).

I am getting the same error i.e. MBlock.exe is not a valid win32 application. Mind that it is the 'Mblock.exe' which I built in the Flash builder. Though the .exe from the MBlock websites works just fine.

I hope that your serial com-port issue will be solved after you install the drivers.

arsh09 commented Jan 27, 2017

Andrew
I just noticed on another laptop that you would need to install the drivers to get the com-port. The option is inside the Connect drop down menu. Though you will need to put the Arduino files into the bin-debug folder (or better into the src folder, which will be copied to bin-debug).

My issue is that I can release the export build but I can not run the application after its installation (or if I use the captive runtime option during the build process then form the MBlock app).

I am getting the same error i.e. MBlock.exe is not a valid win32 application. Mind that it is the 'Mblock.exe' which I built in the Flash builder. Though the .exe from the MBlock websites works just fine.

I hope that your serial com-port issue will be solved after you install the drivers.

@arsh09

This comment has been minimized.

Show comment
Hide comment
@arsh09

arsh09 Jan 27, 2017

The 13 warnings are about the variable names. I just checked that for example 'len' is used twice in the script 'Face Detection'. I meant it was declared twice. This gives the warning. One can choose to ignore them and can rectify them by changing the name of one of the two variables (but almost everywhere where it is used).

Funny thing is I can build a blank ActionScript project and can run (or extract and run) its executable files, but when I do the same with MBlock code, windows throws 'exe is not a win32 valid error'.

arsh09 commented Jan 27, 2017

The 13 warnings are about the variable names. I just checked that for example 'len' is used twice in the script 'Face Detection'. I meant it was declared twice. This gives the warning. One can choose to ignore them and can rectify them by changing the name of one of the two variables (but almost everywhere where it is used).

Funny thing is I can build a blank ActionScript project and can run (or extract and run) its executable files, but when I do the same with MBlock code, windows throws 'exe is not a win32 valid error'.

@drew345

This comment has been minimized.

Show comment
Hide comment
@drew345

drew345 Jan 27, 2017

drew345 commented Jan 27, 2017

@arsh09

This comment has been minimized.

Show comment
Hide comment
@arsh09

arsh09 Jan 27, 2017

Andrew, can you tell me which AIR SDK version u were using when you build?

I noticed that MBlock always use AIRSDK19 version where I am using AIRSDK21 version. Maybe (hopefully, finger crossed) this may be the reason that the exe is not working fine.

arsh09 commented Jan 27, 2017

Andrew, can you tell me which AIR SDK version u were using when you build?

I noticed that MBlock always use AIRSDK19 version where I am using AIRSDK21 version. Maybe (hopefully, finger crossed) this may be the reason that the exe is not working fine.

@drew345

This comment has been minimized.

Show comment
Hide comment
@drew345

drew345 Jan 27, 2017

drew345 commented Jan 27, 2017

@drew345

This comment has been minimized.

Show comment
Hide comment
@drew345

drew345 Jan 27, 2017

drew345 commented Jan 27, 2017

@arsh09

This comment has been minimized.

Show comment
Hide comment
@arsh09

arsh09 Jan 27, 2017

I am not sure if I can see any such button :(
I go to Project --> Export Build Release --> Select 'Signed Application with Captive Runtime' (or also tried 'native Installer' Option),
Select the build files path and to the Next button, I selected the self-created certificate and its password. and then Finish.

Did I miss some step in between?
Sorry for any trouble

arsh09 commented Jan 27, 2017

I am not sure if I can see any such button :(
I go to Project --> Export Build Release --> Select 'Signed Application with Captive Runtime' (or also tried 'native Installer' Option),
Select the build files path and to the Next button, I selected the self-created certificate and its password. and then Finish.

Did I miss some step in between?
Sorry for any trouble

@drew345

This comment has been minimized.

Show comment
Hide comment
@drew345

drew345 Jan 27, 2017

I think your Project - Export is the same I did. The (with Captive Runtime) is what I was remembering.
I don't have my desktop with FlashBuilder with me for 2 more days.

When I added the ANE files, I think I selected:
AIRSerial.ane (not windows option)
BluetoothManager.ane (not windows option)
HID2.4G_win.ane (here windows option, because only option available)

No Trouble at all! Let's do this. Just sorry I don't have computer with flashbuilder with me now. I am in Korea and it is Lunar New Year holiday. write me and we can talk on skype maybe later. rawjmail1@gmail.com
Andrew

drew345 commented Jan 27, 2017

I think your Project - Export is the same I did. The (with Captive Runtime) is what I was remembering.
I don't have my desktop with FlashBuilder with me for 2 more days.

When I added the ANE files, I think I selected:
AIRSerial.ane (not windows option)
BluetoothManager.ane (not windows option)
HID2.4G_win.ane (here windows option, because only option available)

No Trouble at all! Let's do this. Just sorry I don't have computer with flashbuilder with me now. I am in Korea and it is Lunar New Year holiday. write me and we can talk on skype maybe later. rawjmail1@gmail.com
Andrew

@drew345 drew345 closed this Jan 27, 2017

@drew345 drew345 reopened this Jan 27, 2017

@drew345

This comment has been minimized.

Show comment
Hide comment
@drew345

drew345 Jan 27, 2017

Ooops, closed this by accident and just reopened.

drew345 commented Jan 27, 2017

Ooops, closed this by accident and just reopened.

@arsh09

This comment has been minimized.

Show comment
Hide comment
@arsh09

arsh09 Jan 28, 2017

Thanks Andrew.
This is really weird. I have tried this on three different machines/laptops. I can build release other apps (or blank project) but i cant seem to get pass this error after building mblock.

arsh09 commented Jan 28, 2017

Thanks Andrew.
This is really weird. I have tried this on three different machines/laptops. I can build release other apps (or blank project) but i cant seem to get pass this error after building mblock.

bigeyex added a commit that referenced this issue Feb 6, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment