Changeset 184
- Timestamp:
- Jan 14, 2025, 11:19:27 AM (9 days ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Core.lfm
r181 r184 545 545 end 546 546 object Translator: TTranslator 547 POFilesFolder = 'Languages '547 POFilesFolder = 'Languages;Packages/Common/Languages' 548 548 OnTranslate = TranslatorTranslate 549 549 Left = 108 -
trunk/Core.pas
r181 r184 38 38 procedure TargetMessageExecute(Text: string); 39 39 public 40 DataDir: string; 40 BaseDir: string; 41 ExamplesDir: string; 41 42 Project: TProject; 42 43 Targets: TTargets; … … 65 66 Core: TCore; 66 67 68 const 69 ExamplesDirName = 'Examples'; 70 LanguagesDirName = 'Languages'; 71 67 72 68 73 implementation … … 94 99 {$IFDEF UNIX} 95 100 const 96 LinuxDataDir = '/usr/share/LazFuck'; 97 LinuxLanguagesDir = LinuxDataDir + '/Languages'; 101 LinuxDataDir = '../share/LazFuck'; 102 var 103 NewDir: string; 98 104 {$ENDIF} 99 105 begin 100 DataDir := ''; 106 BaseDir := ExcludeTrailingPathDelimiter(ExtractFilePath(ParamStr(0))); 107 Translator.POFilesFolder := BaseDir + DirectorySeparator + LanguagesDirName; 108 ExamplesDir := BaseDir + DirectorySeparator + ExamplesDirName; 109 101 110 {$IFDEF UNIX} 102 // If installed in Linux system then use installation shared game directory for data files103 if DirectoryExists(LinuxDataDir) then104 DataDir := LinuxDataDir105 else DataDir := GetCurrentDir;106 111 // If installed in Linux system then use installation directory for po files 107 if not DirectoryExists(Translator.POFilesFolder) and DirectoryExists(LinuxLanguagesDir) then 108 Translator.POFilesFolder := LinuxLanguagesDir; 112 NewDir := ExpandFileName(BaseDir + DirectorySeparator + LinuxDataDir + 113 DirectorySeparator + LanguagesDirName); 114 if not DirectoryExists(Translator.POFilesFolder) and DirectoryExists(NewDir) then 115 Translator.POFilesFolder := NewDir; 116 117 // If installed in Linux system then use installation directory for po files 118 NewDir := ExpandFileName(BaseDir + DirectorySeparator + LinuxDataDir + 119 DirectorySeparator + ExamplesDirName); 120 if not DirectoryExists(ExamplesDir) and DirectoryExists(NewDir) then 121 ExamplesDir := NewDir; 109 122 {$ENDIF} 110 123 -
trunk/Forms/FormMain.pas
r175 r184 206 206 SFileNotFound = 'File %s not found.'; 207 207 208 const209 ExamplesDir = 'Examples';210 211 208 { TFormMain } 212 209 … … 217 214 try 218 215 if Core.Core.LastOpenedList.Items.Count = 0 then 219 Core.Core.LastOpenedList.Items.Add(Co mbinePaths(Core.Core.DataDir,ExamplesDir +220 DirectorySeparator + 'Sierpinski.b'));216 Core.Core.LastOpenedList.Items.Add(Core.Core.ExamplesDir + 217 DirectorySeparator + 'Sierpinski.b'); 221 218 222 219 if Core.Core.OpenProjectOnStart and (Core.Core.LastOpenedList.Items.Count > 0) and … … 751 748 AProjectClose.Execute; 752 749 if Core.Core.Project.Openned then Exit; 753 Core.Core.Project.FileName := CombinePaths(Core.Core.DataDir, ExamplesDir + DirectorySeparator + SNewProject + '.b'); 750 Core.Core.Project.FileName := SNewProject + '.b'; 751 Core.Core.Project.Openned := True; 754 752 FormSourceCode.SynEditSource.Clear; 755 Core.Core.Project.Openned := True;756 753 Core.Core.CurrentTarget.Compiled := False; 757 754 UpdateInterface; -
trunk/Install/flatpak/net.zdechov.app.LazFuck.yml
r183 r184 27 27 - type: svn 28 28 url: https://svn.zdechov.net/LazFuck/trunk 29 revision: r18 329 revision: r184 30 30 buildsystem: simple 31 31 build-commands: … … 35 35 - install -Dm755 LazFuck -t $FLATPAK_DEST/bin 36 36 - install -Dm644 Install/deb/LazFuck.desktop -t $FLATPAK_DEST/share/applications 37 - install -Dm644 Images/256x256/LazFuck.png $FLATPAK_DEST/share/icons/hicolor/256x256/apps37 - install -Dm644 Images/256x256/LazFuck.png -t $FLATPAK_DEST/share/icons/hicolor/256x256/apps 38 38 - install -Dm644 Languages/*.po -t $FLATPAK_DEST/share/LazFuck/Languages 39 39 - install -Dm644 Packages/Common/Languages/*.po -t $FLATPAK_DEST/share/LazFuck/Languages
Note:
See TracChangeset
for help on using the changeset viewer.