Changeset 4
- Timestamp:
- 02/20/06 21:36:17 (6 years ago)
- Files:
-
- trunk/Makefile (modified) (1 diff)
- trunk/System.Installer/Makefile (modified) (1 diff)
- trunk/System.Installer/System.Installer.cpp (modified) (1 diff)
- trunk/System.Installer/System.Installer.h (modified) (1 diff)
- trunk/wipt-get/Makefile (modified) (1 diff)
- trunk/wipt-get/src/Main.cs (modified) (13 diffs)
- trunk/WiptLib/Makefile (modified) (1 diff)
- trunk/WiptLib/src/Library.cs (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Makefile
r2 r4 17 17 candle /nologo wipt.wxs 18 18 light /nologo wipt.wixobj 19 !IF "$(FRAMEWORKVERSION)"=="v1.1.4322" 19 20 signcode -cn "Special Interest Group for Windows Development" wipt.msi 21 !ELSE 22 signtool sign /n "Special Interest Group for Windows Development" wipt.msi 23 !ENDIF 20 24 21 25 clean: trunk/System.Installer/Makefile
r2 r4 3 3 System.Installer.dll: System.Installer.obj AssemblyInfo.obj 4 4 link /OUT:System.Installer.dll /INCREMENTAL:NO /NOLOGO /DLL /FIXED:No nochkclr.obj mscoree.lib msi.lib kernel32.lib System.Installer.obj 5 !IF "$(FRAMEWORKVERSION)"=="v1.1.4322" 5 6 signcode -cn "Special Interest Group for Windows Development" System.Installer.dll 7 !ELSE 8 signtool sign /n "Special Interest Group for Windows Development" System.Installer.dll 9 !ENDIF 6 10 7 11 System.Installer.obj: StdAfx.pch System.Installer.cpp trunk/System.Installer/System.Installer.cpp
r2 r4 428 428 return ret; 429 429 } 430 431 Guid ApplicationDatabase::GetPackageUpgradeCode(String* path) 432 { 433 return Guid::Empty; 434 } 430 435 } 431 436 } trunk/System.Installer/System.Installer.h
r2 r4 68 68 static InstallState getProductState(Guid productCode); 69 69 static int ExecuteHandler(UINT iMessageType, LPCTSTR message); 70 static Guid GetPackageUpgradeCode(String* path); 70 71 private: 71 72 static ProgressHandler* handler; trunk/wipt-get/Makefile
r2 r4 3 3 wipt-get.exe: src\Main.cs src\AssemblyInfo.cs res\App.ico ..\System.Installer\System.Installer.dll ..\WiptLib\WiptLib.dll 4 4 csc /nologo $(DEBUG) /optimize /Win32Icon:res\App.ico /r:..\System.Installer\System.Installer.dll /r:..\WiptLib\WiptLib.dll /out:wipt-get.exe src\Main.cs src\AssemblyInfo.cs 5 !IF "$(FRAMEWORKVERSION)"=="v1.1.4322" 5 6 signcode -cn "Special Interest Group for Windows Development" wipt-get.exe 7 !ELSE 8 signtool sign /n "Special Interest Group for Windows Development" wipt-get.exe 9 !ENDIF 6 10 7 11 clean: trunk/wipt-get/src/Main.cs
r3 r4 51 51 bool devel = false; 52 52 bool ignoretransforms = false; 53 bool batch = false; 53 54 string command = ""; 54 55 string packages = ""; … … 58 59 switch(arg.ToLower()) 59 60 { 61 case "--batch": 62 batch = true; 63 break; 60 64 case "--devel": 61 65 devel = true; … … 75 79 if(command == "") 76 80 { 77 Console. WriteLine("Error: no command specified");81 Console.Error.WriteLine("Error: no command specified"); 78 82 Usage(); 79 83 return; … … 82 86 if((command == "install" || command == "remove") && packages == "") 83 87 { 84 Console. WriteLine("Error: no packages specified");88 Console.Error.WriteLine("Error: no packages specified"); 85 89 Usage(); 86 90 return; … … 90 94 { 91 95 case "install": 92 Install(packages.Split(','), devel, ignoretransforms );96 Install(packages.Split(','), devel, ignoretransforms, batch); 93 97 break; 94 98 case "remove": … … 112 116 113 117 private static void Install(string[] packages, bool devel, 114 bool ignoretransforms )118 bool ignoretransforms, bool batch) 115 119 { 116 120 foreach(string p in packages) … … 124 128 if(obj == null) 125 129 { 126 Console. WriteLine("No such product " + p);130 Console.Error.WriteLine("No such product " + p); 127 131 continue; 128 132 } 129 133 else if(obj is Suite) 130 134 { 131 InstallSuite((Suite)obj, devel, ignoretransforms );135 InstallSuite((Suite)obj, devel, ignoretransforms, batch); 132 136 continue; 133 137 } … … 144 148 if(instVersion == null) 145 149 { 146 Console. WriteLine("Specified version not listed for product "150 Console.Error.WriteLine("Specified version not listed for product " 147 151 + product.name); 148 152 continue; … … 167 171 if(URL == "") 168 172 { 169 Console. WriteLine("No package listed for specified version of "173 Console.Error.WriteLine("No package listed for specified version of " 170 174 + product.name + ". Contact the repository maintainer."); 171 175 continue; … … 176 180 && state != InstallState.Unknown) 177 181 { 178 Console. WriteLine(product.name + " is already the latest version");182 Console.Error.WriteLine(product.name + " is already the latest version"); 179 183 continue; 180 184 } … … 206 210 if(ret != 0) 207 211 { 208 Console. WriteLine(212 Console.Error.WriteLine( 209 213 "Error code {0} returned from installProduct for " 210 214 + product.name,ret); 211 Console. WriteLine(ApplicationDatabase.getErrorMessage(ret));215 Console.Error.WriteLine(ApplicationDatabase.getErrorMessage(ret)); 212 216 } 213 217 } … … 220 224 221 225 private static void InstallSuite(Suite suite, bool devel, 222 bool ignoretransforms) 223 { 224 Console.WriteLine(suite.name 225 + " is a suite consisting of the following products:"); 226 foreach(string s in suite.products) 227 { 228 Console.WriteLine(s); 229 } 230 Console.WriteLine("\r\nWould you like to install them?"); 231 Console.Write("(y or n): "); 232 string c = Console.ReadLine(); 233 while(c != "y" && c != "Y" && c != "n" && c != "N") 234 { 235 Console.Write("\r\nPlease type 'y' or 'n': "); 226 bool ignoretransforms, bool batch) 227 { 228 string c = ""; 229 if(!batch) 230 { 231 Console.WriteLine(suite.name 232 + " is a suite consisting of the following products:"); 233 foreach(string s in suite.products) 234 { 235 Console.WriteLine(s); 236 } 237 Console.WriteLine("\r\nWould you like to install them?"); 238 Console.Write("(y or n): "); 236 239 c = Console.ReadLine(); 237 } 238 if(c == "y" || c == "Y") 239 { 240 Install(suite.products, devel, ignoretransforms); 240 while(c != "y" && c != "Y" && c != "n" && c != "N") 241 { 242 Console.Write("\r\nPlease type 'y' or 'n': "); 243 c = Console.ReadLine(); 244 } 245 } 246 if(c == "y" || c == "Y" || batch) 247 { 248 Install(suite.products, devel, ignoretransforms, batch); 241 249 } 242 250 } … … 329 337 Usage: wipt-get [options] <command> <product>[ <product> <product> ...] 330 338 OPTIONS 339 --batch Don't ask any questions 331 340 --devel Install development version 332 341 --ignore-transforms Don't apply transforms listed in repository trunk/WiptLib/Makefile
r2 r4 3 3 WiptLib.dll: src\Library.cs src\AssemblyInfo.cs 4 4 csc /nologo $(DEBUG) /optimize /target:library /doc:WiptLib.xml /out:WiptLib.dll src\Library.cs src\AssemblyInfo.cs 5 !IF "$(FRAMEWORKVERSION)"=="v1.1.4322" 5 6 signcode -cn "Special Interest Group for Windows Development" WiptLib.dll 7 !ELSE 8 signtool sign /n "Special Interest Group for Windows Development" WiptLib.dll 9 !ENDIF 6 10 7 11 clean: trunk/WiptLib/src/Library.cs
r3 r4 110 110 || ((v1.major == v2.major) && (v1.minor == v2.minor) && (v1.build < v2.build)); 111 111 } 112 public static bool operator ==(Version v1, Version v2) 113 { 114 return (v1.major == v2.major) && (v1.minor == v2.minor) && (v1.build == v2.build); 112 public override bool Equals(object o) 113 { 114 if(!(o is Version)) 115 { 116 return false; 117 } 118 119 Version v = (Version)o; 120 return (major == v.major) && (minor == v.minor) && (build == v.build); 115 121 } 116 122 public static bool operator >(Version v1, Version v2) 117 123 { 118 124 return !((v1 < v2) || (v1 == v2)); 119 }120 public static bool operator !=(Version v1, Version v2)121 {122 return !(v1 == v2);123 125 } 124 126 }
