mirror of
https://github.com/anope/anope.git
synced 2026-06-12 20:14:49 +02:00
Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 997302f861 | |||
| b3b6e9f862 | |||
| d23bfb0113 | |||
| 151f9c2bcc | |||
| b9acaa6d51 | |||
| c6065ff0f3 | |||
| a5aae4f41d | |||
| 0b36ddfaf3 | |||
| 947ddc9e1b |
@@ -0,0 +1,66 @@
|
||||
name: Windows CI
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
release:
|
||||
types:
|
||||
- published
|
||||
jobs:
|
||||
build:
|
||||
if: "!contains(github.event.head_commit.message, '[skip windows ci]')"
|
||||
runs-on: windows-2025
|
||||
env:
|
||||
BUILD_TYPE: ${{ github.event_name == 'release' && 'Release' || 'Debug' }}
|
||||
CONAN_USER_HOME: ${{ github.workspace }}/win/build
|
||||
CONAN_USER_HOME_SHORT: None
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Setup NSIS
|
||||
run: |-
|
||||
choco install nsis
|
||||
|
||||
- name: Setup MSBuild
|
||||
uses: microsoft/setup-msbuild@v2
|
||||
|
||||
- name: Setup Conan
|
||||
uses: turtlebrowser/get-conan@v1.2
|
||||
with:
|
||||
version: 1.66.0
|
||||
|
||||
- name: Try to restore libraries from the cache
|
||||
uses: actions/cache/restore@v4
|
||||
id: library-cache
|
||||
with:
|
||||
key: conan-${{ hashFiles('src/win32/conanfile.txt') }}
|
||||
path: ${{ env.CONAN_USER_HOME }}/.conan
|
||||
|
||||
- name: Install libraries
|
||||
run: |
|
||||
conan install ${{ github.workspace }}\src\win32 --build=missing
|
||||
|
||||
- name: Save libraries to the cache
|
||||
if: ${{ steps.library-cache.outputs.cache-hit != 'true' }}
|
||||
uses: actions/cache/save@v4
|
||||
with:
|
||||
key: ${{ steps.library-cache.outputs.cache-primary-key }}
|
||||
path: ${{ env.CONAN_USER_HOME }}/.conan
|
||||
|
||||
- name: Run CMake
|
||||
run: |
|
||||
mkdir ${{ github.workspace }}\build
|
||||
cd ${{ github.workspace }}\build
|
||||
cmake -A x64 -D "CMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }}" -G "Visual Studio 17 2022" ..
|
||||
|
||||
- name: Build Anope
|
||||
working-directory: ${{ github.workspace }}\build
|
||||
run: |
|
||||
msbuild PACKAGE.vcxproj /M:5 /P:Configuration=${{ env.BUILD_TYPE }} /P:Platform=x64 /VERBOSITY:MINIMAL
|
||||
|
||||
- name: Upload installer
|
||||
if: "${{ github.event_name == 'release' }}"
|
||||
working-directory: ${{ github.workspace }}\build
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
gh release upload ${{ github.event.release.tag_name }} $(Get-ChildItem anope-*.exe)
|
||||
+11
-20
@@ -1,14 +1,5 @@
|
||||
# This usage of CMake requires at least version 2.4 (checks are made to determine what to use when certain versions lack functions)
|
||||
cmake_minimum_required(VERSION 2.4 FATAL_ERROR)
|
||||
if(COMMAND cmake_policy)
|
||||
cmake_policy(SET CMP0003 NEW)
|
||||
if(POLICY CMP0026)
|
||||
cmake_policy(SET CMP0026 OLD)
|
||||
endif(POLICY CMP0026)
|
||||
if(POLICY CMP0007)
|
||||
cmake_policy(SET CMP0007 OLD)
|
||||
endif(POLICY CMP0007)
|
||||
endif(COMMAND cmake_policy)
|
||||
cmake_minimum_required(VERSION 2.4...3.20 FATAL_ERROR)
|
||||
|
||||
# Set the project as C++ primarily, but have C enabled for the checks required later
|
||||
project(Anope CXX)
|
||||
@@ -422,7 +413,6 @@ read_from_file(${Anope_SOURCE_DIR}/src/version.sh "^VERSION_" VERSIONS)
|
||||
# Iterate through the strings found
|
||||
foreach(VERSION_STR ${VERSIONS})
|
||||
string(REGEX REPLACE "^VERSION_([A-Z]+)=\"?([^\"]*)\"?$" "\\1;\\2" VERSION_OUT ${VERSION_STR})
|
||||
# Depends on CMP0007 OLD
|
||||
list(LENGTH VERSION_OUT VERSION_LEN)
|
||||
list(GET VERSION_OUT 0 VERSION_TYPE)
|
||||
if(${VERSION_LEN} GREATER 1)
|
||||
@@ -479,16 +469,8 @@ if(${Anope_SOURCE_DIR} STREQUAL ${Anope_BINARY_DIR})
|
||||
endif(MSVC)
|
||||
endif(${Anope_SOURCE_DIR} STREQUAL ${Anope_BINARY_DIR})
|
||||
|
||||
# Go into the following directories and run their CMakeLists.txt as well
|
||||
add_subdirectory(data)
|
||||
add_subdirectory(docs)
|
||||
add_subdirectory(language)
|
||||
add_subdirectory(src)
|
||||
add_subdirectory(modules)
|
||||
add_subdirectory(include)
|
||||
|
||||
# Get the filename of the Anope binary, to use later
|
||||
get_target_property(SERVICES_BINARY ${PROGRAM_NAME} LOCATION)
|
||||
set(SERVICES_BINARY "$<TARGET_FILE:${PROGRAM_NAME}>")
|
||||
get_filename_component(SERVICES_BINARY ${SERVICES_BINARY} NAME)
|
||||
|
||||
# At install time, create the following additional directories
|
||||
@@ -556,3 +538,12 @@ if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
|
||||
set(CPACK_MONOLITHIC_INSTALL TRUE)
|
||||
include(CPack)
|
||||
endif(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
|
||||
|
||||
# Go into the following directories and run their CMakeLists.txt as well
|
||||
add_subdirectory(data)
|
||||
add_subdirectory(docs)
|
||||
add_subdirectory(language)
|
||||
add_subdirectory(src)
|
||||
add_subdirectory(modules)
|
||||
add_subdirectory(include)
|
||||
|
||||
|
||||
+1
-1
@@ -408,7 +408,7 @@ macro(calculate_depends SRC)
|
||||
else(FOUND_${FILENAME}_INCLUDE)
|
||||
# XXX
|
||||
if(NOT ${FILENAME} STREQUAL "libintl.h")
|
||||
message(FATAL_ERROR "${SRC} needs header file ${FILENAME} but we were unable to locate that header file! Check that the header file is within the search path of your OS.")
|
||||
message(WARNING "${SRC} needs header file ${FILENAME} but we were unable to locate that header file! Check that the header file is within the search path of your OS.")
|
||||
endif(NOT ${FILENAME} STREQUAL "libintl.h")
|
||||
endif(FOUND_${FILENAME}_INCLUDE)
|
||||
endif(CHECK_ANGLE_INCLUDES)
|
||||
|
||||
+13
-3
@@ -1,6 +1,16 @@
|
||||
Anope Version 2.0.18-git
|
||||
------------------------
|
||||
No significant changes.
|
||||
Anope Version 2.0.18
|
||||
--------------------
|
||||
Backported better sendmail error messages from 2.1.
|
||||
Backported the Windows CI fom 2.1.
|
||||
Fixed a CMake error when it encounters a hard to parse header file.
|
||||
Fixed being able to group guest nicknames.
|
||||
Fixed building Anope with CMake 4.
|
||||
Fixed compatibility with MariaDB.
|
||||
Fixed counting email addresses in ns_maxemail.
|
||||
Fixed importing user ICQ and URL data from 1.8.
|
||||
Fixed operserv/ignore not being prioritised first.
|
||||
Fixed resetting the stats with operserv/stats.
|
||||
Updated the Dutch translation.
|
||||
|
||||
Anope Version 2.0.17
|
||||
--------------------
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
Anope Version 2.0.18-git
|
||||
------------------------
|
||||
Anope Version 2.0.18
|
||||
--------------------
|
||||
No significant changes.
|
||||
|
||||
Anope Version 2.0.17
|
||||
|
||||
+3
-4
@@ -34,10 +34,9 @@ Anope Multi Language Support
|
||||
Poedit (https://poedit.net/) is a popular po file editor, and we recommend using it or another editor designed to edit
|
||||
po files (especially on Windows).
|
||||
|
||||
If you have finished a language file translation and you want others to use it, please send it to team@anope.org
|
||||
(don't forget to mention clearly your (nick)name, your e-mail and the language name). You'll of course get full credit for it.
|
||||
|
||||
NOTE: There is no guarantee we will use your work so please do not be offended if we say no thanks.
|
||||
If you have finished a language file translation and you want others to use it, please file a pull request on GitHub
|
||||
or send it to team@anope.org (don't forget to mention clearly your (nick)name, your email and the language name).
|
||||
You'll of course get full credit for it.
|
||||
|
||||
3) Using languages with modules
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ set_source_files_properties(version.cpp PROPERTIES LANGUAGE CXX COMPILE_FLAGS "$
|
||||
# Generate version-bin executable to modify version.h, setting it's linker flags as well
|
||||
add_executable(version-bin version.cpp)
|
||||
set_target_properties(version-bin PROPERTIES LINKER_LANGUAGE CXX LINK_FLAGS "${LDFLAGS}")
|
||||
get_target_property(version_BINARY version-bin LOCATION)
|
||||
set(version_BINARY "$<TARGET_FILE:version-bin>")
|
||||
# Modify version.h from the above executable, with dependencies to version.cpp
|
||||
# and all of the source files in the main build
|
||||
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/version.h ${CMAKE_CURRENT_BINARY_DIR}/build.h
|
||||
|
||||
@@ -162,7 +162,7 @@ class CommandNSGroup : public Command
|
||||
source.Reply(_("There are too many nicks in your group."));
|
||||
else if (source.GetNick().length() <= guestnick.length() + 7 &&
|
||||
source.GetNick().length() >= guestnick.length() + 1 &&
|
||||
!source.GetNick().find_ci(guestnick) && !source.GetNick().substr(guestnick.length()).find_first_not_of("1234567890"))
|
||||
!source.GetNick().find_ci(guestnick) && source.GetNick().substr(guestnick.length()).find_first_not_of("1234567890") == Anope::string::npos)
|
||||
{
|
||||
source.Reply(NICK_CANNOT_BE_REGISTERED, source.GetNick().c_str());
|
||||
}
|
||||
|
||||
+1
-1
@@ -97,7 +97,7 @@ if(GETTEXT_FOUND)
|
||||
endif(GETTEXT_FOUND)
|
||||
|
||||
# Get the filename of the Anope executable as it is in on this system
|
||||
get_target_property(SERVICES_BINARY ${PROGRAM_NAME} LOCATION)
|
||||
set(SERVICES_BINARY "$<TARGET_FILE:${PROGRAM_NAME}>")
|
||||
get_filename_component(SERVICES_BINARY ${SERVICES_BINARY} NAME)
|
||||
# Add the Anope executable to the list of files for CPack to ignore
|
||||
add_to_cpack_ignored_files("${SERVICES_BINARY}$" TRUE)
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
* Based on the original code of Services by Andy Church.
|
||||
*/
|
||||
|
||||
#include <cerrno>
|
||||
|
||||
#include "services.h"
|
||||
#include "mail.h"
|
||||
#include "config.h"
|
||||
|
||||
@@ -29,7 +29,7 @@ foreach(SRC ${TOOLS_SRCS})
|
||||
DESTINATION ${BIN_DIR}
|
||||
)
|
||||
# Add the executable to the list of files for CPack to ignore
|
||||
get_target_property(EXE_BINARY ${EXE} LOCATION)
|
||||
set(EXE_BINARY "$<TARGET_FILE:${EXE}>")
|
||||
get_filename_component(EXE_BINARY ${EXE_BINARY} NAME)
|
||||
add_to_cpack_ignored_files("${EXE_BINARY}$" TRUE)
|
||||
endif(NOT SKIP)
|
||||
|
||||
+1
-1
@@ -3,4 +3,4 @@
|
||||
VERSION_MAJOR=2
|
||||
VERSION_MINOR=0
|
||||
VERSION_PATCH=18
|
||||
VERSION_EXTRA="-git"
|
||||
VERSION_EXTRA=""
|
||||
|
||||
Reference in New Issue
Block a user