Compare commits

...

5 Commits

Author SHA1 Message Date
Hleb Valoshka 465fbf3277
skip spice2xyzv 2022-01-27 13:51:31 +03:00
Hleb Valoshka f2004da817 debug 2022-01-26 19:11:06 +02:00
Hleb Valoshka 8704bb7c21 disable cspice 2022-01-26 19:08:06 +02:00
Hleb Valoshka 845b4ef930 [ci] Don't install cspice while vcpkg package is broken 2022-01-20 20:20:04 +02:00
Hleb Valoshka c13ea716a0 test 2022-01-18 23:12:42 +02:00
2 changed files with 21 additions and 14 deletions

View File

@ -45,7 +45,7 @@ jobs:
-password "${{ secrets.GITHUB_TOKEN }}"
- name: 'Install dependencies'
run: vcpkg --triplet=${{matrix.platform}}-windows install --recurse libpng libjpeg-turbo gettext luajit fmt libepoxy eigen3 freetype cspice qt5-base
run: vcpkg --triplet=${{matrix.platform}}-windows install --recurse libpng libjpeg-turbo gettext luajit fmt libepoxy eigen3 freetype qt5-base
- name: 'Checkout source code'
uses: actions/checkout@v2
@ -53,7 +53,7 @@ jobs:
submodules: true
- name: 'Configure CMake'
run: cmake -B ${{github.workspace}}/build -DCMAKE_TOOLCHAIN_FILE=c:/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=${{matrix.platform}}-windows -DCMAKE_GENERATOR_PLATFORM=${{matrix.generator_platform}} -DENABLE_SPICE=ON -DENABLE_TOOLS=ON -DENABLE_TESTS=ON -DENABLE_SDL=OFF -DENABLE_QT=ON
run: cmake -B ${{github.workspace}}/build -DCMAKE_TOOLCHAIN_FILE=c:/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=${{matrix.platform}}-windows -DCMAKE_GENERATOR_PLATFORM=${{matrix.generator_platform}} -DENABLE_SPICE=OFF -DENABLE_TOOLS=ON -DENABLE_TESTS=ON -DENABLE_SDL=OFF -DENABLE_QT=ON
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -- /maxcpucount:2 /nologo
@ -76,7 +76,7 @@ jobs:
c:\vcpkg\ports\qt5-base\qtdeploy.ps1 qt\${{env.BUILD_TYPE}}\
7z a celestia-qt.${{matrix.platform}}.7z qt\${{env.BUILD_TYPE}}\*
cd ..\tools
7z a celestia-tools.${{matrix.platform}}.7z xyzv2bin\${{env.BUILD_TYPE}}\*.exe spice2xyzv\${{env.BUILD_TYPE}}\*.exe
7z a celestia-tools.${{matrix.platform}}.7z xyzv2bin\${{env.BUILD_TYPE}}\*.exe
- name: Upload artifacts
uses: actions/upload-artifact@v2

View File

@ -3235,21 +3235,28 @@ int APIENTRY WinMain(HINSTANCE hInstance,
setlocale(LC_ALL, "");
setlocale(LC_NUMERIC, "C");
#ifdef ENABLE_NLS
bindtextdomain("celestia", "locale");
std::cout << bindtextdomain("celestia", LOCALEDIR);
std::cout << '\n';
bind_textdomain_codeset("celestia", "UTF-8");
bindtextdomain("celestia-data", "locale");
std::cout << bindtextdomain("celestia-data", LOCALEDIR);
std::cout << '\n';
bind_textdomain_codeset("celestia-data", "UTF-8");
textdomain("celestia");
std::cout << textdomain("celestia");
std::cout << '\n';
// Loading localized resources
char res[255];
sprintf(res, "locale\\res_%s.dll", _("LANGUAGE"));
int langID = 0;
if (sscanf(_("WinLangID"), "%x", &langID) == 1)
SetThreadLocale(langID);
if ((hRes = LoadLibrary(res)) == NULL) {
cout << "Couldn't load localized resources: "<< res<< "\n";
hRes = hInstance;
if (_("LANGUAGE") != "LANGUAGE")
{
char res[255];
sprintf(res, "locale\\res_%s.dll", _("LANGUAGE"));
int langID = 0;
if (sscanf(_("WinLangID"), "%x", &langID) == 1)
SetThreadLocale(langID);
if ((hRes = LoadLibrary(res)) == NULL)
{
cout << "Couldn't load localized resources: "<< res << "\n";
hRes = hInstance;
}
}
#endif