add vuejs as kiwix-desktop dependency
This commit is contained in:
parent
b68236526d
commit
3755b476bc
|
@ -5,6 +5,7 @@ from . import (
|
||||||
android_ndk,
|
android_ndk,
|
||||||
android_sdk,
|
android_sdk,
|
||||||
aria2,
|
aria2,
|
||||||
|
vuejs,
|
||||||
armhf,
|
armhf,
|
||||||
docoptcpp,
|
docoptcpp,
|
||||||
flatpak,
|
flatpak,
|
||||||
|
|
|
@ -12,7 +12,7 @@ class KiwixDesktop(Dependency):
|
||||||
git_dir = "kiwix-desktop"
|
git_dir = "kiwix-desktop"
|
||||||
|
|
||||||
class Builder(QMakeBuilder):
|
class Builder(QMakeBuilder):
|
||||||
dependencies = ["qt", "qtwebengine", "kiwix-lib", "aria2", "kiwix-tools"]
|
dependencies = ["qt", "qtwebengine", "kiwix-lib", "aria2", "kiwix-tools", "vuejs"]
|
||||||
make_install_target = 'install'
|
make_install_target = 'install'
|
||||||
configure_env = None
|
configure_env = None
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,37 @@
|
||||||
|
import os
|
||||||
|
from .base import (
|
||||||
|
Dependency,
|
||||||
|
Builder,
|
||||||
|
Source
|
||||||
|
)
|
||||||
|
from kiwixbuild.utils import Remotefile, run_command
|
||||||
|
from kiwixbuild._global import neutralEnv
|
||||||
|
|
||||||
|
pj = os.path.join
|
||||||
|
|
||||||
|
class VueJs(Dependency):
|
||||||
|
name = "vuejs"
|
||||||
|
|
||||||
|
class Source(Source):
|
||||||
|
archive = Remotefile('vue.js', '', 'https://vuejs.org/js/vue.js')
|
||||||
|
|
||||||
|
def _download(self, context):
|
||||||
|
context.try_skip(neutralEnv('archive_dir'), self.name)
|
||||||
|
neutralEnv('download')(self.archive)
|
||||||
|
|
||||||
|
def prepare(self):
|
||||||
|
self.command('download', self._download)
|
||||||
|
|
||||||
|
|
||||||
|
class Builder(Builder):
|
||||||
|
def build(self):
|
||||||
|
self.command('configure', self._configure)
|
||||||
|
|
||||||
|
def make_dist(self):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def _configure(self, context):
|
||||||
|
source_path = pj(neutralEnv('archive_dir'), 'vue.js')
|
||||||
|
dest_path = pj(neutralEnv('source_dir'), 'kiwix-desktop', 'resources', 'js', 'vue.js')
|
||||||
|
if os.path.exists(source_path) and os.path.exists(dest_path):
|
||||||
|
os.rename(source_path, dest_path)
|
Loading…
Reference in New Issue