ya2 · news · projects · code · about

1abaea4ee2d2ca294feedd3a11a546566f215937
[panda3d-appimage.git] / README
1 NOTE ==========================================================================
2
3 This works on Linux only.
4
5 INSTALLATION ==================================================================
6
7 pip install panda3d-appimage
8
9 USAGE =========================================================================
10
11 In your setup.py file, add the following:
12
13 from direct.dist.commands import bdist_apps
14 from p3d_appimage import AppImageBuilder
15
16 class BDistAppsCmd(bdist_apps):
17 def run(self):
18 bdist_apps.run(self)
19 AppImageBuilder(self).build()
20
21 setup(
22 ...
23 cmdclass={"bdist_apps": BDistAppsCmd},
24 ... )
25
26 EXAMPLE =======================================================================
27
28 Let's build an AppImage for the Panda3D's Asteroids example.
29
30 Modify the file setup.py
31 (https://github.com/panda3d/panda3d/blob/master/samples/asteroids/setup.py)
32 adding these lines:
33
34 from direct.dist.commands import bdist_apps
35 from p3d_appimage import AppImageBuilder
36
37 class BDistAppsCmd(bdist_apps):
38 def run(self):
39 bdist_apps.run(self)
40 AppImageBuilder(self).build()
41
42 setup(
43 ...
44 cmdclass={"bdist_apps": BDistAppsCmd},
45 ... )
46
47 Then, launch the standard Panda3D build command:
48
49 python setup.py bdist_apps
50
51 At the end of the process, you will get the builds created by Panda3D and your
52 AppImage in the dist/ folder. Do ./Asteroids-x86_64.AppImage to launch your
53 AppImage.
54
55 UPDATING APPIMAGES ============================================================
56
57 The builder can also update your AppImage. If you specify a zsync_path when you
58 invoke the AppImageBuilder's method build(), then you can Invoke the AppImage's
59 method update() in your application and this will update your AppImage.