Skip to content

Commit

Permalink
More cleanup to add flutter UI to sub projects
Browse files Browse the repository at this point in the history
  • Loading branch information
hkbinaurics committed May 16, 2024
1 parent 91a8ac3 commit 9dcf3de
Show file tree
Hide file tree
Showing 44 changed files with 61 additions and 16 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#ifndef __AYF_NATIVE_CONFIG_H__
#define __AYF_NATIVE_CONFIG_H__

extern "C"
{
jvxErrorType flutter_config_open(native_host_configure_func_pointers* fcPtr);
}

#endif
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#include "jvx.h"
#include "flutter_native_host_config.h"

extern "C"
{
extern jvxErrorType jvx_access_link_objects(jvxInitObject_tp* funcInit, jvxTerminateObject_tp* funcTerm, jvxApiString* adescr, jvxComponentType tp, jvxSize id);
extern jvxErrorType jvx_default_connection_rules_add(IjvxDataConnections* theDataConnectionDefRule);
extern jvxErrorType jvx_default_sequence_add(IjvxSequencer* theSeq);
extern jvxErrorType jvx_configure_factoryhost_features(configureFactoryHost_features* features);
extern jvxErrorType jvx_invalidate_factoryhost_features(configureFactoryHost_features* features);
}

extern "C"
{
jvxErrorType flutter_config_open(native_host_configure_func_pointers* fcPtr)
{
if (fcPtr)
{
fcPtr->access_link_objects = jvx_access_link_objects;
fcPtr->configure_factoryhost_features = jvx_configure_factoryhost_features;
fcPtr->invalidate_factoryhost_features = jvx_invalidate_factoryhost_features;
fcPtr->default_connection_rules_add = jvx_default_connection_rules_add;
fcPtr->default_sequence_add = jvx_default_sequence_add;
}
return JVX_NO_ERROR;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ list(APPEND PLUGIN_SOURCES
"ayfcorepack_plugin.cpp"
"ayfcorepack_plugin.h"
"ayf-sdk-local-headers.h"
"${AYF_SDK_PATH}/include/${AYF_CORE_PACK_INCLUDE}/exports/windows/exports-flutter-native-config.def"
"${AYF_SDK_PATH}/software/codeFragments/jvxApplications/native-config/exports/windows/exports-flutter-native-config.def"
"${AYF_SDK_PATH}/include/${AYF_CORE_PACK_INCLUDE}/include/ayfstarter-native-config.h"

)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ dependencies:
path: '../../../../../../flutter/ayf_pack_native'

ayfcorepack:
path: '../../starter_core_pack'
path: '../../ayf_starter_corepack'

ayfstarter:
path: '../'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev,
FlutterWindow window(project);
Win32Window::Point origin(10, 10);
Win32Window::Size size(1280, 720);
if (!window.CreateAndShow(L"ayf_pack_example", origin, size)) {
if (!window.CreateAndShow(L"ayfstarter_app", origin, size)) {
return EXIT_FAILURE;
}
window.SetQuitOnClose(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,22 @@ echo "Running zip release with path=$PATH"
echo "flutter build $2"
flutter build $2

echo cp $1/.$3.env build/$sysfolder/runner/Release/data/flutter_assets
cp $1/.$3.env build/$sysfolder/runner/Release/data/flutter_assets
if [[ "$2" == "web" ]]
then
# What to do here??
echo "Compiling for target web"
else
echo cp $1/.$3.env build/$sysfolder/runner/Release/data/flutter_assets
cp $1/.$3.env build/$sysfolder/runner/Release/data/flutter_assets

if [ -d "$4/$3" ]; then
echo "rm -rf $4/$3"
rm -rf $4/$3
fi
if [ -d "$4/$3" ]; then
echo "rm -rf $4/$3"
rm -rf $4/$3
fi

echo "mv build/$sysfolder/runner/Release $4/$3"
mv build/$sysfolder/runner/Release $4/$3
echo "mv build/$sysfolder/runner/Release $4/$3"
mv build/$sysfolder/runner/Release $4/$3
fi

echo "Flutter app preparation completed!"

Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,14 @@ include_directories(
${JVX_SUBPRODUCT_ROOT}/sources/jvxLibraries/jvx-flutter-native-static/include
)

# Involving the template files for the native config lib
configure_file(${JVX_BASE_ROOT}/software/codeFragments/jvxApplications/native-config/include/generic-native-config.h.in ${CMAKE_CURRENT_SOURCE_DIR}/include/ayfstarter-native-config.h)
configure_file(${JVX_BASE_ROOT}/software/codeFragments/jvxApplications/native-config/src/generic-config-hook.cpp.in ${CMAKE_CURRENT_SOURCE_DIR}/src/ayfstarter-config-hook.cpp)

# Add local sources (header files only for project workspace generation!)
set(LOCAL_SOURCES

${CMAKE_CURRENT_SOURCE_DIR}/exports/${JVX_OS}/exports-flutter-native-config.def
${JVX_BASE_ROOT}/software/codeFragments/jvxApplications/native-config/exports/${JVX_OS}/exports-flutter-native-config.def

${CMAKE_CURRENT_SOURCE_DIR}/src/ayfstarter-config-hook.cpp
${CMAKE_CURRENT_SOURCE_DIR}/include/ayfstarter-native-config.h
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#ifndef __AYFBINRENDER_NATIVE_CONFIG_H__
#define __AYFBINRENDER_NATIVE_CONFIG_H__
#ifndef __AYF_NATIVE_CONFIG_H__
#define __AYF_NATIVE_CONFIG_H__

extern "C"
{
jvxErrorType flutter_config_open(native_host_configure_func_pointers* fcPtr);
}

#endif
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ extern "C"
}
return JVX_NO_ERROR;
}
}
}

0 comments on commit 9dcf3de

Please sign in to comment.