Ignore:
Timestamp:
Jan 18, 2022, 10:26:04 PM (3 years ago)
Author:
chronos
Message:
  • Added: Support for gtk2 themes and locales in snap package.
  • Added: Register game file mime type .xtg in deb and snap packages.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Install/snap/snapcraft.yaml

    r310 r312  
    44summary: A turn-based strategy game inspired by Risk board game.
    55description: |
    6   Features:
     6  **Features:**
    77  * Zoom-able map.
    88  * Map can be generated in cyclic mode to simulate world without borders.
     
    4949      snapcraftctl build
    5050      lazbuild --build-mode=Release xtactics.lpi
    51       ROOT=/root/parts/xtactics/install
    52       install -d -m 755 $ROOT/usr/bin
    53       install -s -m 755 xtactics $ROOT/usr/bin/xtactics
    54       install -d -m 755 $ROOT/usr/share/xtactics/Languages
    55       install -m 755 Languages/xtactics.po $ROOT/usr/share/xtactics/Languages
    56       install -m 755 Languages/xtactics.cs.po $ROOT/usr/share/xtactics/Languages
    57       install -m 755 Languages/UFormAbout.po $ROOT/usr/share/xtactics/Languages
    58       install -m 755 Languages/UFormAbout.cs.po $ROOT/usr/share/xtactics/Languages
    59       install -d -m 755 $ROOT/usr/share/applications
    60       install -m 755 Install/snap/local/xtactics.desktop $ROOT/usr/share/applications
    61       install -d -m 755 $ROOT/usr/share/pixmaps
    62       install -m 755 Images/64x64/xtactics.png $ROOT/usr/share/pixmaps
    63       cp -r Systems $ROOT/usr/share/xtactics
    64       install -d -m 755 $ROOT/usr/share/xtactics/Images
    65       cp -r Images/Maps $ROOT/usr/share/xtactics/Images
     51      install -d -m 755 $SNAPCRAFT_PART_INSTALL/usr/bin
     52      install -s -m 755 xtactics $SNAPCRAFT_PART_INSTALL/usr/bin/xtactics
     53      install -d -m 755 $SNAPCRAFT_PART_INSTALL/usr/share/xtactics/Languages
     54      install -m 644 Languages/xtactics.po $SNAPCRAFT_PART_INSTALL/usr/share/xtactics/Languages
     55      install -m 644 Languages/xtactics.cs.po $SNAPCRAFT_PART_INSTALL/usr/share/xtactics/Languages
     56      install -m 644 Languages/lclstrconsts.pot $SNAPCRAFT_PART_INSTALL/usr/share/xtactics/Languages
     57      install -m 644 Languages/lclstrconsts.cs.po $SNAPCRAFT_PART_INSTALL/usr/share/xtactics/Languages
     58      install -m 644 Languages/UFormAbout.po $SNAPCRAFT_PART_INSTALL/usr/share/xtactics/Languages
     59      install -m 644 Languages/UFormAbout.cs.po $SNAPCRAFT_PART_INSTALL/usr/share/xtactics/Languages
     60      install -d -m 755 $SNAPCRAFT_PART_INSTALL/usr/share/applications
     61      install -m 755 Install/snap/local/xtactics.desktop $SNAPCRAFT_PART_INSTALL/usr/share/applications
     62      install -d -m 755 $SNAPCRAFT_PART_INSTALL/usr/share/mime/packages
     63      install -m 755 Install/deb/xtactics.xml $SNAPCRAFT_PART_INSTALL/usr/share/mime/packages
     64      install -d -m 755 $SNAPCRAFT_PART_INSTALL/usr/share/pixmaps
     65      install -m 755 Images/64x64/xtactics.png $SNAPCRAFT_PART_INSTALL/usr/share/pixmaps
     66      install -m 755 Images/64x64/xtactics.png $SNAPCRAFT_PART_INSTALL/usr/share/pixmaps/application-xtg.png
     67      cp -r Systems $SNAPCRAFT_PART_INSTALL/usr/share/xtactics
     68      install -d -m 755 $SNAPCRAFT_PART_INSTALL/usr/share/xtactics/Images
     69      cp -r Images/Maps $SNAPCRAFT_PART_INSTALL/usr/share/xtactics/Images
     70    after:
     71    - desktop-gtk2
    6672    stage:
    67       #- etc
    68       - usr
    69       - usr/bin
    70       - usr/share/xtactics
    71       - usr/share/applications/xtactics.desktop
    72       - usr/share/pixmaps
     73    - etc
     74    - usr
     75    - usr/bin
     76    - usr/share/xtactics
     77    - usr/share/applications/xtactics.desktop
     78    - usr/share/pixmaps
    7379    stage-packages:
    74       - libatk1.0-0
    75       - libcairo2
    76       - libdatrie1
    77       - libfontconfig1
    78       - libfreetype6
    79       - libfribidi0
    80       - libgdk-pixbuf2.0-0
    81       - libgraphite2-3
    82       - libgtk2.0-0
    83       - libharfbuzz0b
    84       - libpango-1.0-0
    85       - libpangocairo-1.0-0
    86       - libpangoft2-1.0-0
    87       - libpixman-1-0
    88       - libpng16-16
    89       - libthai0
    90       - libx11-6
    91       - libxau6
    92       - libxcb-render0
    93       - libxcb-shm0
    94       - libxcb1
    95       - libxcomposite1
    96       - libxcursor1
    97       - libxdamage1
    98       - libxdmcp6
    99       - libxext6
    100       - libxfixes3
    101       - libxi6
    102       - libxinerama1
    103       - libxrandr2
    104       - libxrender1
    105       - libglu1-mesa
     80    - libatk1.0-0
     81    - libcairo2
     82    - libdatrie1
     83    - libfontconfig1
     84    - libfreetype6
     85    - libfribidi0
     86    - libgdk-pixbuf2.0-0
     87    - libgraphite2-3
     88    - libgtk2.0-0
     89    - libharfbuzz0b
     90    - libpango-1.0-0
     91    - libpangocairo-1.0-0
     92    - libpangoft2-1.0-0
     93    - libpixman-1-0
     94    - libpng16-16
     95    - libthai0
     96    - libx11-6
     97    - libxau6
     98    - libxcb-render0
     99    - libxcb-shm0
     100    - libxcb1
     101    - libxcomposite1
     102    - libxcursor1
     103    - libxdamage1
     104    - libxdmcp6
     105    - libxext6
     106    - libxfixes3
     107    - libxi6
     108    - libxinerama1
     109    - libxrandr2
     110    - libxrender1
     111    - libglu1-mesa
     112  desktop-gtk2:
     113    source: https://github.com/ubuntu/snapcraft-desktop-helpers.git
     114    source-subdir: gtk
     115    plugin: make
     116    make-parameters: ["FLAVOR=gtk2"]
     117    build-packages:
     118    - build-essential
     119    - libgtk2.0-dev
     120    stage-packages:
     121    - libxkbcommon0  # XKB_CONFIG_ROOT
     122    - ttf-ubuntu-font-family
     123    - dmz-cursor-theme
     124    - light-themes
     125    - adwaita-icon-theme
     126    - gnome-themes-standard
     127    - shared-mime-info
     128    - libgtk2.0-0
     129    - libgdk-pixbuf2.0-0
     130    - libglib2.0-bin
     131    - libgtk2.0-bin
     132    - unity-gtk2-module
     133    - locales-all
     134    - libappindicator1
     135    - xdg-user-dirs
     136    - ibus-gtk
     137    - libibus-1.0-5
     138     
     139# Additional plugs to pick up the GTK theme and icons from the system
     140plugs:
     141  icon-themes:
     142    interface: content
     143    target: $SNAP/data-dir/icons
     144    default-provider: gtk-common-themes
     145  sound-themes:
     146    interface: content
     147    target: $SNAP/data-dir/sounds
     148    default-provider: gtk-common-themes
     149  gtk-2-engines:
     150    interface: content
     151    target: $SNAP/lib/gtk-2.0
     152    default-provider: gtk2-common-themes:gtk-2-engines
     153  gtk-2-themes:
     154    interface: content
     155    target: $SNAP/usr/share/themes
     156    default-provider: gtk2-common-themes:gtk-2-themes
     157
     158environment:
     159  XDG_DATA_DIRS: $SNAP/usr/share:$XDG_DATA_DIRS
     160  GTK_PATH: $SNAP/lib/gtk-2.0
    106161
    107162apps:
    108163  xtactics:
    109164    command: usr/bin/xtactics
     165    command-chain:
     166    - bin/desktop-launch
    110167    desktop: usr/share/applications/xtactics.desktop
    111168    plugs:
    112       - desktop
    113       - x11
     169    - desktop
     170    - x11
     171    - home
    114172
    115173layout:
Note: See TracChangeset for help on using the changeset viewer.