-
Notifications
You must be signed in to change notification settings - Fork 4
/
generate.sh
executable file
·16 lines (16 loc) · 1.29 KB
/
generate.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash
git submodule init
git submodule update
mkdir -p ./lib/generated
cp ./mpris-spec/spec/org.mpris.MediaPlayer2*.xml ./lib/generated
sed -i "s|/Media_Player|/org/mpris/MediaPlayer2|g" ./lib/generated/org.mpris.MediaPlayer2.xml
sed -i "s|/Player_Interface|/org/mpris/MediaPlayer2|g" ./lib/generated/org.mpris.MediaPlayer2.Player.xml
sed -i "s|/Playlists_Interface|/org/mpris/MediaPlayer2|g" ./lib/generated/org.mpris.MediaPlayer2.Playlists.xml
sed -i "s|/Track_List_Interface|/org/mpris/MediaPlayer2|g" ./lib/generated/org.mpris.MediaPlayer2.TrackList.xml
dart pub get
dart pub upgrade
dart run dbus:dart_dbus generate-remote-object --class-name=MediaPlayer2 ./lib/generated/org.mpris.MediaPlayer2.xml -o ./lib/generated/mediaplayer2.dart
dart run dbus:dart_dbus generate-remote-object --class-name=MediaPlayer2Player ./lib/generated/org.mpris.MediaPlayer2.Player.xml -o ./lib/generated/mediaplayer2_player.dart
dart run dbus:dart_dbus generate-remote-object --class-name=MediaPlayer2Playlists ./lib/generated/org.mpris.MediaPlayer2.Playlists.xml -o ./lib/generated/mediaplayer2_playlists.dart
dart run dbus:dart_dbus generate-remote-object --class-name=MediaPlayer2TrackList ./lib/generated/org.mpris.MediaPlayer2.TrackList.xml -o ./lib/generated/mediaplayer2_track_list.dart
dart format --fix ./lib/generated