[PC-BSD Commits] r1293 - pbibuild/pbi-source/PBItext

svn at pcbsd.org svn at pcbsd.org
Thu Jan 31 17:31:10 PST 2008


Author: kris
Date: 2008-01-31 17:31:10 -0800 (Thu, 31 Jan 2008)
New Revision: 1293

Modified:
   pbibuild/pbi-source/PBItext/main.cpp
Log:

Added .progsize file creation to PBI text installer as well



Modified: pbibuild/pbi-source/PBItext/main.cpp
===================================================================
--- pbibuild/pbi-source/PBItext/main.cpp	2008-02-01 00:57:20 UTC (rev 1292)
+++ pbibuild/pbi-source/PBItext/main.cpp	2008-02-01 01:31:10 UTC (rev 1293)
@@ -27,6 +27,7 @@
 QString ProgramVer;
 QString ProgramAuthor;
 QString ProgramWeb;
+int ProgSize;
 QString LibDir;
 QString DefaultIcon;
 QString ProgramDir;
@@ -237,6 +238,11 @@
 	    {
 		ProgUpdateURL = line.replace("ProgUpdateURL: ", "");
 	    }    
+            if (line.find("ProgSize:") == 0)
+            {
+                line = line.replace("ProgSize: ", "");
+                ProgSize = line.toInt();
+            }
 	    if ( line.find("LibDir:") == 0)
 	    {
 		LibDir = line.replace("LibDir: ", "");
@@ -479,6 +485,17 @@
     // First create the special ".sbin" directory for each script executable
     QDir sbindir;
     sbindir.mkdir ( "/Programs/" + ProgDirName + "/.sbin", TRUE );
+
+    // Now save the new config file
+    QString sizestring;
+    QFile sizefile( "/Programs/" + ProgDirName + "/.progsize" );
+    if ( sizefile.open( IO_WriteOnly ) ) {
+        QTextStream sizestream( &sizefile );
+             sizestream << "PROGSIZE: ";
+             sizestream << sizestring.setNum(ProgSize);
+             sizefile.close();
+     }
+
     
     // Starts creating the scripts for each EXE
     i = 0;



More information about the Commits mailing list