Downloads:

533

Downloads of v 2014.1:

533

Last Update:

5/10/2016

Package Maintainer(s):

Software Author(s):

  • Louis J. Farrugia

Tags:

ortep3 ortep chemistry crystallography admin

Ortep3

2014.1 | Updated: 5/10/2016

Downloads:

533

Downloads of v 2014.1:

533

Maintainer(s):

Software Author(s):

  • Louis J. Farrugia

Ortep3 2014.1

All Checks are Passing

2 Passing Test


Validation Testing Passed


Verification Testing Passed

Details

To install Ortep3, run the following command from the command line or from PowerShell:

>

To upgrade Ortep3, run the following command from the command line or from PowerShell:

>

To uninstall Ortep3, run the following command from the command line or from PowerShell:

>

NOTE: This applies to both open source and commercial editions of Chocolatey.

1. Ensure you are set for organizational deployment

Please see the organizational deployment guide

  • Open Source or Commercial:
    • Proxy Repository - Create a proxy nuget repository on Nexus, Artifactory Pro, or a proxy Chocolatey repository on ProGet. Point your upstream to https://chocolatey.org/api/v2. Packages cache on first access automatically. Make sure your choco clients are using your proxy repository as a source and NOT the default community repository. See source command for more information.
    • You can also just download the package and push it to a repository Download

3. Enter your internal repository url

(this should look similar to https://chocolatey.org/api/v2)

4. Choose your deployment method:


choco upgrade ortep3 -y --source="'STEP 3 URL'" [other options]

See options you can pass to upgrade.

See best practices for scripting.

Add this to a PowerShell script or use a Batch script with tools and in places where you are calling directly to Chocolatey. If you are integrating, keep in mind enhanced exit codes.

If you do use a PowerShell script, use the following to ensure bad exit codes are shown as failures:


choco upgrade ortep3 -y --source="'STEP 3 URL'" 
$exitCode = $LASTEXITCODE

Write-Verbose "Exit code was $exitCode"
$validExitCodes = @(0, 1605, 1614, 1641, 3010)
if ($validExitCodes -contains $exitCode) {
  Exit 0
}

Exit $exitCode

- name: Ensure ortep3 installed
  win_chocolatey:
    name: ortep3
    state: present
    version: 2014.1
    source: STEP 3 URL

See docs at https://docs.ansible.com/ansible/latest/modules/win_chocolatey_module.html.

Coming early 2020! Central Managment Reporting available now! More information...


chocolatey_package 'ortep3' do
  action    :install
  version  '2014.1'
  source   'STEP 3 URL'
end

See docs at https://docs.chef.io/resource_chocolatey_package.html.


Chocolatey::Ensure-Package
(
    Name: ortep3,
    Version: 2014.1,
    Source: STEP 3 URL
);

Requires Otter Chocolatey Extension. See docs at https://inedo.com/den/otter/chocolatey.


cChocoPackageInstaller ortep3
{
   Name     = 'ortep3'
   Ensure   = 'Present'
   Version  = '2014.1'
   Source   = 'STEP 3 URL'
}

Requires cChoco DSC Resource. See docs at https://github.com/chocolatey/cChoco.


package { 'ortep3':
  provider => 'chocolatey',
  ensure   => '2014.1',
  source   => 'STEP 3 URL',
}

Requires Puppet Chocolatey Provider module. See docs at https://forge.puppet.com/puppetlabs/chocolatey.


salt '*' chocolatey.install ortep3 version="2014.1" source="STEP 3 URL"

See docs at https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.chocolatey.html.

5. If applicable - Chocolatey configuration/installation

See infrastructure management matrix for Chocolatey configuration elements and examples.

This package was approved by moderator dtgm on 5/11/2016.

Description

Ortep-3 for Windows is a MS-Windows version of the current release of ORTEP-III (1.0.3), which incorporates a Graphical User Interface (GUI) to make production of thermal ellipsoid plots much easier.

License

Ortep-3 for Windows is provided free of charge for academic, scientific, educational and non-commercial users, provided its use is acknowledged. A license is required and may be requested. If you do not yet have a license file, this package will still install, but Ortep3 will not start.

Helper programs

Ortep can call other programs. These are not dependencies. This package will pre-set for Ortep-3 the paths for these programs. It will use the default install paths for the following applications (whether they are installed or not), but the paths (and programs) can be changed with parameters (see below):

Package Parameters

The following package parameters can be set:

  • /installDir:<path>

    The default location for Ortep3 is C:\Ortep3. This package by default will install to a more standard, "%ProgramFiles(x86)%\Ortep3", but the directory can be customized.

    • /LicensePath:<path>

    If you have a license file, "ORTEP3-License.txt", you can place it in "C:\Temp" (default) and this package will copy it to the proper location. Adjust the location with this parameter. The path can be a file path or URL.

    • /editor:<path> - Assign a text editor helper program other than Notepad.
    • /povray:<path> - Assign an alternate path for POV-ray.
    • /gsview:<path> - Assign an alternate path for GhostScript View or another PS file viewer.
    • /graphics:<path> - Assign a graphics viewer helper program other than IrfanView (for example, XnView).
    • /hpgl:<path> - Assign an alternate path for HP-GL View or another HP-GL file viewer.

These parameters can be passed to the installer with the use of -params.
For example :
-params '"/LicensePath:http://localsite.org/ortep3license.txt /editor:""C:\Program Files (x86)\Notepad++\notepad++.exe"""'.
(note: the double-double quotes around the path are only needed if it contains spaces)

Features

Ortep-3 for Windows has the following facilities and features.


tools\chocolateyInstall.ps1
$ErrorActionPreference = 'Stop'  # stop on all errors

$packageName  = 'ortep3'
$toolsDir     = Split-Path -parent $MyInvocation.MyCommand.Definition
$DownloadUrl  = 'http://www.chem.gla.ac.uk/~louis/software/downloads/ortep_2014.1.zip'
 
$tempDir = Join-Path $env:TEMP $packageName
if (![System.IO.Directory]::Exists($tempDir)) {
   [System.IO.Directory]::CreateDirectory($tempDir)
}
 
$ZipPath = Join-Path $tempDir $DownloadURL.split('/')[-1]
 
# Download zip
Get-ChocolateyWebFile $packageName $ZipPath $DownloadURL
 
# Extract zip
Get-ChocolateyUnzip $ZipPath $tempDir

$InstallArgs = @{
   packageName   = $packageName
   fileType      = 'exe'
   silentArgs = '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-'
   validExitCodes= @(0)
   url = (Join-Path $tempDir 'setup.exe')
}

$UserArguments = @{}
 
# Parse the packageParameters using good old regular expression
if ($env:chocolateyPackageParameters) {
    $match_pattern = "\/(?<option>([a-zA-Z]+)):(?<value>([`"'])?([a-zA-Z0-9- _\\:\.]+)([`"'])?)|\/(?<option>([a-zA-Z]+))"
    $option_name = 'option'
    $value_name = 'value'
 
    if ($env:chocolateyPackageParameters -match $match_pattern ){
        $results = $env:chocolateyPackageParameters | Select-String $match_pattern -AllMatches
        $results.matches | % {
        $UserArguments.Add(
            $_.Groups[$option_name].Value.Trim(),
            $_.Groups[$value_name].Value.Trim())
    }
    }
    else
    {
        Throw 'Package Parameters were found but were invalid (REGEX Failure)'
    }
  
} else {
    Write-Debug 'No Package Parameters Passed in'
}

