Skip to content

Commit

Permalink
choco files
Browse files Browse the repository at this point in the history
  • Loading branch information
metelkin committed Dec 16, 2024
1 parent 339e5a0 commit 4d0c991
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
18 changes: 18 additions & 0 deletions build-choco/heta-compiler.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>heta-compiler</id>
<version>0.9.2</version>
<title>heta-compiler</title>
<authors>Heta project</authors>
<owners>Heta project</owners>
<description>CLI tool for Heta language</description>
<releaseNotes>Initial release.</releaseNotes>
<summary>Heta Compiler is a tool for developing Quantitative Systems Pharmacology (QSP) and Systems Biology platforms. It integrates modules in formats like Heta language code, Excel, JSON/YAML, or SBML and transforms them into dynamical models.</summary>
<language>en-US</language>
<projectUrl>https://hetalang.github.io/#/heta-compiler/</projectUrl>
<licenseUrl>https://github.com/hetalang/heta-compiler/blob/master/LICENSE</licenseUrl>
<tags>heta cli tools windows</tags>
<dependencies />
</metadata>
</package>
21 changes: 21 additions & 0 deletions build-choco/tools/chocolateyInstall.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
$packageName = 'heta-compiler'
$toolsDir = "$(Split-Path -Parent $MyInvocation.MyCommand.Definition)"
$exePath = Join-Path $toolsDir 'heta.exe'

# Destination for the executable to be globally accessible
$destinationDir = [Environment]::GetEnvironmentVariable('ChocolateyToolsLocation', 'Machine')
if (-not $destinationDir) {
$destinationDir = "$env:ProgramData\chocolatey\bin"
}

# Copy executable to the destination directory
Copy-Item -Path $exePath -Destination $destinationDir -Force

# Add the destination directory to PATH (if not already there)
$path = [Environment]::GetEnvironmentVariable('PATH', 'Machine')
if ($path -notlike "*$destinationDir*") {
[Environment]::SetEnvironmentVariable('PATH', "$path;$destinationDir", 'Machine')
Write-Output "Added $destinationDir to PATH"
}

Write-Output "$packageName installed and added to PATH"

0 comments on commit 4d0c991

Please sign in to comment.