### Author Topic: Suggestion for the Boss  (Read 14832 times)

#### shankle

• Member
• Posts: 868
##### Suggestion for the Boss
« on: October 24, 2013, 06:54:22 AM »
This suggestion is intended to be constructive and I hope it is taken in that light.
I have several hundred programs to change to 64-bit. I find myself going from "cedt.exe"
to a Dos window and back over and over again. Surely there is a better way.
There used to be a "Programmers Workbench" by Microsoft that did what I think

#### wjr

• Member
• Posts: 226
##### Re: Suggestion for the Boss
« Reply #1 on: October 24, 2013, 10:15:55 AM »
I think what you are looking for goes beyond what the Go Tools, with their typical command line nature, can provide. So you are the Boss in the selection of an Editor or IDE with features that can simplify your convert/build process. This also depends upon the complexity of your projects and the consistency in your source file naming, which may allow you to have a generic batch file that the Editor or IDE can use.

There most likely is a better way. For the one that you mentioned, if you really need a DOS window, are you using F10 to get there? Have you set up the Go Tools or a batch file in the Tool / Conf. User Tools... menu? Note the Capture Output option there, so you wouldn't need a pause at the end of a batch file.

#### shankle

• Member
• Posts: 868
##### Re: Suggestion for the Boss
« Reply #2 on: October 24, 2013, 01:12:42 PM »
Thank you for responding WJR.
I have done non of the things you mention.

I use an icon on the desktop to compile the program. When it finds an error
I have to go back to cedt.exe to correct the error. Then back to the icon to
compile the program again etc. etc.
This is the method I have been using.

#### wjr

• Member
• Posts: 226
##### Re: Suggestion for the Boss
« Reply #3 on: October 24, 2013, 03:35:02 PM »
There often are quite a few corrections along the way for a 64-bit conversion. One way to set up the assembly part for your editor is on that Tools / Conf. User Tools... dialog, select the first -Empty- slot for hot key Ctrl+1. Then set the following, for example:

Command:   C:\Program Files (x86)\GoTools\GoAsm.exe
Argument:   /x64 \$(FileTitle).asm
Initial Dir:   \$(FileDir)
Also select Capture Output, then OK.

From there, pressing Ctrl+1 will assemble the current file that you are working on in the editor (the above assumes a file extension of asm) and display the GoAsm output within the editor.

You can do similar for GoRC (build a RES file for linker) and GoLink on the next slots:

Command:   C:\Program Files (x86)\GoTools\GoRC.exe
Argument:   /r \$(FileTitle).rc
Initial Dir:   \$(FileDir)

Argument:   /debug coff \$(FileTitle).obj \$(FileTitle).res @Build.txt
Initial Dir:   \$(FileDir)

With the above method using FileTitle, a build could be as easy as Ctrl+1 Ctrl+2 Ctrl+3 (if you name your RC file with the same Title as the ASM one). Note that Build.txt is a text file in your project directory that contains other GoLink command line options and the list of import DLLs (or you can type these out in the Argument field instead).

Another way, it sounds like you have on your desktop either a batch file, or a short cut to one, that is specific to your current project. You can do similar to the above, by pointing to this batch file in the Command field, and clearing the Argument field (unless batch file does something useful here with arguments).

Something like the above should make it a bit easier without having to switch between windows.

#### shankle

• Member
• Posts: 868
##### Re: Suggestion for the Boss
« Reply #4 on: October 24, 2013, 11:16:53 PM »

The sample you gave does not work for me. I get an error on GoTools.
I did a search on GoTools and it is not in my computer.
I will try to explain the GoAsm setup that exists in my computer:
c: Windows
D: GoAsm
J: MASM32

All items relating to GoAsm are in the D partition under GoAsm.
In D:GoAsm I have placed all headers and programs in codejps.
So cedt.exe runs in D:\GoAsm\codejps

On the desktop I have created a Dos command line icon.
When I click on that icon I key in the following:
D:
D:cd \codejps
D:blahbtch

blahbtch consists of the following:
Set INCLUDE=d:\codejps
Set PATH=d:\codejps
GoAsm /x64/b/c xxxx64.asm

So where and how to I put GoTools in d:\codejps?
Thank you.

#### wjr

• Member
• Posts: 226
##### Re: Suggestion for the Boss
« Reply #5 on: October 25, 2013, 03:11:40 AM »
For the first method, change a portion of the Command field from the example "C:\Program Files (x86)\GoTools\"  to your "D:\GoAsm\" or "D:\GoAsm\codejps\".

For the second method, change the Command field using the "..." on the right and then in the Select File dialog choose your "blahbtch" file.

To fine tune your batch file, you can put "@echo off" on the first line so each command is not shown in the output. You could also make it more generic and instead of "xxxx64" use "%1" so the batch file would then require an argument which the editor would supply if you fill in the Argument field with "\$(FileTitle)" and the Initial Dir as in the above.

#### shankle

• Member
• Posts: 868
##### Re: Suggestion for the Boss
« Reply #6 on: October 25, 2013, 05:22:47 AM »

blahbtch consists of the following:
@echo off
Set INCLUDE=D:\codejps
Set PATH=D:\codejps
GoAsm /x64/b/c %1.asm

This is what    Preferences looks like in cedt.exe\tools
user tool     GoAsm x64
Argument      /x64 \$(FileTitle).asm
InitiaL Dir   \$(FileDir)

x  Capture Output

I don't know how to handle "FileTitle" and "FileDir"
so they are variable each time I use a different program.
How do I modify the Batch file to do this?

#### FORTRANS

• Member
• Posts: 1088
##### Re: Suggestion for the Boss
« Reply #7 on: October 25, 2013, 05:37:56 AM »
Hi,

You could set up a BATch file to run your cedt.exe editor.
Use the \$1 and %2 parameters to pass arguments as needed
Then go to the command prompt and alternate between the
editor and the assemble and link using the command history
supplied by the up or down keys.  Presto, almost no typing
outside the editor.  If you end up at the desktop, Alt-Tab back
to the command prompt.

Regards,

Steve

#### wjr

• Member
• Posts: 226
##### Re: Suggestion for the Boss
« Reply #8 on: October 25, 2013, 05:56:34 AM »
For the first method, the Command field needs the program name as well, for example:

Command:   D:\GoAsm\codejps\GoAsm.exe

For the second method, you have modified the batch file with %1 so nothing left to do there. The editor needs to pass the %1 argument to the batch file, and this is done by setting:

Argument:   \$(FileTitle)
Initial Dir:   \$(FileDir)

exactly as you see it here. The editor treats \$(FileTitle) and \$(FileDir) as a variable depending upon which file you are currently editing and sets things accordingly.

#### shankle

• Member
• Posts: 868
##### Re: Suggestion for the Boss
« Reply #9 on: October 25, 2013, 07:43:19 AM »

blahbtch consists of the following:
@echo off
Set INCLUDE=D:\codejps
Set PATH=D:\codejps
GoAsm /x64/b/c %1.asm

This is what preferences looks like in cedt.exe\tools
user tool     GoAsm x64
Argument      /x64 \$(FileTitle).asm
InitiaL Dir   \$(FileDir)

x  Capture Output

Am unable to save the preferences I keyed in cedt.exe. Hitting save, apply
doesn't work. I'm surely not expected to key them in each time.
Thanks

#### wjr

• Member
• Posts: 226
##### Re: Suggestion for the Boss
« Reply #10 on: October 25, 2013, 09:06:17 AM »
For the "File Not Found", try the Command field using the "..." on the right and then in the Select File dialog choose where you have installed GoAsm.exe which may be "D:\GoAsm\GoAsm.exe" instead. To be sure, this should be for Command, not Menu Text as you have shown above.

You shouldn't need to key this in each time.

#### shankle

• Member
• Posts: 868
##### Re: Suggestion for the Boss
« Reply #11 on: October 25, 2013, 09:55:25 PM »
Got it to work one time.
Seems the batch file is not necessary.

Command     D:\codejps\GoAsm.exe
Argument     /x64 \$(FileTitle).asm
Initial Dir     \$(FileDir)

Checks are in Close on exit,  Capture Output, Save before execution
Clicking on "Save Tools" and loading it into my file called "Stools.cmd"
gives "User Command 3.40"  (not what I keyed in preferences)
The preferences is not saved for repeated executions.

#### wjr

• Member
• Posts: 226
##### Re: Suggestion for the Boss
« Reply #12 on: October 26, 2013, 10:35:21 AM »
Correct, for the first method you do not need the batch file, you are telling the editor where to find the individual GoTool. However, a build is then 2 or 3 steps depending if you have a resource file. Fewer steps with the second method if you can get a slot set up for the batch file which assembles and links.

I didn't need to Save Tools... as it seems to keep adjustments with the current configuration, but if you did get something working and saved it, you should be able to Load Tools... to get that back (or if there is stuff there that doesn't work, select that slot and use Remove).

#### shankle

• Member
• Posts: 868
##### Re: Suggestion for the Boss
« Reply #13 on: October 26, 2013, 10:59:21 AM »
The Crimson Editor forum is not functional. Reason Crimson Editor has been taken
over by Emerald Editor. Evidently there are bugs in the Preferences portion of
Crimson Editor and that's probably why I can't get it to work.