Changeset 4556
- Timestamp:
- Jul 11, 2021, 12:54:20 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/src/netlabs/macros/main.e ¶
r4542 r4556 67 67 'InitConfig' 68 68 69 -- Check if myepm.ex and recompile.ex are linked from outside of NEPMD dirs 70 call CheckLinkedExFilesOutside() 71 69 72 PassedArgs = arg( 1) 70 73 ProcessLoaderStartArgs( PassedArgs) … … 335 338 'PostMe PostMe ProcessJustInstalled' 336 339 endif 340 341 ; --------------------------------------------------------------------------- 342 ; Checks if myepm.ex and recompile.ex are linked from outside of NEPMD dirs. 343 ; The link statement unfortunately prefers linking .ex files from current 344 ; dir, which is the work dir. 345 defproc CheckLinkedExFilesOutside 346 fEpmExOutside = 0 347 fRecompileExOutside = 0 348 EpmExDir = '' 349 RecompileExDir = '' 350 NepmdRootDir = Get_Env( 'NEPMD_ROOTDIR') 351 NepmdUserDir = Get_Env( 'NEPMD_USERDIR') 352 LastLinkNum = GetAVar( 'linknum.last') 353 if LastLinkNum = '' then 354 LastLinkNum = 0 355 endif 356 do LinkNum = 0 to LastLinkNum 357 ExFile = GetAVar( 'linkfilename.'LinkNum) 358 Name = lowcase( GetFileSpec( ExFile, 'N')) 359 if not wordpos( Name, 'epm.ex recompile.ex') then 360 iterate 361 endif 362 363 Dir = NepmdQueryFullName( ExFile'\..') 364 if EpmExDir = '' & Name = 'epm.ex' then 365 EpmExDir = Dir 366 elseif RecompileExDir = '' & Name = 'recompile.ex' then 367 RecompileExDir = Dir 368 endif 369 370 if not pos( ';'upcase( Dir)';', 371 ';'upcase( NepmdRootDir'\netlabs\ex;'NepmdUserDir'\ex;')) then 372 if Name = 'epm.ex' then 373 fEpmExOutside = 1 374 elseif Name = 'recompile.ex' then 375 fRecompileExOutside = 1 376 endif 377 endif 378 379 if EpmExDir <> '' & RecompileExDir <> '' then 380 leave 381 endif 382 enddo 383 if fEpmExOutside | fRecompileExOutside then 384 e = 0 385 Title = 'Wrong .ex files linked' 386 Text = '' 387 if fEpmExOutside then 388 Text = Text || 'epm.ex is linked from'\n\n 389 Text = Text || EpmExDir\n\n 390 e = e + 1 391 endif 392 if fRecompileExOutside then 393 Text = Text || 'recompile.ex is linked from'\n\n 394 Text = Text || RecompileExDir\n\n 395 e = e + 1 396 endif 397 if e = 1 then 398 Text = Text || 'This dir is outside of NEPMD.' 399 elseif e = 2 then 400 Text = Text || 'These dirs are outside of NEPMD.' 401 endif 402 rcx = WinMessageBox( Title, Text, 403 MB_ENTER + MB_WARNING + MB_DEFBUTTON1 + MB_MOVEABLE) 404 endif 405 406 return 337 407 338 408 ; ---------------------------------------------------------------------------
Note:
See TracChangeset
for help on using the changeset viewer.