Skip to content

Commit 7783c7e

Browse files
authored
Update libnick (#110)
* feat: Update deps * fix: Build * fix: Cpr build * fix: Windows build * Update org.nickvision.application.json * fix: Cpr build * Update windows.yml
1 parent 25faf3b commit 7783c7e

11 files changed

Lines changed: 116 additions & 54 deletions

File tree

.github/ISSUE_TEMPLATE/bug.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,10 @@ Describe what you expect to happen instead.
2121
- [ ] Snap
2222
- [ ] Source (Including AUR)
2323
- [ ] WinUI on Windows
24+
- [ ] Installer
25+
- [ ] Portable
2426

25-
Version Number:
27+
Version Number: ___
2628

2729
**Additional context**
2830

.github/workflows/windows.yml

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ jobs:
3636
run: |
3737
$ProgressPreference = 'SilentlyContinue'
3838
mkdir build
39+
mkdir build-portable
3940
Invoke-WebRequest https://github.com/mlocati/gettext-iconv-windows/releases/download/v0.25-v1.17/gettext0.25-iconv1.17-shared-64.zip -OutFile gettext.zip
4041
Expand-Archive -Force 'gettext.zip'
4142
move gettext\bin\* C:\Windows\System32
@@ -46,14 +47,19 @@ jobs:
4647
with:
4748
pkgs: libnick
4849
triplet: ${{ matrix.variant.triplet }}
49-
revision: f3d6b4d5b51d10ac4e52bb88b82fe2076412a177
50+
revision: 5188b5339d8731877be0abea20e3384e866391ff
5051
token: ${{ github.token }}
5152
github-binarycache: true
52-
- name: "Build"
53+
- name: "Build (Installer)"
5354
working-directory: ${{ github.workspace }}/build
5455
run: |
5556
cmake -G "Visual Studio 17 2022" ..
5657
cmake --build . --config Release
58+
- name: "Build (Portable)"
59+
working-directory: ${{ github.workspace }}/build-portable
60+
run: |
61+
cmake -G "Visual Studio 17 2022" -DBUILD_AS_PORTABLE=ON ..
62+
cmake --build . --config Release
5763
- name: "Create Installer"
5864
working-directory: ${{github.workspace}}/inno
5965
shell: pwsh
@@ -62,8 +68,20 @@ jobs:
6268
Invoke-WebRequest https://aka.ms/vs/17/release/vc_redist.${{ matrix.variant.arch }}.exe -OutFile vc_redist.exe
6369
Invoke-WebRequest https://aka.ms/windowsappsdk/1.7/latest/windowsappruntimeinstall-${{ matrix.variant.arch }}.exe -OutFile windowsappruntimeinstall.exe
6470
iscc setup.iss
65-
- name: Upload
71+
- name: "Create Portable"
72+
working-directory: ${{ github.workspace }}/build-portable/org.nickvision.application.winui/Release
73+
shell: pwsh
74+
run: |
75+
$ProgressPreference = 'SilentlyContinue'
76+
Invoke-WebRequest https://aka.ms/vs/17/release/vc_redist.${{ matrix.variant.arch }}.exe -OutFile vc_redist.exe
77+
Invoke-WebRequest https://aka.ms/windowsappsdk/1.7/latest/windowsappruntimeinstall-${{ matrix.variant.arch }}.exe -OutFile windowsappruntimeinstall.exe
78+
- name: "Upload (Installer)"
6679
uses: actions/upload-artifact@v4
6780
with:
6881
path: ${{ github.workspace }}/inno/NickvisionApplicationSetup.exe
69-
name: Windows-${{ matrix.variant.arch }}-Release
82+
name: Windows-${{ matrix.variant.arch }}-Installer
83+
- name: "Upload (Portable)"
84+
uses: actions/upload-artifact@v4
85+
with:
86+
path: ${{ github.workspace }}/build-portable/org.nickvision.application.winui/Release
87+
name: Windows-${{ matrix.variant.arch }}-Portable

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ The recommendation is to (and below commands will) use vcpkg to pull these depen
5151
1. From the `build` folder, run `cmake .. -G "Visual Studio 17 2022"`.
5252
1. From the `build` folder, run `cmake --build . --config Release`.
5353
1. After these commands complete, Application will be successfully built and its binaries can be found in the `org.nickvision.application.winui/Release` folder of the `build` folder.
54+
#### Windows (Portable)
55+
1. From the `build` folder, run `cmake .. -G "Visual Studio 17 2022" -DBUILD_AS_PORTABLE=ON`.
56+
1. From the `build` folder, run `cmake --build . --config Release`.
57+
1. After these commands complete, Application will be successfully built and its binaries can be found in the `org.nickvision.application.winui/Release` folder of the `build` folder.
5458
#### Linux
5559
1. From the `build` folder, run `cmake .. -DCMAKE_BUILD_TYPE=Release`.
5660
1. From the `build` folder, run `cmake --build .`.

flatpak/org.nickvision.application.json

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,24 @@
3636
}
3737
]
3838
},
39+
{
40+
"name": "cpr",
41+
"buildsystem": "cmake-ninja",
42+
"builddir": true,
43+
"config-opts": [
44+
"-DCMAKE_BUILD_TYPE=Release",
45+
"-DCPR_BUILD_TESTS=OFF",
46+
"-DCPR_USE_SYSTEM_CURL=ON",
47+
"-DCPR_ENABLE_SSL=ON"
48+
],
49+
"sources": [
50+
{
51+
"type": "git",
52+
"url": "https://github.com/libcpr/cpr",
53+
"commit": "93a325cd5496c79d1783c22041985fe5d27ac965"
54+
}
55+
]
56+
},
3957
{
4058
"name": "maddy",
4159
"buildsystem": "simple",
@@ -97,7 +115,7 @@
97115
{
98116
"type": "git",
99117
"url": "https://github.com/nickvisionapps/libnick",
100-
"tag": "2025.6.5"
118+
"tag": "2025.7.0"
101119
}
102120
]
103121
},

