Skip to content

Commit

Permalink
fix(msi): build logic
Browse files Browse the repository at this point in the history
  • Loading branch information
nonzzz committed Jun 1, 2022
1 parent f6818eb commit 8233495
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,7 @@ We are using `golangci-lint`, So you need change your lint utils in your local d
> How to use Meakfile in windows system?
- In windows, you need install `GCC` to your local environment. And then find you installed directory and can fork `mingw32-make.exe` and rename it as `make.exe`. Then you can use make command.

> Why i use makefile can't generator msi?
- Unfortunately, We try to use wix in linux system. But it can't support the new syntax. So we only allowed build msi with windows system.
9 changes: 8 additions & 1 deletion scripts/windows-msi.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,14 @@ const pref_hooks = require('perf_hooks')
*/

const main = async () => {
if (os.platform() !== 'win32') throw new Error("Can't run on platforms other than Windows.")
/**
* Process exit can't be use here. windows-msi will use in makefile. If
* we let the process break will affect the result of the makefile.
*/
if (os.platform() !== 'win32') {
console.error("Can't run on platforms other than Windows.")
return 1
}
const star = pref_hooks.performance.now()
const root = process.cwd()
const verPath = path.join(root, 'version.txt')
Expand Down

0 comments on commit 8233495

Please sign in to comment.