Skip to content

Commit

Permalink
activate advanced package set
Browse files Browse the repository at this point in the history
  • Loading branch information
edocevoli committed Mar 29, 2022
1 parent c820fab commit 5bfe728
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 23 deletions.
8 changes: 8 additions & 0 deletions Libraries/MiKTeX/Setup/SetupService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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\""
Expand Down Expand Up @@ -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)
{
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions Libraries/MiKTeX/Setup/version.cmake
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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)
16 changes: 8 additions & 8 deletions Programs/MiKTeX/Setup/MFC/PackageSetPage.cpp
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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) :
Expand All @@ -41,7 +41,7 @@ BOOL PackageSetPage::OnInitDialog()
sheet = reinterpret_cast<SetupWizard *>(GetParent());
switch (SetupApp::Instance->GetPackageLevel())
{
case PackageLevel::Basic:
case PackageLevel::Advanced:
packageSet = 0;
break;
case PackageLevel::Complete:
Expand All @@ -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()
Expand Down Expand Up @@ -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);
}
6 changes: 3 additions & 3 deletions Programs/MiKTeX/Setup/MFC/PackageSetPage.h
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions Programs/MiKTeX/Setup/MFC/Setup-version.h
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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"
Expand Down
1 change: 0 additions & 1 deletion Programs/MiKTeX/Setup/MFC/Setup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions Programs/MiKTeX/Setup/MFC/Setup.rc.in
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions Programs/MiKTeX/Setup/MFC/resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5bfe728

Please sign in to comment.