jvolker / miq-nz-booking-tools

Tools to help booking a spot in New Zealand Managed Isolation and Quarantine. Automatically refreshes, checks and fills forms in the website to find and book the rare spots.
MIT License
83 stars 35 forks source link

Building and deploying Electron App #25

Open jvolker opened 3 years ago

jvolker commented 3 years ago

@alexDrinkwater thanks so much for all your work on the Electron app.

I've just been building the app on macOS 11.2.3 (Big Sur). Unfortunately, when opening it I'm receiving this error

image

Big Sur has high-security standards and as a user, you often have to give permissions in multiple places.

I guess we either have to request permission from the user or not access the folder. I'm wondering if we really need to access this? We are not storing or reading anything as far as I can tell.

jvolker commented 3 years ago

It seems removing this line prevents the error. https://github.com/jvolker/miq-nz-booking-tools/blob/1cfceb565aca68f88b276a763d4d8a4dffff823b/MIQ-Booking-Assistance/miq-assistance.js#L49

@alexDrinkwater Any objections to removing it?

jvolker commented 3 years ago

Just checked out Github releases and think this is the way to go. I might even be able to build for Windows tonight.

sankeerthgone commented 3 years ago

HI , after date selection is any possibility to avoid page refreshing , after date selection and filling captcha its refreshing and coming to start again

alexDrinkwater commented 3 years ago

@jvolker I'm not sure what the user data is for. It was there before I started contributing. Sound like removing it is a good option.

alexDrinkwater commented 3 years ago

@sankeerthgone that sounds like a newly introduced bug. Can you create a separate issue for it?

alexDrinkwater commented 3 years ago

@jvolker you can manually create a zip and then upload it to github release. Ideally we use actions to build and create the release.

jvolker commented 3 years ago

@jvolker I'm not sure what the user data is for. It was there before I started contributing. Sound like removing it is a good option.

True. :) Removed it.

@jvolker you can manually create a zip and then upload it to github release. Ideally we use actions to build and create the release.

Yes, I'm going to build for Windows when I get access to a PC later today. I hope #28 is not actually breaking it atm.

Github actions sound good. This looks useful: https://github.com/marketplace/actions/electron-builder-action

jvolker commented 3 years ago

First release: https://github.com/jvolker/miq-nz-booking-tools/releases/tag/v0.9.0

alexDrinkwater commented 3 years ago

@jvolker I am wondering if you have instructions on how you build the .exe was it with electron forge?

jvolker commented 3 years ago

@jvolker I am wondering if you have instructions on how you build the .exe was it with electron forge?

I've used your instructions from the readme. :) So yes, with Electron Forge.

  1. Install Node.js
  2. Open a command-line window and navigate to the MIQ-Booking-Assistance folder and run npm i to install all dependencies.
  3. npm run make will build the electron application, it outputs it in out folder.

I just had to install Git as well since it was not installed on the machine yet.

gizelle6 commented 3 years ago

A query about refresh which seems to stop the search. The alarm sounds when any date appears in the month selected. If that's not the date required, its not clear how to restart the Assistant other than exiting, reloading the Assistant and logging in again. Maybe there is a shortcut I am missing

alexDrinkwater commented 3 years ago

@gizelle6 Thanks for the input. Please create a new issue. I think what you are saying is a good idea.

alexDrinkwater commented 3 years ago

@jvolker Interesting... when I run npm run make the out directory contains many files including an exe. I'm not sure how you were able to condense it down into one file for the application...

alexDrinkwater commented 3 years ago

@jvolker I was just looking in the wrong folder and see the files you uploaded now. Unfortunately I am on windows and it look like electron-forge can't build for mac when on windows. Could you build the latest for the 0.10.0 release?

jvolker commented 3 years ago

Just seeing your message now.

Could you build the latest for the 0.10.0 release?

I did this as mentioned in the PR.

jvolker commented 3 years ago

This guide is using Electron forge and Github actions: https://dev.to/erikhofer/build-and-publish-a-multi-platform-electron-app-on-github-3lnd

Maybe the second half with builds only for Releases including draft releases is sufficient.

jvolker commented 3 years ago

I've started some work on automated releases but didn't have the time to test it yet: https://github.com/jvolker/miq-nz-booking-tools/tree/automated-releases