flutter: Rename dir flutter to flutter_app

This commit is contained in:
Calcitem 2021-02-17 11:44:31 +08:00
parent c43509b7a5
commit ac95e9c123
145 changed files with 1853 additions and 1905 deletions

View File

@ -36,7 +36,7 @@ jobs:
run: flutter --version run: flutter --version
- name: Install dependencies - name: Install dependencies
run: cd src/ui/flutter; flutter pub get; flutter pub global activate intl_utils; flutter --no-color pub global run intl_utils:generate run: cd src/ui/flutter_app; flutter pub get; flutter pub global activate intl_utils; flutter --no-color pub global run intl_utils:generate
# Uncomment this step to verify the use of 'dart format' on each commit. # Uncomment this step to verify the use of 'dart format' on each commit.
# - name: Verify formatting # - name: Verify formatting
@ -50,11 +50,11 @@ jobs:
# Build # Build
- name: Build apk - name: Build apk
run: cd src/ui/flutter; flutter build apk run: cd src/ui/flutter_app; flutter build apk
# Archive # Archive
- name: Archive production artifacts - name: Archive production artifacts
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
with: with:
name: sanmill-flutter-apk-release name: sanmill-flutter-apk-release
path: src/ui/flutter/build/app/outputs/flutter-apk/app-release.apk path: src/ui/flutter_app/build/app/outputs/flutter-apk/app-release.apk

View File

@ -17,7 +17,7 @@ This distribution of Sanmill consists of the following files:
* src, a subdirectory containing the full source code, including a Makefile that can be used to compile Sanmill CUI on Unix-like systems. * src, a subdirectory containing the full source code, including a Makefile that can be used to compile Sanmill CUI on Unix-like systems.
* src/ui/flutter, a subdirectory containing a Flutter frontend. * src/ui/flutter_app, a subdirectory containing a Flutter frontend.
* src/ui/qt, a subdirectory containing a Qt frontend. * src/ui/qt, a subdirectory containing a Qt frontend.

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
cd src/ui/flutter cd src/ui/flutter_app
flutter pub get flutter pub get
flutter pub global activate intl_utils flutter pub global activate intl_utils
flutter --no-color pub global run intl_utils:generate flutter --no-color pub global run intl_utils:generate

View File

@ -1,52 +0,0 @@
cmake_minimum_required(VERSION 3.4.1)
add_definitions(-g -O2 -std=c++17 -D FLUTTER_UI)
add_library( # Sets the name of the library.
engine
# Sets the library as a shared library.
SHARED
# Provides a relative path to your source file(s).
src/main/cpp/mill_engine.cpp
../../command/command_channel.cpp
../../command/command_queue.cpp
../../command/engine_main.cpp
../../../../bitboard.cpp
../../../../endgame.cpp
../../../../evaluate.cpp
../../../../main.cpp
../../../../mills.cpp
../../../../misc.cpp
../../../../movegen.cpp
../../../../movepick.cpp
../../../../option.cpp
../../../../position.cpp
../../../../rule.cpp
../../../../search.cpp
../../../../thread.cpp
../../../../tt.cpp
../../../../uci.cpp
../../../../ucioption.cpp)
include_directories(
../../command
../../../../../include
../../../../
)
find_library( # Sets the name of the path variable.
log-lib
# Specifies the name of the NDK library that
# you want CMake to locate.
log)
target_link_libraries( # Specifies the target library.
engine
# Links the target library to the log library
# included in the NDK.
${log-lib})

View File

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

View File

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 40 KiB

View File

@ -1,54 +1,54 @@
/* /*
This file is part of Sanmill. This file is part of Sanmill.
Copyright (C) 2019-2021 The Sanmill developers (see AUTHORS file) Copyright (C) 2019-2021 The Sanmill developers (see AUTHORS file)
Sanmill is free software: you can redistribute it and/or modify Sanmill is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or the Free Software Foundation, either version 3 of the License, or
(at your option) any later version. (at your option) any later version.
Sanmill is distributed in the hope that it will be useful, Sanmill is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef BASE2_H #ifndef BASE2_H
#define BASE2_H #define BASE2_H
#ifdef _WIN32 #ifdef _WIN32
#include <windows.h> #include <windows.h>
#else #else
#include <pthread.h> #include <pthread.h>
#include <stdlib.h> #include <stdlib.h>
#include <unistd.h> #include <unistd.h>
#endif #endif
#include <string.h> #include <string.h>
#include <android/log.h> #include <android/log.h>
#ifdef _WIN32 #ifdef _WIN32
inline void Idle(void) { inline void Idle(void) {
Sleep(1); Sleep(1);
} }
#else #else
inline void Idle(void) { inline void Idle(void) {
usleep(1000); usleep(1000);
} }
#endif #endif
#define LOG_TAG "MillEngine" #define LOG_TAG "MillEngine"
#define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__) #define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__)
#define LOGI(...) __android_log_print(ANDROID_LOG_INFO, LOG_TAG, __VA_ARGS__) #define LOGI(...) __android_log_print(ANDROID_LOG_INFO, LOG_TAG, __VA_ARGS__)
#define LOGW(...) __android_log_print(ANDROID_LOG_WARN, LOG_TAG, __VA_ARGS__) #define LOGW(...) __android_log_print(ANDROID_LOG_WARN, LOG_TAG, __VA_ARGS__)
#define LOGE(...) __android_log_print(ANDROID_LOG_ERROR, LOG_TAG, __VA_ARGS__) #define LOGE(...) __android_log_print(ANDROID_LOG_ERROR, LOG_TAG, __VA_ARGS__)
#define LOGF(...) __android_log_print(ANDROID_LOG_FATAL, LOG_TAG, __VA_ARGS__) #define LOGF(...) __android_log_print(ANDROID_LOG_FATAL, LOG_TAG, __VA_ARGS__)
#endif #endif

View File

@ -1,51 +1,51 @@
/* /*
This file is part of Sanmill. This file is part of Sanmill.
Copyright (C) 2019-2021 The Sanmill developers (see AUTHORS file) Copyright (C) 2019-2021 The Sanmill developers (see AUTHORS file)
Sanmill is free software: you can redistribute it and/or modify Sanmill is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or the Free Software Foundation, either version 3 of the License, or
(at your option) any later version. (at your option) any later version.
Sanmill is distributed in the hope that it will be useful, Sanmill is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include <stdio.h> #include <stdio.h>
#include <stdarg.h> #include <stdarg.h>
#include <iostream> #include <iostream>
#include "base.h" #include "base.h"
#include "command_channel.h" #include "command_channel.h"
extern int main(int argc, char* argv[]) ; extern int main(int argc, char* argv[]) ;
void println(const char *str, ...) { void println(const char *str, ...) {
va_list args; va_list args;
va_start(args, str); va_start(args, str);
char buffer[256] = {0}; char buffer[256] = {0};
vsnprintf(buffer, 256, str, args); vsnprintf(buffer, 256, str, args);
va_end(args); va_end(args);
CommandChannel *channel = CommandChannel::getInstance(); CommandChannel *channel = CommandChannel::getInstance();
LOGD("println: %s\n", buffer); LOGD("println: %s\n", buffer);
while (!channel->pushResponse(buffer)) { while (!channel->pushResponse(buffer)) {
Idle(); Idle();
} }
} }
int engineMain(void) int engineMain(void)
{ {
return main(1, 0); return main(1, 0);
} }

View File

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

View File

Before

Width:  |  Height:  |  Size: 7.3 KiB

After

Width:  |  Height:  |  Size: 7.3 KiB

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

Some files were not shown because too many files have changed in this diff Show More