Changeset 95 for trunk


Ignore:
Timestamp:
May 19, 2024, 6:15:22 PM (7 months ago)
Author:
chronos
Message:
  • Fixed: Hide main menu with Qt5 widgetset.
  • Fixed: Pack audio files and detect alternative Unix location.
Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Engine.pas

    r93 r95  
    250250    function TextOutWordWrap(Canvas: TCanvas; X, Y: Integer; Text: string; Width: Integer): Integer;
    251251    function GetMenuWidth: Integer;
     252    function GetAudioDir: string;
    252253  public
    253254    ThreadErrorMessage: string;
     
    16411642end;
    16421643
     1644function TEngine.GetAudioDir: string;
     1645{$IFDEF UNIX}
     1646const
     1647  UnixDataDir = '/usr/share/Tunneler';
     1648  UnixAudioDir = UnixDataDir + '/Audio';
     1649{$ENDIF}
     1650begin
     1651  Result := GetCurrentDir + DirectorySeparator + 'Audio';
     1652  {$IFDEF UNIX}
     1653  if not DirectoryExists(Result) and DirectoryExists(UnixAudioDir) then begin
     1654    Result := UnixAudioDir;
     1655    Exit;
     1656  end;
     1657  {$ENDIF}
     1658end;
     1659
    16431660function TEngine.Scale(Value: Integer): Integer;
    16441661begin
     
    21202137  //DefaultAudioSystem := TAudioSystemMPlayer.Create(nil);
    21212138  AudioShot := TSound.Create(nil);
    2122   AudioShot.FileName := GetCurrentDir + '/Audio/GE_KF7_Soviet.wav';
     2139  AudioShot.FileName := GetAudioDir + DirectorySeparator + 'GE_KF7_Soviet.wav';
    21232140  AudioExplode := TSound.Create(nil);
    2124   AudioExplode.FileName := GetCurrentDir + '/Audio/bomb.wav';
     2141  AudioExplode.FileName := GetAudioDir + DirectorySeparator + 'bomb.wav';
    21252142  InitPlayerPool;
    21262143  DigMasks := TObjectList<TMatrixByte>.Create;
  • trunk/Forms/FormMain.pas

    r87 r95  
    145145procedure TFormMain.UpdateInterface;
    146146begin
    147   if FullScreenEnabled then Menu := nil
    148     else Menu := MainMenu1;
     147  MenuItem1.Visible := not FullScreenEnabled;
     148  MenuItem4.Visible := not FullScreenEnabled;
     149  MenuItem7.Visible := not FullScreenEnabled;
    149150  {$IFDEF DEBUG}
    150151  StatusBar1.Visible := not FullScreenEnabled;
  • trunk/Install/deb/debian/rules

    r63 r95  
    2323        install -D -m 755 Languages/*.pot $(ROOT)/usr/share/Tunneler/Languages
    2424        install -D -m 755 Languages/*.po $(ROOT)/usr/share/Tunneler/Languages
    25        
     25        install -d -m 755 $(ROOT)/usr/share/Tunneler/Audio
     26        install -D -m 755 Audio/*.wav $(ROOT)/usr/share/Tunneler/Audio
     27
    2628%:
    2729        dh $@
  • trunk/Install/flatpak

    • Property svn:ignore set to
      build
      export
      tunneler.tar.gz
      Tunneler.flatpak
      .flatpak-builder
  • trunk/Install/rpm/tunneler.spec

    r91 r95  
    3636install -D -m 755 Languages/*.pot $RPM_BUILD_ROOT/usr/share/Tunneler/Languages
    3737install -D -m 755 Languages/*.po $RPM_BUILD_ROOT/usr/share/Tunneler/Languages
     38install -d -m 755 $RPM_BUILD_ROOT/usr/share/Tunneler/Audio
     39install -D -m 755 Languages/*.wav $RPM_BUILD_ROOT/usr/share/Tunneler/Audio
    3840
    3941%clean
  • trunk/Install/snap/snapcraft.yaml

    r89 r95  
    1717    source: .
    1818    source-type: local
    19     build-packages: 
     19    build-packages:
    2020    - fpc
    2121    - lazarus
     
    3434      install -D -m 755 Languages/*.pot $SNAPCRAFT_PART_INSTALL/usr/share/Tunneler/Languages
    3535      install -D -m 755 Languages/*.po $SNAPCRAFT_PART_INSTALL/usr/share/Tunneler/Languages
     36      install -d -m 755 $SNAPCRAFT_PART_INSTALL/usr/share/Tunneler/Audio
     37      install -D -m 755 Audio/*.wav $SNAPCRAFT_PART_INSTALL/usr/share/Tunneler/Audio
    3638    stage:
    3739    - usr
Note: See TracChangeset for help on using the changeset viewer.