version 0.8.10

This commit is contained in:
Araq 2010-10-21 00:12:14 +02:00
commit 765366c1f3
58 changed files with 768 additions and 30834 deletions

View file

@ -1,6 +1,6 @@
#! stdtmpl(subsChar='?') | standard
#proc GenerateBuildBatchScript(c: TConfigData): string =
# result = "@echo on\nREM Generated by niminst\n"
# result = "@echo off\nREM Generated by niminst\n"
SET CC=gcc
SET LINKER=gcc
SET COMP_FLAGS=-w -O3 -fno-strict-aliasing
@ -10,10 +10,12 @@ REM call the compiler:
# var linkCmd = ""
# for f in items(c.cfiles[1][1]):
ECHO %CC% %COMP_FLAGS% -Ibuild -c ?{f} -o ?{changeFileExt(f, "o")}
%CC% %COMP_FLAGS% -Ibuild -c ?{f} -o ?{changeFileExt(f, "o")}
# linkCmd.add(" " & changeFileExt(f, "o"))
# end for
ECHO %LINKER% %LINK_FLAGS% -o ?{c.binPaths[0]}\?{toLower(c.name)}.exe ?linkCmd
%LINKER% %LINK_FLAGS% -o ?{c.binPaths[0]}\?{toLower(c.name)}.exe ?linkCmd
ECHO SUCCESS

View file

@ -6,7 +6,7 @@
if [ $# -eq 1 ] ; then
case $1 in
"--help"|"-h"|"help"|"h")
echo "?c.name deinstallation script"
echo "?c.displayName deinstallation script"
echo "Usage: [sudo] sh deinstall.sh DIR"
echo "Where DIR may be:"
echo " /usr/bin"
@ -51,7 +51,7 @@ if [ $# -eq 1 ] ; then
echo "deinstallation successful"
else
echo "?c.name deinstallation script"
echo "?c.displayName deinstallation script"
echo "Usage: [sudo] sh deinstall.sh DIR"
echo "Where DIR may be:"
echo " /usr/bin"

View file

@ -3,10 +3,10 @@
# result = ""
; Default Template for NimInst
[Setup]
AppName=$c.name
AppVerName=$c.name $c.version
AppName=$c.displayName
AppVerName=$c.displayName $c.version
DefaultDirName={code:GiveMeAPath|nimrod}
DefaultGroupName=$c.name
DefaultGroupName=$c.displayName
AllowNoIcons=yes
LicenseFile=${expandFilename(c.license)}
OutputBaseFilename=${c.name}_${c.version}
@ -27,16 +27,16 @@ Source: ${expandFilename(f)}; DestDir: {app}\${splitFile(f).dir}; Flags: ignorev
[Icons]
#if c.app == appConsole:
Name: {group}\Console for $c.name; Filename: {cmd}
Name: {group}\Console for $c.displayName; Filename: {cmd}
#else:
Name: {group}\$c.name; Filename: {app}
Name: {group}\$c.displayName; Filename: {app}
#end if
Name: {group}\Documentation; Filename: {app}\doc\overview.html
Name: {group}\{cm:UninstallProgram,$c.name}; Filename: {uninstallexe}
Name: {group}\{cm:UninstallProgram,$c.displayName}; Filename: {uninstallexe}
#if c.binPaths.len > 0:
[Tasks]
Name: modifypath; Description: &Add $c.name to your system path (if not in path already);
Name: modifypath; Description: &Add $c.displayName to your system path (if not in path already);
#end if
[Code]

View file

@ -7,15 +7,15 @@ if [ $# -eq 1 ] ; then
# if c.cat[fcUnixBin].len > 0:
if test -f ?{c.cat[fcUnixBin][0]}
then
echo "?c.name build detected"
echo "?c.displayName build detected"
else
echo "Please build ?c.name before installing it"
echo "Please build ?c.displayName before installing it"
exit 1
fi
# end if
case $1 in
"--help"|"-h"|"help"|"h")
echo "?c.name installation script"
echo "?c.displayName installation script"
echo "Usage: [sudo] sh install.sh DIR"
echo "Where DIR may be:"
echo " /usr/bin"
@ -92,7 +92,7 @@ if [ $# -eq 1 ] ; then
echo "installation successful"
else
echo "?c.name installation script"
echo "?c.displayName installation script"
echo "Usage: [sudo] sh install.sh DIR"
echo "Where DIR may be:"
echo " /usr/bin"

View file

@ -49,7 +49,7 @@ type
binPaths, authors, oses, cpus: seq[string]
cfiles: array[1..maxOS, array[1..maxCPU, seq[string]]]
ccompiler, innosetup: tuple[path, flags: string]
name, version, description, license, infile, outdir: string
name, displayName, version, description, license, infile, outdir: string
innoSetupFlag, installScript, uninstallScript: bool
vars: PStringTable
app: TAppType
@ -70,6 +70,7 @@ proc initConfigData(c: var TConfigData) =
c.ccompiler = ("", "")
c.innosetup = ("", "")
c.name = ""
c.displayName = ""
c.version = ""
c.description = ""
c.license = ""
@ -98,7 +99,7 @@ include "deinstall.tmpl"
# ------------------------- configuration file -------------------------------
const
Version = "0.8"
Version = "0.9"
Usage = "niminst - Nimrod Installation Generator Version " & version & """
(c) 2010 Andreas Rumpf
@ -209,6 +210,7 @@ proc parseIniFile(c: var TConfigData) =
of "project":
case normalize(k.key)
of "name": c.name = v
of "displayname": c.displayName = v
of "version": c.version = v
of "os": c.oses = split(v, {';'})
of "cpu": c.cpus = split(v, {';'})
@ -249,6 +251,7 @@ proc parseIniFile(c: var TConfigData) =
of cfgError: quit(errorStr(p, k.msg))
close(p)
if c.name.len == 0: c.name = changeFileExt(extractFilename(c.infile), "")
if c.displayName.len == 0: c.displayName = c.name
else:
quit("cannot open: " & c.infile)
@ -363,6 +366,7 @@ when haveZipLib:
else: n = c.outdir / n
var z: TZipArchive
if open(z, n, fmWrite):
addFile(z, proj / buildBatFile, buildBatFile)
addFile(z, proj / buildShFile, buildShFile)
addFile(z, proj / installShFile, installShFile)
addFile(z, proj / deinstallShFile, deinstallShFile)