Merge branch 'adxeproject:dev' into partical-system-animation
|
@ -310,7 +310,6 @@ bool AudioEngineImpl::init()
|
|||
|
||||
if (s_ALDevice)
|
||||
{
|
||||
alGetError();
|
||||
s_ALContext = alcCreateContext(s_ALDevice, nullptr);
|
||||
alcMakeContextCurrent(s_ALContext);
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@ NS_CC_BEGIN
|
|||
namespace network
|
||||
{
|
||||
|
||||
Uri::Uri() : _isValid(false), _isSecure(false), _hasAuthority(false), _port(0) {}
|
||||
Uri::Uri() : _isValid(false), _isSecure(false), _hasAuthority(false), _isCustomPort(false), _port(0) {}
|
||||
|
||||
Uri::Uri(const Uri& o)
|
||||
{
|
||||
|
@ -95,6 +95,7 @@ Uri& Uri::operator=(const Uri& o)
|
|||
_host = o._host;
|
||||
_hostName = o._hostName;
|
||||
_hasAuthority = o._hasAuthority;
|
||||
_isCustomPort = o._isCustomPort;
|
||||
_port = o._port;
|
||||
_authority = o._authority;
|
||||
_pathEtc = o._pathEtc;
|
||||
|
@ -121,7 +122,9 @@ Uri& Uri::operator=(Uri&& o)
|
|||
_host = std::move(o._host);
|
||||
_hostName = std::move(o._hostName);
|
||||
_hasAuthority = o._hasAuthority;
|
||||
_isCustomPort = o._isCustomPort;
|
||||
o._hasAuthority = false;
|
||||
o._isCustomPort = false;
|
||||
_port = o._port;
|
||||
o._port = 0;
|
||||
_authority = std::move(o._authority);
|
||||
|
@ -290,18 +293,26 @@ bool Uri::doParse(std::string_view str)
|
|||
_isSecure = true;
|
||||
if (_port == 0)
|
||||
_port = 443;
|
||||
|
||||
_isCustomPort = _port != 443;
|
||||
}
|
||||
else if (_scheme == "http" || _scheme == "ws")
|
||||
{
|
||||
if (_port == 0)
|
||||
_port = 80;
|
||||
|
||||
_isCustomPort = _port != 80;
|
||||
}
|
||||
else if (_scheme == "ftp")
|
||||
{
|
||||
if (_port == 0)
|
||||
_port = 21;
|
||||
|
||||
_isCustomPort = _port != 21;
|
||||
}
|
||||
}
|
||||
else
|
||||
_isCustomPort = _port != 0;
|
||||
|
||||
if (_path.empty())
|
||||
_path.push_back('/');
|
||||
|
@ -319,6 +330,7 @@ void Uri::clear()
|
|||
_host.clear();
|
||||
_hostName.clear();
|
||||
_hasAuthority = false;
|
||||
_isCustomPort = false;
|
||||
_port = 0;
|
||||
_authority.clear();
|
||||
_pathEtc.clear();
|
||||
|
@ -371,7 +383,7 @@ std::string Uri::toString() const
|
|||
ss << _username << "@";
|
||||
}
|
||||
ss << _host;
|
||||
if (_port != 0)
|
||||
if (_isCustomPort)
|
||||
{
|
||||
ss << ":" << _port;
|
||||
}
|
||||
|
|
|
@ -130,6 +130,8 @@ public:
|
|||
*/
|
||||
std::string_view getAuthority() const { return _authority; }
|
||||
|
||||
bool isCustomPort() const { return _isCustomPort; }
|
||||
|
||||
/** Gets a string representation of the URI. */
|
||||
std::string toString() const;
|
||||
|
||||
|
@ -163,13 +165,14 @@ private:
|
|||
|
||||
bool _isValid;
|
||||
bool _isSecure;
|
||||
bool _hasAuthority;
|
||||
bool _isCustomPort;
|
||||
uint16_t _port;
|
||||
std::string _scheme;
|
||||
std::string _username;
|
||||
std::string _password;
|
||||
std::string _host;
|
||||
std::string _hostName;
|
||||
bool _hasAuthority;
|
||||
uint16_t _port;
|
||||
std::string _authority;
|
||||
std::string _pathEtc;
|
||||
std::string _path;
|
||||
|
|
|
@ -1033,10 +1033,7 @@ bool FileUtils::isFileExist(std::string_view filename) const
|
|||
else
|
||||
{
|
||||
std::string fullpath = fullPathForFilename(filename);
|
||||
if (fullpath.empty())
|
||||
return false;
|
||||
else
|
||||
return true;
|
||||
return !fullpath.empty();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -625,7 +625,7 @@ void AssetsManagerEx::downloadVersion()
|
|||
{
|
||||
_updateState = State::DOWNLOADING_VERSION;
|
||||
// Download version file asynchronously
|
||||
_downloader->createDownloadFileTask(versionUrl, _tempVersionPath, "", VERSION_ID);
|
||||
_downloader->createDownloadFileTask(versionUrl, _tempVersionPath, VERSION_ID);
|
||||
}
|
||||
// No version file found
|
||||
else
|
||||
|
@ -696,7 +696,7 @@ void AssetsManagerEx::downloadManifest()
|
|||
{
|
||||
_updateState = State::DOWNLOADING_MANIFEST;
|
||||
// Download version file asynchronously
|
||||
_downloader->createDownloadFileTask(manifestUrl, _tempManifestPath, "", MANIFEST_ID);
|
||||
_downloader->createDownloadFileTask(manifestUrl, _tempManifestPath, MANIFEST_ID);
|
||||
}
|
||||
// No manifest file found
|
||||
else
|
||||
|
@ -1258,7 +1258,7 @@ void AssetsManagerEx::queueDowload()
|
|||
_currConcurrentTask++;
|
||||
DownloadUnit& unit = _downloadUnits[key];
|
||||
_fileUtils->createDirectory(basename(unit.storagePath));
|
||||
_downloader->createDownloadFileTask(unit.srcUrl, unit.storagePath, "", unit.customId);
|
||||
_downloader->createDownloadFileTask(unit.srcUrl, unit.storagePath, unit.customId);
|
||||
|
||||
_tempManifest->setAssetDownloadState(key, Manifest::DownloadState::DOWNLOADING);
|
||||
}
|
||||
|
|
|
@ -4,12 +4,10 @@
|
|||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<!--
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>${PROJECT_NAME}</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${MACOSX_BUNDLE_EXECUTABLE_NAME}</string>
|
||||
-->
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>Icon-57.png</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
cmake_minimum_required(VERSION 3.10)
|
||||
|
||||
set(APP_NAME cpp-tests)
|
||||
set(APP_NAME cpp_tests)
|
||||
|
||||
|
||||
# "too large PDB" error often occurs in cpp-tests when using default "/Zi"
|
||||
|
@ -45,8 +45,6 @@ if(APPLE OR VS)
|
|||
endif()
|
||||
|
||||
if(ANDROID)
|
||||
# change APP_NAME to the share library name for Android, it's value depend on AndroidManifest.xml
|
||||
set(APP_NAME cpp_tests)
|
||||
list(APPEND GAME_HEADER
|
||||
Classes/JNITest/JNITest.h
|
||||
)
|
||||
|
|
|
@ -1204,7 +1204,7 @@ void ParseUriTest::onEnter()
|
|||
EXPECT_EQ("ws", v.getScheme());
|
||||
EXPECT_EQ("localhost", v.getHost());
|
||||
EXPECT_EQ("localhost", v.getHostName());
|
||||
EXPECT_EQ("", v.getPath());
|
||||
EXPECT_EQ("/", v.getPath());
|
||||
EXPECT_EQ(90, v.getPort());
|
||||
EXPECT_EQ("", v.getFragment());
|
||||
EXPECT_EQ("key1=foo=bar&key2=foobar&", v.getQuery());
|
||||
|
@ -1219,7 +1219,7 @@ void ParseUriTest::onEnter()
|
|||
EXPECT_EQ("ws", v.getScheme());
|
||||
EXPECT_EQ("localhost", v.getHost());
|
||||
EXPECT_EQ("localhost", v.getHostName());
|
||||
EXPECT_EQ("", v.getPath());
|
||||
EXPECT_EQ("/", v.getPath());
|
||||
EXPECT_EQ(90, v.getPort());
|
||||
EXPECT_EQ("", v.getFragment());
|
||||
EXPECT_EQ("key1=foo=bar&key2=foobar&", v.getQuery());
|
||||
|
@ -1246,7 +1246,7 @@ void ParseUriTest::onEnter()
|
|||
EXPECT_EQ("ws", v.getScheme());
|
||||
EXPECT_EQ("localhost", v.getHost());
|
||||
EXPECT_EQ("localhost", v.getHostName());
|
||||
EXPECT_EQ("", v.getPath());
|
||||
EXPECT_EQ("/", v.getPath());
|
||||
EXPECT_EQ(90, v.getPort());
|
||||
EXPECT_EQ("", v.getFragment());
|
||||
EXPECT_EQ("key1=foo=bar&key2=foobar&", v.getQuery());
|
||||
|
@ -1262,7 +1262,7 @@ void ParseUriTest::onEnter()
|
|||
EXPECT_EQ("ws", v.getScheme());
|
||||
EXPECT_EQ("localhost", v.getHost());
|
||||
EXPECT_EQ("localhost", v.getHostName());
|
||||
EXPECT_EQ("", v.getPath());
|
||||
EXPECT_EQ("/", v.getPath());
|
||||
EXPECT_EQ(90, v.getPort());
|
||||
EXPECT_EQ("", v.getFragment());
|
||||
EXPECT_EQ("key1=foo=bar&key2=foobar&", v.getQuery());
|
||||
|
@ -1386,20 +1386,20 @@ void ParseUriTest::onEnter()
|
|||
EXPECT_EQ(u4.getScheme(), "");
|
||||
EXPECT_EQ(u4.getHost(), "localhost");
|
||||
EXPECT_EQ(u4.getPort(), 8080);
|
||||
EXPECT_EQ(u4.getPath(), "");
|
||||
EXPECT_EQ(u4.getPath(), "/");
|
||||
EXPECT_EQ(u4.getPathEtc(), "");
|
||||
|
||||
EXPECT_EQ(u5.getScheme(), "bb");
|
||||
EXPECT_EQ(u5.getHost(), "localhost");
|
||||
EXPECT_EQ(u5.getPort(), 0);
|
||||
EXPECT_EQ(u5.getPath(), "");
|
||||
EXPECT_EQ(u5.getPath(), "/");
|
||||
EXPECT_EQ(u5.getPathEtc(), "?&foo=12:4&ccc=13");
|
||||
EXPECT_EQ(u5.getQuery(), "&foo=12:4&ccc=13");
|
||||
|
||||
EXPECT_EQ(u6.getScheme(), "cc");
|
||||
EXPECT_EQ(u6.getHost(), "localhost");
|
||||
EXPECT_EQ(u6.getPort(), 91);
|
||||
EXPECT_EQ(u6.getPath(), "");
|
||||
EXPECT_EQ(u6.getPath(), "/");
|
||||
EXPECT_EQ(u6.getPathEtc(), "?&foo=321&bbb=1");
|
||||
EXPECT_EQ(u6.getQuery(), "&foo=321&bbb=1");
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
# ****************************************************************************/
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
|
||||
set(APP_NAME fairygui-tests)
|
||||
set(APP_NAME fairygui_tests)
|
||||
|
||||
project(${APP_NAME})
|
||||
|
||||
|
@ -58,8 +58,6 @@ if(APPLE OR VS)
|
|||
endif()
|
||||
|
||||
if(ANDROID)
|
||||
# change APP_NAME to the share library name for Android, it's value depend on AndroidManifest.xml
|
||||
set(APP_NAME fairygui_tests)
|
||||
list(APPEND GAME_SOURCE
|
||||
proj.android/app/jni/main.cpp
|
||||
)
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
cmake_minimum_required(VERSION 3.10)
|
||||
|
||||
set(APP_NAME lua-tests)
|
||||
set(APP_NAME lua_tests)
|
||||
|
||||
project(${APP_NAME})
|
||||
|
||||
set(_AX_TOP_LEVEL_APP FALSE)
|
||||
if(NOT DEFINED BUILD_ENGINE_DONE)
|
||||
set(_AX_TOP_LEVEL_APP TRUE)
|
||||
if(XCODE)
|
||||
set(CMAKE_XCODE_GENERATE_TOP_LEVEL_PROJECT_ONLY TRUE)
|
||||
endif()
|
||||
|
@ -60,15 +58,11 @@ if(APPLE OR VS)
|
|||
cocos_mark_multi_resources(res_res RES_TO "Resources/res" FOLDERS ${res_res_folders})
|
||||
cocos_mark_multi_resources(res_src RES_TO "Resources/src" FOLDERS ${res_src_folders})
|
||||
set(cc_common_res ${res_res} ${res_src})
|
||||
if (NOT _AX_TOP_LEVEL_APP)
|
||||
cocos_mark_multi_resources(res_script RES_TO "Resources/src/cocos" FOLDERS ${res_script_folders})
|
||||
set(cc_common_res ${cc_common_res} ${res_script})
|
||||
endif()
|
||||
cocos_mark_multi_resources(res_script RES_TO "Resources/src/cocos" FOLDERS ${res_script_folders})
|
||||
set(cc_common_res ${cc_common_res} ${res_script})
|
||||
endif()
|
||||
|
||||
if(ANDROID)
|
||||
# change APP_NAME to the share library name for Android, it's value depend on AndroidManifest.xml
|
||||
set(APP_NAME lua_tests)
|
||||
list(APPEND GAME_SOURCE proj.android/app/jni/main.cpp)
|
||||
elseif(LINUX)
|
||||
list(APPEND GAME_SOURCE proj.linux/main.cpp)
|
||||
|
@ -125,7 +119,7 @@ else()
|
|||
add_subdirectory(${ADXE_ROOT_PATH}/core/platform/android ${ENGINE_BINARY_PATH}/core/cpp-android)
|
||||
target_link_libraries(${APP_NAME} -Wl,--whole-archive cpp_android_spec -Wl,--no-whole-archive)
|
||||
|
||||
add_subdirectory(${ADXE_ROOT_PATH}/extensions/scripting/lua-bindings/proj.android ${ENGINE_BINARY_PATH}/core/lua-android)
|
||||
add_subdirectory(${ADXE_ROOT_PATH}/extensions/scripting/lua-bindings/proj.android ${ENGINE_BINARY_PATH}/extensions/lua-android)
|
||||
if(${CMAKE_ANDROID_ARCH_ABI} STREQUAL "x86")
|
||||
#add `-Wl,--no-warn-shared-textrel` to fix warning "shared library text segment is not shareable clang"
|
||||
target_link_libraries(${APP_NAME} -Wl,--whole-archive lua_android_spec -Wl,--no-whole-archive -Wl,--no-warn-shared-textrel)
|
||||
|
@ -160,7 +154,9 @@ if(APPLE)
|
|||
)
|
||||
elseif(IOS)
|
||||
set_target_properties(${APP_NAME} PROPERTIES MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/proj.ios_mac/ios/Info.plist")
|
||||
set_xcode_property(${APP_NAME} ASSETCATALOG_COMPILER_APPICON_NAME "AppIcon-${APP_NAME}")
|
||||
set_xcode_property(${APP_NAME} ASSETCATALOG_COMPILER_APPICON_NAME "AppIcon")
|
||||
set_xcode_property(${APP_NAME} DEVELOPMENT_TEAM "")
|
||||
set_xcode_property(${APP_NAME} CODE_SIGN_IDENTIFY "iPhone Developer")
|
||||
endif()
|
||||
|
||||
# For code-signing, set the DEVELOPMENT_TEAM:
|
||||
|
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.3 KiB |
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 8.2 KiB After Width: | Height: | Size: 8.2 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.3 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 6.9 KiB After Width: | Height: | Size: 6.9 KiB |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 8.8 KiB After Width: | Height: | Size: 8.8 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
|
@ -17,16 +17,12 @@
|
|||
<string>Icon-72.png</string>
|
||||
<string>Icon-144.png</string>
|
||||
</array>
|
||||
<key>CFBundleIcons</key>
|
||||
<dict/>
|
||||
<key>CFBundleIcons~ipad</key>
|
||||
<dict/>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.cocos2dx.lua_tests</string>
|
||||
<string>${PRODUCT_BUNDLE_INDENTIFIER}</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<string>$(PROJECT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleSignature</key>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#define ALSOFT_VERSION_NUM ${LIB_VERSION_NUM}
|
||||
|
||||
/* Define the branch being built */
|
||||
#define ALSOFT_GIT_BRANCH "${GIT_BRANCH}"
|
||||
#define ALSOFT_GIT_BRANCH "HEAD" // "${GIT_BRANCH}"
|
||||
|
||||
/* Define the hash of the head commit */
|
||||
#define ALSOFT_GIT_COMMIT_HASH "${GIT_COMMIT_HASH}"
|
||||
#define ALSOFT_GIT_COMMIT_HASH "c1c63a27" // "${GIT_COMMIT_HASH}"
|
||||
|
|
|
@ -33,7 +33,7 @@ function build_linux()
|
|||
cd $ADXE_ROOT
|
||||
set -x
|
||||
cmake . -G "Unix Makefiles" -Bbuild -DCMAKE_BUILD_TYPE=Release -DAX_ENABLE_EXT_IMGUI=ON
|
||||
cmake --build build --target cpp-tests -- -j `nproc`
|
||||
cmake --build build --target cpp_tests -- -j `nproc`
|
||||
set +x
|
||||
}
|
||||
|
||||
|
@ -44,7 +44,7 @@ function build_osx()
|
|||
cd $ADXE_ROOT
|
||||
mkdir -p build
|
||||
cmake -S . -B build -GXcode -DAX_ENABLE_EXT_IMGUI=ON -DAX_USE_ALSOFT=ON
|
||||
cmake --build build --config Release --target cpp-tests -- -quiet
|
||||
cmake --build build --config Release --target cpp_tests -- -quiet
|
||||
|
||||
exit 0
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ function build_ios()
|
|||
|
||||
cmake -S . -B build -GXcode -DCMAKE_TOOLCHAIN_FILE=cmake/ios.mini.cmake -DCMAKE_OSX_ARCHITECTURES=x86_64 -DAX_USE_ALSOFT=ON
|
||||
# cmake .. -GXcode -DCMAKE_TOOLCHAIN_FILE=../cmake/ios.toolchain.cmake -DCMAKE_SYSTEM_NAME=iOS -DPLATFORM=OS -DENABLE_ARC=0 # too much logs on console when "cmake --build ."
|
||||
cmake --build build --config Release --target cpp-tests -- -quiet -jobs $NUM_OF_CORES -destination "platform=iOS Simulator,name=iPhone Retina (4-inch)"
|
||||
cmake --build build --config Release --target cpp_tests -- -quiet -jobs $NUM_OF_CORES -destination "platform=iOS Simulator,name=iPhone Retina (4-inch)"
|
||||
|
||||
exit 0
|
||||
}
|
||||
|
@ -72,13 +72,13 @@ function build_android()
|
|||
echo "Building Android samples ..."
|
||||
source ../environment.sh
|
||||
|
||||
# build fairygui-tests
|
||||
# build fairygui_tests
|
||||
pushd $ADXE_ROOT/tests/fairygui-tests/proj.android
|
||||
|
||||
do_retry ./gradlew assembleRelease -PPROP_BUILD_TYPE=cmake -PPROP_APP_ABI=$BUILD_ARCH --parallel --info
|
||||
popd
|
||||
|
||||
# build cpp-tests
|
||||
# build cpp_tests
|
||||
pushd $ADXE_ROOT/tests/cpp-tests/proj.android
|
||||
|
||||
do_retry ./gradlew assembleRelease -PPROP_BUILD_TYPE=cmake -PPROP_APP_ABI=$BUILD_ARCH --parallel --info
|
||||
|
|
|
@ -9,5 +9,5 @@ if($BUILD_ARCH -eq "x86") {
|
|||
|
||||
cmake -S . -B build_$BUILD_ARCH $CONFIG_ALL_OPTIONS -Thost=x64 -DAX_ENABLE_EXT_IMGUI=ON
|
||||
|
||||
cmake --build build_$BUILD_ARCH --config Release --target cpp-tests
|
||||
cmake --build build_$BUILD_ARCH --config Release --target lua-tests
|
||||
cmake --build build_$BUILD_ARCH --config Release --target cpp_tests
|
||||
cmake --build build_$BUILD_ARCH --config Release --target lua_tests
|
||||
|
|