@@ -554,8 +554,10 @@ SectionGroup /e "$(INST_SEC_CLIENT)" SECGCLIENT
554
554
StrCpy $0 $INSTDIR
555
555
Call RemoveVirtualStore
556
556
557
- IfFileExists $GTA_DIR \gta_sa.exe +1 0
558
- IfFileExists $GTA_DIR \gta-sa.exe 0 PathBad
557
+ Push $GTA_DIR
558
+ Call IsGtaDirectory
559
+ Pop $0
560
+ ${If} $0 == " gta"
559
561
# Fix permissions for GTA install directory
560
562
FastPerms::FullAccessPlox " $GTA_DIR"
561
563
@@ -564,10 +566,16 @@ SectionGroup /e "$(INST_SEC_CLIENT)" SECGCLIENT
564
566
!insertmacro UAC_AsUser_Call Function RemoveVirtualStore ${UAC_SYNCREGISTERS}
565
567
StrCpy $0 $GTA_DIR
566
568
Call RemoveVirtualStore
567
- PathBad:
569
+ ${EndIf}
568
570
${EndIf}
569
571
# ############################################################
570
-
572
+
573
+ # Handle "Grand Theft Auto San Andreas.exe" being present instead of gta_sa.exe
574
+ IfFileExists " $GTA_DIR\gta_sa.exe" noCopyReq
575
+ IfFileExists " $GTA_DIR\Grand Theft Auto San Andreas.exe" 0 noCopyReq
576
+ CopyFiles " $GTA_DIR\Grand Theft Auto San Andreas.exe" " $GTA_DIR\gta_sa.exe"
577
+ noCopyReq:
578
+
571
579
# ############################################################
572
580
# Patch our San Andreas .exe if it is required
573
581
nsArray::SetList array " gta_sa.exe" " gta-sa.exe" " testapp.exe" /end
@@ -577,7 +585,7 @@ SectionGroup /e "$(INST_SEC_CLIENT)" SECGCLIENT
577
585
StrCmp " $0" " 0" TryNextExe
578
586
!insertmacro GetMD5 $GTA_DIR \$1 $ExeMD5
579
587
DetailPrint " $1 successfully detected ($ExeMD5)"
580
- ${LogText} " GetMD5 $GTA_DIR\gta_sa.exe $ExeMD5"
588
+ ${LogText} " GetMD5 $GTA_DIR\$1 $ExeMD5"
581
589
${Switch} $ExeMD5
582
590
${Case} " bf25c28e9f6c13bd2d9e28f151899373" # US 2.00
583
591
${Case} " 7fd5f9436bd66af716ac584ff32eb483" # US 1.01
@@ -1863,7 +1871,8 @@ Function IsGtaDirectory
1863
1871
; gta_sa.exe or gta-sa.exe should exist
1864
1872
IfFileExists " $0\gta_sa.exe" cont1
1865
1873
IfFileExists " $0\gta-sa.exe" cont1
1866
- StrCpy $1 " "
1874
+ IfFileExists " $0\Grand Theft Auto San Andreas.exe" cont1
1875
+ StrCpy $1 " "
1867
1876
cont1:
1868
1877
1869
1878
; data subdirectory should exist
0 commit comments