@@ -110,6 +110,15 @@ function install()
110110 end
111111 end
112112
113+ % Execute pre-install hooks
114+ logger .info(' \n Executing pre-install hooks...' );
115+ hook_success = mhkit .hooks.execute(' pre_install' , spec , logger );
116+ if ~hook_success
117+ logger .error(' Pre-install hooks failed' );
118+ return ;
119+ end
120+ logger .info(' ✓ Pre-install hooks completed' );
121+
113122 % Check if `mhkit` is in `conda list`
114123 has_correct_mhkit_python = false ;
115124 conda_packages = mhkit .conda.list(conda_env_name );
@@ -124,7 +133,10 @@ function install()
124133 if ~has_correct_mhkit_python
125134 % Step 4: Install MHKiT-Python
126135 logger .info(' \n Installing MHKiT-Python v%s ...' , spec .mhkit_python.version);
127- command = spec .mhkit_python.install;
136+
137+ % Get platform-specific install command
138+ platform = mhkit .sys.get_platform();
139+ command = spec .mhkit_python.install.(platform );
128140 command = replace(command , ' <mhkit_python_version>' , spec .mhkit_python.version);
129141 mhkit .sys(sprintf(" conda run -n %s %s" , conda_env_name , command ));
130142
@@ -146,6 +158,15 @@ function install()
146158 logger .info(' ✓ MHKiT-Python v%s ready' , spec .mhkit_python.version);
147159 end
148160
161+ % Execute post-install hooks
162+ logger .info(' \n Executing post-install hooks...' );
163+ hook_success = mhkit .hooks.execute(' post_install' , spec , logger );
164+ if ~hook_success
165+ logger .error(' Post-install hooks failed' );
166+ return ;
167+ end
168+ logger .info(' ✓ Post-install hooks completed' );
169+
149170 logger .info(' Testing functionality...' );
150171 command = spec .mhkit_python.verify_operation.command;
151172 command = sprintf(" conda run -n %s %s" , conda_env_name , command );
@@ -180,6 +201,16 @@ function install()
180201
181202 % Configure MATLAB integration
182203 logger .info(' \n Configuring MATLAB integration...' );
204+
205+ % Execute environment setup hooks
206+ logger .info(' Executing environment setup hooks...' );
207+ hook_success = mhkit .hooks.execute(' environment_setup' , spec , logger );
208+ if ~hook_success
209+ logger .warning(' Environment setup hooks failed, continuing with Python integration' );
210+ else
211+ logger .info(' ✓ Environment setup hooks completed' );
212+ end
213+
183214 initialize_python_integration(conda_env_name , logger );
184215
185216 % Final verification
0 commit comments