Skip to content
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

Linux packages for latest releases (post 1.4.2)? #157

Open
casusbelli opened this issue Mar 7, 2022 · 23 comments
Open

Linux packages for latest releases (post 1.4.2)? #157

casusbelli opened this issue Mar 7, 2022 · 23 comments
Labels
help wanted Extra attention is needed

Comments

@casusbelli
Copy link

Hi!
Is there a location providing newer packages of blockly than 1.4.2 for Linux?

We've been running the OS X version of blockly, where we can upload and run stuff on our otto but there are compile issues with 50-60% of the blockly blocks.
We now installed a linux system on an old laptop which builds the code fine but so far i'm unable to upload code to our otto.
While checking this repo i found that the installed blockly release is somewhat outdated (1.4.2) which is why i'm looking for packages of the later releases.
Thanks!

@cparrapa
Copy link
Member

cparrapa commented Mar 9, 2022

Hi @casusbelli

We put them here https://github.com/OttoDIY/blocklyLinux then you need to remplace all the www folder from this repo to keep it updated.

Ideally we want to merge to this repo so it is all together but we don't know how to exactly create the installers without interfering with other OS, so help need it here.

OS X version which one are you using and what blocks specifically have bugs? Is this something that works on Win?

@rejas
Copy link
Contributor

rejas commented Mar 11, 2022

Hi @cparrapa is there a task list of stuff to do to get linux support merged in here? Or how can I help?

@cparrapa
Copy link
Member

cparrapa commented Mar 11, 2022

Hi @rejas

To be honest I don't know were to start, maybe easier to create the proper scripts for packing on Linux in the packgage.json file?
https://github.com/OttoDIY/blockly/blob/master/package.json

Long story short, a guy made the Linux version that is one of the branches in this repo then he updated and we put here https://github.com/OttoDIY/blocklyLinux since He made many changes to be able to work as the Windows version and does not use Arduino CLI, so that is why we kept separate until we figure out how to merge into one Software, that is technically possible since we are using Electronjs.

I am not familiar with Linux for developing, so any support is greatly appreciated. Thanks for your help.

@logix5
Copy link
Contributor

logix5 commented Mar 11, 2022 via email

@rejas
Copy link
Contributor

rejas commented Mar 13, 2022

Thanks for your feedback. I might be of help with gettung the package.json in shape for linux (and mac) and the stuff that has to do with the electron builder etc.

I am not very familiar with the whole "arduino toolchain" and what has to be done there to get it ready for linux. Or is that a non-issue since linux support is working in the toolchain and only the isntaller needs to be fixed for linux?

So, having said that, here are more questions:

  • you also use this repo for compiling the mac os dmg? because I cant find a script for that in the package.json
  • what minimum version is required for node and npm to get this thing build? found it in the readme. maybe increase it to v14 (or 16) since 12 is not getting updates anymore?
  • any reason why the electron version and other dependencies are stuck in very old and unspported version?
  • the dist directory created when running the compiler task is placed outside the project dirs? on purpose or bug? edit: created a PR for this :-)

@rejas
Copy link
Contributor

rejas commented Mar 13, 2022

Also: this seems to be a clone of blocklino (alas not a fork), just out of curiosity: what difference is to the original fork (broadly spoken) since this repo here is focused on otto diy?

@cparrapa
Copy link
Member

cparrapa commented Mar 13, 2022

Good questions @rejas

In regards to Linux we know very little how to work, I had one around but is soo slow that I could not use for debugging.

  1. This repo also can compile dmg you can see at the end of the package.json follow this https://docs.google.com/document/d/18_sVp2bEYxbGbeXeBdbZlCVgsqRWoC_0sH6FsysbwhA/edit?usp=sharing
  2. This new versions for both npm and electron increase created errors in the compilations so we were afraid to update, so we are stuck there until is tested with new versions and we are sure that everything works.
  3. The dist directory was like that from blocklino so not sure if is a good practice Thanks for the PR looks good!
  4. This is pretty much a clone of Blocklino focus on Otto DIY but also any other Arduino project we included ESP boards too and fixed lots of bugs UI and UX issues on the way.

@logix5
Copy link
Contributor

logix5 commented Mar 13, 2022 via email

@rejas
Copy link
Contributor

rejas commented Mar 14, 2022

Took a swing at building a linux deb. Basically I only did:

  • downloaded arduino cli for linux and put the file in "compilation/arduino"
  • added a new npm script "build_linux": "builder --linux" for creating a deb (which worked with some small fix)
  • installation of deb worked and blockly started
  • connecting didnt work though:
    Error: Command failed: /opt/OttoBlockly/compilation/arduino/arduino-cli compile --fqbn arduino:avr:nano sketch/sketch.ino Error: invalid path writing inventory file: inventory.yaml error: open inventory.yaml: permission denied time="2022-03-14T20:54:47+01:00" level=error msg="Error: invalid path writing inventory file: inventory.yaml error: open inventory.yaml: permission denied"

