Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extensions - Add Linux support for the Mumble plugin #1218

Open
wants to merge 21 commits into
base: mumble-plugin
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,30 @@ jobs:
symbols
retention-days: 1

compile-linux:
if: github.repository == 'IDI-Systems/acre2' && ! contains(github.event.head_commit.message, '[ci skip]')
runs-on: ubuntu-latest
steps:
- name: Checkout the source code
uses: actions/checkout@v2
- name: Install Packages
run: |
sudo apt update
sudo DEBIAN_FRONTEND=noninteractive apt install -y libfaudio-dev libtbb-dev
- name: Build Extensions
run: |
mkdir -p extensions/build
cd extensions/build
cmake -DUSE_64BIT_BUILD=ON ..
make -j
- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: acre2-extensions-linux
path: |
plugin
retention-days: 1

publish-test:
needs: [build, compile]
if: github.event_name == 'workflow_dispatch'
Expand All @@ -123,6 +147,7 @@ jobs:
mv acre2-extensions-*/*.dll @acre2/
mv acre2-extensions-*/extras/*.exe @acre2/extras/
mkdir @acre2/plugin && cp -r acre2-extensions-*/plugin/* @acre2/plugin/ # mv can't merge directories
cp -r acre2-extensions-linux/mumble @acre2/plugin || true
mkdir symbols && mv acre2-extensions-*/symbols/* .
echo "::group::Archive build"
zip -r acre2_${{ needs.build.outputs.VERSION }}${{ github.event.inputs.label }}.zip @acre2
Expand Down Expand Up @@ -171,6 +196,7 @@ jobs:
mv acre2-extensions-*/*.dll @acre2/
mv acre2-extensions-*/extras/*.exe @acre2/extras/
mkdir @acre2/plugin && cp -r acre2-extensions-*/plugin/* @acre2/plugin/ # mv can't merge directories
cp -r acre2-extensions-linux/mumble @acre2/plugin || true
mkdir symbols && mv acre2-extensions-*/symbols/* .
echo "::group::Archive build"
zip -r acre2_${{ needs.build.outputs.VERSION }}.zip @acre2
Expand Down Expand Up @@ -229,6 +255,7 @@ jobs:
mv acre2-extensions-*/*.dll @acre2/
mv acre2-extensions-*/extras/*.exe @acre2/extras/
mkdir @acre2/plugin && cp -r acre2-extensions-*/plugin/* @acre2/plugin/ # mv can't merge directories
cp -r acre2-extensions-linux/mumble @acre2/plugin || true
mkdir symbols && mv acre2-extensions-*/symbols/* .
echo "::group::Archive build"
zip -r acre2_${{ needs.build.outputs.VERSION }}.zip @acre2
Expand Down
12 changes: 12 additions & 0 deletions addons/sys_core/initSettings.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,18 @@
{[_this] call FUNC(setRevealToAI)}
] call CBA_fnc_addSetting;

if ("ACRE2Arma" callExtension "99" == "1") then {
// Wine Socket Port
[
QGVAR(wineSocketPort),
"EDITBOX",
["Wine Socket Port", "(Linux only) What port should ACRE2 try to connect to Mumble on?"],
"ACRE2 Wine",
"19141",
false
] call CBA_fnc_addSetting;
};

// Notification Settings - not yet implemented
/*[
QGVAR(incomingTransmissionNotification),
Expand Down
6 changes: 5 additions & 1 deletion addons/sys_io/fnc_server.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ DFUNC(connectionFnc) = {
LOG("ATEEEMPTING TO OPEN PIPE!");
// acre_player sideChat "OPEN PIPE";
GVAR(pongTime) = diag_tickTime;
GVAR(pipeCode) = "ACRE2Arma" callExtension "0ts"; // Connect String
extensionParameter = "0";
if (!isNil {EGVAR(sys_core,wineSocketPort)}) then {
extensionParameter = "0p" + EGVAR(sys_core,wineSocketPort);
};
GVAR(pipeCode) = "ACRE2Arma" callExtension extensionParameter; // Connect String
// acre_player sideChat format["RESULT: %1", GVAR(pipeCode)];
if (GVAR(pipeCode) != "1") then {
if (time > 15) then {
Expand Down
45 changes: 29 additions & 16 deletions extensions/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ option(USE_STATIC_LINKING "USE_STATIC_LINKING" ON)

set(CMAKE_BUILD_TYPE "RelWithDebInfo")

find_package(DirectX)
if(DirectX_FOUND)
message("Found DirectX")
else()
message(FATAL_ERROR "DirectX NOT FOUND")
if (WIN32)
find_package(DirectX)
if(DirectX_FOUND)
message("Found DirectX")
else()
message(FATAL_ERROR "DirectX NOT FOUND")
endif()
endif()

if(USE_STATIC_LINKING)
Expand All @@ -35,13 +37,21 @@ set(CMAKE_CL_64 ${USE_64BIT_BUILD})
if(USE_64BIT_BUILD)
message("INFO: Building 64-bit projects")
set(ACRE_ARCH "x64")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/build/win64/")
link_directories("${DirectX_ROOT_DIR}/lib/x64")
if(WIN32)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/build/win64/")
link_directories("${DirectX_ROOT_DIR}/lib/x64")
else()
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/build/x86_64-linux-gnu/")
endif()
else()
message("INFO: Building 32-bit projects")
set(ACRE_ARCH "x86")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/build/win32/")
link_directories("${DirectX_ROOT_DIR}/lib/x86")
if(WIN32)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/build/win32/")
link_directories("${DirectX_ROOT_DIR}/lib/x86")
else()
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/build/i686-linux-gnu/")
endif()
endif()

set(CMAKE_INCLUDE_CURRENT_DIR ON)
Expand All @@ -65,12 +75,15 @@ include_directories(src/ACRE2Core)
add_subdirectory(src/ACRE2Shared)
add_subdirectory(src/ACRE2Core)

add_subdirectory(src/ACRE2Arma)
add_subdirectory(src/ACRE2Steam)

add_subdirectory(src/ACRE2TS)
add_subdirectory(src/ACRE2Mumble)

#Extras
add_subdirectory(src/Wav2B64)
#add_subdirectory(src/ACRE2DistortionTestPlugin)
if (WIN32)
add_subdirectory(src/ACRE2Arma)
add_subdirectory(src/ACRE2Steam)

add_subdirectory(src/ACRE2TS)

#Extras
add_subdirectory(src/Wav2B64)
#add_subdirectory(src/ACRE2DistortionTestPlugin)
endif()
Loading