Hi Ketil,

Could we have a "Duplicate Project" option, which takes the current active project and duplicates everything into another project? At the moment I just copy the folder then rename every file to the new project name and then edit the project.rap file.

If this could get automated that would be sweet.

Cheers,
Jimmy
Posted on 2007-07-05 19:50:36 by JimmyClif
hi JC,
RA already has "Create Template" option.
menu: Project->Create Template
you can duplicate projects with that option. yes?
Posted on 2007-07-06 11:58:03 by drizz
True, haven't thought about using a Template... I thought more along the lines of "this version needs to be a little different than the other one" Or creating a copy to do a major dirty hack because you something needs to be fixed immediately and then going back to the other one and implement it properly later.

For now I'll use a Template, or I ponder how I can possibly free up some time for an addin (unlikely) ;)

Posted on 2007-07-06 12:28:36 by JimmyClif
(unlikely) ;)
come on, it can't be that hard  ;) look for example at "Project Zipper" addin -Or-  Radasm source "Tpl\CreateTpl.asm".
Posted on 2007-07-06 12:51:32 by drizz
Thanks for the guilt trip... I see what I can do :)
Posted on 2007-07-07 08:37:38 by JimmyClif
drizz,

Do you still have the Project Zipper Code ? I can't seem to find it and it's not available from Ketil's site either.

I'll try to bang this thing out over the next few days.  :!:
Posted on 2008-03-04 13:40:27 by JimmyClif
Are you getting old?  :P :) It's in the addins file http://www.radasm.com/projects/Addins.zip

cheers
Posted on 2008-03-05 01:40:16 by drizz

Are you getting old?  :P


Seems so :(

Thanks though... :thumbsup:
Posted on 2008-03-05 11:45:04 by JimmyClif
Alright, I hacked something together while my kids were screaming in my ears :-/ I had quite a rough time as for each time I wanted to test it I had to uninstall the addin, close RadAsm, open RadAsm, install the plugin and run it. This was very inconvenient and demoralizing. I wonder if there is a better way to do this.

Anyway... the addin works. Due to a design error subdirectories such as \Res\ with files named the same as the Original Main file will have to be manually renamed. Like if the Main project was called "SaveProjectAs" and there is a file inside the \Res\ folder named SaveProjectAsDlg.rc it will have to be manually renamed to WhateverTheNewNameOfTheProjectIsDlg.rc

I can live with it. Either that or I can not scan the files and replace every occurence of "SaveProjectAs" to "WhateverTheNewNameOfTheProjectIs".

What else is wrong? For some reason which escapes me one can not run the Addin twice in a row. Or twice at all while RadAsm is running.

Also I don't like it being under "Tools" I would prefer it being under the "File" \ "New Project" \ "Open Project" tab, but again - I can live with it.

Complainers Welcome... Bug Fixers, Enhancers even more.
Posted on 2008-03-21 16:07:23 by JimmyClif
Hi Jimmy, been buisy lately (read: lazy)  :P

About your addin, WHERE do i start  :D


Alright, I hacked something together while my kids were screaming in my ears :-/ I had quite a rough time as for each time I wanted to test it I had to uninstall the addin, close RadAsm, open RadAsm, install the plugin and run it. This was very inconvenient and demoralizing. I wonder if there is a better way to do this.
Setup a second copy of RA somewhere. Multiple copies work just fine and don't clash.
Set your addin output directory to that of RA copy addin dir (via /OUT:"second copy addin dir\$7", or via "Main Project files" in project menu).
You can even set up "Run" and "Debug" command to point to second copy.


Anyway... the addin works. Due to a design error subdirectories such as \Res\ with files named the same as the Original Main file will have to be manually renamed. Like if the Main project was called "SaveProjectAs" and there is a file inside the \Res\ folder named SaveProjectAsDlg.rc it will have to be manually renamed to WhateverTheNewNameOfTheProjectIsDlg.rc
Take a look in RA source and see how Ketil handles it (hint: search for "ProWizFixLine" and "ProWizFinish", ProWizFinish is the function that creates project from template)


What else is wrong? For some reason which escapes me one can not run the Addin twice in a row. Or twice at all while RadAsm is running.
Bug in zeroing buffers. Solution:
	; Create Directory with new name
invoke RtlZeroMemory,o$ szFromFolder, s$ szFromFolder
invoke RtlZeroMemory,o$ szDestFolder, s$ szDestFolder



Also I don't like it being under "Tools" I would prefer it being under the "File" \ "New Project" \ "Open Project" tab, but again - I can live with it.

in AddMenu change  "mov edx,6" to 0. 6 is id of the menu item "Tools". This is not all, you might wan't to use insert menu rather than append. And don't forget to add RAM_CLOSE hook to EAX that you missed!

Hope that helped 8) Beside the things listed above addin works ok  :thumbsup:

Cheers



Posted on 2008-03-28 21:42:47 by drizz
drizz,

Thank You. I don't have that much time anymore to get knee deep into these things. I write many versions of the same prog lately which differ in minor things or I maintain the few programs at work which make my job easier.

I'll try the duplicate RadAsm trick. Wonders me how I didn't think of it :) and also thanks for pointing out the bug(s), looks like I tried to cheat and messed up ;)

I'll move the menu item and fix all the mentionned stuff. I doubt I will have a look at the RA source... I tried it with the Project Zipper source and didn't last all too long. Chances are that I'll hack my own buggy  "ProWizFixLine" and "ProWizFinish" in. :shrug:

Thanks a lot for the feedback. I'll get to all these things in the next few days.
Posted on 2008-03-29 18:02:55 by JimmyClif