Changeset 240
- Timestamp:
- May 18, 2020, 2:28:16 PM (4 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Install/win/Common.iss
r234 r240 73 73 Source: "{#MyAppSubDir}\Sounds\*.*"; DestDir: "{app}\Sounds"; Flags: ignoreversion; Components: main 74 74 Source: "{#MyAppSubDir}\Tribes\*.*"; DestDir: "{app}\Tribes"; Flags: ignoreversion; Components: main 75 Source: "{#MyAppSubDir}\Saved\*.*"; DestDir: "{app}\Saved"; Flags: ignoreversion; Components: main 76 Source: "{#MyAppSubDir}\Maps\*.*"; DestDir: "{app}\Maps"; Flags: ignoreversion; Components: maps 75 77 Source: "{#MyAppSubDir}\Localization\cs\*.*"; DestDir: "{app}\Localization\cs"; Flags: ignoreversion recursesubdirs; Components: lang\cs 76 78 Source: "{#MyAppSubDir}\Localization\de\*.*"; DestDir: "{app}\Localization\de"; Flags: ignoreversion recursesubdirs; Components: lang\de … … 86 88 Source: "{#MyAppSubDir}\AI\StdAI\StdAI.png"; DestDir: "{app}\AI\StdAI"; Flags: ignoreversion; Components: ai\stdai 87 89 Source: "{#MyAppSubDir}\AI\StdAI\StdAI.ai.txt"; DestDir: "{app}\AI\StdAI"; Flags: ignoreversion; Components: ai\stdai 88 Source: "{#MyAppSubDir}\Maps\*.*"; DestDir: "{localappdata}\c-evo\Maps"; Flags: ignoreversion; Components: maps89 Source: "{#MyAppSubDir}\Saved\*.*"; DestDir: "{localappdata}\c-evo\Saved"; Flags: ignoreversion; Components: main90 90 ; NOTE: Don't use "Flags: ignoreversion" on any shared system files 91 91 -
trunk/Packages/CevoComponents/Directories.pas
r199 r240 63 63 end; 64 64 65 procedure CopyDir(SourceDir, DestinationDir, Filter: string); 66 var 67 Src, Dst: TSearchRec; 68 begin 69 if not DirectoryExists(DestinationDir) then CreateDir(DestinationDir); 70 if FindFirst(SourceDir + DirectorySeparator + Filter, $21, Src) = 0 then 71 repeat 72 if (FindFirst(DestinationDir + DirectorySeparator + Src.Name, $21, Dst) <> 0) or 73 (Dst.Time < Src.Time) then 74 CopyFile(SourceDir + DirectorySeparator + Src.Name, 75 DestinationDir + DirectorySeparator + Src.Name, false); 76 FindClose(Dst); 77 until FindNext(Src) <> 0; 78 FindClose(Src); 79 end; 80 65 81 procedure UnitInit; 66 82 var 67 83 AppDataDir: string; 68 src, dst: TSearchRec;69 84 begin 70 85 LocaleCode := ''; … … 79 94 DataDir := AppDataDir; 80 95 end; 81 if not DirectoryExists(GetSavedDir) then CreateDir(GetSavedDir);82 if not DirectoryExists(GetMapsDir) then CreateDir(GetMapsDir);83 96 84 // Copy appdata if not done yet 85 if FindFirst(GetSavedDir(True) + DirectorySeparator + '*.cevo', $21, src) = 0 then 86 repeat 87 if (FindFirst(GetSavedDir(True) + DirectorySeparator + src.Name, $21, dst) <> 0) or 88 (dst.Time < src.Time) then 89 CopyFile(PChar(GetSavedDir(True) + DirectorySeparator + src.Name), 90 PChar(GetSavedDir(True) + DirectorySeparator + src.Name), false); 91 FindClose(dst); 92 until FindNext(src) <> 0; 93 FindClose(src); 94 95 // Copy appdata if not done yet 96 if FindFirst(GetMapsDir(True) + DirectorySeparator + '*.*', $21, src) = 0 then 97 repeat 98 if (FindFirst(GetMapsDir(True) + DirectorySeparator + src.Name, $21, dst) <> 0) or 99 (dst.Time < src.Time) then 100 CopyFile(PChar(GetMapsDir(True) + DirectorySeparator + src.Name), 101 PChar(GetMapsDir(True) + DirectorySeparator + src.Name), false); 102 FindClose(dst); 103 until FindNext(src) <> 0; 104 FindClose(src); 97 CopyDir(GetSavedDir(True), GetSavedDir(False), '*.*'); 98 CopyDir(GetMapsDir(True), GetMapsDir(False), '*.*'); 105 99 end; 106 100
Note:
See TracChangeset
for help on using the changeset viewer.