33using System . Linq ;
44using Microsoft . Deployment . WindowsInstaller ;
55using System . IO ;
6- using System . Xml ;
7- using System . Text . RegularExpressions ;
8- using System . Xml . Linq ;
9- using System . Diagnostics ;
10- using System . Windows . Forms ;
6+
117
128//Written by Madhukar Moogala ADN
139
@@ -28,15 +24,17 @@ public static class CustomActions
2824 [ CustomAction ]
2925 public static ActionResult PatchVSFiles ( Session session )
3026 {
31-
27+ #if DEBUG
28+ System . Diagnostics . Debugger . Launch ( ) ;
29+ #endif
3230 session . Log ( "Begin PatchVSFiles" ) ;
3331 string TARGETDIR = session [ "TARGETDIR" ] ;
3432 //This gives us the right folder where the wizard files are sitting.
3533 string vcFolder = session [ "D_VS2022VCFOLDER" ] ;
3634
3735 char [ ] delimiterChars = { ' ' , ',' , ';' , ':' , '\t ' } ;
3836
39- //ArxAppWiz;ArxAppWiz18_2 ;ArxAtlWizComWrapper;ArxAtlWizDynProp;ArxWizCustomObject;ArxWizJig;ArxWizMFCSupport;ArxWizNETWrapper;ArxWizReactors
37+ //ArxAppWiz;ArxAppWiz182 ;ArxAtlWizComWrapper;ArxAtlWizDynProp;ArxWizCustomObject;ArxWizJig;ArxWizMFCSupport;ArxWizNETWrapper;ArxWizReactors
4038 string pArxWizList = session [ "ArxWizList" ] ;
4139 session . Log ( " >> PatchVSFiles: ArxWizList = " + pArxWizList ) ;
4240
@@ -68,16 +66,18 @@ public static ActionResult PatchVSFiles(Session session)
6866 return ( ActionResult . Success ) ;
6967 }
7068
71-
69+
7270 [ CustomAction ]
7371 public static ActionResult PatchHTMLWizFiles ( Session session )
7472 {
75-
73+ #if DEBUG
74+ System . Diagnostics . Debugger . Launch ( ) ;
75+ #endif
7676 session . Log ( "Begin PatchHTMLWizFiles" ) ;
7777 string TARGETDIR = session [ "TARGETDIR" ] ;
7878 string RDS = String . IsNullOrEmpty ( session [ "RDS" ] ) ? "ADSK" : session [ "RDS" ] ;
7979 session . Log ( " >> PatchHTMLWizFiles: RDS = " + RDS + " / TARGETDIR = " + TARGETDIR ) ;
80- //C:\Program Files (x86)\Autodesk\ObjectARX 2025 Wizards\
80+ //C:\Program Files (x86)\Autodesk\ObjectARX 2026 Wizards\
8181
8282 DirectoryInfo di = new DirectoryInfo ( TARGETDIR ) ;
8383 FileInfo [ ] files = di . GetFiles ( "default.htm" , SearchOption . AllDirectories )
@@ -112,22 +112,20 @@ public static ActionResult PatchHTMLWizFiles(Session session)
112112 public static ActionResult PatchPropsWizFiles ( Session session )
113113 {
114114#if DEBUG
115- int processId = Process . GetCurrentProcess ( ) . Id ;
116- string message = string . Format ( "Please attach the debugger to process [{0}]." , processId ) ;
117- MessageBox . Show ( message , "Debug" ) ;
115+ System . Diagnostics . Debugger . Launch ( ) ;
118116#endif
119117 session . Log ( "Begin PatchPropsWizFiles" ) ;
120118 //Debugger.Break () ;
121119
122120 string TARGETDIR = session [ "TARGETDIR" ] ;
123121 string ARXPATH = session [ "ARXPATH" ] ;
124122 session . Log ( " >> PatchPropsWizFiles: ARXPATH = " + ARXPATH + " / TARGETDIR = " + TARGETDIR ) ;
125- //C:\Program Files (x86)\Autodesk\ObjectARX 2025 Wizards\
123+ //C:\Program Files (x86)\Autodesk\ObjectARX 2026 Wizards\
126124 string ACAD = session [ "ACAD" ] ;
127125 session . Log ( " >> PatchPropsWizFiles: ACAD = " + ACAD ) ;
128126
129127 DirectoryInfo di = new DirectoryInfo ( TARGETDIR ) ;
130- FileInfo [ ] files = di . GetFiles ( "*2025 .props" , SearchOption . AllDirectories ) . ToArray ( ) ;
128+ FileInfo [ ] files = di . GetFiles ( "*2026 .props" , SearchOption . AllDirectories ) . ToArray ( ) ;
131129 session . Log ( " >> PatchPropsWizFiles: DirectoryInfo = " + files . Length . ToString ( ) ) ;
132130 var _arxpath = ARXPATH ;
133131 var _acad = ACAD ;
@@ -138,12 +136,12 @@ public static ActionResult PatchPropsWizFiles(Session session)
138136 session . Log ( " >> PatchPropsWizFiles: =>> " + file . FullName ) ;
139137 string content = File . ReadAllText ( file . FullName ) ;
140138 content = content . Replace ( @"C:\ObjectARX\" , _arxpath ) ;
141- var from = @"C:\Program Files\Autodesk\AutoCAD 2025 \" ;
139+ var from = @"C:\Program Files\Autodesk\AutoCAD 2026 \" ;
142140 var to = _acad ;
143141 session . Log ( $ " >> PatchPropsWizFiles: =>> replacing { from } with { to } ") ;
144142 content = content . Replace ( from , to ) ;
145143 File . WriteAllText ( file . FullName , content ) ;
146- session . Log ( " >> PatchPropsWizFiles: =>> saving" ) ;
144+ session . Log ( " >> PatchPropsWizFiles: =>> saving" ) ;
147145
148146 }
149147 catch ( Exception ex )
0 commit comments