libapplication/CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
if(WIN32)
2-
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
2+
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
3+
if(BUILD_AS_PORTABLE)
4+
add_definitions(-DPORTABLE_BUILD)
5+
endif()
36
endif()
47

58
add_library(libapplication

libapplication/include/models/configuration.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ namespace Nickvision::Application::Shared::Models
1818
* @brief Constructs a Configuration.
1919
* @param key The key to pass to the DataFileBase
2020
* @param appName The appName to pass to the DataFileBase
21+
* @param isPortable The isPortable to pass to the DataFileBase
2122
*/
22-
Configuration(const std::string& key, const std::string& appName);
23+
Configuration(const std::string& key, const std::string& appName, bool isPortable);
2324
/**
2425
* @brief Gets the preferred theme for the application.
2526
* @return The preferred theme
@@ -53,4 +54,4 @@ namespace Nickvision::Application::Shared::Models
5354
};
5455
}
5556

56-
#endif //CONFIGURATION_H
57+
#endif //CONFIGURATION_H

libapplication/src/controllers/mainwindowcontroller.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@ namespace Nickvision::Application::Shared::Controllers
2323
: m_started{ false },
2424
m_args{ args },
2525
m_appInfo{ "org.nickvision.application", "Nickvision Application", "Application" },
26-
m_dataFileManager{ m_appInfo.getName() }
26+
#ifdef PORTABLE_BUILD
27+
m_dataFileManager{ m_appInfo.getName(), true }
28+
#else
29+
m_dataFileManager{ m_appInfo.getName(), false }
30+
#endif
2731
{
2832
m_appInfo.setVersion({ "2025.7.0-next" });
2933
m_appInfo.setShortName(_("Application"));

libapplication/src/models/configuration.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ using namespace Nickvision::System;
66

77
namespace Nickvision::Application::Shared::Models
88
{
9-
Configuration::Configuration(const std::string& key, const std::string& appName)
10-
: DataFileBase{ key, appName }
9+
Configuration::Configuration(const std::string& key, const std::string& appName, bool isPortable)
10+
: DataFileBase{ key, appName, isPortable }
1111
{
1212

1313
}

resources/po/application.pot

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: PACKAGE VERSION\n"
1010
"Report-Msgid-Bugs-To: \n"
11-
"POT-Creation-Date: 2025-06-21 11:07-0400\n"
11+
"POT-Creation-Date: 2025-07-12 19:19-0400\n"
1212
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1313
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1414
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -18,80 +18,80 @@ msgstr ""
1818
"Content-Transfer-Encoding: 8bit\n"
1919
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
2020

21-
#: libapplication/src/controllers/mainwindowcontroller.cpp:29
21+
#: libapplication/src/controllers/mainwindowcontroller.cpp:33
2222
msgid "Application"
2323
msgstr ""
2424

25-
#: libapplication/src/controllers/mainwindowcontroller.cpp:30
25+
#: libapplication/src/controllers/mainwindowcontroller.cpp:34
2626
msgid "Create new Nickvision applications"
2727
msgstr ""
2828

29-
#: libapplication/src/controllers/mainwindowcontroller.cpp:35
29+
#: libapplication/src/controllers/mainwindowcontroller.cpp:39
3030
msgid "Matrix Chat"
3131
msgstr ""
3232

33-
#: libapplication/src/controllers/mainwindowcontroller.cpp:37
33+
#: libapplication/src/controllers/mainwindowcontroller.cpp:41
3434
msgid "Contributors on GitHub"
3535
msgstr ""
3636

37-
#: libapplication/src/controllers/mainwindowcontroller.cpp:39
37+
#: libapplication/src/controllers/mainwindowcontroller.cpp:43
3838
msgid "Fyodor Sobolev"
3939
msgstr ""
4040

41-
#: libapplication/src/controllers/mainwindowcontroller.cpp:41
41+
#: libapplication/src/controllers/mainwindowcontroller.cpp:45
4242
msgid "David Lapshin"
4343
msgstr ""
4444

45-
#: libapplication/src/controllers/mainwindowcontroller.cpp:42
45+
#: libapplication/src/controllers/mainwindowcontroller.cpp:46
4646
msgid "translator-credits"
4747
msgstr ""
4848

49-
#: libapplication/src/controllers/mainwindowcontroller.cpp:142
49+
#: libapplication/src/controllers/mainwindowcontroller.cpp:146
5050
msgid "New update available"
5151
msgstr ""
5252

53-
#: libapplication/src/controllers/mainwindowcontroller.cpp:146
54-
#: libapplication/src/controllers/mainwindowcontroller.cpp:151
53+
#: libapplication/src/controllers/mainwindowcontroller.cpp:150
54+
#: libapplication/src/controllers/mainwindowcontroller.cpp:155
5555
msgid "No update available"
5656
msgstr ""
5757

58-
#: libapplication/src/controllers/mainwindowcontroller.cpp:164
58+
#: libapplication/src/controllers/mainwindowcontroller.cpp:168
5959
msgid ""
6060
"The update is downloading in the background and will start once it finishes"
6161
msgstr ""
6262

63-
#: libapplication/src/controllers/mainwindowcontroller.cpp:169
63+
#: libapplication/src/controllers/mainwindowcontroller.cpp:173
6464
msgid "Unable to download and install update"
6565
msgstr ""
6666

67-
#: libapplication/src/controllers/mainwindowcontroller.cpp:182
67+
#: libapplication/src/controllers/mainwindowcontroller.cpp:186
6868
msgctxt "Night"
6969
msgid "Good Morning!"
7070
msgstr ""
7171

72-
#: libapplication/src/controllers/mainwindowcontroller.cpp:186
72+
#: libapplication/src/controllers/mainwindowcontroller.cpp:190
7373
msgctxt "Morning"
7474
msgid "Good Morning!"
7575
msgstr ""
7676

77-
#: libapplication/src/controllers/mainwindowcontroller.cpp:190
77+
#: libapplication/src/controllers/mainwindowcontroller.cpp:194
7878
msgid "Good Afternoon!"
7979
msgstr ""
8080

81-
#: libapplication/src/controllers/mainwindowcontroller.cpp:194
81+
#: libapplication/src/controllers/mainwindowcontroller.cpp:198
8282
msgid "Good Evening!"
8383
msgstr ""
8484

85-
#: libapplication/src/controllers/mainwindowcontroller.cpp:196
85+
#: libapplication/src/controllers/mainwindowcontroller.cpp:200
8686
msgid "Good Day!"
8787
msgstr ""
8888

89-
#: libapplication/src/controllers/mainwindowcontroller.cpp:239
89+
#: libapplication/src/controllers/mainwindowcontroller.cpp:243
9090
#, c++-format
9191
msgid "Folder Opened: {}"
9292
msgstr ""
9393

94-
#: libapplication/src/controllers/mainwindowcontroller.cpp:254
94+
#: libapplication/src/controllers/mainwindowcontroller.cpp:258
9595
msgid "Folder closed"
9696
msgstr ""
9797

resources/po/ru.po

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: PACKAGE VERSION\n"
99
"Report-Msgid-Bugs-To: \n"
10-
"POT-Creation-Date: 2025-06-21 11:07-0400\n"
10+
"POT-Creation-Date: 2025-07-12 19:19-0400\n"
1111
"PO-Revision-Date: 2023-05-23 06:33+0300\n"
1212
"Last-Translator: Fyodor Sobolev\n"
1313
"Language-Team: Russian\n"
@@ -18,81 +18,81 @@ msgstr ""
1818
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
1919
"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
2020

21-
#: libapplication/src/controllers/mainwindowcontroller.cpp:29
21+
#: libapplication/src/controllers/mainwindowcontroller.cpp:33
2222
msgid "Application"
2323
msgstr "Application"
2424

25-
#: libapplication/src/controllers/mainwindowcontroller.cpp:30
25+
#: libapplication/src/controllers/mainwindowcontroller.cpp:34
2626
msgid "Create new Nickvision applications"
2727
msgstr "Создавайте новые приложения Nickvision"
2828

29-
#: libapplication/src/controllers/mainwindowcontroller.cpp:35
29+
#: libapplication/src/controllers/mainwindowcontroller.cpp:39
3030
msgid "Matrix Chat"
3131
msgstr "Чат Matrix"
3232

33-
#: libapplication/src/controllers/mainwindowcontroller.cpp:37
33+
#: libapplication/src/controllers/mainwindowcontroller.cpp:41
3434
#, fuzzy
3535
msgid "Contributors on GitHub"
3636
msgstr "Соавторы на GitHub ❤️"
3737

38-
#: libapplication/src/controllers/mainwindowcontroller.cpp:39
38+
#: libapplication/src/controllers/mainwindowcontroller.cpp:43
3939
msgid "Fyodor Sobolev"
4040
msgstr "Фёдор Соболев"
4141

42-
#: libapplication/src/controllers/mainwindowcontroller.cpp:41
42+
#: libapplication/src/controllers/mainwindowcontroller.cpp:45
4343
msgid "David Lapshin"
4444
msgstr "Давид Лапшин"
4545

46-
#: libapplication/src/controllers/mainwindowcontroller.cpp:42
46+
#: libapplication/src/controllers/mainwindowcontroller.cpp:46
4747
msgid "translator-credits"
4848
msgstr "Фёдор Соболев https://github.com/fsobolev"
4949

50-
#: libapplication/src/controllers/mainwindowcontroller.cpp:142
50+
#: libapplication/src/controllers/mainwindowcontroller.cpp:146
5151
msgid "New update available"
5252
msgstr ""
5353

54-
#: libapplication/src/controllers/mainwindowcontroller.cpp:146
55-
#: libapplication/src/controllers/mainwindowcontroller.cpp:151
54+
#: libapplication/src/controllers/mainwindowcontroller.cpp:150
55+
#: libapplication/src/controllers/mainwindowcontroller.cpp:155
5656
msgid "No update available"
5757
msgstr ""
5858

59-
#: libapplication/src/controllers/mainwindowcontroller.cpp:164
59+
#: libapplication/src/controllers/mainwindowcontroller.cpp:168
6060
msgid ""
6161
"The update is downloading in the background and will start once it finishes"
6262
msgstr ""
6363

64-
#: libapplication/src/controllers/mainwindowcontroller.cpp:169
64+
#: libapplication/src/controllers/mainwindowcontroller.cpp:173
6565
msgid "Unable to download and install update"
6666
msgstr ""
6767

68-
#: libapplication/src/controllers/mainwindowcontroller.cpp:182
68+
#: libapplication/src/controllers/mainwindowcontroller.cpp:186
6969
msgctxt "Night"
7070
msgid "Good Morning!"
7171
msgstr "Доброй ночи!"
7272

73-
#: libapplication/src/controllers/mainwindowcontroller.cpp:186
73+
#: libapplication/src/controllers/mainwindowcontroller.cpp:190
7474
msgctxt "Morning"
7575
msgid "Good Morning!"
7676
msgstr "Доброе утро!"
7777

78-
#: libapplication/src/controllers/mainwindowcontroller.cpp:190
78+
#: libapplication/src/controllers/mainwindowcontroller.cpp:194
7979
msgid "Good Afternoon!"
8080
msgstr "Добрый день!"
8181

82-
#: libapplication/src/controllers/mainwindowcontroller.cpp:194
82+
#: libapplication/src/controllers/mainwindowcontroller.cpp:198
8383
msgid "Good Evening!"
8484
msgstr "Добрый вечер!"
8585

86-
#: libapplication/src/controllers/mainwindowcontroller.cpp:196
86+
#: libapplication/src/controllers/mainwindowcontroller.cpp:200
8787
msgid "Good Day!"
8888
msgstr "Здравствуйте!"
8989

90-
#: libapplication/src/controllers/mainwindowcontroller.cpp:239
90+
#: libapplication/src/controllers/mainwindowcontroller.cpp:243
9191
#, fuzzy, c++-format
9292
msgid "Folder Opened: {}"
9393
msgstr "Папка открыта: {0}"
9494

95-
#: libapplication/src/controllers/mainwindowcontroller.cpp:254
95+
#: libapplication/src/controllers/mainwindowcontroller.cpp:258
9696
#, fuzzy
9797
msgid "Folder closed"
9898
msgstr "Папка закрыта."

0 commit comments

Comments
 (0)