Skip to content

Commit

Permalink
more changes regarding wasm C++ projects move
Browse files Browse the repository at this point in the history
  • Loading branch information
mvladic committed Dec 5, 2024
1 parent d792997 commit 58c61d6
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 28 deletions.
14 changes: 7 additions & 7 deletions .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
"name": "Win32",
"includePath": [
"C:/emsdk/upstream/emscripten/cache/sysroot/include/emscripten",
"./packages/project-editor/flow/runtime/cpp/eez-framework/src",
"./packages/project-editor/flow/runtime/cpp/eez-runtime",
"./packages/project-editor/flow/runtime/cpp/eez-runtime/conf",
"./packages/project-editor/flow/runtime/cpp/eez-framework/src/eez/platform/simulator",
"./packages/project-editor/flow/runtime/cpp/eez-framework/src/eez/libs/agg",
"./packages/project-editor/flow/runtime/cpp/lvgl-runtime"
"./wasm/eez-framework/src",
"./wasm/eez-runtime",
"./wasm/eez-runtime/conf",
"./wasm/eez-framework/src/eez/platform/simulator",
"./wasm/eez-framework/src/eez/libs/agg",
"./wasm/lvgl-runtime"
],
"defines": [
"DEBUG",
Expand All @@ -27,4 +27,4 @@
}
],
"version": 4
}
}
1 change: 0 additions & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ gulp.task("copy", function () {
return gulp
.src([
SRC + "/**/*.*",
"!" + SRC + "/project-editor/flow/runtime/cpp/**/*.*",
"!" + SRC + "/**/*.ts",
"!" + SRC + "/**/*.tsx",
"!" + SRC + "/**/*.less",
Expand Down
3 changes: 0 additions & 3 deletions npm-module-publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ for (const folder of FOLDERS) {
fse.copySync(folder, `npm-module/${folder}`, { overwrite: true });
}

console.log(`Remove npm-module/packages/project-editor/flow/runtime/cpp ...`);
fse.removeSync(`npm-module/packages/project-editor/flow/runtime/cpp`);

/*
console.log("Spawn npm publish ...");
const dir = spawn(
Expand Down
4 changes: 1 addition & 3 deletions tools/eez-framework-amalgamation/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ const META_DIR = "./meta";

////////////////////////////////////////////////////////////////////////////////

const EEZ_FRAMEWORK_PATH = path.resolve(
"../../../packages/project-editor/flow/runtime/cpp/eez-framework"
);
const EEZ_FRAMEWORK_PATH = path.resolve("../../../wasm//eez-framework");

const BASE_PATH = path.resolve(EEZ_FRAMEWORK_PATH + "/src/eez");

Expand Down
4 changes: 2 additions & 2 deletions tools/lvgl-api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ function buildFunction(build: Build, func: Function) {
(async function main() {
const exportedFunctions = (
await fs.promises.readFile(
`../../packages/project-editor/flow/runtime/cpp/lvgl-runtime/v${VERSION}/exported-functions.txt`,
`../../wasm/lvgl-runtime/v${VERSION}/exported-functions.txt`,
"utf-8"
)
)
Expand Down Expand Up @@ -242,7 +242,7 @@ function buildFunction(build: Build, func: Function) {
console.log("Processed", processed, "functions");

await fs.promises.writeFile(
`../../packages/project-editor/flow/runtime/cpp/lvgl-runtime/v${VERSION}/stub_api.c`,
`../../wasm/lvgl-runtime/v${VERSION}/stub_api.c`,
build.result
);
})();
3 changes: 1 addition & 2 deletions tsconfig.dev.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,5 @@
"strictPropertyInitialization": false,
"useDefineForClassFields": true
},
"include": ["./packages"],
"exclude": ["./packages/project-editor/flow/runtime/cpp"]
"include": ["./packages"]
}
3 changes: 1 addition & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,5 @@
"strictPropertyInitialization": false,
"useDefineForClassFields": true
},
"include": ["./packages"],
"exclude": ["./packages/project-editor/flow/runtime/cpp"]
"include": ["./packages"]
}
8 changes: 4 additions & 4 deletions wasm/eez-runtime/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ How to build?
source ~/emsdk/emsdk_env.sh
export EMSCRIPTEN=/home/mvladic/emsdk/upstream/emscripten
mkdir -p packages/project-editor/flow/runtime/cpp/eez-runtime/build/emscripten
cd packages/project-editor/flow/runtime/cpp/eez-runtime/build/emscripten
cmake -DCMAKE_TOOLCHAIN_FILE=../../cmake/Emscripten.cmake -DCMAKE_BUILD_TYPE=Debug -G "Unix Makefiles" ../..
make
mkdir -p wasm/eez-runtime/build
cd wasm/eez-runtime/build
emcmake cmake ..
make -j8
```
8 changes: 4 additions & 4 deletions wasm/lvgl-runtime/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ How to build?
source ~/emsdk/emsdk_env.sh
export EMSCRIPTEN=/home/mvladic/emsdk/upstream/emscripten
mkdir -p packages/project-editor/flow/runtime/cpp/lvgl-runtime/v8.3/build
cd packages/project-editor/flow/runtime/cpp/lvgl-runtime/v8.3/build
mkdir -p wasm/lvgl-runtime/v8.3/build
cd wasm/lvgl-runtime/v8.3/build
emcmake cmake ..
emmake make -j4
mkdir -p packages/project-editor/flow/runtime/cpp/lvgl-runtime/v9.0/build
cd packages/project-editor/flow/runtime/cpp/lvgl-runtime/v9.0/build
mkdir -p wasm/lvgl-runtime/v9.0/build
cd wasm/lvgl-runtime/v9.0/build
emcmake cmake ..
emmake make -j4
```

0 comments on commit 58c61d6

Please sign in to comment.