Skip to content

Commit

Permalink
AU: 1 updated - astyle
Browse files Browse the repository at this point in the history
  • Loading branch information
Chocolatey committed Feb 5, 2018
1 parent dd01f07 commit 7942f82
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 9 deletions.
29 changes: 26 additions & 3 deletions automatic/astyle/astyle.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">
<metadata>
<id>astyle</id>
<version>2.05.1</version>
<version>3.1</version>
<packageSourceUrl>https://github.com/AdmiringWorm/chocolatey-packages/tree/master/automatic/astyle</packageSourceUrl>
<owners>AdmiringWorm, yying</owners>
<title>Artistic Style</title>
Expand All @@ -20,13 +20,36 @@
<tags>astyle command-line source code beautifier</tags>
<summary>Artistic Style is a source code indenter, formatter, and beautifier for the C, C++, C++/CLI, Objective-C, C# and Java programming languages.</summary>
<!-- Do not touch the description here in the nuspec file. Description is imported during update from the Readme.md file -->
<description>Artistic Style is a source code indenter, formatter, and beautifier for the C, C++, C++/CLI, Objective-C, C# and Java programming languages.
<description><![CDATA[Artistic Style is a source code indenter, formatter, and beautifier for the C, C++, C++/CLI, Objective-C, C# and Java programming languages.
When indenting source code, we as programmers have a tendency to use both spaces and tab characters to create the wanted indentation. Moreover, some editors by default insert spaces instead of tabs when pressing the tab key, and other editors (Emacs for example) have the ability to "pretty up" lines by automatically setting up the white space before the code on the line, possibly inserting spaces in a code that up to now used only tabs for indentation.
Since the NUMBER of space characters showed on screen for each tab character in the source code changes between editors (unless the user sets up the number to his liking...), one of the standard problems programmers are facing when moving from one editor to another is that code containing both spaces and tabs that was up to now perfectly indented, suddenly becomes a mess to look at when changing to another editor. Even if you as a programmer take care to ONLY use spaces or tabs, looking at other people's source code can still be problematic.
To address this problem, Artistic Style was created - a filter written in C++ that automatically re-indents and re-formats C / C++ / Objective-C / C++/CLI / C# / Java source files. It can be used from a command line, or it can be incorporated as classes in another C++ program.</description>
To address this problem, Artistic Style was created - a filter written in C++ that automatically re-indents and re-formats C / C++ / Objective-C / C++/CLI / C# / Java source files. It can be used from a command line, or it can be incorporated as classes in another C++ program.
## Features
- It's free and open source!
- Cross-platform application works on Windows, Linux, Mac OS X, and others.
- Supports 15 popular bracket styles.
- Over 90 formatting options.
- Detailed documentation for use and options
- Available in over 20 languages with easy additions
- Supports UTF8, UTF16, and most other character encodings.
- Can process entire projects recursively.
- Will not update unchanged files.
- Checksum prevents dropped or duplicated data.
- Seamless integration with many development environments and editors.
- Can be included in C/C++ and Objective-C projects as a shared (DLL) or static library.
- Can be included in Java projects as a Java Native Interface (KNI)
- Can be included in C#, Python, Pascal, and other projects as a shared library (DLL).
## Package Parameters
- `/KeepAllFiles` - Don't remove any of the source/build files and other unneeded files.
**Example**
`choco install astyle --params '"/KeepAllFiles"'
]]></description>
<releaseNotes>http://astyle.sourceforge.net/notes.html</releaseNotes>
<dependencies>
<dependency id="chocolatey-core.extension" version="1.3.0" />
Expand Down
6 changes: 3 additions & 3 deletions automatic/astyle/legal/VERIFICATION.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ The embedded software have been downloaded from the listed download
location on <https://sourceforge.net/projects/astyle/files/astyle/>
and can be verified by doing the following:

1. Download the following <>
1. Download the following <https://sourceforge.net/projects/astyle/files/astyle/astyle%203.1/AStyle_3.1_windows.zip/download>
2. Get the checksum using one of the following methods:
- Using powershell function 'Get-FileHash'
- Use chocolatey utility 'checksum.exe'
3. The checksums should match the following:

checksum type:
checksum:
checksum type: sha256
checksum: 0759D0A3B3AD768E0F1984B6FAF22C5D9D53C2E081D1CFBD1CC7D6E955E995CB

The file 'LICENSE.txt' has been obtained from <https://sourceforge.net/p/astyle/code/HEAD/tree/trunk/AStyle/LICENSE.md>
6 changes: 3 additions & 3 deletions automatic/astyle/tools/chocolateyInstall.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ $toolsPath = Split-Path -parent $MyInvocation.MyCommand.Definition

$packageArgs = @{
packageName = $env:ChocolateyPackageName
file = "$toolsPath\"
file = "$toolsPath\AStyle_3.1_windows.zip"
destination = $toolsPath
}

Get-ChocolateyUnzip @packageArgs
rm $toolsPath\*.zip -ea 0
Remove-Item $toolsPath\*.zip -ea 0

$pp = Get-PackageParameters
if (!($pp.KeepAllFiles)) {
Expand All @@ -22,5 +22,5 @@ if (!($pp.KeepAllFiles)) {
"$toolsPath\AStyle\CMakeLists.txt"
)

rm $pathsToRemove -Force -Recurse -ea 0
Remove-Item $pathsToRemove -Force -Recurse -ea 0
}

0 comments on commit 7942f82

Please sign in to comment.