flat assembler
Message board for the users of flat assembler.
Index
> Macroinstructions > Pe Batch-Macro Auto Increment Versioning system |
Author |
|
revolution 21 Nov 2008, 19:23
Maybe you can also consider detecting when assembly has failed and not update the counters.
BTW: Perhaps it might be better/easier to make a small exe file to do all the work. The bat/asm combo seems a little bit cumbersome to my taste. Is there some reason you chose to use the bat/asm method? I'm trying to think why/where it might be an advantage over a small exe. |
|||
21 Nov 2008, 19:23 |
|
hopcode 22 Nov 2008, 02:40
revolution wrote: Maybe you can also consider detecting when assembly has failed and not update the counters. Maybe you can also consider bringing evidence when assembly has failed and the counters would be updated... Regards, hopcode |
|||
22 Nov 2008, 02:40 |
|
revolution 22 Nov 2008, 05:45
Code: @fasm %fasmpath%\counter.asm count.bin
del %1_count.bin |
|||
22 Nov 2008, 05:45 |
|
hopcode 22 Nov 2008, 08:29
revolution wrote: I don't see any detection of failure here? Do you ? But, seriously It is a real pleasure to talk to you. especially when you are Gone away Fishing... The problem is that of the three Musketeers...People believe that they were only three, but to tell it all, in reality, they are four Musketeers, and they reside in the same %fasmpath%. Also, dont worry ! All would not go in the Wrong (to paraphrase a "Talkinheads-ity"). If someone, sword in hand, chops/cuts up the HDD, where the %fasmpath% resides, well, that is a more serious matter, an other old old story... Have i persuaded you ? regards, hopcode |
|||
22 Nov 2008, 08:29 |
|
baldr 22 Nov 2008, 13:22
hopcode,
Update must be done atomically, i.e. all of Code: … fasm %1.asm "%1%ext%" … fasm %fasmpath%\vbuilder.asm %1.exe … @fasm %fasmpath%\counter.asm count.bin del %1_count.bin ren count.bin %1_count.bin … By the way, my .DLL is still ver. 0.00, and mysteriously .Exe appears… |
|||
22 Nov 2008, 13:22 |
|
hopcode 22 Nov 2008, 16:37
ooOps...
Thanks for the tips.Change the line baldr wrote:
in Code:
fasm %fasmpath%\vbuilder.asm
(or rather see the updated source). Quote:
right, if you dont specify : version filename dll. BTW, I say it publicly: according to me, you and revolution are the same person, dont you ? Should i explain why ? regards, hopcode |
|||
22 Nov 2008, 16:37 |
|
revolution 22 Nov 2008, 16:41
hopcode wrote: BTW, I say it publicly: according to me, you and revolution are the same person, dont you ? I'm curious as to what makes you come to that conclusion? |
|||
22 Nov 2008, 16:41 |
|
hopcode 22 Nov 2008, 17:31
revolution wrote:
Ok, consider the things in the following light ... fassen wir mal zusammen... (~tr: let summarize...) 1) You and papa Baldr help a lot the primers. a + for you both 2) You and papa Baldr for HL discussion (like the one here) have lot of tips/suggestions and no direct code.(that is normal, one asm-expert would say) Also, a ++ for papa and a + for you, because he makes use of pseudolanguages too, appositedly created by himself. 3) When you disappear for a short time,papa does his appearance. 4) Same idiomatic peculiarities... 5) You are both not aggressive. a + for you both 6) And Last, but not least, he is, with few posts, like your protégé not on technical matters. In fact, on technical matters he can manage himself, alone by himself, without this "your protective attitude", i would say, a papa's attitude. Note: point 6 could be understandable by old frequent board people only. This doesnt act as evidence. Finally, it seems you are both the compliment to 1 person. or i like figuring it so out... regards, hopcode |
|||
22 Nov 2008, 17:31 |
|
baldr 22 Nov 2008, 17:35
hopcode,
In updated source Code: fasm %fasmpath%\vbuilder.asm revolution, I'm stunned. No comments. |
|||
22 Nov 2008, 17:35 |
|
revolution 22 Nov 2008, 17:42
hopcode: Curious, while I am flattered to get all those +'s I am also surprised that someone has taken the time to consider things like this. Why would you imagine I would need a sock-puppet? Have you also considered that if what you say is true then I would have also taken to replying to myself, sometimes contradictorily, that would be weird don't you think? Kind of like Dr. Jekyll and Mr. Hyde, hehe.
Do you know that posting on here is not anonymous? Any admin can simply look up the IP code of each poster. |
|||
22 Nov 2008, 17:42 |
|
hopcode 22 Nov 2008, 17:59
baldr wrote:
you are right, my shame after that line, it needs something like this Code:
copy %fasmpath%\vbuilder.bin %1%ext%
...see updated 2 source and thanks a lot for your attention. regards, hopcode |
|||
22 Nov 2008, 17:59 |
|
baldr 22 Nov 2008, 19:40
revolution,
Randall Hyde hopcode, So what about error checking/recovery (apart from main source compilation)? |
|||
22 Nov 2008, 19:40 |
|
revolution 22 Nov 2008, 19:48
Hey baldr are you me, I mean am I you? Oh heck, I am so confused. Who am I today? The real scary Q is which of us is Mr. Hyde? Pick me, pick me, I wanna be the bad guy Mr. Hyde, and baldr can be the clever scientist Dr. Jekyll
|
|||
22 Nov 2008, 19:48 |
|
baldr 22 Nov 2008, 20:15
revolution, we make a deal: on even julian day number you're Mr. Hyde, on odd — I'm. On February 29th Mr. Hyde is Mr. Hyde himself.
|
|||
22 Nov 2008, 20:15 |
|
hopcode 23 Nov 2008, 02:27
a good mood,
...apart eror checking/recovery... regards, hopcode (aka Mark Rainer Kranz) |
|||
23 Nov 2008, 02:27 |
|
baldr 23 Nov 2008, 10:49
hopcode,
Another batch of suggestions: version.bat fasm+ver.cmd source.ext target.ext may be more descriptive name and consistent (with fasm.exe) syntax for version.bat. With little effort, you can even accept it fully, with options (but, there is more: you can introduce your own options as well! Just don't forget to cut them out from fasm command line ). Well, not so little and not fully (batch language is barely documented and full of quirks), here is example: Code: @echo off set source= set target= :ParseCmdLine if ""=="%1" goto ParseDone rem With command extensions enabled you may use /i if option rem -d option requires specific handling because of = for %%o in (D d) do if "%1"=="-%%o" ( echo Option: "%1 %2=%3" & shift & shift & goto Continue ) for %%o in (M m P p S s) do if "%1"=="-%%o" ( echo Option: "%1 %2" & shift & goto Continue ) if ""=="%source%" ( set source=%1 & goto Continue ) else ( if ""=="%target%" ( set target=%1 & goto Continue ) ) rem Here we come with unrecognized syntax echo WTF is "%1"? :Continue shift goto ParseCmdLine :ParseDone echo Source: "%source%" echo Target: "%target%" You may use %~p#, %~n# and %~x# for path, name and extension portions, respectively, of batch parameter %#. You don't really need the extension, do you? count.asm Is it necessary to load file "%vcount%" twice in count.asm? Idea for the next major upgrade: VERSION.INC from fasm package. It's simple to parse, not much harder to update ("9" => "10"). vbuilder.asm Parse MZ/PE headers. |
|||
23 Nov 2008, 10:49 |
|
hopcode 23 Nov 2008, 11:34
Quote:
No, that is so written only for a clearness pourpose. and Quote:
Yes, the next versions, as i have time baldr wrote:
..follows your example Well,i think it is a bit too much. And consequently, in this sense, i agree with the "cumbersome" adjective that revolution said about using of asm/bat, if i am not mistaken. I like this simple solution (that doesnt exlude merging other suggestions from you,...mmmh..thinking... ) because i perceive it even integrated, and on the "minimum requirement" for a version incrementing system. BTW, i see that the thing is of some interest for you,isnt it ? regards |
|||
23 Nov 2008, 11:34 |
|
baldr 23 Nov 2008, 15:20
hopcode wrote: BTW, i see that the thing is of some interest for you,isnt it ? 1. Can it be improved? 2. Is it as generic as possible? 3. Is there any other way to solve that problem? And last, but not least: 4. Does it handle marginal cases / errors? For example, my question about duplicate file "%vcount%" was because when I encounter almost equal and self-contained code fragments I ask myself: "Why don't define macro for that?" Even simple 4-liner for loading word from file will clearly state it's purpose and (moreover) similar semantic of that fragments (up to the parameters). |
|||
23 Nov 2008, 15:20 |
|
hopcode 26 Nov 2008, 16:11
Stable Release 26 Nov.2008
see first post special thanks to "papa" Baldr special thanks to revolution hopcode |
|||
26 Nov 2008, 16:11 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.