-
-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add vuejs as kiwix-desktop dependency #442
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ | |
android_ndk, | ||
android_sdk, | ||
aria2, | ||
vuejs, | ||
armhf, | ||
docoptcpp, | ||
flatpak, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I strongly dislike this.
Honestly, If this is to complex to do (we have to check on qmake side), I would say that we keep |
||
if os.path.exists(source_path) and os.path.exists(dest_path): | ||
os.rename(source_path, dest_path) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to file the sha256sum of the file.