[PC-BSD Commits] r802 - in pcbsd/trunk: PBCsource PBIsource PBItext installcd-overlay/usr/local/pcbsd/LANGS

svn at pcbsd.org svn at pcbsd.org
Mon Oct 29 10:25:54 PST 2007


Author: kris
Date: 2007-10-29 11:25:54 -0700 (Mon, 29 Oct 2007)
New Revision: 802

Modified:
   pcbsd/trunk/PBCsource/main.cpp
   pcbsd/trunk/PBCsource/pbcwizard.ui
   pcbsd/trunk/PBCsource/pbcwizard.ui.h
   pcbsd/trunk/PBIsource/pbi.ui.h
   pcbsd/trunk/PBItext/main.cpp
   pcbsd/trunk/installcd-overlay/usr/local/pcbsd/LANGS/PCInstall_bg.qm
   pcbsd/trunk/installcd-overlay/usr/local/pcbsd/LANGS/PCInstall_cs.qm
   pcbsd/trunk/installcd-overlay/usr/local/pcbsd/LANGS/PCInstall_de.qm
   pcbsd/trunk/installcd-overlay/usr/local/pcbsd/LANGS/PCInstall_fr.qm
   pcbsd/trunk/installcd-overlay/usr/local/pcbsd/LANGS/PCInstall_it.qm
   pcbsd/trunk/installcd-overlay/usr/local/pcbsd/LANGS/PCInstall_ja.qm
   pcbsd/trunk/installcd-overlay/usr/local/pcbsd/LANGS/PCInstall_pt.qm
   pcbsd/trunk/installcd-overlay/usr/local/pcbsd/LANGS/PCInstall_pt_BR.qm
Log:

Updated the PBI Creator to version 3.3, which adds a new true command
line creation method, no X server required. Also changes to LZMA compression




Modified: pcbsd/trunk/PBCsource/main.cpp
===================================================================
--- pcbsd/trunk/PBCsource/main.cpp	2007-10-26 15:56:05 UTC (rev 801)
+++ pcbsd/trunk/PBCsource/main.cpp	2007-10-29 18:25:54 UTC (rev 802)
@@ -51,30 +51,8 @@
     }
 
 
-    if ( argc == 3)
-    {
-        QString flag = argv[1];
-	if ( flag == "-create" )
-	{
-	           QString tmp = argv[2];
-		   if (  w.loadPresetSlot(tmp) == 0) {
-		         w.CreatePBI_CLI();
-	                         w.hide();
-		         a.connect( &a, SIGNAL( lastWindowClosed() ), &a, SLOT( quit() ) );
-		         a.exec();
-		         exit(0);
-		   } else {
-		       printf("Error: Bad .pbc file\n");
-		       exit(1);
-		   }
-	           
-	} else {
-	    show_args();
-	    exit(1);
-	}
 
 
-    }
     
     
     w.show();

Modified: pcbsd/trunk/PBCsource/pbcwizard.ui
===================================================================
--- pcbsd/trunk/PBCsource/pbcwizard.ui	2007-10-26 15:56:05 UTC (rev 801)
+++ pcbsd/trunk/PBCsource/pbcwizard.ui	2007-10-29 18:25:54 UTC (rev 802)
@@ -259,7 +259,7 @@
                     <cstring>textLabel1_5</cstring>
                 </property>
                 <property name="text">
-                    <string>PBI Creator 3.2</string>
+                    <string>PBI Creator 3.3</string>
                 </property>
             </widget>
         </grid>
@@ -1198,19 +1198,12 @@
     <slot>CheckExeItems()</slot>
     <slot>StartPackageCreation()</slot>
     <slot>StartPackageCreationSlot()</slot>
-    <slot>CreateProgTar()</slot>
-    <slot>TarTmpDir()</slot>
-    <slot>CopyPBIFileSlot()</slot>
     <slot>SetAppDir( QString Dir )</slot>
-    <slot>CatInstallScriptSlot()</slot>
     <slot>InstallFileDoneSlot()</slot>
-    <slot>RemoveTmpDirSlot()</slot>
-    <slot access="private">CountTarLineSlot()</slot>
     <slot access="private">AddMimeButtonSlot()</slot>
     <slot access="private">EditMimeButtonSlot()</slot>
     <slot access="private">RemoveMimeButtonSlot()</slot>
     <slot access="private">EditMimeDataSlot( QString Extension, QString IconDir, int ProgNum )</slot>
-    <slot access="private">CopyLangFiles()</slot>
     <slot access="private">SavePresetSlot()</slot>
     <slot access="private">PopulateExeList()</slot>
     <slot access="private">PopulateMimeList()</slot>
@@ -1219,13 +1212,13 @@
     <slot access="private">editRemoveScriptSlot()</slot>
     <slot access="private">selectPresetSlot()</slot>
     <slot returnType="int">loadPresetSlot( QString loadFile )</slot>
-    <slot>CreatePBI_CLI()</slot>
     <slot>AddExeDataSlot( QString ProgDir, QString IconPath, QString Desc, int noDesktop, int noMenu, int runRoot, int runShell, int notify, int link, int webLink, int taskbar, int owndir, QString KDECat )</slot>
     <slot>EditExeDataSlot( QString ProgDir, QString IconPath, QString Desc, int noDesktop, int noMenu, int runRoot, int runShell, int notify, int link, int webLink, int taskbar, int owndir, QString KDECat )</slot>
     <slot>ExeBoxDoubleClick()</slot>
     <slot>MimeBoxDoubleClick()</slot>
     <slot>AddMimeDataSlot( QString Extension, QString IconDir, int ProgNum )</slot>
     <slot>help()</slot>
+    <slot>MakePresetFileSlot( QString filename )</slot>
 </slots>
 <functions>
     <function access="private">runCommand( QString Command )</function>

Modified: pcbsd/trunk/PBCsource/pbcwizard.ui.h
===================================================================
--- pcbsd/trunk/PBCsource/pbcwizard.ui.h	2007-10-26 15:56:05 UTC (rev 801)
+++ pcbsd/trunk/PBCsource/pbcwizard.ui.h	2007-10-29 18:25:54 UTC (rev 802)
@@ -331,166 +331,22 @@
 // Time to put it all together, and begin creating our package. 
 void PBCwizard::StartPackageCreation()
 {
+    QString presetfile = HomeDir + "/.pbi.pbc";
+    MakePresetFileSlot(presetfile);
     
-    if ( CLICreation == 1)
-    {
-	printf("Starting PBI Creation...\n");
-    }
     
-    
-    
-     int TotalExe = ExeListBox->count() - 1;
-     int i = 0;
+	    
+    PackageLabel->setText(tr("Creating PBI file..."));
+    TarProg = new QProcess(this);
+    TarProg->addArgument( PBCAppDir + "/createpbi.sh" );
+    TarProg->addArgument(PBCAppDir + "/");
+    TarProg->addArgument( HomeDir + "/.pbi.pbc" );
+    connect( TarProg, SIGNAL(processExited()), this, SLOT(InstallFileDoneSlot() ) );
      
-     QString tmp;
-     
-     
-    // Create the TmpDir
-    QDir TmpDir;
-    if ( CLICreation == 1)
-    {
-	printf("Creating tmp dir...\n");
-    }
-    PackageLabel->setText(tr("Creating tmp dir..."));
-    TmpDir.mkdir(HomeDir + "/.PBCtmp", TRUE);
-    
-    
-     PackageLabel->setText(tr("Creating config file..."));
-    // Create our config file
-    QFile CfgFile( HomeDir + "/.PBCtmp/PkgConfig" );
-    if ( CfgFile.open( IO_WriteOnly ) ) {
-        QTextStream stream( &CfgFile );
-	// Save the software name and info
-	stream << "ProgName: " << PackageNameEdit->text() << "\n";
-	stream << "ProgVersion: " << PackageVerEdit->text() << "\n";
-	stream << "ProgWeb: " << PackageWebEdit->text() << "\n";
-	stream << "ProgAuthor: " << PackageAuthorEdit->text() << "\n";
-	stream << "ProgUpdateURL: " << PBIUpdateEdit->text() << "\n";
-
-	// Specify what type of libs we are using
-	if (AutoLibRadioButton->isChecked() )
-	{
-	     stream << "LibDir: Auto\n" ;
-	 } else if (SpecLibRadioButton->isChecked() ) {
-	     tmp = LibLineEdit->text();
-	     stream << "LibDir: " << tmp.remove(0, DirLineEdit->text().length() ) << "\n";
-	 } else {
-	     stream << "LibDir: NONE\n";  
-	 }
-	 
-	 // Save the default icon, if needed
-	 tmp = DefaultIcon;
-	 stream << "DefaultIcon: " << tmp.remove(0, DirLineEdit->text().length() ) << "\n";
-	 
-	 // Start saving exe info
-	
-	 i = 0;
-	 while ( i <= TotalExe)
-	 {
-	     tmp = ExeProgPath[i];
-	     if ( ExeWebLink[i] == 0 )
-	     {
-	        stream << "ExePath: " << tmp.remove(0, DirLineEdit->text().length() ) << "\n" ;
-	     } else {
-	        stream << "ExePath: " << tmp << "\n" ;
-	     }
-	     tmp = ExeIconPath[i];
-	     stream << "ExeIcon: " << tmp.remove(0, DirLineEdit->text().length() )  << "\n" ;
-	     stream << "ExeDescr: " << ExeDescr[i]  << "\n" ;
-	     stream << "ExeNoDesktop: " << ExeNoDesktop[i] << "\n";
-	     stream << "ExeNoMenu: " << ExeNoMenu[i] << "\n";
-	     stream << "ExeRunRoot: " << ExeRunRoot[i] << "\n";
-	     stream << "ExeRunShell: " << ExeRunShell[i] << "\n";
-	     stream << "ExeNotify: " << ExeNotify[i] << "\n";
-	     stream << "ExeLink: " << ExeLink[i] << "\n";
-	     stream << "ExeWebLink: " << ExeWebLink[i] << "\n";
-	     stream << "ExeTaskbar: " << ExeTaskbar[i] << "\n";
-	     stream << "ExeOwndir: " << ExeOwndir[i] << "\n";
-	     stream << "ExeKdeCat: " << ExeKdeCat[i] << "\n";
-	     i++;
-	 }
-	 
-	 i = 0;
-	 while (! MimeExt[i].isEmpty() )
-	 {
-	     stream << "MimeExt: " << MimeExt[i] << "\n";
-	     tmp = MimeIcon[i];
-	     stream << "MimeIcon: " << tmp.remove(0, DirLineEdit->text().length() ) << "\n";
-	     stream << "MimeProg: " << MimeProg[i] << "\n";
-	     i++;
-	 }
-	 
-        CfgFile.close();
-	
-	
-    }
-    
-    if (LicYesButton->isChecked() )
-    {
-	if ( CLICreation == 1)
-	{
-	    printf("Creating license file...\n");
-	 }
-          PackageLabel->setText(tr("Creating license file..."));
-          // Create our license file
-    QFile LicFile( HomeDir + "/.PBCtmp/LICENSE" );
-    if ( LicFile.open( IO_WriteOnly ) ) {
-        QTextStream stream( &LicFile );
-	stream << LicenseTextEdit->text() << "\n";
-        LicFile.close();
-    }
-	
-	
-    }
-    
-    
-    if ( AutoLibRadioButton->isChecked() )
-    {
-	
-	if ( CLICreation == 1)
-	{
-		printf("Populating Libraries...\n");
-	}
-	
-	PackageLabel->setText(tr("Populating Lib Dir..."));
-
-	
-	//TmpDir.mkdir(HomeDir + "/.PBCtmp/libs", TRUE);
-	TmpDir.mkdir(DirLineEdit->text() + "/autolibs", TRUE);
-	
-	
-	// Run the copylibs.sh script to move any libs over
-	 i = 0;
-	 while ( i <= TotalExe)
-	 {
-	     
-	     //runCommand(PBCAppDir + "/PBIfiles/copylibs.sh \"" + ExeProgPath[i]  + "\" \"" + HomeDir + "/.PBCtmp/.autolibs/\"");
-	     runCommand(PBCAppDir + "/PBIfiles/copylibs.sh \"" + ExeProgPath[i]  + "\" \"" + DirLineEdit->text()+ "/autolibs/\"");
-	      i++;
-	 }
-	
-	 
-	 
-	 // If we have a ~bin directory, copy the libs for any binaries in it also
-	 QDir BinDir(DirLineEdit->text() + "/bin");
-	 
-	 if ( BinDir.exists() )
-	 {
-	     BinDir.setFilter( QDir::Files | QDir::NoSymLinks);
-	     for ( uint i = 0; i < BinDir.count(); i++ ) {
-		 //runCommand(PBCAppDir + "/PBIfiles/copylibs.sh \"" + DirLineEdit->text() + "/bin/" + BinDir[i]  + "\" \"" + HomeDir + "/.PBCtmp/.autolibs/\"");	 
-		 runCommand(PBCAppDir + "/PBIfiles/copylibs.sh \"" + DirLineEdit->text() + "/bin/" + BinDir[i]  + "\" \"" +DirLineEdit->text() + "/autolibs/\"");
-	     }
-	     
-	 }
-	 
-	 
-	 CreateProgTar();
-	 
-     } else {
-	CreateProgTar();
-    }
-     
+     if ( !TarProg->start() ) {
+	      
+    }    
+   
 }
 
 
@@ -500,105 +356,6 @@
 }
 
 
-// Create normal .tar file of the target program
-void PBCwizard::CreateProgTar()
-{
-    
-    // Setup our Int for counting total lines tar creates, for progress bar
-    TotalTarLine = 0;
-    
-    if ( CLICreation == 1)
-    {
-	printf("Creating file archive...\n");
-    }
-    
-    PackageLabel->setText(tr("Creating package archive..."));
-    TarProg = new QProcess(this);
-    TarProg->addArgument( "tar" );
-    TarProg->addArgument("cvjf" );
-    TarProg->addArgument( HomeDir + "/.PBCtmp/Package.tbz" );
-    TarProg->addArgument("-C" );
-    TarProg->addArgument( DirLineEdit->text() );
-    TarProg->addArgument("." );
-    connect( TarProg, SIGNAL(readyReadStderr()), this, SLOT(CountTarLineSlot() ) );
-     connect( TarProg, SIGNAL(processExited()), this, SLOT(CopyPBIFileSlot() ) );
-     
-	 if ( !TarProg->start() ) {
-	      
-	 }
-    
-
-}
-
-// Creates a bzip2 .tar file which contains all install file contents
-void PBCwizard::TarTmpDir()
-{
-
-    if ( CLICreation == 1)
-    {
-	printf("Creating PBI file...\n");
-    }
-    
-    PackageLabel->setText(tr("Creating .pbi installer"));
-    TarProg = new QProcess(this);
-    TarProg->addArgument( "tar" );
-    TarProg->addArgument("cvf" );
-    TarProg->addArgument( HomeDir + "/.PBCtmp/InstallFile.tar" );
-    TarProg->addArgument("--exclude" );
-    TarProg->addArgument("Package.tbz" );
-    TarProg->addArgument("--exclude" );
-    TarProg->addArgument("InstallFile.tar" );
-    TarProg->addArgument("-C" );
-    TarProg->addArgument( HomeDir + "/.PBCtmp/" );
-    TarProg->addArgument("." );
-
-     connect( TarProg, SIGNAL(processExited()), this, SLOT(CatInstallScriptSlot() ) );
-     
-	 if ( !TarProg->start() ) {
-	      
-	 }
-    
-    
-    
-
-}
-
-// Copy over the PBI Installer file
-void PBCwizard::CopyPBIFileSlot()
-{
-    // Append to the config file, the number of files total in the install tarbal
-    QFile CfgFile( HomeDir + "/.PBCtmp/PkgConfig" );
-    if ( CfgFile.open( IO_WriteOnly  | IO_Append ) ) {
-        QTextStream stream( &CfgFile );
-	// Save the software name and info
-	stream << "\nTarLines: " << TotalTarLine << "\n";
-	CfgFile.close();
-    }
-    
-    
-    //runCommand("cp " + PBCAppDir + "/PBIfiles/PBItext " + HomeDir + "/.PBCtmp/");
-    runCommand("cp " + PBCAppDir + "/PBIfiles/header.png " + HomeDir + "/.PBCtmp/");
-    runCommand("cp " + PBCAppDir + "/PBIfiles/leftside.png " + HomeDir + "/.PBCtmp/");
-    runCommand("cp " + PBCAppDir + "/PBIfiles/icon.png " + HomeDir + "/.PBCtmp/");
-    
-     runCommand("cp " + PBCAppDir + "/PBIfiles/PBItext " + HomeDir + "/.PBCtmp/");
-    
-    QFile FirstRun ( DirLineEdit->text() + "/PBI.FirstRun.sh");
-    if ( FirstRun.exists() ) {
-	runCommand("cp " + DirLineEdit->text() + "/PBI.FirstRun.sh " + HomeDir + "/.PBCtmp/");
-    }
-    CopyPBI = new QProcess(this);
-    CopyPBI->addArgument( "cp" );
-    CopyPBI->addArgument(PBCAppDir + "/PBIfiles/PBI" );
-    CopyPBI->addArgument( HomeDir + "/.PBCtmp/" );
-
-     connect( CopyPBI, SIGNAL(processExited()), this, SLOT(CopyLangFiles() ) );
-	 if ( !CopyPBI->start() ) {
-	      
-	 }
-    
-}
-
 // Set the application directory
 void PBCwizard::SetAppDir( QString Dir )
 {
@@ -608,49 +365,14 @@
 }
 
 
-void PBCwizard::CatInstallScriptSlot()
-{
- 
-    
-    // Starts process to cat the files together. 
-    QString Name = PackageNameEdit->text();
-    QString Ver = PackageVerEdit->text();
-    QString PBIVer = PBIVerEdit->text();
-    
-    Name = Name.stripWhiteSpace();
-    Name.replace(" ", "");
-    Ver = Ver.stripWhiteSpace();
-    Ver.replace(" ", "");
-    PBIVer = PBIVer.stripWhiteSpace();
-    PBIVer.replace(" ", "");
-    
 
-    CatScript = new QProcess(this);
-    CatScript->addArgument( PBCAppDir + "/PBIfiles/mkpbi.sh" );
-    CatScript->addArgument(PBCAppDir);
-    CatScript->addArgument( HomeDir );
-   CatScript->addArgument(  "/" + Name + Ver + "-PV" + PBIVer + ".pbi"  );
-    
-   /* QMessageBox::information( this,"ADSA", PBCAppDir + "/PBIfiles/mkpbi.sh " +
-   PBCAppDir + "/PBIfiles/pbistart " +
-   HomeDir +"/.PBCtmp/InstallFile.tar " +
-   HomeDir + "/" + Name + Ver + "-PV" + PBIVer + ".pbi"  );
-    */
-     connect( CatScript, SIGNAL(processExited()), this, SLOT(RemoveTmpDirSlot() ) );
-	 if ( !CatScript->start() ) {
-	      
-	 }
-    
-
-}
-
-
 void PBCwizard::InstallFileDoneSlot()
 {
-    QString Name = PackageNameEdit->text();
+
+        QString Name = PackageNameEdit->text();
     QString Ver = PackageVerEdit->text();
     QString PBIVer = PBIVerEdit->text();
-    
+
     Name = Name.stripWhiteSpace();
     Name.replace(" ", "");
     Ver = Ver.stripWhiteSpace();
@@ -658,55 +380,16 @@
     PBIVer = PBIVer.stripWhiteSpace();
     PBIVer.replace(" ", "");
     
-    if ( CLICreation == 1)
-    {
-	printf("PBI Created: " + HomeDir + "/" + Name + Ver + "-PV" + PBIVer + ".pbi\n");
-	done(0);
-    } else {
     KMessageBox::information(this, tr("Your file has been created at:\n") + HomeDir + "/" + Name + Ver + "-PV" + PBIVer + ".pbi", tr("File Created!"));
         PackageLabel->setText("Complete! ");
         setFinishEnabled(currentPage(), TRUE);
-    }
-    
-
 }
 
-// Start process to remove the .PBCtmp directory
-void PBCwizard::RemoveTmpDirSlot()
-{
-  
-   CopyFile = new QProcess(this);
-   CopyFile->addArgument( "rm" );
-  CopyFile->addArgument("-rf" );
-   CopyFile->addArgument( HomeDir +"/.PBCtmp" );
-   connect( CopyFile, SIGNAL(processExited()), this, SLOT(InstallFileDoneSlot() ) );
-   
-   if ( !CopyFile->start() ) {
-	      
-     } 
 
 
-}
 
 
-void PBCwizard::CountTarLineSlot()
-{
-        
-    QString tmp;
-     while (TarProg->canReadLineStderr() )
-     {	// Read the line, dont need the output, just the count
-	 tmp = TarProg->readLineStderr();
-	 TotalTarLine = TotalTarLine + 1;
 
-     }
-    
-    
-}
-
-
-
-
-
 void PBCwizard::AddMimeButtonSlot()
 {
     
@@ -785,34 +468,12 @@
 }
 
 
-void PBCwizard::CopyLangFiles()
-{
-    // Copy the lang files over, which also checkes for header.png and leftside.png
-    
-    CopyLangs = new QProcess(this);
-    CopyLangs->addArgument(PBCAppDir + "/PBIfiles/cplangs.sh" );
-    CopyLangs->addArgument(PBCAppDir + "/PBIfiles/*.qm" );
-    CopyLangs->addArgument( HomeDir + "/.PBCtmp/" );
-    CopyLangs->addArgument( DirLineEdit->text() );
 
-     connect( CopyLangs, SIGNAL(processExited()), this, SLOT(TarTmpDir() ) );
-	 if ( !CopyLangs->start() ) {
-	      
-	 }
 
-	
-	 
 
-	 
-	 
-}
 
 
 
-
-
-
-
 void PBCwizard::SavePresetSlot()
 {
     
@@ -822,94 +483,10 @@
                     this,
                     "Choose a filename to save under" );
     
-    if ( ! saveFile.isEmpty() )
-    {
-	
-	if ( saveFile.find(".pbc") == -1)
-	{
-	  saveFile = saveFile + ".pbc";  
-	}
-	
-	QFile CfgFile( saveFile );
-	if ( CfgFile.open( IO_WriteOnly ) ) {
-	    QTextStream stream( &CfgFile );
-	    // Save the software name and info
-	    stream << "[ PBC 1.0 ]" << "\n";
-	    stream << "ProgName: " << PackageNameEdit->text() << "\n";
-	    stream << "ProgVersion: " << PackageVerEdit->text() << "\n";
-	    stream << "ProgWeb: " << PackageWebEdit->text() << "\n";
-	    stream << "ProgAuthor: " << PackageAuthorEdit->text() << "\n";
-	    stream << "PBIVer: " << PBIVerEdit->text() << "\n";
-	    stream << "PBIUpdate: " << PBIUpdateEdit->text() << "\n";
-	    
-	    // Save the package directory
-	    stream << "PackageDir: " << DirLineEdit->text() << "\n";
-	    
-	    
-	    // Specify what type of libs we are using
-	    if (AutoLibRadioButton->isChecked() )
-	    {
-		stream << "LibDir: Auto\n" ;
-	    } else if (SpecLibRadioButton->isChecked() ) {
-		stream << "LibDir: " << LibLineEdit->text() << "\n";
-	    } else {
-		stream << "LibDir: NONE\n";  
-	    }
-	    
-	    // Save the default icon, if needed
-	    stream << "DefaultIcon: " << DefaultIcon << "\n";
-	    
-	    // Start saving exe info
-	    int TotalExe = ExeListBox->count() - 1;
-	    int i = 0;
-	    while ( i <= TotalExe)
-	    {
-		stream << "ExePath: " << ExeProgPath[i] << "\n" ;
-		stream << "ExeIcon: " <<  ExeIconPath[i]  << "\n" ;
-		stream << "ExeDescr: " << ExeDescr[i]  << "\n" ;
-		stream << "ExeNoDesktop: " << ExeNoDesktop[i] << "\n";
-		stream << "ExeNoMenu: " << ExeNoMenu[i] << "\n";
-		stream << "ExeRunRoot: " << ExeRunRoot[i] << "\n";
-		stream << "ExeRunShell: " << ExeRunShell[i] << "\n";
-		stream << "ExeNotify: " << ExeNotify[i] << "\n";
-		stream << "ExeLink: " << ExeLink[i] << "\n";
-		stream << "ExeWebLink: " << ExeWebLink[i] << "\n";
-		stream << "ExeTaskbar: " << ExeTaskbar[i] << "\n";
-		stream << "ExeOwndir: " << ExeOwndir[i] << "\n";
-		stream << "ExeKdeCat: " << ExeKdeCat[i] << "\n";
-		i++;
-	    }
-	    
-	    i = 0;
-	    while (! MimeExt[i].isEmpty() )
-	    {
-		stream << "MimeExt: " << MimeExt[i] << "\n";
-		stream << "MimeIcon: " << MimeIcon[i] << "\n";
-		stream << "MimeProg: " << MimeProg[i] << "\n";
-		i++;
-	    }
-	    
-	    
-	    if (LicYesButton->isChecked() )
-	    {
-		stream << "License: YES\n" ;
-		stream << LicenseTextEdit->text() ;
-		
-	    } else {
-		stream << "License: NO\n"; 
-	    }
-	    
-	    
-	    CfgFile.close();
-	    
-	    
-	}
-	else
-	{
-	    //We weren't able to open the file for writing, invalid directory or permission denied
-	    KMessageBox::error(this, tr("Unable to write preset file to '") + saveFile + tr("'. Check the location exists, and is writeable."), tr("Unable to save preset"));
-	}
-    }
+   if ( ! saveFile.isEmpty() )
+   {
+      MakePresetFileSlot(saveFile);    
+   }
 }
 
 
