Skip to content

Commit

Permalink
win installer
Browse files Browse the repository at this point in the history
  • Loading branch information
Evgeny Metelkin committed Feb 23, 2024
1 parent bb96221 commit e56bee1
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 5 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/on-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

jobs:
upload-release-asset:
runs-on: ubuntu-latest
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
Expand All @@ -16,6 +16,14 @@ jobs:
- name: Build standalone apps
run: npm run pkg

- name: Install WiX Toolset
run: |
choco install wixtoolset
- name: Build windows installer
run: |
candle.exe -o dist/ build-win-installer.wxs
light.exe -o dist/heta-compiler-installer.msi dist/build-win-installer.wixobj
- name: Upload Release Asset Win
uses: actions/upload-release-asset@v1
env:
Expand Down
24 changes: 23 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,29 @@ Heta compiler can be used as the framework for a QSP modeling project of any siz

Metelkin, E., (2021). Heta compiler: a software tool for the development of large-scale QSP models and compilation into simulation formats. __Journal of Open Source Software, 6(67), 3708__, [DOI: 10.21105/joss.03708](https://doi.org/10.21105/joss.03708)

## Installation
## Installation in Windows

[Download heta-installer.msi from release page](https://github.com/hetalang/heta-compiler/releases) and install.

## Installation in Linux and Macos

For all users (requires sudo previleges)

```bash
sudo wget -O /usr/local/bin/heta https://github.com/hetalang/heta-compiler/releases/download/test2/heta-compiler-linux && sudo chmod +x /usr/local/bin/heta
```

For single user without sudo previleges

```bash
mkdir -p ~/bin
wget -O ~/bin/heta https://github.com/hetalang/heta-compiler/releases/download/test2/heta-compiler-linux
chmod +x ~/bin/heta
echo "export PATH=$PATH:~/bin" >> ~/.bashrc
source ~/.bashrc
```

## Installation in NodeJS environment

[NodeJS](https://nodejs.org/en/) must be installed prior to Heta compiler installation. Currently the recommended version is **NodeJS v16 and newer**, but NodeJS v14 is also supported.

Expand Down
36 changes: 36 additions & 0 deletions build-win-installer.wxs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
candle.exe -o dist/ build-win-installer.wxs
light.exe -o dist/heta-compiler-installer.msi dist/build-win-installer.wixobj
-->
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="c3f66490-971b-4b85-b407-455a7a145a7c" Name="heta-compiler" Version="0.8.0" Manufacturer="Heta project" UpgradeCode="0ab2e391-808f-481d-a423-1a64c0140b23" Language="1033">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />

<MajorUpgrade DowngradeErrorMessage="A newer version of MyApplication is already installed." />
<Media Id="1" Cabinet="cab1.cab" EmbedCab="yes" />

<Feature Id="ProductFeature" Title="heta-compiler" Level="1">
<ComponentGroupRef Id="ProductComponents" />
</Feature>
</Product>

<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLFOLDER" Name="heta-compiler" />
</Directory>
</Directory>
</Fragment>

<Fragment>
<ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
<!-- Copy MyApp.exe to the application directory -->
<Component Id="HetCompilerComponent" Guid="c3f66490-971b-4b85-b407-455a7a145a7c">
<File Id="HetaCompilerExe" Name= "heta.exe" Source="dist/heta-compiler-win.exe" KeyPath="yes" Checksum="yes" />

<Environment Id="UpdatePath" Name="Path" Value="[INSTALLFOLDER]" Permanent="no" Part="last" Action="set" System="yes" />
</Component>
</ComponentGroup>
</Fragment>
</Wix>
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@
"bin/heta-init.js"
],
"targets": [
"node14-win-x64",
"node14-linux-x64",
"node14-macos-x64"
"node16-win-x64",
"node16-linux-x64",
"node16-macos-x64"
],
"assets": [
"src/templates/*"
Expand Down

0 comments on commit e56bee1

Please sign in to comment.