mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 03:20:18 +00:00
up
This commit is contained in:
parent
0645e9aa5b
commit
c6c2b04b3e
32
.github/workflows/main.yml
vendored
32
.github/workflows/main.yml
vendored
@ -59,34 +59,4 @@ jobs:
|
||||
mv pocketpy output/linux/x86_64
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
path: output
|
||||
build_android:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: subosito/flutter-action@v2
|
||||
with:
|
||||
flutter-version: '3.0.0'
|
||||
channel: 'stable'
|
||||
- run: flutter --version
|
||||
- name: Compiling
|
||||
run: |
|
||||
python3 amalgamate.py
|
||||
cd plugins/flutter/example
|
||||
flutter build apk --split-debug-info=.debug-info --split-per-abi
|
||||
cd build/app/outputs/flutter-apk
|
||||
mkdir -p output/android/arm64-v8a
|
||||
mkdir -p output/android/armeabi-v7a
|
||||
mkdir -p output/android/x86_64
|
||||
unzip -q app-arm64-v8a-release.apk -d tmp
|
||||
mv tmp/lib/arm64-v8a/libpocketpy.so output/android/arm64-v8a/libpocketpy.so
|
||||
rm -rf tmp
|
||||
unzip -q app-armeabi-v7a-release.apk -d tmp
|
||||
mv tmp/lib/armeabi-v7a/libpocketpy.so output/android/armeabi-v7a/libpocketpy.so
|
||||
rm -rf tmp
|
||||
unzip -q app-x86_64-release.apk -d tmp
|
||||
mv tmp/lib/x86_64/libpocketpy.so output/android/x86_64/libpocketpy.so
|
||||
rm -rf tmp
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
path: plugins/flutter/example/build/app/outputs/flutter-apk/output
|
||||
path: output
|
File diff suppressed because it is too large
Load Diff
@ -1 +1 @@
|
||||
Subproject commit 82f297a00d351a32467eadb8f91865b8d87d2efd
|
||||
Subproject commit 4a8fa7756058f5c58c1fe2e7a9abb423d8683dfa
|
@ -44,7 +44,7 @@ for n in [4,3,2,1]:
|
||||
impl.append ( f'{mapping[p_ret]} ret = {call_impl};' )
|
||||
impl.append( f'return vm->Py{p_ret.capitalize()}(ret);' )
|
||||
impl = '\n'.join([' '*8 + i for i in impl])
|
||||
s += f'''__EXPORT\nvoid pkpy_vm_bind{name}(VM* vm, const char* mod, const char* name, {name} f) {{
|
||||
s += f'''__EXPORT\nvoid pkpy_vm_bind{name[3:]}(VM* vm, const char* mod, const char* name, {name} f) {{
|
||||
PyVar obj = vm->new_module_if_not_existed(mod);
|
||||
vm->bindFunc<{len(p_args)}>(obj, name, [f](VM* vm, const pkpy::ArgList& args) {{
|
||||
{impl}
|
||||
|
250
src/_bindings.h
250
src/_bindings.h
File diff suppressed because it is too large
Load Diff
@ -19,7 +19,7 @@ struct Timer{
|
||||
|
||||
int main(int argc, char** argv){
|
||||
VM* vm = pkpy_new_vm(true);
|
||||
pkpy_vm_bind__f_str__(vm, "builtins", "input", [](){
|
||||
pkpy_vm_bind_str__(vm, "builtins", "input", [](){
|
||||
static std::string line;
|
||||
std::getline(std::cin, line);
|
||||
return line.c_str();
|
||||
|
Loading…
x
Reference in New Issue
Block a user