Monday, October 15, 2007

Session 11 - MozillaBuild in Vista - nsinstall giving me problems

I deleted my whole objdir because I couldn't make it work an incremental build and now I find myself not being able to build on Vista.
What's wrong? After the weekend developing for the 0.1 release, now I can't build anymore on Vista AGAIN, could it has to do with it?
The last time I only had to "run as administrator" the msvc8.bat

Could it has to do that at some point I decided to update my source tree without checking tinderbox first?

I'm trying to understand this Bug 388543[MozillaBuild] nsinstall on vista dies due to UAC

Everytime, I try to run the make -f client.mk build, I get a different error, why?:
  • nsinstall: cannot copy c:\ff\mozilla\js\src\jsapi.h to ..\..\dist\include\js\jsapi.h: The system cannot find the file specified
  • nsinstall: cannot copy c:\ff\mozilla\nsprpub\pr\include\prbit.h to c:\ff\mozilla\objdir\dist\sdk\include\prbit.h: The system cannot find the file specified
  • nsinstall: cannot copy c:\ff\mozilla\xpcom\string\public\nsObsoleteAString.h to ..\..\..\dist\include\string\nsObsoleteAString.h: The system cannot find the file specified
  • nsinstall: cannot copy c:\ff\mozilla\nsprpub\pr\include\prclist.h to c:\ff\mozilla\objdir\dist\include\nspr\prclist.h: The system cannot find the file specified

Which has this ApplyManifesto.vbs, which I do not know what to do with it!!!:
Dim objFSO, objShell, objProc, objManifestFile
Dim strPathMozBuild, strPathMT, strPathExe, strArgs, strPathManifest

strPathMozBuild = "c:\mozilla-build"
strPathMT = "c:\Program Files\Microsoft Visual Studio 8\VC\bin\mt.exe"

'*** Nothing below this line should need to be modified

set objFSO = CreateObject("Scripting.FileSystemObject")
set objShell = CreateObject("WScript.Shell")
strPathManifest = strPathMozBuild & "\tmp.manifest"

strPathMT = Chr(34) & strPathMT & Chr(34)

AddManifestToExes strPathMozBuild & "\msys\bin"
AddManifestToExes strPathMozBuild & "\moztools\bin"
AddManifestToExes strPathMozBuild & "\moztools-180compat\bin"

Sub AddManifestToExes(byval strDirectory)
Dim fileExt
Set objFolder = objFSO.GetFolder(strDirectory)
For Each objFile In objFolder.Files
fileExt = objFSO.GetExtensionName(objFile.Path)
If fileExt = "exe" Then
AddManifest objFile
End If
Next
For Each objFolder In objFolder.SubFolders
GetFiles objFolder.Path
Next
End Sub

Sub AddManifest(oFile)
WScript.echo "Adding manifest to: " & oFile.Path
strPathExe = oFile.Path
Set objManifestFile = objFSO.CreateTextFile(strPathManifest, True)
objManifestFile.WriteLine ""
objManifestFile.WriteLine ""
objManifestFile.WriteLine " objManifestFile.WriteLine " processorArchitecture=""X86"""
objManifestFile.WriteLine " name=""" & oFile.Name & """"
objManifestFile.WriteLine " type=""win32""/>"
objManifestFile.WriteLine " "
objManifestFile.WriteLine " "
objManifestFile.WriteLine " "
objManifestFile.WriteLine " objManifestFile.WriteLine " level=""asInvoker"""
objManifestFile.WriteLine " uiAccess=""false""/>"
objManifestFile.WriteLine "
"
objManifestFile.WriteLine "
"
objManifestFile.WriteLine "
"
objManifestFile.WriteLine "
"
objManifestFile.Close

strArgs = " -outputresource:" & strPathExe & ";#1 -manifest " & strPathManifest

set objProc = objShell.Exec(strPathMT & strArgs)

Do
WScript.Sleep 100
Loop Until objProc.Status <> 0

If objProc.ExitCode <> 0 Then
WScript.Echo "EXIT CODE: " & objProc.ExitCode
WScript.Echo "ERROR: " & objProc.StdErr.ReadAll
End If

objFSO.DeleteFile(strPathManifest)
End Sub

I also tried nsinstall.manifest to put this beside C:\mozilla-build\moztools\bin\nsinstall.exe, according to this post http://wiki.mozilla.org/Penelope_Developer_Page#Windows_Vista:


processorArchitecture="X86"
name="nsinstall"
type="win32"/>


Description of your application



level="asInvoker"
uiAccess="false"/>





My .mozconfig:
#mk_add_options MOZ_CO_PROJECT=browser
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/objdir
. $topsrcdir/browser/config/mozconfig
# the line before sets the project as browser and enable the application
mk_add_options MOZ_MAKE_FLAGS=-j4

# Options for 'configure' (same as command-line options).
ac_add_options --enable-debug
ac_add_options --disable-static --enable-shared
ac_add_options --disable-optimize

No comments:

Post a Comment