[PC-BSD Commits] r1985 - in pbibuild/pbi-source: PBIsource PBItext
svn at pcbsd.org
svn at pcbsd.org
Tue May 27 07:04:43 PDT 2008
Author: kris
Date: 2008-05-27 07:04:43 -0700 (Tue, 27 May 2008)
New Revision: 1985
Modified:
pbibuild/pbi-source/PBIsource/pbi.ui.h
pbibuild/pbi-source/PBItext/main.cpp
Log:
Updated the PBI installer to have desktop shortcuts point to a common
directory now, so that during an upgrade, existing desktop icons still work.
Reported by Fabry and Gonzalo
Modified: pbibuild/pbi-source/PBIsource/pbi.ui.h
===================================================================
--- pbibuild/pbi-source/PBIsource/pbi.ui.h 2008-05-27 13:55:35 UTC (rev 1984)
+++ pbibuild/pbi-source/PBIsource/pbi.ui.h 2008-05-27 14:04:43 UTC (rev 1985)
@@ -723,11 +723,14 @@
// Regular Program Application
if ( ExeLink[exenum] == "0" && ExeWebLink[exenum] == "0" && ExeLink[exenum] == "0" ) {
+ runCommand("mkdir -p /Programs/bin >/dev/null 2>/dev/null");
+ runCommand("ln -fs /Programs/" + ProgDirName + "/.sbin/" + Binary + " /Programs/bin/" + Binary+ " >/dev/null 2>/dev/null");
+
if ( file.open( IO_WriteOnly) ) {
QTextStream stream( &file );
stream << "[Desktop Entry]\n";
stream << "Name=" + ExeDescr[exenum] + "\n";
- stream << "Exec=/Programs/" + ProgDirName + "/.sbin/" + Binary + "\n";
+ stream << "Exec=/Programs/bin/" + Binary + "\n";
stream << "Type=Application\n";
stream << "Path=/Programs/" + ProgDirName + "/\n";
stream << "Icon=" + Icon + "\n";
@@ -946,16 +949,6 @@
}
- // change permissions of the directory
- /*
- chown = new QProcess( this );
- chown->addArgument( "chmod" );
- chown->addArgument( "-R" );
- chown->addArgument( "777" );
- chown->addArgument("/Programs/" + ProgramName);
- if ( !chown->start() ) {
-
- } */
}
@@ -969,12 +962,15 @@
if ( ExeLink[exenum] == "0" && ExeWebLink[exenum] == "0") {
// Create desktop link
+ runCommand("mkdir -p /Programs/bin >/dev/null 2>/dev/null");
+ runCommand("ln -fs /Programs/" + ProgDirName + "/.sbin/" + Binary + " /Programs/bin/" + Binary+ " >/dev/null 2>/dev/null");
+
if ( file2.open( IO_WriteOnly) ) {
QTextStream stream2( &file2 );
stream2 << "[Desktop Entry]\n";
stream2 << "Name=" + ExeDescr[exenum] + "\n";
- stream2 << "Exec=/Programs/" + ProgDirName + "/.sbin/" + Binary + "\n";
+ stream2 << "Exec=/Programs/bin/" + Binary + "\n";
stream2 << "Type=Application\n";
stream2 << "Path=/Programs/" + ProgDirName + "/\n";
stream2 << "Icon=" + Icon + "\n";
Modified: pbibuild/pbi-source/PBItext/main.cpp
===================================================================
--- pbibuild/pbi-source/PBItext/main.cpp 2008-05-27 13:55:35 UTC (rev 1984)
+++ pbibuild/pbi-source/PBItext/main.cpp 2008-05-27 14:04:43 UTC (rev 1985)
@@ -663,11 +663,15 @@
// Regular Program Application
if ( ExeLink[exenum] == "0" && ExeWebLink[exenum] == "0" && ExeLink[exenum] == "0" ) {
+ runCommand("mkdir -p /Programs/bin >/dev/null 2>/dev/null");
+ runCommand("ln -fs /Programs/" + ProgDirName + "/.sbin/" + Binary + " /Programs/bin/" + Binary+ " >/dev/null 2>/dev/null");
+
+
if ( file.open( IO_WriteOnly) ) {
QTextStream stream( &file );
stream << "[Desktop Entry]\n";
stream << "Name=" + ExeDescr[exenum] + "\n";
- stream << "Exec=/Programs/" + ProgDirName + "/.sbin/" + Binary + "\n";
+ stream << "Exec=/Programs/bin/" + Binary + "\n";
stream << "Type=Application\n";
stream << "Path=/Programs/" + ProgDirName + "/\n";
stream << "Icon=" + Icon + "\n";
@@ -901,12 +905,14 @@
if ( ExeLink[exenum] == "0" && ExeWebLink[exenum] == "0") {
// Create desktop link
-
+ runCommand("mkdir -p /Programs/bin >/dev/null 2>/dev/null");
+ runCommand("ln -fs /Programs/" + ProgDirName + "/.sbin/" + Binary + " /Programs/bin/" + Binary+ " >/dev/null 2>/dev/null");
+
if ( file2.open( IO_WriteOnly) ) {
QTextStream stream2( &file2 );
stream2 << "[Desktop Entry]\n";
stream2 << "Name=" + ExeDescr[exenum] + "\n";
- stream2 << "Exec=/Programs/" + ProgDirName + "/.sbin/" + Binary + "\n";
+ stream2 << "Exec=/Programs/bin/" + Binary + "\n";
stream2 << "Type=Application\n";
stream2 << "Path=/Programs/" + ProgDirName + "/\n";
stream2 << "Icon=" + Icon + "\n";
More information about the Commits
mailing list