@rejas
Copy link
Contributor

rejas commented Mar 14, 2022

Also: Does the npm script "start" work for anyone? I only get a white window when running it due to line 17
where the path to the index.html file is created only for the packaged files and not for this usecase where the www-directory is in the same directory

@rejas
Copy link
Contributor

rejas commented Mar 14, 2022

changing that line to
mainWindow.loadURL("file://" + path.join(__dirname, './www/index.html'))
would make the "npm start" work but of course wouldnt work for the packaged installers.

@logix5
Copy link
Contributor

logix5 commented Mar 14, 2022 via email

@casusbelli
Copy link
Author

[..]

We put them here https://github.com/OttoDIY/blocklyLinux then you need to remplace all the www folder from this repo to keep it updated.

Ideally we want to merge to this repo so it is all together but we don't know how to exactly create the installers without interfering with other OS, so help need it here.

OS X version which one are you using and what blocks specifically have bugs? Is this something that works on Win?

Thanks for the hints, I'll try replacing the code manually for starters.

Regarding OS X I was using last blockly/OS X releases, probably missing some build related dependencies from the developer setups. I might re-visit that and see if if can file some helpful tickets.

@rejas
Copy link
Contributor

rejas commented Mar 15, 2022

Maybe we should open a discussion about "linux and mac installers" instead of discussing here everything?

@cparrapa
Copy link
Member

Good Idea @rejas
One last thing you can have a look how @agomezgar managed to package Linux here https://github.com/agomezgar/OttoBlocklyLinux the only problem is that is not updated and lack of Arduino CLI

Install node.js
Clone the repository
Run npm install
If you want to test the software, run npm start
To compile, run npm run compiler

@rejas
Copy link
Contributor

rejas commented Mar 18, 2022

Regarding OS X I was using last blockly/OS X releases, probably missing some build related dependencies from the developer setups. I might re-visit that and see if if can file some helpful tickets.

I can confirm that the mac os version doesnt work for me neither (yeah, i have linux and mac laptops here as well as a windows machine so I am very eager to get blockly running on all three OS (windows 1.4.7 works fine, so next i slinux and mac :-)

Anyway, regarding mac, my observations are:

First the electron builder dependency has to be updated to at least v21 so that the dmg building process runs on macOS (Big Sur).

Secondly, the arduino cli is missing. Downloadable is only the single exectuable, but once the app runs and tries to compile/upload programs, it complains about a missing arduino_avt which has to be installed via
./arduino-cli core install arduino:avt

The files installed are in the gitignore and looking through the sourcecode here I find this commit:
412f1f2

So, now I would like to know how those files can be re-generated at runtime. Any help @cparrapa or @takujikawata-pr ?

@logix5
Copy link
Contributor

logix5 commented Mar 19, 2022 via email

@rejas
Copy link
Contributor

rejas commented Mar 19, 2022

Thanks for the info @logix5

I did those steps already (for mac). But I was wondering if those things can happen during building the installer?

@takujikawata-pr
Copy link
Member

Hi,
Something from Mac build! I hope this may help some! I just added 1.4.7 installer in the release (https://github.com/OttoDIY/blockly/releases/download/v1.4.7/ottoblockly-1.4.7.dmg)

Mac build is still kind of experimental, so I think I need further adjustment to the build steps.
F.Y.I, following is my memo for Mac build:
https://docs.google.com/document/d/18_sVp2bEYxbGbeXeBdbZlCVgsqRWoC_0sH6FsysbwhA/edit?usp=sharing
(If Mac release doesn't work, I'd like to know how it fails. I'll then analysis the problem and will fix!)

I guess Linux build can also be done something similar. I'll try Linux build, too.

@logix5
Copy link
Contributor

logix5 commented Mar 19, 2022 via email

@rejas
Copy link
Contributor

rejas commented Mar 19, 2022

@takujikawata-pr

Yeah, your memo is quite accurate to how I managed to make a dmg on my mac.

Am I correct, that there is no automatic release-process that puts the exe and dmg installers into the github? You do it manually?

@logix5
Copy link
Contributor

logix5 commented Mar 21, 2022 via email

@cparrapa cparrapa added the help wanted Extra attention is needed label Mar 22, 2022
@cparrapa
Copy link
Member

Hi @rejas
Sorry for the late reply here, I have been busy and then the holidays...

I am not sure for Mac but for windows I just do a npm run publier this automatically creates the new release with the new version number and puts the exe installers into the github, but this requires the token for the repo which you should be able to create as member of the repo.

All PR merged, what is left to put in sync all OS, specially the linux one that we are missing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

5 participants