The MASM Forum Archive 2004 to 2012

Specialised Projects => Compiler Based Assembler => Assembler With Microsoft Visual C => Topic started by: Vortex on June 06, 2009, 10:15:56 AM

Title: Running Visual Studio 2010 Professional Beta 1 development tools on Windows XP
Post by: Vortex on June 06, 2009, 10:15:56 AM
Download  Visual Studio 2010 Professional Beta 1 (http://www.microsoft.com/downloads/details.aspx?familyid=3296BB4F-D8BA-4CFD-AA95-A424C5913F6B&displaylang=en) and install it on a technician computer. This machine can be another computer or a virtual machine. Copy the following files and folders to your development computer :

The folder named 1033 and it's content
atlprov.dll
bscmake.exe
c1.dll
c1xx.dll
c2.dll
cl.exe
cl.exe.config
cvtres.exe
dumpbin.exe
editbin.exe
lib.exe
link.exe
link.exe.config
ml.exe
mspdb100.dll
msvcm100.dll
msvcp100.dll
msvcr100.dll
nmake.exe
pgocvt.exe
pgodb100.dll
pgomgr.exe
pgort100.dll
pgosweep.exe
undname.exe
vcvars32.bat
xdcmake.exe
xdcmake.exe.config


Notice that it's important to place some critical DLLs to your development environment :

mspdb100.dll , msvcm100.dll , msvcp100.dll , msvcr100.dll

No need to install any framework. You need to copy the include files and import libraries from the technician computer to finalize the setup.

Small executable built with custom C start-up code ( 3584 bytes ) :

set PATH=D:\VS2010b\bin;%PATH%

SET INCLUDE=D:\VS2010b\include;D:\VS2010bSDK\Include

SET LIB=D:\VS2010b\lib;D:\VS2010bSDK\lib

cl /c /Oty2 /Zl /Gs /GS- /FoDemo.OBJ Demo.c
link /SUBSYSTEM:WINDOWS /NODEFAULTLIB Demo.obj crt0\crt0.lib kernel32.lib user32.lib gdi32.lib D:\masm32\lib\msvcrt.lib


Traditional build depending on MS CRT static library ( 31232 bytes )

set PATH=D:\VS2010b\bin;%PATH%

SET INCLUDE=D:\VS2010b\include;D:\VS2010bSDK\Include

SET LIB=D:\VS2010b\lib;D:\VS2010bSDK\lib

cl Demo.c kernel32.lib user32.lib gdi32.lib


Test environment : Windows XP SP 3 with the latest hotfixes, no any .NET framework installed

EDIT : I uploaded a new version of VS2010b1Test1.zip this time containing the crt0 folder. Thanks UtilMasm for your reporting.

[attachment deleted by admin]
Title: Re: Running Visual Studio 2010 Professional Beta 1 development tools on Windows XP
Post by: d0d0 on June 06, 2009, 10:36:43 AM
Thanks alot Vortex!  :U

By the way, have they added support for c99 to their compiler?

Thanks
Title: Re: Running Visual Studio 2010 Professional Beta 1 development tools on Windows XP
Post by: UtillMasm on June 06, 2009, 11:04:10 AM
 :U
but...
D:\VS2010b\
D:\VS2010bSDK\
crt0\crt0.lib
what are they?
can you atach the following command file's result.
@echo off
echo Working...
dir d:\vs2010b\ /a-d/s/b>AllFiles.txt
dir d:\vs2010bsdk\ /a-d/s/b>>AllFiles.txt
dir d:\vs2010b1test1\ /a-d/s/b>>AllFiles.txt
echo Done, ready to exit.
pause
Title: Re: Running Visual Studio 2010 Professional Beta 1 development tools on Windows XP
Post by: Vortex on June 06, 2009, 11:19:38 AM
Hi UtillMasm,

Sorry, my apologies. I forgot the crt0 library. Would please download again the sample?

Yes, I should give more information about the structure of installation folders :

VS2010b :

bin        ; binaries, development tools
include    ; standard include files
lib        ; VC run-time libraries


VS2010bSDK :

include ; VS 2010 SDK include files
lib     ; VS 2010 SDK libraries
Title: Re: Running Visual Studio 2010 Professional Beta 1 development tools on Windows
Post by: mitchi on June 06, 2009, 03:31:29 PM
Excellent Vortex. By the way, the batch file of #2 has no linker line.
Title: Re: Running Visual Studio 2010 Professional Beta 1 development tools on Windows XP
Post by: UtillMasm on June 06, 2009, 03:36:22 PM
because cl's option /c not exist.
Title: Re: Running Visual Studio 2010 Professional Beta 1 development tools on Windows
Post by: mitchi on June 06, 2009, 03:43:48 PM
Oh I see so that's how it is!!  I was expecting something like /MT on the commandline, I didn't know it was default !
Title: Re: Running Visual Studio 2010 Professional Beta 1 development tools on Windows
Post by: dedndave on June 06, 2009, 05:07:01 PM
i was trying to extract the files without a second machine
i created the 1.2 gb ISO image and extracted the files from that
there are several cab files, as well as extractable exe's
i am trying to find the right ones
Title: Re: Running Visual Studio 2010 Professional Beta 1 development tools on Windows XP
Post by: Vortex on June 06, 2009, 05:32:51 PM
Hi dedndave,

This may not be the best solution but do you have another hard disc to create a safe test environment? You could copy the necessary files to your development system. What I mean is that you can install temporarily your OS to a second hard disc.
Title: Re: Running Visual Studio 2010 Professional Beta 1 development tools on Windows
Post by: dedndave on June 06, 2009, 05:34:26 PM
actually, i do have another hard drive
but i was trying to do it this way so we could document it for others

i may wind up using the drive as a test-bed and figuring out the details as i go
Title: Re: Running Visual Studio 2010 Professional Beta 1 development tools on Windows XP
Post by: GregL on June 06, 2009, 10:40:37 PM
Quote from: d0d0By the way, have they added support for c99 to their compiler?

No, Microsoft has been ignoring the C99 standard for many years now.  :tdown

Title: Re: Running Visual Studio 2010 Professional Beta 1 development tools on Windows XP
Post by: drizz on June 06, 2009, 11:23:08 PM
@echo off
rem Mount "VS2010Beta1ENU_PRO.iso" to virtual drive
set ISODRIVE=G
mkdir bin
expand %ISODRIVE%:\cab16.cab -F:"FL_ml_exe_19621_x86_ln.3643236F_FC70_11D3_A536_0090278A1BB8" ".\bin"
ren ".\bin\FL_ml_exe_19621_x86_ln.3643236F_FC70_11D3_A536_0090278A1BB8" "ml.exe"
expand %ISODRIVE%:\cab32.cab -F:"F_REDIST_DLL_APPLOCAL_msvcr100_x86" ".\bin"
ren ".\bin\F_REDIST_DLL_APPLOCAL_msvcr100_x86" "msvcr100.dll"
expand %ISODRIVE%:\cab6.cab -F:"FL_link_exe_10395_x86_ln.3643236F_FC70_11D3_A536_0090278A1BB8" ".\bin"
ren ".\bin\FL_link_exe_10395_x86_ln.3643236F_FC70_11D3_A536_0090278A1BB8" "link.exe"
expand %ISODRIVE%:\cab10.cab -F:"FL_mspdbst_dll_x86_ln.3643236F_FC70_11D3_A536_0090278A1BB8" ".\bin"
ren ".\bin\FL_mspdbst_dll_x86_ln.3643236F_FC70_11D3_A536_0090278A1BB8" "mspdb100.dll"

pause > NUL
I'll let you hax0rs figure out the rest :)
Which shouldn't be a problem if you have a good filemanager like tcmd that can browse/extract/search archives.
Title: Re: Running Visual Studio 2010 Professional Beta 1 development tools on Windows XP
Post by: drizz on June 07, 2009, 12:11:31 AM
Oh my, ignore my last post, i completely forgot about a tool i use a LOT to extract msi archives.
It's called "Less MSIérables", the original homepage (http://blogs.pingpoet.com/overflow/archive/2005/06/02/2449.aspx) seems to be down atm, i'll attach the exe that i have, it's not the original because i had to recompile it to fix a little bug.
Open the "vs_setup.msi" file in it and select the files you want to extract.

Edit:
It seems it doesen't work with this msi, oh well, here is the download link with original content anyway
http://code.google.com/p/code4all/downloads/list
Title: Re: Running Visual Studio 2010 Professional Beta 1 development tools on Windows
Post by: dedndave on June 07, 2009, 12:38:09 AM
program sounds good - not too sure i like the name - lol
a bit of a stretch
let me play with it - ty Drizz

yah - msi file format has changed a bit over time
but - i think there is an extract option to get a list of files in a cabinet without extracting
i can make a text list with batch then look through it
Title: Re: Running Visual Studio 2010 Professional Beta 1 development tools on Windows XP
Post by: Vortex on June 07, 2009, 04:50:13 PM
A dialog box example built with ml.exe and link.exe V10

[attachment deleted by admin]
Title: Re: Running Visual Studio 2010 Professional Beta 1 development tools on Windows XP
Post by: UtillMasm on June 07, 2009, 05:01:15 PM
 :U
very nice!
Title: Re: Running Visual Studio 2010 Professional Beta 1 development tools on Windows XP
Post by: drizz on June 07, 2009, 06:33:30 PM
Ok people listen up :)

