-
-
Notifications
You must be signed in to change notification settings - Fork 525
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
electron-forge install #41
Conversation
My thoughts on installing Linux packages:
|
@malept Currently this PR installs the only target available (if there is only one) or allows the user to choose. For instance on macOS it will allow the user to choose between Are you suggesting we should be defaulting to a certain heirachy of package types and install the highest one that is compatible? |
I was describing an autodetect method - I wasn't aware of the prompt-based method. That should be fine for Linux, provided we can describe what the packages are. |
targetAsset = possibleAssets.find(asset => asset.id === assetID); | ||
} | ||
|
||
const tmpdir = path.resolve(os.tmpdir(), 'forge-install'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This folder should probably be removed when the command completes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably, but it's in the tmp
directory so the OS will wipe it when it needs to and if we leave it there reinstalls are a million times faster. Idm either way, but it was a godsend during development 😆
…not found a release
…sudo for Linux installers
It appears that it's pretty nontrivial to install a single flatpak file without a flatpak repository.
@@ -64,14 +66,18 @@ | |||
"debug": "^2.3.3", | |||
"electron-installer-dmg": "^0.1.2", | |||
"electron-packager": "^8.4.0", | |||
"electron-sudo": "malept/electron-sudo#fix-linux-sudo-detection", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just FYI, this can be changed to a version once automation-stack/electron-sudo#41 is merged & released.
"electron-winstaller": "^2.5.0", | ||
"fs-promise": "^1.0.0", | ||
"github": "^7.2.0", | ||
"glob": "^7.1.1", | ||
"inquirer": "^2.0.0", | ||
"lodash.template": "^4.4.0", | ||
"log-symbols": "^1.0.2", | ||
"node-fetch": "^1.6.3", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It feels really weird to add two different modules that perform HTTP requests, even though I know that they're serving two different functions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nugget
is just for the fancy UI, I could remove it but I think the feedback is good for such a big download.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I kind of wish nugget was built on fetch, or we used some fancy feedback module that was built on fetch. It's not that important.
|
||
const installActions = { | ||
win32: { | ||
'.exe': async filePath => await opn(filePath, { wait: false }), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since every other installer is one line (except for the darwin zip installer), should this also go in a separate file?
} | ||
|
||
const tmpdir = path.resolve(os.tmpdir(), 'forge-install'); | ||
const pathSafeRepo = repo.replace(/\//g, '-').replace(/\\/g, '-'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That could be one .replace
call.
const GITHUB_API = 'https://api.github.com'; | ||
|
||
const main = async () => { | ||
const searchSpinner = ora.ora('Searching for Application').start(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this hasn't been promisified yet.
fix: save as dialog titles
This is a WIP for installing Electron apps from GitHub releases. Currently tested / working / implemented on macOS and theoretically works on Windows (don't have a windows machine atm).
Need some help getting it working on linux (@malept)?
Example: