News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Global QEditor

Started by ic2, January 24, 2008, 06:43:21 AM

Previous topic - Next topic

ic2

Hello everybody,

Would anyone know how to set Windows registry to use Qeditor from any drive.  I got my masm32 on C:\ partition but a have a lot of ASM files on other partitions and if I want to assemble the file I got to move the file to C:\ ...  I think I once read somewhere in the forum on how to do it but I can't find it.

Thanks in advance for any info about this

zooba

I assume you're talking about compiling files? If so, it's all done through batch files which you will find in your MASM32\BIN folder. Go through these and everywhere you see:

\masm32\bin

at the start of a filename, add your drive to the start as well:

C:\masm32\bin

For example:

\masm32\bin\ml /nologo /c /coff %1.asm
becomes
C:\masm32\bin\ml /nologo /c /coff %1.asm

Cheers,

Zooba :U

ic2

Thank zooba, but that didn't work.  I could have did something wrong or that may be exactly what is needed along with something else... I thinking registry related, inculding something else that will help masm32 expand its working environment.

I better explain more clearer.  First of all, I all ready know that most people only have one drive and that is C:\ ... If so these people never used fdisk or Partition Magic to expand their horizon to insure maximum disk security.  If c is destroyed all of your valuable work is on another untouched partition depending on how you save your stuff.

( Those lines were only for people who never even thought about partition . )

Anyway, it's in the install rules when you first install masm32.  Indicating that masm32 is set up to comply (assemble) asm files if that file lives on the same partition with masm32.  If you got a asm file on drive D, E or F and there is no masm32 installed on that partition the only thing you can do with that file is open it,  edit it and save it with QEditor, but it you try to comply that file ... it does nothing because the file is out of it environment.

I'm not really sure but I think someone found a way to make it work with out having a copy of masm32 on every drive.  This is the only clue I can remember since it seems system registry related to make it cross partitions.

%SystemRoot%\system32\NOTEPAD.EXE %1


%masm32Root%\\ C:\masm32\BIN\_______ %

Than you can comply from any extra drives without a masm folder if we can figure out how to do it.     I'm just guesting.




@echo off

if not exist rsrc.rc goto over1
c:\masm32\bin\rc /v rsrc.rc
c:\masm32\bin\cvtres /machine:ix86 rsrc.res
:over1

if exist %1.obj del %1.obj
if exist %1.exe del %1.exe

c:\masm32\bin\ml /c /coff %1.asm
if errorlevel 1 goto errasm

if not exist rsrc.obj goto nores

c:\masm32\bin\Link /SUBSYSTEM:WINDOWS %1.obj rsrc.obj
if errorlevel 1 goto errlink

dir %1.*
goto TheEnd

:nores
c:\masm32\bin\Link /SUBSYSTEM:WINDOWS %1.obj
if errorlevel 1 goto errlink
dir %1
goto TheEnd

:errlink
echo _
echo Link error
goto TheEnd

:errasm
echo _
echo Assembly Error
goto TheEnd

:TheEnd



Masm32 Default looks like this in the registry:


I don't let XP PerceivedType my asm's
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\.asm]
@="asmfile"




So i go here the old fashion way !!!  Directly, just in case
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\asmfile]
@="Text File"

[HKEY_CLASSES_ROOT\asmfile\DefaultIcon]
@="c:\\masm32\\Qeditor.exe,0"

[HKEY_CLASSES_ROOT\asmfile\shell]

[HKEY_CLASSES_ROOT\asmfile\shell\open]

[HKEY_CLASSES_ROOT\asmfile\shell\open\command]
@="c:\\masm32\\Qeditor.exe %1"


This all may have to change...


zooba

File associations was my second guess at what you meant, though I still don't fully understand your problem.

Fixing the batch files should correct the compilation error you describe. Nothing in the MASM32 package (as far as I know) uses any registry entries. The one you included in your post looks fine to me (if your MASM32 installation is on drive C). Same deal with the registry sections, I see no problems there.

I'm sorry I can't help more but I don't see any reason why you would need to use the registry to allow MASM to be used from a different partition.

Cheers,

Zooba :U

Don

Hi Ic2, I guess you want file association. Here is the reg file for default setup of masm32:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\asmfile]
@="Assembly Source File"

[HKEY_CLASSES_ROOT\asmfile\DefaultIcon]
@="C:\\masm32\\qeditor.exe"