if ($UserArguments.ContainsKey('InstallDir')) {
   Write-Host 'You requested a custom install directory.'
   $InstallDir = $UserArguments.InstallDir
} else {
   $InstallDir = Join-Path ${env:ProgramFiles(x86)} 'Ortep3'
}
$InstallArgs.silentArgs += ' /DIR="' + $InstallDir + '"'

# Execute installer
Install-ChocolateyPackage @InstallArgs

# Create a settings/license file home
$settingsPath = Join-Path $env:ProgramData 'Ortep3'
if (-not (test-path $settingsPath)) {
   New-Item $settingsPath -ItemType Directory
}
if (Test-Path $settingsPath) {
   Remove-Item "$settingsPath\*" -Recurse
   $Acl = get-acl $settingsPath
   $InheritanceFlag = [System.Security.AccessControl.InheritanceFlags]::ContainerInherit -bor [System.Security.AccessControl.InheritanceFlags]::ObjectInherit
   $PropagationFlag = [System.Security.AccessControl.PropagationFlags]::InheritOnly
   $rule = New-Object  system.security.accesscontrol.filesystemaccessrule('Authenticated Users','Modify',$InheritanceFlag,$PropagationFlag,'Allow')
   $Acl.setaccessrule($rule)
   set-acl $settingsPath $Acl

   # Create environment variable pointing to the license/ini file locations
   Install-ChocolateyEnvironmentVariable 'ORTEP3DIR' $settingsPath 'Machine'

   # Look for a license file
   if ($UserArguments.ContainsKey('LicensePath')) {
      Write-Host 'You provided a license file path.'
      $LicensePath = $UserArguments.LicensePath
   } else {
      $LicensePath = 'C:\Temp\ORTEP3-License.txt'
   }
   $LicenseArgs = @{
      packageName  = 'Ortep3License'
      fileFullPath = (Join-Path $settingsPath 'ORTEP3-License.txt')
      url          = ([System.Uri]$LicensePath).AbsoluteUri
   }
   if (([System.Uri]$LicensePath).Scheme -eq 'file' -and 
       (-not (Test-Path ([System.Uri]$LicensePath).LocalPath))) {
         $msg = "***No license found at $LicensePath.***`n" + 
               "***You will need to manually copy an 'ORTEP3-License.txt' file to the " + 
               "'$settingsPath' directory.***`n"
         Write-host $msg
   } else {
      Get-ChocolateyWebFile @LicenseArgs
   }

   # Create an .ini file with default paths to helper applications
   $iniPath = Join-Path $settingsPath 'ortep.ini'
   $iniString = @"
   #
   #  ORTEP.INI
   #  System file for :
   #  Ortep-3 for Windows Version 2014.1 (2014)
   #
   #
   #  Locations of plugin executables
   #
"@

   if ($UserArguments.ContainsKey('editor')) {
      Write-Host 'You provided a TXT editor path.'
      $iniString += "`nEditorExecutable=" + $UserArguments['editor']
   } else {
      $iniString += "`nEditorExecutable=c:\Windows\system32\notepad.exe"
   }
   if ($UserArguments.ContainsKey('povray')) {
      Write-Host 'You provided a POVray path.'
      $iniString += "`nPOVRayExecutable=" + $UserArguments['povray']
   } else {
      $iniString += "`nPOVRayExecutable=C:\Program Files\POV-Ray\v3.7\bin\pvengine64.exe"
   }
   if ($UserArguments.ContainsKey('gsview')) {
      Write-Host 'You provided a GSView path.'
      $iniString += "`nPostScriptExecutable=" + $UserArguments['gsview']
   } else {
      $iniString += "`nPostScriptExecutable=C:\Program Files\Ghostgum\gsview\gsview64.exe"
   }
   if ($UserArguments.ContainsKey('graphics')) {
      Write-Host 'You provided a Graphics path.'
      $iniString += "`nGraphicsExecutable=" + $UserArguments['graphics']
   } else {
      $iniString += "`nGraphicsExecutable=c:\Program Files\irfanview\i_view32.exe"
   }
   if ($UserArguments.ContainsKey('hpgl')) {
      Write-Host 'You provided a HPGL path.'
      $iniString += "`nHPGLExecutable=" + $UserArguments['hpgl']
   } else {
      $iniString += "`nHPGLExecutable=c:\Program Files\printgl\printglw.exe"
   }

   if (Test-Path $iniPath) {
      Write-Host 'Prior settings file found.  Will not overwrite helper program paths.'
   } else {
      Write-Host 'Establishing helper applications paths.'
      $iniString -replace "`n","`r`n" > $iniPath
   }

} else {
   throw 'Settings folder does not exist!'
}

