[Developers] Bug in scummvm_vs_libs\install.bat ?

Ask for help with ScummVM problems

Moderator: ScummVM Team

Post Reply
monsieurouxx
Posts: 80
Joined: Fri Oct 19, 2007 5:48 pm

[Developers] Bug in scummvm_vs_libs\install.bat ?

Post by monsieurouxx »

I followed the instructions of the wiki to compile ScummVM with Visual C Express 9.0. Everything semt to go fine.

However, during compilation, 2 types of errors occurred:
1. NASM.EXE couldn' be found
2. The ".h" files of the additional libraries (zlib, vorbis,etc.) could not be found.

I opened my VC installation folder (C:\Program Files\Microsoft Visual Studio 9.0\VC) and noticed that, after running the "scummvm_vs_libs\install.bat" file provided on the wiki page, the whole contents of the "lib", "include" and "bin" folders had been copied directly into the VC folder. The directory structure had not been kept.

That's why the compiler could not find the files.

I opened the "scummvm_vs_libs\install.bat" file and saw the follwing command (and similar) :
xcopy /s /y include "%VCINSTALLDIR%" > NUL

I'm not a specialist of the xcopy command and its switches, but isn't there something wrong? How come the files have not been copied to the rights folders?[/b]
User avatar
Red_Breast
Posts: 774
Joined: Tue Sep 30, 2008 10:33 pm
Location: The Bar Of Gold, Upper Swandam Lane.

Post by Red_Breast »

If they haven't been copied correctly then maybe the directory structure has changed from the time that package was put together and now. That's just a guess.
I've compiled on Windows a couple of times last year. I don't remember using a .bat file though. I seem to remember just copying the files/folders from the place I downloaded them to into the correct folder outside of VC Express (just using Windows Explorer I mean.)
One thing I noticed. You said VC Express 9.0. The guide I used:
http://wiki.scummvm.org/index.php/Compi ... ual_Studio
which you also might be using has instructions up to Visual Studio 2008. That's what I used. Maybe VC Ex 9.0 has changed and that's the problem.
I've just downloaded the package myself. Are you using Vista or 7? From the top of the script:-

Code: Select all

rem In Vista, if install.bat is running elevated, its initial working
rem directory will not be where it resides, so set it to be so.
rem In earlier versions of Windows this is a null operation.
I think the package was put together by forum member sanguinehearts. I know what I'd do in your situation. Keep working at it and if you feel you've exhausted all your options then PM him.
One other thing I should add. I believe you made this thread for the attention of the ScummVM team only, going on the title of the thread starting with 'Developers'. So I'll add I'm nothing to do with the team. I just thought I'd see if I could help.
KuroShiro
Posts: 473
Joined: Thu May 15, 2008 7:42 am
Location: Somewhere Out There

Post by KuroShiro »

That is pretty strange. However, all the install.bat file really does for that is copy over the files, so you can do it manually without too much trouble.

Copy the contents of each of the directories you mentioned (lib, include, bin, etc.) to the respective folders in your /vc directory (or whatever you named it). Be sure to maintain the directory structure.
monsieurouxx
Posts: 80
Joined: Fri Oct 19, 2007 5:48 pm

Post by monsieurouxx »

I'm using Windows XP, and, even though the Wiki page was originally written for VC8, it does not explain why the .BAT file acts randomly (indeed, it just copies files, so it should do it right, independently from VC).

I've indeed copied the files manually and fixed my problem myself, but it's such a pity to lose the benefit of those cool ZIP and BAT files.

The issue is easily reproduced:
I'd advise the maintainers of ScummVM to create a fake directory structure, download the ZIP file from the wiki page, and run the install.bat file. You'll see that the files go directly to the folder - no subfolders are created.
User avatar
md5
ScummVM Developer
Posts: 2250
Joined: Thu Nov 03, 2005 9:31 pm
Location: Athens, Greece

Post by md5 »

That's odd - it works fine on my end... (it always did, since I wrote that installer and tested it on many systems)

I don't understand how it is possible to lose the directory structure - the "/s" switch in xcopy instructs it to copy directories and subdirectories.

The only thing I can think of is that the ZIP file hasn't been unzipped properly (i.e. the directory structure has been lost), or xcopy is for some reason borked on your system. I've tried this installer under XP, Vista and 7 and it worked flawlessly in all cases...
Post Reply