[HKEY_CLASSES_ROOT\asmfile\shell]

[HKEY_CLASSES_ROOT\asmfile\shell\open]

[HKEY_CLASSES_ROOT\asmfile\shell\open\command]
@="C:\\masm32\\qeditor.exe %1"

[HKEY_CLASSES_ROOT\.asm]
@="asmfile"


Copy the code to asm2qeditor.reg (or extract the file from the attached zip) and run it as an administrator. It will create all of the icons and file associations you require.

Regards, Don.

[attachment deleted by admin]

hutch--

Of this much you can be sure, QE does not use the registry at all and this is intentional. QE will run anything anywhere but there is more to it than that. The masm32 project itentionally sets hard coded paths from the standard path notation "\" (root) without specifying the logical drive so it can be installed on any partition and of course so you can run multiple copies on different partitions.

To change this which I don't recommend, you must change all of the paths in the batch files in the BIN diectory and change the individual batch files for every example in the examples directory. The tools directory would have to be changed as well and all of the libraries would need to be changed.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

ic2

Quote
and change the individual batch files for every example in the examples directory. The tools directory would have to be changed as well and all of the libraries would need to be changed

Now that would destroy the beauty of the project ...

Nothing about masm32 should change.  That never came to mind.  I was thinking registry and bin batch files only.

Anyway, I got to thinking and realize masm32 is really small as is.  So I just made a copy and removed everything but the required files.  Than I copy that folder on every partition on my hard drive and wala, It dose everything I was after.

So now I got baby masm32 on all of my drives "only one extra visible object per drive" and the main install is left as is on C drive.  Now my masm32 environment is complete.
   
Anything thing else better could only be done with-in Qeditor or a QEditor2.  That would require a major rebuild of QEditor so it can do it's thing once associated with from any partition.  Yes, I bet that's the key to it all.   I don't think I'm going to hold my breath for this one.  :)

I'm not crazy,  Im not going to even think about requesting any changes to QEditor  other than a find next button and re-adjustable window size in a plug in or something ... 

Thanks guys for trying.   hutch knew what I was taking about off the bat.  You have to have build it before you can really catch on.

Thank hutch, I completely understand






Don

Hi Ic2,

I have read your initial post again with fresh eyes ;)

Are you trying to open files using explorer or are you compiling? You mention both

The reg file I have given only enables you to double click on a file with .asm extension and have it open in qeditor. It does not do anything for the paths.

I guess you could always link a "\masm32" directory on each of your drives back to the one in c:\. Linkd is available in the resource kit tools from Microsoft (as long as you are using NTFS on the drives):


md f:\masm32
linkd f:\masm32 c:\masm32


Regards, Don.


zooba

Ah, I see what I missed now.

You'll have to go into the menus.ini file in your MASM32 folder (or Edit|Edit Menus in QEditor) and add C: to the start of all the batch file references. No registry, no program modifications.

Cheers,

Zooba :U

ic2

Interesting idea Don, but all my partitions are formatted FAT and FAT32.  I'll still try that some day soon for the experience.  Thanks Don

zooba, I'm into your blog now :) very nice, full with interesting subject.  I will not be missing anything that shows up in it.

Yes zooba, that's all it took ...  and it WORKS !!!

The ONLY file I had to edit was the Qeditor.ini file default path ... changing  everything to masm32 full path name.  WoW this is sooo GREAT... a dream come true ...

Just like you said... it's the only thing you ever have to do.  Thanks again zooba

Don

Good luck ic2  :bg

Regards, Don.

GregL

Don,

Thanks for the tip about linkd. After searching around I found there is a similar command in Vista called mklink that's a built-in command. I created a Directory Junction from 'd:\masm32' to 'c:\masm32' instead of duplicating the directory on the d: drive. It works very well for this purpose.  :thumbu 


Don

Hi Greg, I just tested linkd for changing between masm32 versions 9 and beta10. Works as expected:

Install masm32 v9 onto c:
Move c:\masm32 to c:\m32ver\masm32
Rename c:\m32ver\masm32 to c:\m32ver\v9
Install masm32 beta 10e onto c:
Move c:\masm32 to c:\m32ver\masm32
Rename c:\m32ver\masm32 to c:\m32ver\beta10e
Make an empty c:\masm32 directory

Now to switch between versions:
linkd c:\masm32 c:\m32ver\v9
or
linkd c:\masm32 c:\m32ver\beta10e

:U

Regards, Don.