Skip to content

Commit 2a5d367

Browse files
committed
Initial commit
0 parents  commit 2a5d367

File tree

78 files changed

+5231
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+5231
-0
lines changed

.editorconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[*.{h,cpp,py,json,page,txt}]
2+
indent_style = space
3+
indent_size = 4
4+
5+
[*.{xml,css,md,blp,yml}]
6+
indent_style = space
7+
indent_size = 2

.gitattributes

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Auto detect text files and perform LF normalization
2+
* text eol=lf
3+
*.png binary
4+
*.jpg binary
5+
*.ico binary
6+
*.pdf binary
7+
*.exe binary

.github/FUNDING.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# These are supported funding model platforms
2+
3+
github: nlogozzo
4+
patreon: # Replace with a single Patreon username
5+
open_collective: # Replace with a single Open Collective username
6+
ko_fi: # Replace with a single Ko-fi username
7+
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9+
liberapay: # Replace with a single Liberapay username
10+
issuehunt: # Replace with a single IssueHunt username
11+
otechie: # Replace with a single Otechie username
12+
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
13+
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']

.github/workflows/flatpak.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
on:
2+
push:
3+
branches: [ "main" ]
4+
pull_request:
5+
branches: [ "main" ]
6+
types: [ "review_requested", "ready_for_review" ]
7+
workflow_dispatch:
8+
name: Flatpak
9+
permissions:
10+
id-token: write
11+
contents: read
12+
jobs:
13+
gnome-flatpak:
14+
name: "GNOME on Flatpak"
15+
runs-on: ubuntu-latest
16+
if: ${{ github.event.pull_request.user.login != 'weblate' }}
17+
container:
18+
image: ghcr.io/flathub-infra/flatpak-github-actions:gnome-47
19+
options: --privileged
20+
strategy:
21+
matrix:
22+
arch: [x86_64]
23+
fail-fast: false
24+
steps:
25+
- uses: actions/checkout@v4
26+
- uses: flathub-infra/flatpak-github-actions/flatpak-builder@master
27+
with:
28+
bundle: org.nickvision.miniera.gnome.flatpak
29+
manifest-path: flatpak/org.nickvision.miniera.gnome.json
30+
cache-key: flatpak-builder-gnome-${{ github.sha }}
31+
arch: ${{ matrix.arch }}
32+
restore-cache: true
33+
qt-flatpak:
34+
name: "Qt on Flatpak"
35+
runs-on: ubuntu-latest
36+
if: ${{ github.event.pull_request.user.login != 'weblate' }}
37+
container:
38+
image: ghcr.io/flathub-infra/flatpak-github-actions:kde-6.8
39+
options: --privileged
40+
strategy:
41+
matrix:
42+
arch: [x86_64]
43+
fail-fast: false
44+
steps:
45+
- uses: actions/checkout@v4
46+
- uses: flathub-infra/flatpak-github-actions/flatpak-builder@master
47+
with:
48+
bundle: org.nickvision.miniera.qt.flatpak
49+
manifest-path: flatpak/org.nickvision.miniera.qt.json
50+
cache-key: flatpak-builder-qt-${{ github.sha }}
51+
arch: ${{ matrix.arch }}
52+
restore-cache: true

.github/workflows/snap.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
on:
2+
push:
3+
branches: ["main"]
4+
pull_request:
5+
branches: ["main"]
6+
types: ["review_requested", "ready_for_review"]
7+
workflow_dispatch:
8+
name: Snap
9+
permissions:
10+
id-token: write
11+
contents: read
12+
jobs:
13+
gnome-snap:
14+
name: "GNOME on Snap"
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
- name: Build
19+
uses: snapcore/action-build@v1
20+
id: snapcraft-build
21+
with:
22+
snapcraft-args: "--verbosity debug"
23+
snapcraft-channel: "edge"
24+
- uses: actions/upload-artifact@v4
25+
with:
26+
name: miniera-snap
27+
path: ${{ steps.snapcraft-build.outputs.snap }}

.github/workflows/spelling.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
on:
2+
push:
3+
branches: [ "main" ]
4+
pull_request:
5+
branches: [ "main" ]
6+
types: [ "review_requested", "ready_for_review" ]
7+
name: Spell Check
8+
jobs:
9+
codespell:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- uses: codespell-project/actions-codespell@master
14+
with:
15+
check_filenames: true
16+
skip: cargo-sources.json,.git,*.svg,*.html,*.js,*.po,*.pot,*.page,*.map,sqlite3.h,sqlite3.c,pch.h,CONTRIBUTING.md
17+
ignore_words_list: gir

.github/workflows/windows.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
on:
2+
push:
3+
branches: [ "main" ]
4+
pull_request:
5+
branches: [ "main" ]
6+
types: [ "review_requested", "ready_for_review" ]
7+
workflow_dispatch:
8+
name: Windows
9+
permissions:
10+
id-token: write
11+
contents: read
12+
env:
13+
GITHUB_ACTIONS: true
14+
VCPKG_ROOT: ${{github.workspace}}/vcpkg
15+
jobs:
16+
build:
17+
name: "Build on x64"
18+
runs-on: windows-latest
19+
if: ${{ github.event.pull_request.user.login != 'weblate' }}
20+
steps:
21+
- name: "Checkout"
22+
uses: actions/checkout@v4
23+
with:
24+
submodules: recursive
25+
- name: "Setup Environment"
26+
shell: pwsh
27+
run: |
28+
$ProgressPreference = 'SilentlyContinue'
29+
mkdir build
30+
Invoke-WebRequest https://github.com/mlocati/gettext-iconv-windows/releases/download/v0.23-v1.17/gettext0.23-iconv1.17-shared-64.zip -OutFile gettext.zip
31+
Expand-Archive -Force 'gettext.zip'
32+
move gettext\bin\* C:\Windows\System32
33+
choco install innosetup
34+
- name: "Vcpkg"
35+
uses: johnwason/vcpkg-action@v6
36+
id: vcpkg
37+
with:
38+
pkgs: libnick qtbase qtsvg qttools qlementine qlementine-icons
39+
triplet: x64-windows
40+
revision: f0c3568a543de0c54295c715d5555fd83b547fe4
41+
token: ${{ secrets.GITHUB_TOKEN }}
42+
github-binarycache: true
43+
- name: "Build"
44+
working-directory: ${{github.workspace}}/build
45+
run: |
46+
cmake -G "Visual Studio 17 2022" ..
47+
cmake --build . --config Release
48+
- name: "Create Installer"
49+
working-directory: ${{github.workspace}}/inno
50+
shell: pwsh
51+
run: |
52+
$ProgressPreference = 'SilentlyContinue'
53+
Invoke-WebRequest https://aka.ms/vs/17/release/vc_redist.x64.exe -OutFile vc_redist.x64.exe
54+
Invoke-WebRequest https://bin.equinox.io/c/bNyj1mQVY4c/ngrok-v3-stable-windows-amd64.zip -OutFile ngrok.zip
55+
Expand-Archive -Force 'ngrok.zip'
56+
move ngrok\ngrok.exe ngrok.exe
57+
iscc setup.iss
58+
- name: Upload
59+
uses: actions/upload-artifact@v4
60+
with:
61+
path: ${{github.workspace}}/inno/NickvisionMinieraSetup.exe
62+
name: Windows-x64-Release

.gitignore

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Prerequisites
2+
*.d
3+
4+
# Compiled Object files
5+
*.slo
6+
*.lo
7+
*.o
8+
*.obj
9+
10+
# Precompiled Headers
11+
*.gch
12+
*.pch
13+
14+
# Compiled Dynamic libraries
15+
*.so
16+
*.dylib
17+
*.dll
18+
19+
# Fortran module files
20+
*.mod
21+
*.smod
22+
23+
# Compiled Static libraries
24+
*.lai
25+
*.la
26+
*.a
27+
*.lib
28+
29+
# Executables
30+
*.exe
31+
*.out
32+
*.app
33+
34+
# User-specific files
35+
*.rsuser
36+
*.suo
37+
*.user
38+
*.user.*
39+
*.userosscache
40+
*.sln.docstates
41+
42+
# Directories
43+
out/
44+
out-linux/
45+
out-windows/
46+
out-mac/
47+
build/
48+
build-linux/
49+
build-windows/
50+
build-mac/
51+
bin/
52+
.cache/
53+
.vs/
54+
.vscode/
55+
.idea/
56+
.fleet/
57+
.flatpak-builder/
58+
.flatpak/
59+
_nickbuild/
60+
*.snap
61+
62+
# CMake
63+
CMakeUserPresets.json
64+
compile_commands.json
65+
66+
# Exe Files
67+
*.exe

CMakeLists.txt

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
cmake_minimum_required (VERSION 3.25)
2+
3+
set(CMAKE_CXX_STANDARD 20)
4+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
5+
if(DEFINED ENV{VCPKG_ROOT})
6+
file(TO_CMAKE_PATH $ENV{VCPKG_ROOT} VCPKG_ROOT)
7+
if(EXISTS "${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake")
8+
set(CMAKE_TOOLCHAIN_FILE "${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake")
9+
set(USING_VCPKG ON)
10+
endif()
11+
endif()
12+
if (POLICY CMP0141)
13+
cmake_policy(SET CMP0141 NEW)
14+
set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "$<IF:$<AND:$<C_COMPILER_ID:MSVC>,$<CXX_COMPILER_ID:MSVC>>,$<$<CONFIG:Debug,RelWithDebInfo>:EditAndContinue>,$<$<CONFIG:Debug,RelWithDebInfo>:ProgramDatabase>>")
15+
endif()
16+
17+
project("org.nickvision.miniera" LANGUAGES C CXX VERSION 2025.2.0 DESCRIPTION "Run Minecraft servers.")
18+
set(SHORT_NAME "miniera")
19+
set(DISPLAY_NAME "Miniera")
20+
include(GNUInstallDirs)
21+
22+
file(STRINGS "${CMAKE_SOURCE_DIR}/resources/po/POTFILES" TRANSLATE_FILES)
23+
file(STRINGS "${CMAKE_SOURCE_DIR}/resources/po/LINGUAS" LINGUAS)
24+
set(POT_FILE "${CMAKE_SOURCE_DIR}/resources/po/${SHORT_NAME}.pot")
25+
26+
find_program(GETTEXT_XGETTEXT_EXECUTABLE xgettext)
27+
find_program(GETTEXT_MSGMERGE_EXECUTABLE msgmerge)
28+
find_program(GETTEXT_MSGFMT_EXECUTABLE msgfmt)
29+
if(EXISTS "${GETTEXT_XGETTEXT_EXECUTABLE}")
30+
if(EXISTS "${GETTEXT_MSGMERGE_EXECUTABLE}")
31+
if(EXISTS "${GETTEXT_MSGFMT_EXECUTABLE}")
32+
set(HAS_GETTEXT TRUE)
33+
endif()
34+
endif()
35+
endif()
36+
37+
add_subdirectory("lib${SHORT_NAME}")
38+
if(WIN32)
39+
add_subdirectory("${PROJECT_NAME}.qt")
40+
else()
41+
if(NOT DEFINED UI_PLATFORM)
42+
if(LINUX)
43+
add_subdirectory("${PROJECT_NAME}.gnome")
44+
else()
45+
add_subdirectory("${PROJECT_NAME}.qt")
46+
endif()
47+
else()
48+
add_subdirectory("${PROJECT_NAME}.${UI_PLATFORM}")
49+
endif()
50+
endif()

0 commit comments

Comments
 (0)