-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3a3da43
commit 5c770a8
Showing
6 changed files
with
235 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
# appimage-builder recipe see https://appimage-builder.readthedocs.io for details | ||
version: 1 | ||
script: | ||
- rm -rf AppDir || true | ||
- cp -r build/linux/x64/release/bundle AppDir | ||
- mkdir -p AppDir/usr/share/icons/hicolor/64x64/apps/ | ||
- cp assets/images/logo.png AppDir/usr/share/icons/hicolor/64x64/apps/ | ||
AppDir: | ||
path: ./AppDir | ||
app_info: | ||
id: org.appimagecrafters.hello-flutter | ||
name: Hello Flutter | ||
icon: logo | ||
version: latest | ||
exec: hello_flutter | ||
exec_args: $@ | ||
apt: | ||
arch: amd64 | ||
allow_unauthenticated: true | ||
sources: | ||
- sourceline: deb http://archive.ubuntu.com/ubuntu/ bionic main restricted | ||
- sourceline: deb http://archive.ubuntu.com/ubuntu/ bionic-updates main restricted | ||
- sourceline: deb http://archive.ubuntu.com/ubuntu/ bionic universe | ||
- sourceline: deb http://archive.ubuntu.com/ubuntu/ bionic-updates universe | ||
- sourceline: deb http://archive.ubuntu.com/ubuntu/ bionic multiverse | ||
- sourceline: deb http://archive.ubuntu.com/ubuntu/ bionic-updates multiverse | ||
- sourceline: deb http://archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse | ||
- sourceline: deb http://security.ubuntu.com/ubuntu bionic-security main restricted | ||
- sourceline: deb http://security.ubuntu.com/ubuntu bionic-security universe | ||
- sourceline: deb http://security.ubuntu.com/ubuntu bionic-security multiverse | ||
include: | ||
- libgtk-3-0 | ||
exclude: | ||
- humanity-icon-theme | ||
- hicolor-icon-theme | ||
- adwaita-icon-theme | ||
- ubuntu-mono | ||
files: | ||
exclude: | ||
- usr/share/man | ||
- usr/share/doc/*/README.* | ||
- usr/share/doc/*/changelog.* | ||
- usr/share/doc/*/NEWS.* | ||
- usr/share/doc/*/TODO.* | ||
runtime: | ||
env: | ||
GIO_MODULE_DIR: $APPDIR/usr/lib/x86_64-linux-gnu/gio/modules/ | ||
test: | ||
fedora: | ||
image: appimagecrafters/tests-env:fedora-30 | ||
command: ./AppRun | ||
use_host_x: true | ||
debian: | ||
image: appimagecrafters/tests-env:debian-stable | ||
command: ./AppRun | ||
use_host_x: true | ||
arch: | ||
image: appimagecrafters/tests-env:archlinux-latest | ||
command: ./AppRun | ||
use_host_x: true | ||
centos: | ||
image: appimagecrafters/tests-env:centos-7 | ||
command: ./AppRun | ||
use_host_x: true | ||
ubuntu: | ||
image: appimagecrafters/tests-env:ubuntu-xenial | ||
command: ./AppRun | ||
use_host_x: true | ||
AppImage: | ||
arch: x86_64 | ||
update-information: guess | ||
sign-key: None | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
# This source code is a part of Project Violet. | ||
# Copyright (C) 2021.violet-team. Licensed under the Apache-2.0 License. | ||
|
||
import sys | ||
import os | ||
import os.path | ||
import re | ||
|
||
target = 'linux' | ||
|
||
def process_dart(path): | ||
f = open(path, 'r') | ||
w = [] | ||
nl = False | ||
op = False | ||
for line in f.readlines(): | ||
if '//' in line: | ||
annote = re.split(r': |, | ',line.split('//')[-1].strip()) | ||
|
||
if not annote[0].startswith('@dependent'): | ||
if nl or op: | ||
nl = False | ||
else: | ||
w.append(line) | ||
continue | ||
|
||
if annote[1] == target: | ||
w.append(line) | ||
continue | ||
|
||
if len(annote) == 2: | ||
continue | ||
|
||
if annote[2] == '=>': | ||
nl = True | ||
continue | ||
|
||
if annote[2] == '[': | ||
op = True | ||
continue | ||
|
||
if annote[2] == ']': | ||
op = False | ||
continue | ||
else: | ||
if nl or op: | ||
nl = False | ||
else: | ||
w.append(line) | ||
f.close() | ||
f = open(path, 'w+') | ||
f.writelines(w) | ||
f.close() | ||
|
||
def process_yaml(path): | ||
f = open(path, 'r') | ||
w = [] | ||
nl = False | ||
op = False | ||
for line in f.readlines(): | ||
if '#' in line: | ||
annote = re.split(r': |, | ', line.split('#')[-1].strip()) | ||
|
||
if not annote[0].startswith('@dependent'): | ||
if nl or op: | ||
nl = False | ||
else: | ||
w.append(line) | ||
continue | ||
|
||
if annote[1] == target: | ||
w.append(line) | ||
continue | ||
|
||
if len(annote) == 2: | ||
continue | ||
|
||
if annote[2] == '=>': | ||
nl = True | ||
continue | ||
|
||
if annote[2] == '[': | ||
op = True | ||
continue | ||
|
||
if annote[2] == ']': | ||
op = False | ||
continue | ||
else: | ||
if nl or op: | ||
nl = False | ||
else: | ||
w.append(line) | ||
f.close() | ||
f = open(path, 'w+') | ||
f.writelines(w) | ||
f.close() | ||
|
||
def create_dummy_valid(path): | ||
f = open(path, 'w') | ||
f.writelines(['String getValid(foo) {return foo;}']) | ||
f.close() | ||
|
||
for root, subdirs, files in os.walk('./'): | ||
for filename in files: | ||
if filename.endswith(".dart"): | ||
process_dart(root + '/' + filename) | ||
elif filename.endswith(".yaml"): | ||
process_yaml(root + '/' + filename) | ||
|
||
create_dummy_valid('./lib/server/salt.dart') | ||
create_dummy_valid('./lib/server/wsalt.dart') |