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

Primera adaptación a Linux #52

Closed
wants to merge 2 commits into from
Closed

Conversation

agomezgar
Copy link
Member

Hola, Camilo. Después de un pequeño parón porque me atasqué, al final he conseguido sacar adelante vuestra aplicación para Linux. Por supuesto, tendrías que crear un branch distinto (lo siento, no soy profesional), porque las versiones de ambos sistemas operativos son incompatibles (con lo que he aprendido, creo que en unos meses podría sacar una única versión).

Si queréis probar el código, basta con que lo bajéis, y ejecutéis npm install
npm start

Podéis compilar una appImage, así como una unpacked-version, mediante npm run compiler

Ha habido que resolver varios problemas:

a) Ya no sirve arduino-builder. Ha habido que empezar a trabajar con arduino-cli. Para ello, la primera vez que compiléis, el programa creará una carpeta oculta para copiar los datos que necesita ahí, y a continuación instalará tanto librerías como las tarjetas arduino de tipo avr. Un problema que aún no he podido solucionar es que es una serie de tareas asíncronas, que no he podido ejecutar en el orden correcto. La solución "temporal" es pedir al usuario que espere unos segundos antes de volver a intentar la carga del programa.

b) Al actualizar la versión de electrón, la pantalla por defecto salía en blanco. He visto en las issues que ya te están preguntando por el tema. El problema es que ahora hay especificar, en el archivo electronApp.js, y cada vez que creemos una ventana como mainWindow, la opción nodeIntegration como true. Ejemplo:

mainWindow = new BrowserWindow({width: 1240, height: 700, icon: 'www/media/icon.png', frame: false, movable: true,webPreferences:{
		nodeIntegration:true
	}
})

c) La nueva versión de serialport trabaja con promises, por lo que he tenido que reprogramar el modo en que el puerto serie lee los datos.

Sí, lo sé, está muy mal explicado, pero os recuerdo que no soy profesional y que hasta hace dos meses, creía que Electron era un juego del Spectrum.

Ya que estoy, os animo a todos los interesados en el tema a que echéis un vistazo al programa que he redactado mientras analizaba este trabajo: MasayloBlockly (aquí tenéis también la versión web, todo aún temporal).

Un saludo a todos. Si sois constructivos con las críticas, os lo agradeceré.

@cparrapa
Copy link
Member

Hola @agomezgar agomezgar
Gracias! este proyecto va a crecer mucho cuando colaboramos así, voy a crear el repo separado así como dices entonces este merge mejor ponerlo en el otto?

@agomezgar
Copy link
Member Author

agomezgar commented Sep 12, 2020 via email

@mxochicale
Copy link

mxochicale commented Sep 12, 2020

Great work @agomezgar and @cparrapa : )

I have few suggestions:

  • You might like to use English language in order to get involved other people whose language is not Spanish.
  • @cparrapa You might like to close this PR and then perhaps a create a new branch called linux_build in OttoDIY/blockly. Then in the potential new branch github.com/OttoDIY/blockly/tree/linux_build, @agomezgar can commit their nice development and , @gitaroktato and I can happily review and test it as well.
  • The plan would be the creation of a new PR for the branch linux_build instead of the master. Then, instructions such as Linux, Ubuntu, Raspbian (Raspberry Pi OS) installer #38 (comment) can also be added.

P.S. Apologies if I am slow in my replies but I only have time for this over the weekends.

Thanks
Miguel

@cparrapa
Copy link
Member

Hi @mxochicale

You are right we need to keep this universal @agomezgar
Can you help me creating the branch? i am new to branches, i sent you invitation as a member should be able to do this?
Sounds like the perfect plan and right thing to do because i was thinking a separate repo but that will be disorganized and confusing.

Thanks

@cparrapa cparrapa closed this Sep 13, 2020
@agomezgar
Copy link
Member Author

To make a branch is easy:
imagen
Just click on master branch and select a new name. There's no need to send me any invitation (but I'm flattered anyway). Then I will repeat the same pull request, or maybe would you prefer to clone locally my repo and then upload to these new branch.
I am really happy that you consider so well my job about this incredible project that is OttoDIY

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants