[PC-BSD Commits] r15777 - pcbsd-projects/EasyPBI

svn at pcbsd.org svn at pcbsd.org
Mon Mar 12 07:46:28 PDT 2012


Author: kenmoore
Date: 2012-03-12 14:46:27 +0000 (Mon, 12 Mar 2012)
New Revision: 15777

Modified:
   pcbsd-projects/EasyPBI/mainwindow.cpp
   pcbsd-projects/EasyPBI/pbi.h
Log:
Fix the creation of desktop/menu entries if only a single binary, and also fix the naming conventions for desktop/menu entries



Modified: pcbsd-projects/EasyPBI/mainwindow.cpp
===================================================================
--- pcbsd-projects/EasyPBI/mainwindow.cpp	2012-03-12 14:45:19 UTC (rev 15776)
+++ pcbsd-projects/EasyPBI/mainwindow.cpp	2012-03-12 14:46:27 UTC (rev 15777)
@@ -237,11 +237,17 @@
         //Add desktop/menu entries 
         if(ui->gui_app->isChecked()){
           Get_Main_Exe_Smart(pbi_data);
+          QString mainexe = ModBuild::getFilenameFromPath(pbi_data->main_exe);
+          ModBuild::makeMenuEntry( newModulePath, mainexe, ModBuild::readValue("PBI_PROGNAME"),ModBuild::readValue("PBI_PROGICON"), ui->port_category->text() );
+          ModBuild::makeDesktopEntry( newModulePath, mainexe, ModBuild::readValue("PBI_PROGNAME"),ModBuild::readValue("PBI_PROGICON") );
+
           Get_More_Exe(pbi_data);
           current_exe = pbi_data->more_exe;
           while(current_exe){
-            ModBuild::makeMenuEntry( newModulePath, current_exe->path, ModBuild::getFilenameFromPath(current_exe->path) ,ModBuild::readValue("PBI_PROGICON"), ui->port_category->text() );
-            ModBuild::makeDesktopEntry( newModulePath, current_exe->path, ModBuild::getFilenameFromPath(current_exe->path) ,ModBuild::readValue("PBI_PROGICON") );
+            QString binary = current_exe->path;
+            QString name = ModBuild::readValue("PBI_PROGNAME")+ModBuild::getFilenameFromPath(binary);
+            ModBuild::makeMenuEntry( newModulePath, binary, name, ModBuild::readValue("PBI_PROGICON"), ui->port_category->text() );
+            ModBuild::makeDesktopEntry( newModulePath, binary, name, ModBuild::readValue("PBI_PROGICON") );
             current_exe = (BIN_FILE *) current_exe->next;
           }
         }

Modified: pcbsd-projects/EasyPBI/pbi.h
===================================================================
--- pcbsd-projects/EasyPBI/pbi.h	2012-03-12 14:45:19 UTC (rev 15776)
+++ pcbsd-projects/EasyPBI/pbi.h	2012-03-12 14:46:27 UTC (rev 15777)
@@ -144,7 +144,7 @@
 // using the port's information
 int Get_Main_Exe_Smart(PBI_Struct *data);
 
-// search for additional bin/* files using pkg-plist file
+// search for additional bin/(*) files using pkg-plist file
 int Get_More_Exe(PBI_Struct *data);
 
 // copy the program's executable to the overlay-dir -- version 8



More information about the Commits mailing list