From 71081bf366a785faa05e68f5704740447bc4ce6a Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Wed, 3 Aug 2005 08:41:15 +0000 Subject: [PATCH] Fixed SD2-396: Opening a Visual Studio Solution with #D causes Error "... is not a valid solution file". git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@298 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- bin/setup/BuildHelpIndex.pdb | Bin 17920 -> 0 bytes bin/setup/PostInstallTasks.bat | 7 +-- bin/setup/PostInstallTasks.vbs | 40 --------------- bin/setup/PreUninstallTasks.bat | 4 +- bin/setup/PreUninstallTasks.vbs | 38 -------------- setup/Corsavy.nsi | 48 ++++++++++-------- setup/readme.txt | 10 +++- .../Project/Src/Project/Solution/Solution.cs | 15 +++++- 8 files changed, 56 insertions(+), 106 deletions(-) delete mode 100644 bin/setup/BuildHelpIndex.pdb delete mode 100644 bin/setup/PostInstallTasks.vbs delete mode 100644 bin/setup/PreUninstallTasks.vbs diff --git a/bin/setup/BuildHelpIndex.pdb b/bin/setup/BuildHelpIndex.pdb deleted file mode 100644 index bc9851dcb45f642b7b2ab4e19cd984749bb8f318..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 17920 zcmeI332aoy8OLY6i^E|ECd6EUF2qzxAU>esN>U7K3|4SWVrWQW0mgm?3wzhyT?bGP zy;c>9)K(%@)duAd6;eW!fYK&PqqJ1CLQ&FI>JdVtN;%Xw38K}tq zGdJ?MS7GQg9z?&xKm+bydjHcK(N(K~MUze9s_lH#@!m1Ns*Wv^9~OAp;*%;}N! zhc-Q#uK8`-H&(y+!SbVD&px$B!$!1W*Bc#AAG+bz@BXu7pZnu!&yOMQ8h9i;3NC@i z!sFm;Vab)k6X5IMiSQ)2489(Y=<;abQrZ8H_t(F3u==gW_m<`BPrQ2k*O#aDQ7sp% zfx-O0mc_9DS6KB7#EY#vlK=l};8M;1f&PCqU6aq(I2r+;%lFIYPlkgvKx;-sL$85L zW&g8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e0&YbOSf|gg^e+2u4aXeoO>zGIN za>i}XLMMWpYx7R%tt~n?;9T4Ozab!^A=Ci(0ueanFjs~c@?*4 diff --git a/bin/setup/PostInstallTasks.bat b/bin/setup/PostInstallTasks.bat index a142e8fd69..24a1f23756 100644 --- a/bin/setup/PostInstallTasks.bat +++ b/bin/setup/PostInstallTasks.bat @@ -10,6 +10,7 @@ echo. echo ICSharpCode.SharpZipLib.dll ..\tools\gacutil2.exe /i ..\ICSharpCode.SharpZipLib.dll echo. -echo Installing and configuring help system -BuildHelpIndex.exe -REM pause +rem echo Installing and configuring help system +rem cd help +rem call register.bat +@IF %ERRORLEVEL% NEQ 0 PAUSE \ No newline at end of file diff --git a/bin/setup/PostInstallTasks.vbs b/bin/setup/PostInstallTasks.vbs deleted file mode 100644 index 94625452f3..0000000000 --- a/bin/setup/PostInstallTasks.vbs +++ /dev/null @@ -1,40 +0,0 @@ -Dim WshShell -Set WshShell = CreateObject("WScript.Shell") -WshShell.CurrentDirectory = GetSetupPath() - -WScript.Echo "Installing shared assemblies into the GAC" & vbCrLf - -WScript.Echo "ICSharpCode.SharpZipLib.dll" -RegisterInGAC "..\ICSharpCode.SharpZipLib.dll" - -WScript.Echo "NUnit.Core.dll" -RegisterInGAC "..\nunit.core.dll" - -WScript.Echo "NUnit.Framework.dll" -RegisterInGAC "..\nunit.framework.dll" - -Execute "BuildHelpIndex.exe" - -' SHARED FUNCTIONS - -Public Sub RegisterInGAC(strAssemblyRelativePath) - Execute "..\tools\gacutil2.exe /i:" & strAssemblyRelativePath -End Sub - -Public Sub Execute(strProgram) - Dim oExec - - Set oExec = WshShell.Exec(strProgram) - - Do While oExec.Status = 0 - WScript.Sleep 100 - Loop - - WScript.Echo oExec.StdOut.ReadAll -End Sub - -Public Function GetSetupPath() - Dim strSetupDirPath - strSetupDirPath = Left(WScript.ScriptFullName, InStrRev(WScript.ScriptFullName, "\")) - GetSetupPath = strSetupDirPath -End Function diff --git a/bin/setup/PreUninstallTasks.bat b/bin/setup/PreUninstallTasks.bat index 02ca7b0c13..c9e1662b39 100644 --- a/bin/setup/PreUninstallTasks.bat +++ b/bin/setup/PreUninstallTasks.bat @@ -6,4 +6,6 @@ echo. ..\tools\gacutil2.exe /u ..\nunit.framework.dll echo. ..\tools\gacutil2.exe /u ..\ICSharpCode.SharpZipLib.dll -REM pause +rem cd help +rem call unregister.bat +@IF %ERRORLEVEL% NEQ 0 PAUSE \ No newline at end of file diff --git a/bin/setup/PreUninstallTasks.vbs b/bin/setup/PreUninstallTasks.vbs deleted file mode 100644 index 9efaa14d21..0000000000 --- a/bin/setup/PreUninstallTasks.vbs +++ /dev/null @@ -1,38 +0,0 @@ -Dim WshShell -Set WshShell = CreateObject("WScript.Shell") -WshShell.CurrentDirectory = GetSetupPath() - -WScript.Echo "Removing shared assemblies from the GAC" & vbCrLf - -WScript.Echo "ICSharpCode.SharpZipLib.dll" -RemoveFromGAC "..\ICSharpCode.SharpZipLib.dll" - -WScript.Echo "NUnit.Core.dll" -RemoveFromGAC "..\nunit.core.dll" - -WScript.Echo "NUnit.Framework.dll" -RemoveFromGAC "..\nunit.framework.dll" - -' SHARED FUNCTIONS - -Public Sub RemoveFromGAC(strAssemblyRelativePath) - Execute "..\tools\gacutil2.exe /u:" & strAssemblyRelativePath -End Sub - -Public Sub Execute(strProgram) - Dim oExec - - Set oExec = WshShell.Exec(strProgram) - - Do While oExec.Status = 0 - WScript.Sleep 100 - Loop - - WScript.Echo oExec.StdOut.ReadAll -End Sub - -Public Function GetSetupPath() - Dim strSetupDirPath - strSetupDirPath = Left(WScript.ScriptFullName, InStrRev(WScript.ScriptFullName, "\")) - GetSetupPath = strSetupDirPath -End Function diff --git a/setup/Corsavy.nsi b/setup/Corsavy.nsi index 7eb1bcfe9a..4e9716ed9b 100644 --- a/setup/Corsavy.nsi +++ b/setup/Corsavy.nsi @@ -11,7 +11,7 @@ !define MUI_WELCOMEFINISHPAGE_BITMAP "wizard-image.bmp" !define MUI_UNWELCOMEFINISHPAGE_BITMAP "wizard-image.bmp" -BrandingText "© 2000-2004 ic#code, http://www.icsharpcode.net/" +BrandingText "© 2000-2005 ic#code, http://www.icsharpcode.net/" SetCompressor lzma CRCCheck on @@ -61,11 +61,11 @@ ShowUnInstDetails show ; .NET Framework check ; http://msdn.microsoft.com/netframework/default.aspx?pull=/library/en-us/dnnetdep/html/redistdeploy1_1.asp -; Section "Detecting that the .NET Framework 1.1 is installed" +; Section "Detecting that the .NET Framework 2.0 Beta 2 is installed" Function .onInit - ReadRegDWORD $R0 HKLM "SOFTWARE\Microsoft\NET Framework Setup\NDP\v1.1.4322" Install + ReadRegDWORD $R0 HKLM "SOFTWARE\Microsoft\NET Framework Setup\NDP\v2.0.50215" Install StrCmp $R0 "" 0 CheckPreviousVersion - MessageBox MB_OK "Microsoft .NET Framework 1.1 was not found on this system.$\r$\n$\r$\nUnable to continue this installation." + MessageBox MB_OK "Microsoft .NET Framework 2.0 Beta 2 was not found on this system.$\r$\n$\r$\nUnable to continue this installation." Abort CheckPreviousVersion: @@ -85,21 +85,28 @@ Function .onInit FunctionEnd Section "MainSection" SEC01 - SetOutPath "$INSTDIR" SetOverwrite ifnewer - ; Those files are included with the installer - File /r ..\AddIns - File /r ..\bin - File /r ..\data - File /r ..\doc + ; any file that would go in the root + SetOutPath "$INSTDIR" + + + SetOutPath "$INSTDIR\AddIns" + File /r ..\AddIns\*.* + + SetOutPath "$INSTDIR\bin" + File /r ..\bin\*.* + + SetOutPath "$INSTDIR\data" + File /r ..\data\*.* + + SetOutPath "$INSTDIR\doc" + File /r ..\doc\*.* CreateDirectory "$SMPROGRAMS\SharpDevelop" CreateShortCut "$SMPROGRAMS\SharpDevelop\SharpDevelop.lnk" "$INSTDIR\bin\SharpDevelop.exe" CreateShortCut "$DESKTOP\SharpDevelop.lnk" "$INSTDIR\bin\SharpDevelop.exe" - CreateShortCut "$SMPROGRAMS\SharpDevelop\SharpDevelop Help.lnk" "$INSTDIR\doc\help\sharpdevelop.chm" - ; Add default file associations ; CreateFileAssociation extension extType extDef exeCmd defIcon ${CreateFileAssociation} ".cmbx" "SD.cmbxfile" "#Develop Combine" "$INSTDIR\bin\SharpDevelop.exe" "$INSTDIR\data\resources\filetypes\cmbx.ico" @@ -122,23 +129,22 @@ Section -Post WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}" WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}" - ; ExecShell "" "$INSTDIR\bin\tools\GacUtil2 /i ..\nunit.core.dll" "" SW_SHOWMINIMIZED - ; ExecShell "" "$INSTDIR\bin\tools\GacUtil2 /i ..\nunit.framework.dll" "" SW_SHOWMINIMIZED - ; now finally call our post install tasks - ExecWait '"$SYSDIR\cscript.exe" "$INSTDIR\bin\setup\PostInstallTasks.vbs"' + SetOutPath "$INSTDIR\bin\setup" + ; return code goes to $0 -> don't fail setup when there are Help2 problems + ExecWait '"$INSTDIR\bin\setup\PostInstallTasks.bat"' $0 SectionEnd Section Uninstall Delete "$DESKTOP\SharpDevelop.lnk" Delete "$SMPROGRAMS\SharpDevelop\*.*" - ; ExecShell "" "$INSTDIR\bin\tools\GacUtil2 /u ..\nunit.core.dll" "" SW_SHOWMINIMIZED - ; ExecShell "" "$INSTDIR\bin\tools\GacUtil2 /u ..\nunit.framework.dll" "" SW_SHOWMINIMIZED - ; first, remove all dependencies from the GAC etc - ExecWait '"$SYSDIR\cscript.exe" "$INSTDIR\bin\setup\PreUninstallTasks.vbs"' - + SetOutPath "$INSTDIR\bin\setup" + ExecWait '"$INSTDIR\bin\setup\PreUninstallTasks.bat"' $0 + ; set OutPath to somewhere else because the current working directory cannot be deleted! + SetOutPath "$DESKTOP" + RMDir "$SMPROGRAMS\SharpDevelop" RMDir /r "$INSTDIR" diff --git a/setup/readme.txt b/setup/readme.txt index b7a066eeb2..3f0719d036 100644 --- a/setup/readme.txt +++ b/setup/readme.txt @@ -2,11 +2,19 @@ The setup program is maintained by Christoph Wille, christophw@alphasierrapapa.c Information -Setup uses NSIS 2.0 Release - http://nsis.sourceforge.net +Setup uses NSIS 2.06 Release - http://nsis.sourceforge.net CHANGELOG +4/13/2005: +* Fixed installation in path with spaces. + +4/12/2005: + +* SetOutputPath +* Exclusion of directories + 10/07/2004: * Batch files replaced with WSH scripts diff --git a/src/Main/Base/Project/Src/Project/Solution/Solution.cs b/src/Main/Base/Project/Src/Project/Solution/Solution.cs index a9b23e71a7..5373aef560 100644 --- a/src/Main/Base/Project/Src/Project/Solution/Solution.cs +++ b/src/Main/Base/Project/Src/Project/Solution/Solution.cs @@ -354,6 +354,17 @@ namespace ICSharpCode.SharpDevelop.Project static Regex projectLinePattern = new Regex("Project\\(\"(?.*)\"\\)\\s+=\\s+\"(?.*)\",\\s*\"(?<Location>.*)\",\\s*\"(?<Guid>.*)\"", RegexOptions.Compiled); static Regex globalSectionPattern = new Regex("\\s*GlobalSection\\((?<Name>.*)\\)\\s*=\\s*(?<Type>.*)", RegexOptions.Compiled); + static string GetFirstNonCommentLine(TextReader sr) + { + string line = ""; + while ((line = sr.ReadLine()) != null) { + line = line.Trim(); + if (line.Length > 0 && line[0] != '#') + return line; + } + return ""; + } + /// <summary> /// Reads the specified solution file. The project-location-guid information is written into the conversion class. /// </summary> @@ -362,7 +373,7 @@ namespace ICSharpCode.SharpDevelop.Project { string solutionDirectory = Path.GetDirectoryName(solutionFileName); using (StreamReader sr = File.OpenText(solutionFileName)) { - string line = sr.ReadLine(); + string line = GetFirstNonCommentLine(sr); Match match = versionPattern.Match(line); if (!match.Success) { return null; @@ -391,7 +402,7 @@ namespace ICSharpCode.SharpDevelop.Project bool needsConversion = false; using (StreamReader sr = File.OpenText(fileName)) { - string line = sr.ReadLine(); + string line = GetFirstNonCommentLine(sr); Match match = versionPattern.Match(line); if (!match.Success) { MessageService.ShowError(fileName + " is not a valid solution file.");