@@ -1286,30 +863,9 @@
 }
 
 
-void PBCwizard::CreatePBI_CLI()
-{
-    CLICreation = 1;
-    
-    PopulateExeList();
-    
-     QDir TmpDir;
-     HomeDir = TmpDir.homeDirPath();
-    
-	// Delete the tmp dir if it exists, then continue on
-	DelTmp = new QProcess( this );
-	DelTmp->addArgument( "rm" );
-	DelTmp->addArgument( "-rf" );
-               DelTmp->addArgument( HomeDir + "/.PBCtmp" );
-               connect( DelTmp, SIGNAL(processExited()), this, SLOT(StartPackageCreationSlot() ) );
-		   
-	 if ( !DelTmp->start() ) {
-	      StartPackageCreation();
-	 } 
-}
 
 
 
-
 void PBCwizard::AddExeDataSlot( QString ProgDir, QString IconPath, QString Desc, int noDesktop, int noMenu, int runRoot, int runShell, int notify, int link, int webLink, int taskbar, int owndir, QString KDECat )
 {
 	 	 	    // save the item stuff
@@ -1406,3 +962,96 @@
 {
     system("kedit " + PBCAppDir + "/PBC-Readme.txt &");
 }
+
+
+void PBCwizard::MakePresetFileSlot( QString filename )
+{
+    // Get the filename and start writing the preset file
+    QString saveFile = filename;
+ 
+	
+	if ( saveFile.find(".pbc") == -1)
+	{
+	  saveFile = saveFile + ".pbc";  
+	}
+	
+	QFile CfgFile( saveFile );
+	if ( CfgFile.open( IO_WriteOnly ) ) {
+	    QTextStream stream( &CfgFile );
+	    // Save the software name and info
+	    stream << "[ PBC 1.0 ]" << "\n";
+	    stream << "ProgName: " << PackageNameEdit->text() << "\n";
+	    stream << "ProgVersion: " << PackageVerEdit->text() << "\n";
+	    stream << "ProgWeb: " << PackageWebEdit->text() << "\n";
+	    stream << "ProgAuthor: " << PackageAuthorEdit->text() << "\n";
+	    stream << "PBIVer: " << PBIVerEdit->text() << "\n";
+	    stream << "PBIUpdate: " << PBIUpdateEdit->text() << "\n";
+	    
+	    // Save the package directory
+	    stream << "PackageDir: " << DirLineEdit->text() << "\n";
+	    
+	    
+	    // Specify what type of libs we are using
+	    if (AutoLibRadioButton->isChecked() )
+	    {
+		stream << "LibDir: Auto\n" ;
+	    } else if (SpecLibRadioButton->isChecked() ) {
+		stream << "LibDir: " << LibLineEdit->text() << "\n";
+	    } else {
+		stream << "LibDir: NONE\n";  
+	    }
+	    
+	    // Save the default icon, if needed
+	    stream << "DefaultIcon: " << DefaultIcon << "\n";
+	    
+	    // Start saving exe info
+	    int TotalExe = ExeListBox->count() - 1;
+	    int i = 0;
+	    while ( i <= TotalExe)
+	    {
+		stream << "ExePath: " << ExeProgPath[i] << "\n" ;
+		stream << "ExeIcon: " <<  ExeIconPath[i]  << "\n" ;
+		stream << "ExeDescr: " << ExeDescr[i]  << "\n" ;
+		stream << "ExeNoDesktop: " << ExeNoDesktop[i] << "\n";
+		stream << "ExeNoMenu: " << ExeNoMenu[i] << "\n";
+		stream << "ExeRunRoot: " << ExeRunRoot[i] << "\n";
+		stream << "ExeRunShell: " << ExeRunShell[i] << "\n";
+		stream << "ExeNotify: " << ExeNotify[i] << "\n";
+		stream << "ExeLink: " << ExeLink[i] << "\n";
+		stream << "ExeWebLink: " << ExeWebLink[i] << "\n";
+		stream << "ExeTaskbar: " << ExeTaskbar[i] << "\n";
+		stream << "ExeOwndir: " << ExeOwndir[i] << "\n";
+		stream << "ExeKdeCat: " << ExeKdeCat[i] << "\n";
+		i++;
+	    }
+	    
+	    i = 0;
+	    while (! MimeExt[i].isEmpty() )
+	    {
+		stream << "MimeExt: " << MimeExt[i] << "\n";
+		stream << "MimeIcon: " << MimeIcon[i] << "\n";
+		stream << "MimeProg: " << MimeProg[i] << "\n";
+		i++;
+	    }
+	    
+	    
+	    if (LicYesButton->isChecked() )
+	    {
+		stream << "License: YES\n" ;
+		stream << LicenseTextEdit->text() ;
+		
+	    } else {
+		stream << "License: NO\n"; 
+	    }
+	    
+	    
+	    CfgFile.close();
+	    
+	    
+	}
+	else
+	{
+	    //We weren't able to open the file for writing, invalid directory or permission denied
+	    KMessageBox::error(this, tr("Unable to write preset file to '") + saveFile + tr("'. Check the location exists, and is writeable."), tr("Unable to save preset"));
+	}
+}

Modified: pcbsd/trunk/PBIsource/pbi.ui.h
===================================================================
--- pcbsd/trunk/PBIsource/pbi.ui.h	2007-10-26 15:56:05 UTC (rev 801)
+++ pcbsd/trunk/PBIsource/pbi.ui.h	2007-10-29 18:25:54 UTC (rev 802)
@@ -1221,7 +1221,7 @@
          QFile file4( "extract.sh" );
          if ( file4.open( IO_WriteOnly ) ) {
                QTextStream stream4( &file4 );
-	       stream4 << "#!/bin/sh\nSKIP=`cat pbiskip`\ntail +${SKIP} pbilink | tar xpovj -C \"${1}\" -f - ";
+	       stream4 << "#!/bin/sh\nSKIP=`cat pbiskip`\ntail +${SKIP} pbilink | ./lzma d -si -so | tar xpov -C \"${1}\" -f - ";
                  file4.close();
              }	
 	

Modified: pcbsd/trunk/PBItext/main.cpp
===================================================================
--- pcbsd/trunk/PBItext/main.cpp	2007-10-26 15:56:05 UTC (rev 801)
+++ pcbsd/trunk/PBItext/main.cpp	2007-10-29 18:25:54 UTC (rev 802)
@@ -165,7 +165,7 @@
          QFile file4( "extract.sh" );
          if ( file4.open( IO_WriteOnly ) ) {
                QTextStream stream4( &file4 );
-	       stream4 << "#!/bin/sh\nSKIP=`cat pbiskip`\ntail +${SKIP} pbilink | tar xpovj -C \"${1}\" -f - >/dev/null 2>/dev/null";
+	       stream4 << "#!/bin/sh\nSKIP=`cat pbiskip`\ntail +${SKIP} pbilink | ./lzma d -si -so | tar xpov -C \"${1}\" -f - >/dev/null 2>/dev/null";
                  file4.close();
              }	
 

Modified: pcbsd/trunk/installcd-overlay/usr/local/pcbsd/LANGS/PCInstall_bg.qm
===================================================================
(Binary files differ)

Modified: pcbsd/trunk/installcd-overlay/usr/local/pcbsd/LANGS/PCInstall_cs.qm
===================================================================
(Binary files differ)

Modified: pcbsd/trunk/installcd-overlay/usr/local/pcbsd/LANGS/PCInstall_de.qm
===================================================================
(Binary files differ)

Modified: pcbsd/trunk/installcd-overlay/usr/local/pcbsd/LANGS/PCInstall_fr.qm
===================================================================
(Binary files differ)

Modified: pcbsd/trunk/installcd-overlay/usr/local/pcbsd/LANGS/PCInstall_it.qm
===================================================================
(Binary files differ)

Modified: pcbsd/trunk/installcd-overlay/usr/local/pcbsd/LANGS/PCInstall_ja.qm
===================================================================
(Binary files differ)

Modified: pcbsd/trunk/installcd-overlay/usr/local/pcbsd/LANGS/PCInstall_pt.qm
===================================================================
(Binary files differ)

Modified: pcbsd/trunk/installcd-overlay/usr/local/pcbsd/LANGS/PCInstall_pt_BR.qm
===================================================================
(Binary files differ)



More information about the Commits mailing list