mirror of
				https://github.com/bytecodealliance/wasm-micro-runtime.git
				synced 2025-10-30 21:02:27 +00:00 
			
		
		
		
	Fix compile issue (#88)
This commit is contained in:
		
							parent
							
								
									9aa9cbde77
								
							
						
					
					
						commit
						09d5149081
					
				|  | @ -32,6 +32,17 @@ echo $PWD | |||
| cp  lvgl_native_ui_app ${OUT_DIR} | ||||
| echo "#####################build native-ui-app success" | ||||
| 
 | ||||
| 
 | ||||
| echo "##################### 2. build littlevgl wasm runtime start#####################" | ||||
| cd $BUILD_DIR | ||||
| mkdir -p wasm-runtime-wgl | ||||
| cd wasm-runtime-wgl | ||||
| cmake ${PROJECT_DIR}/wasm-runtime-wgl/linux-build | ||||
| make | ||||
| cp wasm_runtime_wgl ${OUT_DIR}/ | ||||
| 
 | ||||
| echo "##################### build littlevgl wasm runtime end#####################" | ||||
| 
 | ||||
| echo "#####################build host-tool" | ||||
| cd $BUILD_DIR | ||||
| mkdir -p host-tool | ||||
|  | @ -46,17 +57,6 @@ cp host_tool ${OUT_DIR} | |||
| echo "#####################build host-tool success" | ||||
| 
 | ||||
| 
 | ||||
| echo "##################### 2. build littlevgl wasm runtime start#####################" | ||||
| cd $BUILD_DIR | ||||
| mkdir -p wasm-runtime-wgl | ||||
| cd wasm-runtime-wgl | ||||
| cmake ${PROJECT_DIR}/wasm-runtime-wgl/linux-build | ||||
| make | ||||
| cp wasm_runtime_wgl ${OUT_DIR}/ | ||||
| 
 | ||||
| echo "##################### build littlevgl wasm runtime end#####################" | ||||
| 
 | ||||
| 
 | ||||
| echo "##################### 3. build wasm ui app start#####################" | ||||
| cd ${PROJECT_DIR}/wasm-apps/wgl | ||||
| make | ||||
|  |  | |||
|  | @ -29,7 +29,7 @@ lv_obj_t *hello_world_label; | |||
| lv_obj_t *count_label; | ||||
| lv_obj_t *btn1; | ||||
| lv_obj_t *label_count1; | ||||
| int label_count1_value = 0; | ||||
| int label_count1_value = 100; | ||||
| char label_count1_str[11] = { 0 }; | ||||
| 
 | ||||
| void timer1_update(user_timer_t timer1) | ||||
|  | @ -60,10 +60,10 @@ void on_init() | |||
| 
 | ||||
|     /*Create a label on the button*/ | ||||
|     lv_obj_t *btn_label = lv_label_create(btn1, NULL); | ||||
|     lv_label_set_text(btn_label, "Click ++"); | ||||
|     lv_label_set_text(btn_label, "Click --"); | ||||
| 
 | ||||
|     label_count1 = lv_label_create(NULL, NULL); | ||||
|     lv_label_set_text(label_count1, "0"); | ||||
|     lv_label_set_text(label_count1, "100"); | ||||
|     lv_obj_align(label_count1, NULL, LV_ALIGN_IN_BOTTOM_MID, 0, 0); | ||||
| 
 | ||||
|     /* set up a timer */ | ||||
|  | @ -75,8 +75,10 @@ void on_init() | |||
| static void btn_event_cb(lv_obj_t *btn, lv_event_t event) | ||||
| { | ||||
|     if(event == LV_EVENT_RELEASED) { | ||||
|         label_count1_value++; | ||||
|         label_count1_value--; | ||||
|         sprintf(label_count1_str, "%d", label_count1_value); | ||||
|         lv_label_set_text(label_count1, label_count1_str); | ||||
|         if (label_count1_value == 0) | ||||
|             label_count1_value = 100; | ||||
|     } | ||||
| } | ||||
|  |  | |||
|  | @ -44,9 +44,8 @@ if (NOT ("$ENV{VALGRIND}" STREQUAL "YES")) | |||
|   add_definitions(-DNVALGRIND) | ||||
| endif () | ||||
| 
 | ||||
| # Currently build as 32-bit by default. | ||||
| set (BUILD_AS_64BIT_SUPPORT "NO") | ||||
| #set (BUILD_AS_64BIT_SUPPORT "YES") | ||||
| # Currently build as 64-bit by default. | ||||
| set (BUILD_AS_64BIT_SUPPORT "YES") | ||||
| 
 | ||||
| if (CMAKE_SIZEOF_VOID_P EQUAL 8) | ||||
| if (${BUILD_AS_64BIT_SUPPORT} STREQUAL "YES") | ||||
|  |  | |||
|  | @ -32,6 +32,17 @@ echo $PWD | |||
| cp  vgl_native_ui_app ${OUT_DIR} | ||||
| echo "#####################build native-ui-app success" | ||||
| 
 | ||||
| 
 | ||||
| echo "##################### 2. build littlevgl wasm runtime start#####################" | ||||
| cd $BUILD_DIR | ||||
| mkdir -p vgl-wasm-runtime | ||||
| cd vgl-wasm-runtime | ||||
| cmake ${PROJECT_DIR}/vgl-wasm-runtime | ||||
| make | ||||
| cp vgl_wasm_runtime ${OUT_DIR}/ | ||||
| 
 | ||||
| echo "##################### build littlevgl wasm runtime end#####################" | ||||
| 
 | ||||
| echo "#####################build host-tool" | ||||
| cd $BUILD_DIR | ||||
| mkdir -p host-tool | ||||
|  | @ -46,17 +57,6 @@ cp host_tool ${OUT_DIR} | |||
| echo "#####################build host-tool success" | ||||
| 
 | ||||
| 
 | ||||
| echo "##################### 2. build littlevgl wasm runtime start#####################" | ||||
| cd $BUILD_DIR | ||||
| mkdir -p vgl-wasm-runtime | ||||
| cd vgl-wasm-runtime | ||||
| cmake ${PROJECT_DIR}/vgl-wasm-runtime | ||||
| make | ||||
| cp vgl_wasm_runtime ${OUT_DIR}/ | ||||
| 
 | ||||
| echo "##################### build littlevgl wasm runtime end#####################" | ||||
| 
 | ||||
| 
 | ||||
| echo "##################### 3. build wasm ui app start#####################" | ||||
| cd ${PROJECT_DIR}/wasm-apps | ||||
| if [ ! -d "${PROJECT_DIR}/wasm-apps/lvgl" ]; then | ||||
|  |  | |||
|  | @ -15,8 +15,8 @@ if (NOT ("$ENV{VALGRIND}" STREQUAL "YES")) | |||
|   add_definitions(-DNVALGRIND) | ||||
| endif () | ||||
| 
 | ||||
| # Currently build as 32-bit by default. | ||||
| set (BUILD_AS_64BIT_SUPPORT "NO") | ||||
| # Currently build as 64-bit by default. | ||||
| set (BUILD_AS_64BIT_SUPPORT "YES") | ||||
| 
 | ||||
| if (CMAKE_SIZEOF_VOID_P EQUAL 8) | ||||
| if (${BUILD_AS_64BIT_SUPPORT} STREQUAL "YES") | ||||
|  |  | |||
|  | @ -29,7 +29,7 @@ lv_obj_t *hello_world_label; | |||
| lv_obj_t *count_label; | ||||
| lv_obj_t *btn1; | ||||
| lv_obj_t *label_count1; | ||||
| int label_count1_value = 0; | ||||
| int label_count1_value = 100; | ||||
| char label_count1_str[11] = { 0 }; | ||||
| 
 | ||||
| void timer1_update(user_timer_t timer1) | ||||
|  | @ -60,10 +60,10 @@ void on_init() | |||
| 
 | ||||
|     /*Create a label on the button*/ | ||||
|     lv_obj_t *btn_label = lv_label_create(btn1, NULL); | ||||
|     lv_label_set_text(btn_label, "Click ++"); | ||||
|     lv_label_set_text(btn_label, "Click --"); | ||||
| 
 | ||||
|     label_count1 = lv_label_create(NULL, NULL); | ||||
|     lv_label_set_text(label_count1, "0"); | ||||
|     lv_label_set_text(label_count1, "100"); | ||||
|     lv_obj_align(label_count1, NULL, LV_ALIGN_IN_BOTTOM_MID, 0, 0); | ||||
| 
 | ||||
|     /* set up a timer */ | ||||
|  | @ -75,8 +75,10 @@ void on_init() | |||
| static void btn_event_cb(lv_obj_t *btn, lv_event_t event) | ||||
| { | ||||
|     if(event == LV_EVENT_RELEASED) { | ||||
|         label_count1_value++; | ||||
|         label_count1_value--; | ||||
|         sprintf(label_count1_str, "%d", label_count1_value); | ||||
|         lv_label_set_text(label_count1, label_count1_str); | ||||
|         if (label_count1_value == 0) | ||||
|             label_count1_value = 100; | ||||
|     } | ||||
| } | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Weining
						Weining