From 5bfe728ef47cd31b6882a5b70c9a9bfac1f2641b Mon Sep 17 00:00:00 2001 From: Christian Schenk Date: Tue, 29 Mar 2022 13:22:26 +0200 Subject: [PATCH] activate advanced package set --- Libraries/MiKTeX/Setup/SetupService.cpp | 8 ++++++++ Libraries/MiKTeX/Setup/version.cmake | 4 ++-- Programs/MiKTeX/Setup/MFC/PackageSetPage.cpp | 16 ++++++++-------- Programs/MiKTeX/Setup/MFC/PackageSetPage.h | 6 +++--- Programs/MiKTeX/Setup/MFC/Setup-version.h | 4 ++-- Programs/MiKTeX/Setup/MFC/Setup.cpp | 1 - Programs/MiKTeX/Setup/MFC/Setup.rc.in | 10 +++++----- Programs/MiKTeX/Setup/MFC/resource.h | 4 ++-- 8 files changed, 30 insertions(+), 23 deletions(-) diff --git a/Libraries/MiKTeX/Setup/SetupService.cpp b/Libraries/MiKTeX/Setup/SetupService.cpp index b972c3b618..2079896b14 100644 --- a/Libraries/MiKTeX/Setup/SetupService.cpp +++ b/Libraries/MiKTeX/Setup/SetupService.cpp @@ -44,6 +44,7 @@ using namespace MiKTeX::Util; #define LICENSE_FILE "LICENSE.TXT" #define DOWNLOAD_INFO_FILE "README.TXT" +#define ADVANCED_MIKTEX "\"Advanced MiKTeX\"" #define BASIC_MIKTEX "\"Basic MiKTeX\"" #define BASIC_MIKTEX_LEGACY "\"Small MiKTeX\"" #define COMPLETE_MIKTEX "\"Complete MiKTeX\"" @@ -284,6 +285,10 @@ PackageLevel SetupService::TestLocalRepository(const PathName& pathRepository, P { packageLevel_ = PackageLevel::Basic; } + else if (firstLine.find(ADVANCED_MIKTEX) != string::npos) + { + packageLevel_ = PackageLevel::Advanced; + } else if (firstLine.find(COMPLETE_MIKTEX) != string::npos || firstLine.find(COMPLETE_MIKTEX_LEGACY) != string::npos) { @@ -1599,6 +1604,9 @@ void SetupServiceImpl::CreateInfoFile() const char* lpszPackageSet; switch (options.PackageLevel) { + case PackageLevel::Advanced: + lpszPackageSet = ADVANCED_MIKTEX; + break; case PackageLevel::Essential: lpszPackageSet = ESSENTIAL_MIKTEX; break; diff --git a/Libraries/MiKTeX/Setup/version.cmake b/Libraries/MiKTeX/Setup/version.cmake index f46420c405..2e43746907 100644 --- a/Libraries/MiKTeX/Setup/version.cmake +++ b/Libraries/MiKTeX/Setup/version.cmake @@ -1,6 +1,6 @@ ## version.cmake: ## -## Copyright (C) 2017-2021 Christian Schenk +## Copyright (C) 2017-2022 Christian Schenk ## ## This file is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published @@ -20,5 +20,5 @@ set(MIKTEX_COMP_INTERFACE_VERSION 6) set(MIKTEX_COMP_MAJOR_VERSION 5) -set(MIKTEX_COMP_MINOR_VERSION 0) +set(MIKTEX_COMP_MINOR_VERSION 1) set(MIKTEX_COMP_PATCH_VERSION 0) diff --git a/Programs/MiKTeX/Setup/MFC/PackageSetPage.cpp b/Programs/MiKTeX/Setup/MFC/PackageSetPage.cpp index ba95a774de..2a3f061261 100644 --- a/Programs/MiKTeX/Setup/MFC/PackageSetPage.cpp +++ b/Programs/MiKTeX/Setup/MFC/PackageSetPage.cpp @@ -1,6 +1,6 @@ /* PackageSet.cpp: - Copyright (C) 1999-2018 Christian Schenk + Copyright (C) 1999-2022 Christian Schenk This file is part of the MiKTeX Setup Wizard. @@ -27,8 +27,8 @@ #include "SetupWizard.h" BEGIN_MESSAGE_MAP(PackageSetPage, CPropertyPage) - ON_BN_CLICKED(IDC_SMALL, OnSmall) - ON_BN_CLICKED(IDC_TOTAL, OnTotal) + ON_BN_CLICKED(IDC_ADVANCED, OnAdvanced) + ON_BN_CLICKED(IDC_COMPLETE, OnComplete) END_MESSAGE_MAP(); PackageSetPage::PackageSetPage(bool download) : @@ -41,7 +41,7 @@ BOOL PackageSetPage::OnInitDialog() sheet = reinterpret_cast(GetParent()); switch (SetupApp::Instance->GetPackageLevel()) { - case PackageLevel::Basic: + case PackageLevel::Advanced: packageSet = 0; break; case PackageLevel::Complete: @@ -64,7 +64,7 @@ BOOL PackageSetPage::OnSetActive() void PackageSetPage::DoDataExchange(CDataExchange* dx) { CPropertyPage::DoDataExchange(dx); - DDX_Radio(dx, IDC_SMALL, packageSet); + DDX_Radio(dx, IDC_ADVANCED, packageSet); } LRESULT PackageSetPage::OnWizardNext() @@ -124,18 +124,18 @@ BOOL PackageSetPage::OnKillActive() if (ret) { SetupOptions options = SetupApp::Instance->Service->GetOptions(); - options.PackageLevel = (packageSet == 0 ? PackageLevel::Basic : PackageLevel::Complete); + options.PackageLevel = (packageSet == 0 ? PackageLevel::Advanced : PackageLevel::Complete); SetupApp::Instance->Service->SetOptions(options); } return ret; } -void PackageSetPage::OnSmall() +void PackageSetPage::OnAdvanced() { sheet->SetWizardButtons(PSWIZB_BACK | PSWIZB_NEXT); } -void PackageSetPage::OnTotal() +void PackageSetPage::OnComplete() { sheet->SetWizardButtons(PSWIZB_BACK | PSWIZB_NEXT); } diff --git a/Programs/MiKTeX/Setup/MFC/PackageSetPage.h b/Programs/MiKTeX/Setup/MFC/PackageSetPage.h index 0c051e527b..4e3fdad98a 100644 --- a/Programs/MiKTeX/Setup/MFC/PackageSetPage.h +++ b/Programs/MiKTeX/Setup/MFC/PackageSetPage.h @@ -1,6 +1,6 @@ /* PackageSetPage.h: -*- C++ -*- - Copyright (C) 1999-2018 Christian Schenk + Copyright (C) 1999-2022 Christian Schenk This file is part of the MiKTeX Setup Wizard. @@ -57,10 +57,10 @@ class PackageSetPage : BOOL OnKillActive() override; protected: - afx_msg void OnSmall(); + afx_msg void OnAdvanced(); protected: - afx_msg void OnTotal(); + afx_msg void OnComplete(); private: int packageSet = 0; diff --git a/Programs/MiKTeX/Setup/MFC/Setup-version.h b/Programs/MiKTeX/Setup/MFC/Setup-version.h index 607a254f4b..da384c8bd3 100644 --- a/Programs/MiKTeX/Setup/MFC/Setup-version.h +++ b/Programs/MiKTeX/Setup/MFC/Setup-version.h @@ -1,6 +1,6 @@ /* Setup-version.h: version information -*- C++ -*- - Copyright (C) 1999-2021 Christian Schenk + Copyright (C) 1999-2022 Christian Schenk This file is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published @@ -18,7 +18,7 @@ USA. */ #define MIKTEX_COMP_MAJOR_VERSION 5 -#define MIKTEX_COMP_MINOR_VERSION 0 +#define MIKTEX_COMP_MINOR_VERSION 1 #define MIKTEX_COMP_PATCH_VERSION 0 #define MIKTEX_COMP_COPYRIGHT_STR "© 1999-2021 Christian Schenk" diff --git a/Programs/MiKTeX/Setup/MFC/Setup.cpp b/Programs/MiKTeX/Setup/MFC/Setup.cpp index 4da3624c52..a823e684f1 100644 --- a/Programs/MiKTeX/Setup/MFC/Setup.cpp +++ b/Programs/MiKTeX/Setup/MFC/Setup.cpp @@ -210,7 +210,6 @@ const struct option long_options[] = { "local-package-repository", required_argument, 0, OPT_LOCAL_PACKAGE_REPOSITORY }, { "no-additional-roots", no_argument, 0, OPT_NO_ADDITIONAL_ROOTS }, { "no-registry", no_argument, 0, OPT_NO_REGISTRY }, - { "package-set", required_argument, 0, OPT_PACKAGE_SET }, #if FEATURE_1874934 { "paper-size", required_argument, 0, OPT_PAPER_SIZE }, #endif diff --git a/Programs/MiKTeX/Setup/MFC/Setup.rc.in b/Programs/MiKTeX/Setup/MFC/Setup.rc.in index f3e9f292d5..cad1f5b9c6 100644 --- a/Programs/MiKTeX/Setup/MFC/Setup.rc.in +++ b/Programs/MiKTeX/Setup/MFC/Setup.rc.in @@ -204,8 +204,8 @@ IDD_PACKAGE_SET_INSTALL DIALOGEX 0, 0, 317, 143 STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU FONT 8, "MS Sans Serif", 0, 0, 0x0 BEGIN - CONTROL "&Basic MiKTeX",IDC_SMALL,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,21,1,275,10 - CONTROL "&Complete MiKTeX",IDC_TOTAL,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,21,34,275,10 + CONTROL "&Advanced MiKTeX",IDC_ADVANCED,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,21,1,275,10 + CONTROL "&Complete MiKTeX",IDC_COMPLETE,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,21,34,275,10 LTEXT "This is the recommended option. MiKTeX can be configured to install missing files automatically (in the course of use).",IDC_STATIC,46,14,250,16 END @@ -243,9 +243,9 @@ IDD_PACKAGE_SET_DOWNLOAD DIALOGEX 0, 0, 317, 143 STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU FONT 8, "MS Sans Serif", 0, 0, 0x0 BEGIN - CONTROL "&Basic MiKTeX",IDC_SMALL,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,21,1,275,10 - CONTROL "&Complete MiKTeX",IDC_TOTAL,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,21,50,275,10 - LTEXT "A directory will be created which contains the basic MiKTeX distribution.",IDC_STATIC,46,15,250,8 + CONTROL "&Advanced MiKTeX",IDC_ADVANCED,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,21,1,275,10 + CONTROL "&Complete MiKTeX",IDC_COMPLETE,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,21,50,275,10 + LTEXT "A directory will be created which contains the advanced MiKTeX distribution.",IDC_STATIC,46,15,250,8 LTEXT "This is the recommended option. MiKTeX can be configured to install missing packages automatically (in the course of use).",IDC_STATIC,46,27,250,16 LTEXT "A directory will be created which contains the complete MiKTeX distribution.",IDC_STATIC,46,64,250,8 LTEXT "Don't use this option unless you have a fast and reliable Internet connection.",IDC_STATIC,46,76,250,16 diff --git a/Programs/MiKTeX/Setup/MFC/resource.h b/Programs/MiKTeX/Setup/MFC/resource.h index f220789eea..62ec269b0e 100644 --- a/Programs/MiKTeX/Setup/MFC/resource.h +++ b/Programs/MiKTeX/Setup/MFC/resource.h @@ -83,9 +83,9 @@ #define IDC_ANI 1031 #define IDC_MESSAGE 1032 #define IDC_INSTALL_FROM_LOCAL_REPOSITORY 1033 -#define IDC_SMALL 1034 +#define IDC_ADVANCED 1034 #define IDC_INSTALL_FROM_REMOTE_REPOSITORY 1035 -#define IDC_TOTAL 1036 +#define IDC_COMPLETE 1036 #define IDC_ETA 1037 #define IDC_ETA_TITLE 1038 #define IDC_CHECK 1038