-
Notifications
You must be signed in to change notification settings - Fork 13
/
com.microchip.mplabx.yaml
133 lines (133 loc) · 5.43 KB
/
com.microchip.mplabx.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# TODO: add compilers support patches @ https://www.microchip.com/en-us/development-tools-tools-and-software/mplab-xc-compilers
# TODO: evaluate if 32bit libs are still required
# TODO: maybe switch to sdk as runtime if some dev tools are required, e.g. gdb
# TODO: maybe add sdcc
app-id: com.microchip.mplabx
runtime: org.freedesktop.Platform
runtime-version: '21.08'
sdk: org.freedesktop.Sdk
sdk-extensions:
- org.freedesktop.Sdk.Compat.i386
- org.freedesktop.Sdk.Extension.openjdk8
- org.freedesktop.Sdk.Extension.toolchain-i386
add-extensions:
# disabled as the i386 libs were copied as a workaround for flatpak not mounting extensions during apply_extra
# org.freedesktop.Platform.Compat.i386:
# directory: lib/i386-linux-gnu
# version: '21.08'
# org.freedesktop.Platform.Compat.i386.Debug:
# directory: lib/debug/lib/i386-linux-gnu
# version: '21.08'
# no-autodownload: true
com.microchip.mplabx.Compiler:
directory: compilers
subdirectories: true
no-autodownload: true
auto-delete: true
x-compat-i386-opts: &compat_i386_opts
prepend-pkg-config-path: /app/lib32/pkgconfig:/usr/lib/i386-linux-gnu/pkgconfig
ldflags: -L/app/lib32
prepend-path: /usr/lib/sdk/toolchain-i386/bin
env:
CC: i686-unknown-linux-gnu-gcc
CXX: i686-unknown-linux-gnu-g++
libdir: /app/lib32
command: mplab_ide
finish-args:
- --allow=multiarch
- --device=all
- --device=dri
- --env=JAVA_HOME=/app/jre
- --filesystem=home
- --persist=.cache/mplab_ide
- --persist=.java
- --persist=.mplab_ide
- --share=ipc
- --share=network
- --socket=x11
modules:
- name: openjdk
buildsystem: simple
build-commands:
- /usr/lib/sdk/openjdk8/install.sh
- name: mplabx
buildsystem: simple
build-commands:
- install -dm755 ${FLATPAK_DEST}/lib{,32,/i386-linux-gnu}
#- install -dm755 /app/lib/debug/lib/i386-linux-gnu
- install -dm755 ${FLATPAK_DEST}/compilers
- install -Dm644 ld.so.conf -t ${FLATPAK_DEST}/etc/
- install -Dm644 mplabx-install.sh -t ${FLATPAK_DEST}/bin/
- install -Dm755 apply_extra mplab_{ide,ipe} mplabx-environment.sh -t ${FLATPAK_DEST}/bin/
- install -Dm644 ${FLATPAK_ID}{,.mplab_ipe}.desktop -t ${FLATPAK_DEST}/share/applications/
- install -Dm644 ide_48.png ${FLATPAK_DEST}/share/icons/hicolor/48x48/apps/${FLATPAK_ID}.png
- install -Dm644 ide_256.png ${FLATPAK_DEST}/share/icons/hicolor/256x256/apps/${FLATPAK_ID}.png
- install -Dm644 ipe_48.png ${FLATPAK_DEST}/share/icons/hicolor/48x48/apps/${FLATPAK_ID}.mplab_ipe.png
# symlink executables
- |
for app in mbd.sh prjMakefilesGenerator.sh; do
ln -s /app/extra/mplabx/mplab_platform/bin/${app} ${FLATPAK_DEST}/bin/${app}
done
- install -dm755 ${FLATPAK_DEST}/docs
- install -Dm644 mplabx-override.conf ${FLATPAK_DEST}/docs/systemd_overrides/mplabx-override.conf
- ln -s ../extra/docs/udev_rules ${FLATPAK_DEST}/docs/udev_rules
# workaround for flatpak not being able to mount extensions during apply_extra
- cp -r /usr/lib/i386-linux-gnu/* ${FLATPAK_DEST}/lib/i386-linux-gnu/
sources:
- type: extra-data
filename: mplabx-installer.tar
url: https://ww1.microchip.com/downloads/en/DeviceDoc/MPLABX-v5.50(1)-linux-installer.tar
sha256: 85be41d8da0c388c1889520b8641abf816e23ac946003b0460aaa4efaa5ad1d9
size: 592752640
- type: file
path: apply_extra
- type: file
path: mplabx-environment.sh
- type: script
dest-filename: mplab_ide
commands:
- source /app/bin/mplabx-environment.sh
- exec /app/extra/mplabx/mplab_platform/bin/mplab_ide
- type: script
dest-filename: mplab_ipe
commands:
- source /app/bin/mplabx-environment.sh
- exec /app/extra/mplabx/mplab_platform/bin/mplab_ipe
- type: file
path: com.microchip.mplabx.desktop
- type: file
path: com.microchip.mplabx.mplab_ipe.desktop
- type: file
path: ld.so.conf
- type: file
path: mplabx-install.sh
- type: file
path: mplabx-override.conf
- type: file
path: icons/ide_256.png
- type: file
path: icons/ide_48.png
- type: file
path: icons/ipe_48.png
modules:
- ../shared-modules/fakeroot/fakeroot.json
- ../shared-modules/fakechroot/fakechroot.json
- ../shared-modules/fakeroot/lib32-fakeroot.json
- ../shared-modules/fakechroot/lib32-fakechroot.json
# TODO: fix compilation of openjfx8 from source
#- openjfx8/openjfx8.json
- name: openjfx8-bin
buildsystem: simple
build-commands:
- install -Dm755 jre/lib/amd64/* -t ${FLATPAK_DEST}/jre/jre/lib/amd64/
- install -Dm644 jre/lib/ext/jfxrt.jar -t ${FLATPAK_DEST}/jre/jre/lib/ext/
- install -Dm644 jre/lib/{javafx.properties,jfxswt.jar} -t ${FLATPAK_DEST}/jre/jre/lib/
- install -Dm644 lib/* -t ${FLATPAK_DEST}/jre/lib/
sources:
- type: archive
url: https://archive.archlinux.org/packages/j/java8-openjfx/java8-openjfx-8.u202-3-x86_64.pkg.tar.xz
sha256: 197de9331b65824ff8303e910446c20f307a0c705f762c2a2f30f943b46f4a18
strip-components: 4
# bintrock-unpacker is needed to be packaged by extensions, as the app is not available during
# apply_extra, include it here for unpacking without an extension installed
- bitrock-unpacker/bitrock-unpacker.yaml