flutter: Rename dir flutter to flutter_app
|
@ -36,7 +36,7 @@ jobs:
|
|||
run: flutter --version
|
||||
|
||||
- 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.
|
||||
# - name: Verify formatting
|
||||
|
@ -50,11 +50,11 @@ jobs:
|
|||
|
||||
# Build
|
||||
- name: Build apk
|
||||
run: cd src/ui/flutter; flutter build apk
|
||||
run: cd src/ui/flutter_app; flutter build apk
|
||||
|
||||
# Archive
|
||||
- name: Archive production artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
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
|
|
@ -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/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.
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
cd src/ui/flutter
|
||||
cd src/ui/flutter_app
|
||||
flutter pub get
|
||||
flutter pub global activate intl_utils
|
||||
flutter --no-color pub global run intl_utils:generate
|
||||
|
|
|
@ -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})
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 5.2 KiB |
Before Width: | Height: | Size: 8.3 KiB After Width: | Height: | Size: 8.3 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 40 KiB |
|
@ -1,54 +1,54 @@
|
|||
/*
|
||||
This file is part of Sanmill.
|
||||
Copyright (C) 2019-2021 The Sanmill developers (see AUTHORS file)
|
||||
|
||||
Sanmill is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Sanmill is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef BASE2_H
|
||||
#define BASE2_H
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#else
|
||||
#include <pthread.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <string.h>
|
||||
|
||||
#include <android/log.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
inline void Idle(void) {
|
||||
Sleep(1);
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
inline void Idle(void) {
|
||||
usleep(1000);
|
||||
}
|
||||
#endif
|
||||
|
||||
#define LOG_TAG "MillEngine"
|
||||
|
||||
#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 LOGW(...) __android_log_print(ANDROID_LOG_WARN, 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__)
|
||||
|
||||
#endif
|
||||
/*
|
||||
This file is part of Sanmill.
|
||||
Copyright (C) 2019-2021 The Sanmill developers (see AUTHORS file)
|
||||
|
||||
Sanmill is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Sanmill is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef BASE2_H
|
||||
#define BASE2_H
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#else
|
||||
#include <pthread.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <string.h>
|
||||
|
||||
#include <android/log.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
inline void Idle(void) {
|
||||
Sleep(1);
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
inline void Idle(void) {
|
||||
usleep(1000);
|
||||
}
|
||||
#endif
|
||||
|
||||
#define LOG_TAG "MillEngine"
|
||||
|
||||
#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 LOGW(...) __android_log_print(ANDROID_LOG_WARN, 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__)
|
||||
|
||||
#endif
|
|
@ -1,51 +1,51 @@
|
|||
/*
|
||||
This file is part of Sanmill.
|
||||
Copyright (C) 2019-2021 The Sanmill developers (see AUTHORS file)
|
||||
|
||||
Sanmill is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Sanmill is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <iostream>
|
||||
|
||||
#include "base.h"
|
||||
#include "command_channel.h"
|
||||
|
||||
extern int main(int argc, char* argv[]) ;
|
||||
|
||||
void println(const char *str, ...) {
|
||||
|
||||
va_list args;
|
||||
|
||||
va_start(args, str);
|
||||
|
||||
char buffer[256] = {0};
|
||||
vsnprintf(buffer, 256, str, args);
|
||||
|
||||
va_end(args);
|
||||
|
||||
CommandChannel *channel = CommandChannel::getInstance();
|
||||
|
||||
LOGD("println: %s\n", buffer);
|
||||
|
||||
while (!channel->pushResponse(buffer)) {
|
||||
Idle();
|
||||
}
|
||||
}
|
||||
|
||||
int engineMain(void)
|
||||
{
|
||||
return main(1, 0);
|
||||
}
|
||||
/*
|
||||
This file is part of Sanmill.
|
||||
Copyright (C) 2019-2021 The Sanmill developers (see AUTHORS file)
|
||||
|
||||
Sanmill is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Sanmill is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <iostream>
|
||||
|
||||
#include "base.h"
|
||||
#include "command_channel.h"
|
||||
|
||||
extern int main(int argc, char* argv[]) ;
|
||||
|
||||
void println(const char *str, ...) {
|
||||
|
||||
va_list args;
|
||||
|
||||
va_start(args, str);
|
||||
|
||||
char buffer[256] = {0};
|
||||
vsnprintf(buffer, 256, str, args);
|
||||
|
||||
va_end(args);
|
||||
|
||||
CommandChannel *channel = CommandChannel::getInstance();
|
||||
|
||||
LOGD("println: %s\n", buffer);
|
||||
|
||||
while (!channel->pushResponse(buffer)) {
|
||||
Idle();
|
||||
}
|
||||
}
|
||||
|
||||
int engineMain(void)
|
||||
{
|
||||
return main(1, 0);
|
||||
}
|
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 5.2 KiB |
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 7.3 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 107 KiB After Width: | Height: | Size: 107 KiB |
Before Width: | Height: | Size: 873 B After Width: | Height: | Size: 873 B |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 6.3 KiB |
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 6.3 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 8.2 KiB After Width: | Height: | Size: 8.2 KiB |
Before Width: | Height: | Size: 9.4 KiB After Width: | Height: | Size: 9.4 KiB |
Before Width: | Height: | Size: 68 B After Width: | Height: | Size: 68 B |
Before Width: | Height: | Size: 68 B After Width: | Height: | Size: 68 B |
Before Width: | Height: | Size: 68 B After Width: | Height: | Size: 68 B |