lessmsi is working!

I have downloaded the latest wix binaries from:
http://wix.sourceforge.net/releases/3.0.5217.0/

recompiled the project and adjusted it to use the newer wix assembly, fixed bugs and added code to handle external cabs.

try it out:
http://rapidshare.com/files/241961627/lessmsi_fixed.7z.html
MD5: 6F575624FBC010EBD352742500C76C15

Note that the tool extracts all cabs first then deletes the ones you didn't select, so for vs_setup you must have atleast 2,5GB free space.

Enjoy :boohoo:
Title: Re: Running Visual Studio 2010 Professional Beta 1 development tools on Windows XP
Post by: Vortex on June 07, 2009, 07:19:32 PM
xdcmake.exe, a binary supplied with VS 2010 Beta 1 requires the installation of .NET Framework 4.0
Title: Re: Running Visual Studio 2010 Professional Beta 1 development tools on Windows
Post by: dedndave on June 07, 2009, 07:25:56 PM
QuoteVisual C++ compiler for each source code file when source code is compiled with /doc and when the source code file contains documentation comments marked up with XML tags.

just don't do that  :bg

i bet vortex will write a xdcmake.exe that doesn't use .NET 4
Title: Re: Running Visual Studio 2010 Professional Beta 1 development tools on Windows XP
Post by: UtillMasm on June 08, 2009, 02:47:09 AM
Quote from: drizz on June 07, 2009, 06:33:30 PM
...
...you must have atleast 2,5GB free space.
...
:(
Title: Re: Running Visual Studio 2010 Professional Beta 1 development tools on Windows XP
Post by: Vortex on June 08, 2009, 04:46:47 PM
Hi drizz,

Thanks for the tool. Your method based on extracting the binaries from archives is a good one.
Title: Re: Running Visual Studio 2010 Professional Beta 1 development tools on Windows
Post by: dedndave on June 08, 2009, 05:55:52 PM
problem is i don't have a complete list of required files   :(
(hint hint Vortex - lol)
Title: Re: Running Visual Studio 2010 Professional Beta 1 development tools on Windows XP
Post by: Vortex on June 08, 2009, 06:22:49 PM
Hi dedndave,

I already presented some hints.
Title: Re: Running Visual Studio 2010 Professional Beta 1 development tools on Windows
Post by: dedndave on June 08, 2009, 06:47:05 PM
i know - in fact, you pretty much gave all of em
it is the include files and libraries i need listed
the msi/cab files do not tell which directory is targeted for different files
although, it is probably in an INI file or something
let me play with it a bit when i get some time
if i need help, i will PM ya
Title: Re: Running Visual Studio 2010 Professional Beta 1 development tools on Windows XP
Post by: Vortex on September 21, 2009, 05:11:54 PM
A quick method by Japheth to extract Masm 10 from the installation package :

QuoteEXTRACT /L c:\temp cab16.cab FL_ml_exe*

Rename the extracted file to ml.exe

ML.EXE needs MSVCR100.DLL. This file is already extracted, look in the Setup subdirectory.

Thanks Japheth for your solution.
Title: Re: Running Visual Studio 2010 Professional Beta 1 development tools on Windows XP
Post by: remus2k on January 02, 2011, 04:09:00 AM
Hi Thanks For this Info :U

I have compile with new ml and linker a masm code
Now have i see with the new compiler ist this exe bigger

Standart ml and linker from Masm32 package
3,00 KB (3.072 Bytes)

With v10.xxxx
3,50 KB (3.584 Bytes)

And this exe have a new section .reloc

what if better or newer by masm v10 from vs2010
Title: Re: Running Visual Studio 2010 Professional Beta 1 development tools on Windows XP
Post by: Vortex on January 02, 2011, 10:13:06 AM
Hi remus2k,

You should use Pelle's Polink.exe to link the object files. It does not add automatically relocation sections and creates smaller executables. This powerful linker comes with Pelles C package and Masm32 installation :

\masm32\bin\polink.exe
Title: Re: Running Visual Studio 2010 Professional Beta 1 development tools on Windows XP
Post by: remus2k on January 02, 2011, 04:44:55 PM
Hi vortex

Thanks for all this Information and examples

I have compiled without installed the studio
and have a error msvcr100.dll Fail.

Ok it gives two solution:

1. install the Microsoft Visual C++ 2010 Redistributable Package (x86)
2. or copy this files from vs2010 studio "msvcm100.dll , msvcp100.dll , msvcr100.dll" to the system32 folder

Then works fine :U