Changeset 371
- Timestamp:
- Jan 2, 2025, 9:02:57 PM (2 days ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Core.pas
r370 r371 74 74 GameLoaded: Boolean; 75 75 FormNewTabIndex: Integer; 76 GameFilesDir: string;76 BaseDir: string; 77 77 procedure LoadRecentExecute(Sender: TObject); 78 78 procedure StartNewGame; … … 518 518 519 519 procedure TCore.DataModuleCreate(Sender: TObject); 520 {$IFDEF Linux}520 {$IFDEF UNIX} 521 521 const 522 LinuxGameFilesDir = '/usr/share/xtactics'; 523 LinuxLanguagesDir = LinuxGameFilesDir + '/Languages'; 522 LinuxBaseDir = '/usr/share/xtactics'; 523 LinuxLanguagesDir = LinuxBaseDir + '/Languages'; 524 LinuxBaseDir2 = '/app/share/xtactics'; 525 LinuxLanguagesDir2 = LinuxBaseDir2 + '/Languages'; 524 526 {$ENDIF} 525 527 begin 526 GameFilesDir := ExtractFilePath(ParamStr(0)); 527 {$IFDEF Linux} 528 BaseDir := ExtractFilePath(ParamStr(0)); 529 Translator1.POFilesFolder := BaseDir + DirectorySeparator + 'Languages'; 530 531 {$IFDEF UNIX} 528 532 // If installed in Linux system then use installation shared game directory for data files 529 if DirectoryExists(LinuxGameFilesDir) then 530 GameFilesDir := LinuxGameFilesDir; 533 if not DirectoryExists(BaseDir) and DirectoryExists(LinuxBaseDir) then 534 BaseDir := LinuxBaseDir; 535 536 if not DirectoryExists(BaseDir) and DirectoryExists(LinuxBaseDir2) then 537 BaseDir := LinuxBaseDir2; 538 531 539 // If installed in Linux system then use installation directory for po files 532 540 if not DirectoryExists(Translator1.POFilesFolder) and DirectoryExists(LinuxLanguagesDir) then 533 541 Translator1.POFilesFolder := LinuxLanguagesDir; 542 if not DirectoryExists(Translator1.POFilesFolder) and DirectoryExists(LinuxLanguagesDir2) then 543 Translator1.POFilesFolder := LinuxLanguagesDir2; 534 544 {$ENDIF} 535 545 … … 544 554 Game.OnNewTurn := GameNewTurnExecute; 545 555 Game.OnPlayerChange := DoPlayerChange; 546 Game.MapImageFileName := CombinePaths( GameFilesDir, 'Images' + DirectorySeparator + 'Maps' + DirectorySeparator + 'WorldMap.png');556 Game.MapImageFileName := CombinePaths(BaseDir, 'Images' + DirectorySeparator + 'Maps' + DirectorySeparator + 'WorldMap.png'); 547 557 Server.Game := Game; 548 558 LocalClients.Game := Game; … … 674 684 DefaultGameSystemName = 'Default'; 675 685 begin 676 if GameFilesDir <> '' then677 SystemsDir := GameFilesDir + DirectorySeparator + GameSystemsDirName686 if BaseDir <> '' then 687 SystemsDir := BaseDir + DirectorySeparator + GameSystemsDirName 678 688 else SystemsDir := ExpandFileName(GameSystemsDirName); 679 689 if DirectoryExists(SystemsDir) then begin -
trunk/Install/flatpak/net.zdechov.app.xTactics.yml
r370 r371 27 27 - type: svn 28 28 url: https://svn.zdechov.net/xtactics/trunk 29 revision: r37 029 revision: r371 30 30 buildsystem: simple 31 31 build-commands: … … 33 33 . /usr/lib/sdk/freepascal/enable.sh 34 34 lazbuild --build-mode=Release --ws=qt5 xtactics.lpi 35 - install -Dm755 xtactics -t $FLATPAK_DEST/share/xTactics 36 - install -d $FLATPAK_DEST/bin 37 - ln -s $FLATPAK_DEST/share/xTactics/xtactics $FLATPAK_DEST/bin/xtactics 35 - install -Dm755 xtactics -t $FLATPAK_DEST/bin 38 36 - install -Dm644 Install/deb/xtactics.desktop -t $FLATPAK_DEST/share/applications 39 37 - install -Dm644 Install/deb/xtactics.xml $FLATPAK_DEST/share/mime/packages/$FLAPTAK_ID.xml 40 - install -Dm644 Images/64x64/xtactics.png -t $FLATPAK_DEST/share/icons/hicolor/64x64/apps41 38 - install -Dm644 Languages/*.po -t $FLATPAK_DEST/share/xtactics/Languages 42 39 - install -Dm644 Packages/Common/Languages/*.po -t $FLATPAK_DEST/share/xtactics/Languages … … 45 42 - install -d -m 755 $FLATPAK_DEST/share/xtactics/Images 46 43 - cp -r Images/Maps $FLATPAK_DEST/share/xtactics/Images 44 - install -Dm644 Images/64x64/xtactics.png -t $FLATPAK_DEST/share/icons/hicolor/64x64/apps 47 45 - install -Dm644 Install/flatpak/${FLATPAK_ID}.metainfo.xml -t $FLATPAK_DEST/share/metainfo
Note:
See TracChangeset
for help on using the changeset viewer.