Skip to content

Commit

Permalink
add vuejs as kiwix-desktop dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
jetownfeve21 committed May 19, 2020
1 parent b682365 commit c44a2a4
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 2 deletions.
1 change: 1 addition & 0 deletions kiwixbuild/dependencies/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
android_ndk,
android_sdk,
aria2,
vuejs,
armhf,
docoptcpp,
flatpak,
Expand Down
1 change: 0 additions & 1 deletion kiwixbuild/dependencies/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,6 @@ def build(self):
def make_dist(self):
pass


class MakeBuilder(Builder):
configure_option_template = "{dep_options} {static_option} {env_option} --prefix {install_dir} --libdir {libdir}"
configure_option = ""
Expand Down
2 changes: 1 addition & 1 deletion kiwixbuild/dependencies/kiwix_desktop.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class Source(GitClone):
git_dir = "kiwix-desktop"

class Builder(QMakeBuilder):
dependencies = ["qt", "qtwebengine", "kiwix-lib", "aria2", "kiwix-tools"]
dependencies = ["qt", "qtwebengine", "kiwix-lib", "aria2", "kiwix-tools", "vuejs"]
make_install_target = 'install'
configure_env = None

Expand Down
35 changes: 35 additions & 0 deletions kiwixbuild/dependencies/vuejs.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import os
from .base import (
Dependency,
# SimpleDownload,
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):
os.rename(pj(neutralEnv('archive_dir'), 'vue.js'), pj(neutralEnv('source_dir'), 'kiwix-desktop', 'resources', 'js', 'vue.js'))

0 comments on commit c44a2a4

Please sign in to comment.