Changeset 178
- Timestamp:
- Mar 27, 2018, 11:07:44 AM (7 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 6 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/Install/deb/debian/rules
r156 r178 22 22 install -m 755 Languages/UJobProgressView.cs.po $(ROOT)/usr/share/AcronymDecoder/languages 23 23 install -d -m 755 $(ROOT)/usr/share/AcronymDecoder/Examples 24 install -m 755 "Example acronyms.adp" $(ROOT)/usr/share/AcronymDecoder/Examples24 @install -D -m 644 Examples/* $(ROOT)/usr/share/AcronymDecoder/Examples || true 25 25 install -d -m 755 $(ROOT)/usr/share/applications 26 26 install -m 755 Install/deb/AcronymDecoder.desktop $(ROOT)/usr/share/applications -
trunk/Install/win
-
Property svn:ignore
set to
*.exe
-
Property svn:ignore
set to
-
trunk/Install/win/AcronymDecoder.iss
r172 r178 74 74 Source: "{#MyAppSubDir}\libeay32.dll"; DestDir: "{app}"; Flags: ignoreversion 75 75 Source: "{#MyAppSubDir}\ssleay32.dll"; DestDir: "{app}"; Flags: ignoreversion 76 Source: "{#MyAppSubDir}\Example acronyms.adp"; DestDir: "{app}"; Flags: ignoreversion76 Source: "{#MyAppSubDir}\Examples"; DestDir: "{app}\Examples"; Flags: ignoreversion 77 77 Source: "{#MyAppSubDir}\Release notes.txt"; DestDir: "{app}"; Flags: ignoreversion 78 78 Source: "{#MyAppSubDir}\Languages\*.po"; DestDir: "{app}\Languages"; Flags: ignoreversion -
trunk/Languages/AcronymDecoder.cs.po
r176 r178 752 752 msgstr "Špatný formát souboru" 753 753 754 #: ucore.soptions 755 msgid "options" 756 msgstr "volby" 757 758 #: ucore.sprojectfile 759 msgid "project file" 760 msgstr "projektový soubor" 761 762 #: ucore.sshowthishelp 763 msgid "Show this help" 764 msgstr "Ukázat tuto nápovědu" 765 766 #: ucore.sstartminimizedintray 767 msgid "Start minimized in system tray" 768 msgstr "Startovat zmenšený do oznamovací oblasti" 769 754 770 #: uformabout.slicense 755 771 msgid "License" -
trunk/Languages/AcronymDecoder.po
r176 r178 742 742 msgstr "" 743 743 744 #: ucore.soptions 745 msgid "options" 746 msgstr "" 747 748 #: ucore.sprojectfile 749 msgid "project file" 750 msgstr "" 751 752 #: ucore.sshowthishelp 753 msgid "Show this help" 754 msgstr "" 755 756 #: ucore.sstartminimizedintray 757 msgid "Start minimized in system tray" 758 msgstr "" 759 744 760 #: uformabout.slicense 745 761 msgid "License" -
trunk/UCore.pas
r174 r178 40 40 procedure SetAlwaysOnTop(AValue: Boolean); 41 41 function FindFirstNonOption: string; 42 procedure WriteLnConsole(Text: string); 42 43 public 43 44 AcronymDb: TAcronymDb; … … 69 70 const 70 71 ExampleFile = 'Example acronyms.adp'; 72 DefaultOverrideFile = 'Default.txt'; 73 74 resourcestring 75 SStartMinimizedInTray = 'Start minimized in system tray'; 76 SShowThisHelp = 'Show this help'; 77 SOptions = 'options'; 78 SProjectFile = 'project file'; 71 79 72 80 … … 108 116 end; 109 117 118 procedure TCore.WriteLnConsole(Text: string); 119 begin 120 {$IFDEF WINDOWS} 121 if not IsConsole then begin 122 IsConsole := True; 123 SysInitStdIO; 124 end; 125 {$ENDIF} 126 WriteLn(Text); 127 end; 128 110 129 procedure TCore.Initialize; 111 130 var 112 131 FileNameOption: string; 113 132 ExampleFileName: string; 133 DefaultOverrideFileName: string; 134 ExamplesDir: string; 135 Lines: TStringList; 136 Output: string; 114 137 begin 115 138 if not InitializeStarted then begin … … 117 140 LoadConfig; 118 141 119 {$IFDEF 0}120 142 if Application.HasOption('h', 'help') then begin 121 WriteLn('AcronymDecoder <project file>'); 122 WriteLn(' -t --tray Start minimized in system tray'); 123 WriteLn(' -h --help Show this help'); 143 Output := 'AcronymDecoder [' + SOptions + '] <' + SProjectFile + '>' + LineEnding; 144 Output := Output + ' -t --tray ' + SStartMinimizedInTray + LineEnding; 145 Output := Output + ' -h --help ' + SShowThisHelp + LineEnding; 146 WriteLnConsole(Output); 124 147 Application.Terminate; 125 148 Exit; 126 149 end; 127 {$ENDIF}128 150 129 151 if Application.HasOption('t', 'tray') then begin … … 131 153 end; 132 154 133 ExampleFileName := ExtractFileDir(Application.ExeName) + DirectorySeparator + ExampleFile; 155 ExamplesDir := ExtractFileDir(Application.ExeName) + DirectorySeparator + 156 'Examples'; 157 {$IFDEF Linux} 158 // If installed in Linux system then use installation directory for po files 159 if Application.ExeName = '/usr/bin/' + ExtractFileNameOnly(Application.ExeName) then 160 ExamplesDir := '/usr/share/' + ExtractFileNameOnly(Application.ExeName) + 161 DirectorySeparator + 'Examples'; 162 {$ENDIF} 163 ExampleFileName := ExamplesDir + DirectorySeparator + ExampleFile; 164 165 // To override default project file put new project name to default file 166 DefaultOverrideFileName := ExamplesDir + DirectorySeparator + DefaultOverrideFile; 167 if FileExists(DefaultOverrideFileName) then begin 168 Lines := TStringList.Create; 169 Lines.LoadFromFile(DefaultOverrideFileName); 170 if Lines.Count > 0 then 171 ExampleFileName := ExamplesDir + DirectorySeparator + Lines[0]; 172 Lines.Free; 173 end; 174 134 175 FileNameOption := FindFirstNonOption; 135 176 if FileNameOption <> '' then begin … … 144 185 if FileExists(ExampleFileName) then begin 145 186 // Open default database with examples if no item is in recent openned history 146 FileNameOption := ExtractFileDir(Application.ExeName) + DirectorySeparator + ExampleFile; 147 {$IFDEF Linux} 148 // If installed in Linux system then use installation directory for po files 149 if Application.ExeName = '/usr/bin/' + ExtractFileNameOnly(Application.ExeName) then 150 FileNameOption := '/usr/share/' + ExtractFileNameOnly(Application.ExeName) + '/Examples/' + ExampleFile; 151 {$ENDIF} 152 FormMain.ProjectOpen(FileNameOption); 187 FormMain.ProjectOpen(ExampleFileName); 153 188 end else begin 154 189 // Create empty file
Note:
See TracChangeset
for help on using the changeset viewer.