# Execute installer
Install-ChocolateyPackage @InstallArgs
tools\chocolateyUninstall.ps1
$RegistryLocation = 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall'

# different key for 32-bit installs on 64-bit systems
$BitLevel = Get-ProcessorBits
If ($BitLevel -eq '64') {
   $RegistryLocation = 'HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall'
}

$unexe = (Get-ItemProperty "$RegistryLocation\*" | 
                     Where-Object { $_.displayname -match 'ortep'} |
                     Select-Object -ExpandProperty UninstallString).trim('"')

if (test-path $unexe) {
   $UninstallArgs = @{
      packageName = 'ortep3'
      fileType = 'exe'
      file = $unexe
      silentArgs = '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-'
      validExitCodes = @(0)
   }

   Uninstall-ChocolateyPackage @UninstallArgs
   Remove-Item (Split-Path $unexe) -Recurse -Force
} else { Write-Host "no uninstaller found!"}

# remove the environment variable
Install-ChocolateyEnvironmentVariable 'ORTEP3DIR' $null 'Machine'

In cases where actual malware is found, the packages are subject to removal. Software sometimes has false positives. Moderators do not necessarily validate the safety of the underlying software, only that a package retrieves software from the official distribution point and/or validate embedded software against official distribution point (where distribution rights allow redistribution).

Chocolatey Pro provides runtime protection from possible malware.

Version Downloads Last Updated Status

This package has no dependencies.

Discussion for the Ortep3 Package

Ground Rules:

  • This discussion is only about Ortep3 and the Ortep3 package. If you have feedback for Chocolatey, please contact the Google Group.
  • This discussion will carry over multiple versions. If you have a comment about a particular version, please note that in your comments.
  • The maintainers of this Chocolatey Package will be notified about new comments that are posted to this Disqus thread, however, it is NOT a guarantee that you will get a response. If you do not hear back from the maintainers after posting a message below, please follow up by using the link on the left side of this page or follow this link to contact maintainers. If you still hear nothing back, please follow the package triage process.
  • Tell us what you love about the package or Ortep3, or tell us what needs improvement.
  • Share your experiences with the package, or extra configuration or gotchas that you've found.
  • If you use a url, the comment will be flagged for moderation until you've been whitelisted. Disqus moderated comments are approved on a weekly schedule if not sooner. It could take between 1-5 days for your comment to show up.
comments powered by Disqus