Several updates and new packages

This commit is contained in:
layman
2017-05-19 09:53:18 +02:00
parent 2d1b0a55dd
commit 32a2ecd537
28 changed files with 688 additions and 14 deletions
@@ -0,0 +1,16 @@
--- cmd_app.cpp.old 2009-01-31 21:23:30.000000000 +0100
+++ cmd_app.cpp 2009-01-31 21:25:48.000000000 +0100
@@ -88,7 +88,12 @@
_tsearchenv_s("PK2DeviceFile.dat", "PATH", tempString);
if (_tcslen(tempString) < 17)
{
- _tcsncpy_s(tempString, "PK2DeviceFile.dat", 17);
+ // Try /usr/share/pk2 first
+ _tcsncpy_s(tempString, "/usr/share/pk2/PK2DeviceFile.dat", 32);
+
+ if(access(tempString, 0))
+ // Well, that didn't work, default to the current directory
+ _tcsncpy_s(tempString, "PK2DeviceFile.dat", 17);
}
}
if (!PicFuncs.ReadDeviceFile(tempString))
@@ -0,0 +1,25 @@
--- pk2cmd-9999/pk2cmd/cmd_app.cpp.orig 2017-05-17 15:46:14.454813532 +0200
+++ pk2cmd-9999/pk2cmd/cmd_app.cpp 2017-05-17 15:46:59.444690407 +0200
@@ -8,7 +8,7 @@
// Software must have this entire copyright and disclaimer notice prominently
// posted in a location where end users will see it (e.g., installation program,
// program headers, About Box, etc.). To the maximum extent permitted by law,
-// this Software is distributed “AS IS” and WITHOUT ANY WARRANTY INCLUDING BUT
+// this Software is distributed ?AS IS? and WITHOUT ANY WARRANTY INCLUDING BUT
// NOT LIMITED TO ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR
// PARTICULAR PURPOSE, or NON-INFRINGEMENT. IN NO EVENT WILL MICROCHIP OR ITS
// LICENSORS BE LIABLE FOR ANY INCIDENTAL, SPECIAL, INDIRECT OR CONSEQUENTIAL
@@ -88,7 +88,12 @@
_tsearchenv_s("PK2DeviceFile.dat", "PATH", tempString);
if (_tcslen(tempString) < 17)
{
- _tcsncpy_s(tempString, "PK2DeviceFile.dat", 17);
+ // Try /usr/share/pk2 first
+ _tcsncpy_s(tempString, "/usr/share/pk2/PK2DeviceFile.dat", 32);
+
+ if(access(tempString, 0))
+ // Well, that didn't work, default to the current directory
+ _tcsncpy_s(tempString, "PK2DeviceFile.dat", 17);
}
}
if (!PicFuncs.ReadDeviceFile(tempString))