From 2e68d1b447c5278d0f8deb27629fce5010f40d5f Mon Sep 17 00:00:00 2001 From: Jim Date: Mon, 20 Apr 2015 09:27:25 -0700 Subject: [PATCH] Update ATTRIBUTE GET$ "","" to only return the path as this is more useful. --- Documentation/yab-Commands | 5 +- README.md | 4 +- src/YAB.rdef.rsrc | Bin 3037 -> 3037 bytes src/YabInterface.cpp | 2 + src/resattr | Bin 16389 -> 0 bytes src/resattr.cpp | 313 +++++++++++++++++++++++++++++++++++++ src/resattrMakefile | 27 ++++ 7 files changed, 348 insertions(+), 3 deletions(-) delete mode 100755 src/resattr create mode 100644 src/resattr.cpp create mode 100644 src/resattrMakefile diff --git a/Documentation/yab-Commands b/Documentation/yab-Commands index f90b5f8..ae7ba42 100644 --- a/Documentation/yab-Commands +++ b/Documentation/yab-Commands @@ -18,8 +18,9 @@ ATTRIBUTE CLEAR Name$, Filename$ Value$ = ATTRIBUTE GET$ Name$, Filename$ Get the string value of the attribute Name$ for file Filename$. Returns "true" or "false" for "Bool" type attributes. - If Name$="", returns a list of attribute names and their types separated by " | ". returns "Unsupported" for types that are not valid for yab. - it name$ and filenbame$ both = "", returns the current program path and filename + If Name$="", returns a list of attribute names and their types separated + by " | ". returns "Unsupported" for types that are not valid for yab. + If Name$ and Filename$ both = "", returns the current program directory. Value = ATTRIBUTE GET Name$, Filename$ Get the number value of the attribute Name$ for file Filename$. diff --git a/README.md b/README.md index c96e1da..37904bc 100644 --- a/README.md +++ b/README.md @@ -24,4 +24,6 @@ This will insure that the BuildFactory is refreshed with the current version. LICENSE: Artistic License -- Create your own stand-alone binaries with yab under any license you want. AUTHOR: jan__64 -yab homepage: http://yab.orgfree.com/ \ No newline at end of file +yab homepage: http://yab.orgfree.com/ + +yab forum: http://yab-talk.forumotion.com/ \ No newline at end of file diff --git a/src/YAB.rdef.rsrc b/src/YAB.rdef.rsrc index b78cbdd35d88ed01b9ac9a5258c5eaba358e50f0..e56c03a009d3426225ac1e2a8e605ad124ee0aab 100644 GIT binary patch delta 14 WcmcaBeph_MKTbxL&Hp*?F#-TGFa|#W delta 14 WcmcaBeph_MKTbx*&Hp*?F#-TG9tJ!B diff --git a/src/YabInterface.cpp b/src/YabInterface.cpp index a9dc250..d5dc0cb 100644 --- a/src/YabInterface.cpp +++ b/src/YabInterface.cpp @@ -9220,6 +9220,8 @@ const char* YabInterface::AttributeGet1(const char* name, const char* filename) if (tempname.Length() >0) ErrorGen("Attribute file not found!"); BString appdir = mainFileName; + int32 i = appdir.FindLast("/"); + appdir.Truncate(i); return appdir; } diff --git a/src/resattr b/src/resattr deleted file mode 100755 index 36f7fc983b0d364d2f3c1ddf7a19c4839ae3eb71..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 16389 zcmc&*4|H5rnZHR|2rlUI(3~%ge!cUkO^G=v816%V&Tt2Q33#1G)k9 z7obI;8$lO==n|^SbhYMlHNRBzrJC1)Ukh3Yx|G^!3@`wIEC5 z^T4mr*IvfH_JRHkbd@e(KYS2`uADY~mJT9Sh)T(8=@e3hsFJ+Zk_=e2x-XAaMUD@q z3f;;HcDBT-l|AeviIw8MJXTSw<$#doDq?kcTr0;D%T|LJQuP(m> zoQY$X^?#G8|< zQ;w+tM1MN8y}LF3hQdT+rhn%hO-Nj>ICausgtnZHJtM z(-}#+PQva;1iKuRcEpiCeQxKPVC0_EdN-JGQ{9d6kRyVL&TV!wxXlqz7_!}P!U={@ zzbhDtX=F!`L8ErN9gValf{9*R*zLh+ROKe(DK`>xlD1$a;q=hG&h_D7!U;9EZFSmR zY4tWIk&MJ+(-k$WSSvam*N$`rI~_aO+tn72ita=t=Gv(wv+PxEBIza)?coGC+AJCD ziVi8(AyzwXi<69}679}fM8LKeEnHzTlF`7%XdoI0G`8b{q7AN_P-2bOu2_dSu;_*$ za#j4A;=z!qU94(jl*&X>o86R%xDK`1c3#oOXiuPV8-?5iJdG!4ah=m6t*&Dq8QFFO zx-AunB7F8Xr`?V@+eHiFuM`$sqedz$mJT^l$93Mj<#bm!y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q*>4l`#>MqirL#mD*z_NFqC>#*uy`~=puD_FJPvHeZ&~@hSm@5VAKd$k^8ovT;)(@Ux`Db0u`xfPYt+6@7a$I9`hUGG~WaZDW zT&3~Xbp2~I_G!FSV{?Wjs__dbp9|WhF&;Cd{f9N4i+-m+Uj+7^VR=@UlQCXj$A$L{ z%TIK9LhJj3#y`^dO0~oa6Q8BPX1?$Y$7*2n9L6&&Ok-=@)$+!_do{jW*UxIaK;tJgeoEt?X?(B7l?*h}5QzPK32@OFmIX;{ zvhjQW0`*ve9lR4vI>`lzMZsuyIJj8lFGwcZ7bJV}n|IfO&S=V65X1qH1wGeax1c@Y zMtti9Skg^(bokmux9=K!)W32=bBo=ycKrt17TBkE^MFLiw-_a%xZN3zw*{lN+~3>5 zR1b3fYwT4m4Y%TxfB)*W>rjbL3w9{g)zvHF^5}|h(ITM^)~H-QT4(|MJl5{mZrs)< z3K~7ey$0oTg*GT<{OeZ2l=jvD<%dH53*m_&Jo0#hjYlKINBYh8F&gV1DShqT-Qphk z?nNXU5}obx|F)vTH~5(rPfBPuPvOMyP-WxL5I`i*h+`ftkv1WJv9t5PIO3$ps+Rn5 zm=^Dm4I`WXd5fZ60cuoLTcZ3WRsKAmWR#24LyYHIVB3=op+XINm62gT-`?mCY*^d8 z&fd_lqRB6#U)=GwEr+5lL!{nT*(>i@*Kq6FM%4F|=~r7OPsUZtuWo8y(a>Z!uUfU< zzd>8dSC)dhGJXLrKI>F^z-IY!&q4yP~o85G-um*fQ|1v8stf^6Ao?_>HAY>%Zh|gJa^|gxFnC;p_gd&Jx;R~ zDJ(rzXWJ*93Dn1@PCU?6q{$rVD# +#include +#include + +#include +#include +#include +#include + +// usage +static const char *kUsage = +"Usage: %s [ ] -o [ ... ]\n" +"\n" +"Reads resources from zero or more input files and adds them as attributes\n" +"to the specified output file, or (in reverse mode) reads attributes from\n" +"zero or more input files and adds them as resources to the specified output\n" +"file. If not existent the output file is created as an empty file.\n" +"\n" +"Options:\n" +" -h, --help - Print this text.\n" +" -o - Specifies the output file.\n" +" -O, --overwrite - Overwrite existing attributes. regardless of whether\n" +" an attribute does already exist, it is always written\n" +" when a respective resource is encountered in an input\n" +" file. The last input file specifying the attribute\n" +" wins. If the options is not given, already existing\n" +" attributes remain untouched. Otherwise the first input\n" +" file specifying an attribute wins.\n" +" -r, --reverse - Reverse mode: Reads attributes from input files and\n" +" writes resources. A unique resource ID is assigned to\n" +" each attribute, so there will be no conflicts if two\n" +" input files feature the same attribute.\n" +; + +// command line args +static int sArgc; +static const char *const *sArgv; + +// print_usage +void +print_usage(bool error) +{ + // get nice program name + const char *programName = (sArgc > 0 ? sArgv[0] : "resattr"); + if (const char *lastSlash = strrchr(programName, '/')) + programName = lastSlash + 1; + + // print usage + fprintf((error ? stderr : stdout), kUsage, programName); +} + +// print_usage_and_exit +static +void +print_usage_and_exit(bool error) +{ + print_usage(error); + exit(error ? 1 : 0); +} + +// next_arg +static +const char* +next_arg(int argc, const char* const* argv, int& argi, bool dontFail = false) +{ + if (argi + 1 >= argc) { + if (dontFail) + return NULL; + print_usage_and_exit(true); + } + + return argv[++argi]; +} + +// write_attributes +static +void +write_attributes(BNode &out, const char *inFileName, BResources &resources, + bool overwrite) +{ + // iterate through the resources + type_code type; + int32 id; + const char *name; + size_t size; + for (int resIndex = 0; + resources.GetResourceInfo(resIndex, &type, &id, &name, &size); + resIndex++) { + // if we shall not overwrite attributes, we skip the attribute, if it + // already exists + attr_info attrInfo; + if (!overwrite && out.GetAttrInfo(name, &attrInfo) == B_OK) + continue; + + // get the resource + const void *data = resources.LoadResource(type, id, &size); + if (!data && size > 0) { + // should not happen + fprintf(stderr, "Failed to get resource `%s', type: %" B_PRIx32 + ", id: %" B_PRId32 " from input file `%s'\n", name, type, id, + inFileName); + exit(1); + } + + // construct a name, if the resource doesn't have one + char nameBuffer[32]; + if (!name) { + sprintf(nameBuffer, "unnamed_%d\n", resIndex); + name = nameBuffer; + } + + // write the attribute + ssize_t bytesWritten = out.WriteAttr(name, type, 0LL, data, size); + if (bytesWritten < 0) { + fprintf(stderr, "Failed to write attribute `%s' to output file: " + "%s\n", name, strerror(bytesWritten)); + } + } +} + +// write_resources +static +void +write_resources(BResources &resources, const char *inFileName, BNode &in, + int32 &resID) +{ + // iterate through the attributes + char name[B_ATTR_NAME_LENGTH]; + while (in.GetNextAttrName(name) == B_OK) { + // get attribute info + attr_info attrInfo; + status_t error = in.GetAttrInfo(name, &attrInfo); + if (error != B_OK) { + fprintf(stderr, "Failed to get info for attribute `%s' of input " + "file `%s': %s\n", name, inFileName, strerror(error)); + exit(1); + } + + // read attribute + char *data = new char[attrInfo.size]; + ssize_t bytesRead = in.ReadAttr(name, attrInfo.type, 0LL, data, + attrInfo.size); + if (bytesRead < 0) { + fprintf(stderr, "Failed to read attribute `%s' of input " + "file `%s': %s\n", name, inFileName, strerror(bytesRead)); + delete[] data; + exit(1); + } + + // find unique ID + const char *existingName; + size_t existingSize; + while (resources.GetResourceInfo(attrInfo.type, resID, &existingName, + &existingSize)) { + resID++; + } + + // write resource + error = resources.AddResource(attrInfo.type, resID++, data, + attrInfo.size, name); + if (error != B_OK) { + fprintf(stderr, "Failed to write resource `%s' to output " + "file: %s\n", name, strerror(error)); + } + delete[] data; + } +} + +// resources_to_attributes +static +void +resources_to_attributes(const char *outputFile, const char **inputFiles, + int inputFileCount, bool overwrite) +{ + // create output file, if it doesn't exist + if (!BEntry(outputFile).Exists()) { + BFile createdOut; + status_t error = createdOut.SetTo(outputFile, + B_READ_WRITE | B_CREATE_FILE); + if (error != B_OK) { + fprintf(stderr, "Failed to create output file `%s': %s\n", + outputFile, strerror(error)); + exit(1); + } + } + + // open output file + BNode out; + status_t error = out.SetTo(outputFile); + if (error != B_OK) { + fprintf(stderr, "Failed to open output file `%s': %s\n", outputFile, + strerror(error)); + exit(1); + } + + // iterate through the input files + for (int i = 0; i < inputFileCount; i++) { + // open input file + BFile in; + error = in.SetTo(inputFiles[i], B_READ_ONLY); + if (error != B_OK) { + fprintf(stderr, "Failed to open input file `%s': %s\n", + inputFiles[i], strerror(error)); + exit(1); + } + + // open resources + BResources resources; + error = resources.SetTo(&in, false); + if (error != B_OK) { + fprintf(stderr, "Failed to read resources of input file `%s': %s\n", + inputFiles[i], strerror(error)); + exit(1); + } + + // add the attributes + write_attributes(out, inputFiles[i], resources, overwrite); + } +} + +// resources_to_attributes +static +void +attributes_to_resources(const char *outputFile, const char **inputFiles, + int inputFileCount) +{ + // open output file + BFile out; + status_t error = out.SetTo(outputFile, B_READ_WRITE | B_CREATE_FILE); + if (error != B_OK) { + fprintf(stderr, "Failed to open output file `%s': %s\n", outputFile, + strerror(error)); + exit(1); + } + + // init output resources + BResources resources; + error = resources.SetTo(&out, false); + if (error != B_OK) { + fprintf(stderr, "Failed to init resources of output file `%s': %s\n", + outputFile, strerror(error)); + exit(1); + } + + int32 resID = 0; + + // iterate through the input files + for (int i = 0; i < inputFileCount; i++) { + // open input file + BNode in; + error = in.SetTo(inputFiles[i]); + if (error != B_OK) { + fprintf(stderr, "Failed to open input file `%s': %s\n", + inputFiles[i], strerror(error)); + exit(1); + } + + // add the resources + + write_resources(resources, inputFiles[i], in, resID); + } +} + +// main +int +main(int argc, const char *const *argv) +{ + sArgc = argc; + sArgv = argv; + + // parameters + const char *outputFile = NULL; + bool overwrite = false; + bool reverse = false; + const char **inputFiles = new const char*[argc]; + int inputFileCount = 0; + + // parse arguments + for (int argi = 1; argi < argc; argi++) { + const char *arg = argv[argi]; + if (arg[0] == '-') { + if (strcmp(arg, "-h") == 0 || strcmp(arg, "--help") == 0) { + print_usage_and_exit(false); + } else if (strcmp(arg, "-o") == 0) { + outputFile = next_arg(argc, argv, argi); + } else if (strcmp(arg, "-O") == 0) { + overwrite = true; + } else if (strcmp(arg, "-r") == 0 + || strcmp(arg, "--reverse") == 0) { + reverse = true; + } else { + print_usage_and_exit(true); + } + } else { + inputFiles[inputFileCount++] = arg; + } + } + + // check parameters + if (!outputFile) + print_usage_and_exit(true); + + if (reverse) { + attributes_to_resources(outputFile, inputFiles, inputFileCount); + } else { + resources_to_attributes(outputFile, inputFiles, inputFileCount, + overwrite); + } + + return 0; +} diff --git a/src/resattrMakefile b/src/resattrMakefile new file mode 100644 index 0000000..9c9320d --- /dev/null +++ b/src/resattrMakefile @@ -0,0 +1,27 @@ +NAME= resattr +TYPE= APP +SRCS= resattr.cpp +RSRCS= +LIBS= /boot/develop/lib/x86/libroot.so /boot/develop/lib/x86/libbe.so +LIBPATHS= +SYSTEM_INCLUDE_PATHS= /boot/develop/headers/be /boot/develop/headers/cpp /boot/develop/headers/posix /boot/home/config/include +LOCAL_INCLUDE_PATHS= +OPTIMIZE=NONE +# specify any preprocessor symbols to be defined. The symbols will not +# have their values set automatically; you must supply the value (if any) +# to use. For example, setting DEFINES to "DEBUG=1" will cause the +# compiler option "-DDEBUG=1" to be used. Setting DEFINES to "DEBUG" +# would pass "-DDEBUG" on the compiler's command line. +DEFINES= +# specify special warning levels +# if unspecified default warnings will be used +# NONE = supress all warnings +# ALL = enable all warnings +WARNINGS = +# Build with debugging symbols if set to TRUE +SYMBOLS= +COMPILER_FLAGS= +LINKER_FLAGS= + +## include the makefile-engine +include $(BUILDHOME)/etc/makefile-engine