From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- .../files/pk2cmd-add-share-dir-for-dev-file-1.20.patch | 16 ++++++++++++++++ .../files/pk2cmd-add-share-dir-for-dev-file.patch | 17 +++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 dev-embedded/pk2cmd/files/pk2cmd-add-share-dir-for-dev-file-1.20.patch create mode 100644 dev-embedded/pk2cmd/files/pk2cmd-add-share-dir-for-dev-file.patch (limited to 'dev-embedded/pk2cmd/files') diff --git a/dev-embedded/pk2cmd/files/pk2cmd-add-share-dir-for-dev-file-1.20.patch b/dev-embedded/pk2cmd/files/pk2cmd-add-share-dir-for-dev-file-1.20.patch new file mode 100644 index 000000000000..30d6b1e71a3e --- /dev/null +++ b/dev-embedded/pk2cmd/files/pk2cmd-add-share-dir-for-dev-file-1.20.patch @@ -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)) diff --git a/dev-embedded/pk2cmd/files/pk2cmd-add-share-dir-for-dev-file.patch b/dev-embedded/pk2cmd/files/pk2cmd-add-share-dir-for-dev-file.patch new file mode 100644 index 000000000000..448fecfca935 --- /dev/null +++ b/dev-embedded/pk2cmd/files/pk2cmd-add-share-dir-for-dev-file.patch @@ -0,0 +1,17 @@ +--- cmd_app.cpp.bak 2008-07-11 15:49:56.000000000 -0400 ++++ cmd_app.cpp 2008-09-20 23:18:17.000000000 -0400 +@@ -63,7 +63,13 @@ + _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); ++ + //_tcsncpy_s(tempString, "C:\\PICkit_2\\pk2cmd\\debug\\PK2DeviceFile.dat", 42); + //printf("DEBUG DEVICE FILE SETTING!!!!\n"); + } -- cgit v1.2.3