summary refs log tree commit diff stats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rwxr-xr-xtools/buildbat.tmpl4
-rwxr-xr-xtools/deinstall.tmpl4
-rwxr-xr-xtools/inno.tmpl14
-rwxr-xr-xtools/install.tmpl8
-rwxr-xr-xtools/niminst.nim8
5 files changed, 22 insertions, 16 deletions
diff --git a/tools/buildbat.tmpl b/tools/buildbat.tmpl
index 2bb0766a2..a20559a90 100755
--- a/tools/buildbat.tmpl
+++ b/tools/buildbat.tmpl
@@ -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
diff --git a/tools/deinstall.tmpl b/tools/deinstall.tmpl
index 19b31e5b4..61141f78e 100755
--- a/tools/deinstall.tmpl
+++ b/tools/deinstall.tmpl
@@ -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"
diff --git a/tools/inno.tmpl b/tools/inno.tmpl
index cc8583779..ce800b1de 100755
--- a/tools/inno.tmpl
+++ b/tools/inno.tmpl
@@ -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]
diff --git a/tools/install.tmpl b/tools/install.tmpl
index bf3bfabc4..34f77aac1 100755
--- a/tools/install.tmpl
+++ b/tools/install.tmpl
@@ -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"
diff --git a/tools/niminst.nim b/tools/niminst.nim
index a93ea2ef8..292ea4a9e 100755
--- a/tools/niminst.nim
+++ b/tools/niminst.nim
@@ -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)