Minimalist build configuration; move toon to keyconfig

This commit is contained in:
nastys
2021-09-18 00:54:54 +02:00
parent db08f988e9
commit 860302a119
20 changed files with 640 additions and 114 deletions
@@ -5,6 +5,10 @@
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Minimalist|x64">
<Configuration>Minimalist</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
@@ -34,6 +38,13 @@
<CLRSupport>true</CLRSupport>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Minimalist|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<CLRSupport>true</CLRSupport>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
@@ -45,6 +56,9 @@
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Minimalist|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
@@ -55,6 +69,11 @@
<TargetExt>.dva</TargetExt>
<TargetName>$(ProjectName)</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Minimalist|x64'">
<LinkIncremental>false</LinkIncremental>
<TargetExt>.dva</TargetExt>
<TargetName>$(ProjectName)</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
@@ -97,6 +116,27 @@
<AdditionalOptions>-d2:-FH4- %(AdditionalOptions)</AdditionalOptions>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Minimalist|x64'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PrecompiledHeaderFile>
</PrecompiledHeaderFile>
<WarningLevel>Level3</WarningLevel>
<PreprocessorDefinitions>MINIMALIST;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..\..\dependencies\simpleini;..\..\..\dependencies\WineVer;..\..\..\dependencies\GPUModel;..\..\..\dependencies\PluginConfigApi;..\..\..\dependencies\freeglut\include;..\..\..\dependencies\detours\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<LanguageStandard>stdcpp17</LanguageStandard>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<AdditionalOptions>-d2FH4- /utf-8 %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<AdditionalDependencies>User32.lib</AdditionalDependencies>
<SubSystem>Windows</SubSystem>
<EntryPointSymbol>
</EntryPointSymbol>
<AdditionalLibraryDirectories>..\..\..\dependencies\detours\lib;..\..\..\dependencies\freeglut\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalOptions>-d2:-FH4- %(AdditionalOptions)</AdditionalOptions>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="dllmain.cpp" />
<ClCompile Include="i18n.h" />
@@ -65,7 +65,9 @@ LPCWSTR KEYCONFIG_SECTION = L"keyconfig";
int nSkipLauncher = GetPrivateProfileIntW(LAUNCHER_SECTION, L"skip", FALSE, CONFIG_FILE);
int nNoGPUDialog = GetPrivateProfileIntW(LAUNCHER_SECTION, L"no_gpu_dialog", FALSE, CONFIG_FILE);
#ifndef MINIMALIST
int nLanguage = GetPrivateProfileIntW(LAUNCHER_SECTION, L"launcher_language", FALSE, CONFIG_FILE);
#endif
std::vector<LPCWSTR> languages = std::vector<LPCWSTR>({ L"LANG_AUTO", L"en", L"zh-Hans", L"pt-BR", L"it-IT"});
@@ -184,6 +186,7 @@ ConfigOptionBase* graphicsArray[] = {
new DropdownOption(L"model", L"GPU", CONFIG_FILE, L"MODEL_NAME", L"MODEL_HINT", -1, std::vector<LPCWSTR>({ L"MODEL_AUTOMATIC", L"Kepler", L"Maxwell", L"Turing", L"Ampere" }), -1),
new BooleanOption(L"TAA", GRAPHICS_SECTION, CONFIG_FILE, L"TAA_NAME", L"TAA_HINT", true, false),
new BooleanOption(L"MLAA", GRAPHICS_SECTION, CONFIG_FILE, L"MLAA_NAME", L"MLAA_HINT", true, false),
#ifndef MINIMALIST
new DropdownOption(L"MAG", GRAPHICS_SECTION, CONFIG_FILE, L"MAG_NAME", L"MAG_HINT", 0, std::vector<LPCWSTR>({ L"MAG_BILINEAR", L"MAG_NEAREST", L"MAG_SHARPEN", L"MAG_CONE" })),
new BooleanOption(L"DOF", GRAPHICS_SECTION, CONFIG_FILE, L"DOF_NAME", L"DOF_HINT", true, false),
new BooleanOption(L"reflections", GRAPHICS_SECTION, CONFIG_FILE, L"REFLECTIONS_NAME", L"REFLECTIONS_HINT", true, false),
@@ -196,6 +199,7 @@ ConfigOptionBase* graphicsArray[] = {
new BooleanOption(L"shader", GRAPHICS_SECTION, CONFIG_FILE, L"SHADER_NAME", L"SHADER_HINT", true, false),
new DropdownOption(L"NPR1", GRAPHICS_SECTION, CONFIG_FILE, L"NPR1_NAME", L"NPR1_HINT", 0, std::vector<LPCWSTR>({ L"Default", L"Force on", L"Force off" })),
new BooleanOption(L"2D", GRAPHICS_SECTION, CONFIG_FILE, L"2D_NAME", L"2D_HINT", false, false),
#endif
};
ConfigOptionBase* optionsArray[] = {
@@ -209,8 +213,10 @@ ConfigOptionBase* optionsArray[] = {
new OptionMetaSectionLabel(L"SECTION_COMPATIBILITY"),
new BooleanOption(L"no_movies", PATCHES_SECTION, CONFIG_FILE, L"NO_MOVIES_NAME", L"NO_MOVIES_HINT", false, false),
new BooleanOption(L"stereo", PATCHES_SECTION, CONFIG_FILE, L"STEREO_NAME", L"STEREO_HINT", true, false),
#ifndef MINIMALIST
new BooleanOption(L"prevent_data_deletion", PATCHES_SECTION, CONFIG_FILE, L"PREVENT_DATA_DELETION_NAME", L"PREVENT_DATA_DELETION_HINT", false, false),
new BooleanOption(L"no_opd", PATCHES_SECTION, CONFIG_FILE, L"NO_OPD_NAME", L"NO_OPD_HINT", false, false),
#endif
new OptionMetaSeparator(),
new OptionMetaSpacer(8),
@@ -231,27 +237,37 @@ ConfigOptionBase* optionsArray[] = {
new OptionMetaSpacer(8),
new OptionMetaSectionLabel(L"SECTION_LAUNCHER"),
#ifndef MINIMALIST
new DropdownOption(L"launcher_language",LAUNCHER_SECTION,CONFIG_FILE, L"LAUNCHER_LANGUAGE_NAME",L"LAUNCHER_LANGUAGE_HINT", 0, languages),
new BooleanOption(L"dark_launcher", LAUNCHER_SECTION, CONFIG_FILE, L"DARK_LAUNCHER_NAME", L"DARK_LAUNCHER_HINT", false, false),
//new BooleanOption(L"acrylic_blur", LAUNCHER_SECTION, CONFIG_FILE, L"ACRYLIC_BLUR_NAME", L"ACRYLIC_BLUR_HINT", false, false),
#endif
new BooleanOption(L"no_gpu_dialog", LAUNCHER_SECTION, CONFIG_FILE, L"NO_GPU_DIALOG_NAME", L"NO_GPU_DIALOG_HINT", false, false),
#ifndef MINIMALIST
new BooleanOption(L"use_divahook_bat", LAUNCHER_SECTION, CONFIG_FILE, L"USE_DIVAHOOK_BAT_NAME", L"USE_DIVAHOOK_BAT_HINT", false, false),
#endif
new StringOption(L"command_line", LAUNCHER_SECTION, CONFIG_FILE, L"COMMAND_LINE_NAME", L"COMMAND_LINE_HINT", L"", false),
};
ConfigOptionBase* options2Array[] = {
new OptionMetaSectionLabel(L"SECTION_PV_SELECTOR"),
#ifndef MINIMALIST
new DropdownOption(L"quick_start", PATCHES_SECTION, CONFIG_FILE, L"QUICK_START_NAME", L"QUICK_START_HINT", 1, std::vector<LPCWSTR>({ L"Disabled", L"Guest", L"Guest + Normal" })),
#endif
new BooleanOption(L"freeplay", PATCHES_SECTION, CONFIG_FILE, L"FREEPLAY_NAME", L"FREEPLAY_HINT", true, false),
#ifndef MINIMALIST
new BooleanOption(L"no_scrolling_sfx", PATCHES_SECTION, CONFIG_FILE, L"NO_SCROLLING_SFX_NAME", L"NO_SCROLLING_SFX_HINT", false, false),
new BooleanOption(L"unlock_pseudo", PATCHES_SECTION, CONFIG_FILE, L"UNLOCK_PSEUDO_NAME", L"UNLOCK_PSEUDO_HINT", false, false),
#endif
new OptionMetaSeparator(),
new OptionMetaSpacer(8),
new OptionMetaSectionLabel(L"SECTION_ESM"),
new NumericOption(L"Enhanced_Stage_Manager", PATCHES_SECTION, CONFIG_FILE, L"ENHANCED_STAGE_MANAGER_NAME", L"ENHANCED_STAGE_MANAGER_HINT", 0, 0, INT_MAX),
new BooleanOption(L"Enhanced_Stage_Manager_Encore", PATCHES_SECTION, CONFIG_FILE, L"ENHANCED_STAGE_MANAGER_ENCORE_NAME", L"ENHANCED_STAGE_MANAGER_ENCORE_HINT", true, false),
#ifndef MINIMALIST
new BooleanOption(L"sing_missed", PATCHES_SECTION, CONFIG_FILE, L"SING_MISSED_NAME", L"SING_MISSED_HINT", false, false),
#endif
new BooleanOption(L"autopause", KEYCONFIG_SECTION, KEYCONFIG_FILE, L"AUTOPAUSE_NAME", L"AUTOPAUSE_HINT", true, true),
new OptionMetaSeparator(),
new OptionMetaSpacer(8),
@@ -267,11 +283,14 @@ ConfigOptionBase* options2Array[] = {
new BooleanOption(L"hide_freeplay", PATCHES_SECTION, CONFIG_FILE, L"HIDE_FREEPLAY_NAME", L"HIDE_FREEPLAY_HINT", false, false),
new BooleanOption(L"pdloadertext", PATCHES_SECTION, CONFIG_FILE, L"PDLOADERTEXT_NAME", L"PDLOADERTEXT_HINT", true, false),
new BooleanOption(L"no_timer", PATCHES_SECTION, CONFIG_FILE, L"NO_TIMER_NAME", L"NO_TIMER_HINT", true, false),
#ifndef MINIMALIST
new BooleanOption(L"no_timer_sprite", PATCHES_SECTION, CONFIG_FILE, L"NO_TIMER_SPRITE_NAME", L"NO_TIMER_SPRITE_HINT", true, false),
new BooleanOption(L"no_message_bar", PATCHES_SECTION, CONFIG_FILE, L"NO_MESSAGE_BAR_NAME", L"NO_MESSAGE_BAR_HINT", false, false),
new BooleanOption(L"no_stage_text", PATCHES_SECTION, CONFIG_FILE, L"NO_STAGE_TEXT_NAME", L"NO_STAGE_TEXT_HINT", false, false),
new BooleanOption(L"card", PATCHES_SECTION, CONFIG_FILE, L"CARD_NAME", L"CARD_HINT", false, false),
#endif
new BooleanOption(L"dwgui_scaling", PATCHES_SECTION, CONFIG_FILE, L"DWGUI_SCALING_NAME", L"DWGUI_SCALING_HINT", false, false),
#ifndef MINIMALIST
new OptionMetaSeparator(),
new OptionMetaSpacer(8),
@@ -283,6 +302,7 @@ ConfigOptionBase* options2Array[] = {
new NumericOption(L"default_hand_size", PATCHES_SECTION, CONFIG_FILE, L"DEFAULT_HAND_SIZE_NAME", L"DEFAULT_HAND_SIZE_HINT", -1, -1, INT_MAX),
new OptionMetaSeparator(),
new OptionMetaSpacer(8),
#endif
};
ConfigOptionBase* playerdataArray[] = {
+39 -1
View File
@@ -36,7 +36,9 @@ namespace Launcher {
public:
ui(void)
{
#ifndef MINIMALIST
SetLanguage();
#endif
InitializeComponent();
@@ -228,7 +230,9 @@ namespace Launcher {
updateLagCompMsec();
#ifndef MINIMALIST
scanModpacks();
#endif
int window = glutCreateWindow("glut"); // a context must be created to use glGetString
@@ -427,21 +431,26 @@ namespace Launcher {
void updateStyle()
{
#ifndef MINIMALIST
int nDarkLauncher = GetPrivateProfileIntW(LAUNCHER_SECTION, L"dark_launcher", FALSE, CONFIG_FILE);
int nAcrylicLauncher = GetPrivateProfileIntW(LAUNCHER_SECTION, L"acrylic_blur", FALSE, CONFIG_FILE);
//int nAcrylicLauncher = GetPrivateProfileIntW(LAUNCHER_SECTION, L"acrylic_blur", FALSE, CONFIG_FILE);
#endif
//bool useAcrylic = nAcrylicLauncher && setBlur(hWnd, AccentState::ACCENT_ENABLE_ACRYLICBLURBEHIND);
Color colourBg, colourBg2, colourFg;
System::Windows::Forms::FlatStyle cbxStyle;
#ifndef MINIMALIST
if (nDarkLauncher)
{
#endif
setDarkTheme(hWnd);
colourFg = Color::White;
colourBg = Color::FromArgb(255, 32, 32, 32); // tabControl
colourBg2 = Color::FromArgb(255, 25, 25, 25);
cbxStyle = System::Windows::Forms::FlatStyle::Flat;
#ifndef MINIMALIST
}
else
{
@@ -451,6 +460,9 @@ namespace Launcher {
colourBg2 = Color::FromArgb(255, 242, 242, 242);
cbxStyle = System::Windows::Forms::FlatStyle::System;
}
#else
this->Text += (" - Minimalist Edition");
#endif
/*if (useAcrylic)
{
@@ -479,8 +491,10 @@ namespace Launcher {
this->tabPage_Plugins->ForeColor = colourFg;
this->tabPage_Components->BackColor = colourBg;
this->tabPage_Components->ForeColor = colourFg;
#ifndef MINIMALIST
this->tabPage_Modpacks->BackColor = colourBg;
this->tabPage_Modpacks->ForeColor = colourFg;
#endif
this->creditsTextBox->BackColor = colourBg;
this->creditsTextBox->ForeColor = colourFg;
this->tabPage_Update->BackColor = colourBg;
@@ -521,9 +535,12 @@ namespace Launcher {
SetBackCol(this->panel_Components, colourBg, cbxStyle);
SetBackCol(this->panel_Plugins, colourBg, cbxStyle);
#ifndef MINIMALIST
tabPage_Modpacks->Enabled = false;
#endif
}
#ifndef MINIMALIST
void updateLanguage() {
int language = GetPrivateProfileIntW(LAUNCHER_SECTION, L"launcher_language", FALSE, CONFIG_FILE);
if (nLanguage == language)
@@ -536,7 +553,9 @@ namespace Launcher {
this->InitializeComponent();
this->addOptions();
}
#endif
#ifndef MINIMALIST
void SetLanguage() {
if (nLanguage == 0) {
Thread::CurrentThread->CurrentUICulture = gcnew CultureInfo(GetUserDefaultLCID());
@@ -544,6 +563,7 @@ namespace Launcher {
Thread::CurrentThread->CurrentUICulture = CultureInfo::CreateSpecificCulture(gcnew String(languages[nLanguage]));
}
}
#endif
private:
@@ -595,6 +615,7 @@ private: System::Windows::Forms::LinkLabel^ linkLabel_Official_Discord;
private: System::Windows::Forms::LinkLabel^ linkLabel_Help;
private: System::Windows::Forms::LinkLabel^ linkLabel_Repo;
private: System::Windows::Forms::CheckBox^ checkBox_nofsopt;
#ifndef MINIMALIST
private: System::Windows::Forms::TabPage^ tabPage_Modpacks;
private: System::Windows::Forms::CheckBox^ checkBox_ModPatches;
private: System::Windows::Forms::Button^ button_ModDelete;
@@ -607,6 +628,7 @@ private: System::Windows::Forms::ListBox^ listBox_Mods;
private: System::Windows::Forms::Button^ button_ModFiles;
private: System::Windows::Forms::Button^ button_ModRescan;
private: System::Windows::Forms::Button^ button_ModRename;
#endif
private: System::Windows::Forms::LinkLabel^ linkLabel_Console;
private: System::Windows::Forms::Panel^ panel_Patches2;
private: System::Windows::Forms::FlowLayoutPanel^ flowLayoutPanel1;
@@ -673,6 +695,7 @@ private: System::Windows::Forms::FlowLayoutPanel^ flowLayoutPanel2;
this->tabPage_Plugins = (gcnew System::Windows::Forms::TabPage());
this->panel_Custom = (gcnew System::Windows::Forms::Panel());
this->panel_Plugins = (gcnew System::Windows::Forms::Panel());
#ifndef MINIMALIST
this->tabPage_Modpacks = (gcnew System::Windows::Forms::TabPage());
this->button_ModRename = (gcnew System::Windows::Forms::Button());
this->button_ModRescan = (gcnew System::Windows::Forms::Button());
@@ -682,6 +705,7 @@ private: System::Windows::Forms::FlowLayoutPanel^ flowLayoutPanel2;
this->button_ModClone = (gcnew System::Windows::Forms::Button());
this->button_ModSetActive = (gcnew System::Windows::Forms::Button());
this->listBox_Mods = (gcnew System::Windows::Forms::ListBox());
#endif
this->tabPage_Credits = (gcnew System::Windows::Forms::TabPage());
this->creditsTextBox = (gcnew System::Windows::Forms::TextBox());
this->tabPage_Update = (gcnew System::Windows::Forms::TabPage());
@@ -714,7 +738,9 @@ private: System::Windows::Forms::FlowLayoutPanel^ flowLayoutPanel2;
this->tabPage_Playerdata->SuspendLayout();
this->tabPage_Components->SuspendLayout();
this->tabPage_Plugins->SuspendLayout();
#ifndef MINIMALIST
this->tabPage_Modpacks->SuspendLayout();
#endif
this->tabPage_Credits->SuspendLayout();
this->tabPage_Update->SuspendLayout();
this->flowLayoutPanel1->SuspendLayout();
@@ -758,7 +784,9 @@ private: System::Windows::Forms::FlowLayoutPanel^ flowLayoutPanel2;
this->tabControl->Controls->Add(this->tabPage_Playerdata);
this->tabControl->Controls->Add(this->tabPage_Components);
this->tabControl->Controls->Add(this->tabPage_Plugins);
#ifndef MINIMALIST
this->tabControl->Controls->Add(this->tabPage_Modpacks);
#endif
this->tabControl->Controls->Add(this->tabPage_Credits);
this->tabControl->Controls->Add(this->tabPage_Update);
resources->ApplyResources(this->tabControl, L"tabControl");
@@ -903,6 +931,7 @@ private: System::Windows::Forms::FlowLayoutPanel^ flowLayoutPanel2;
//
resources->ApplyResources(this->panel_Plugins, L"panel_Plugins");
this->panel_Plugins->Name = L"panel_Plugins";
#ifndef MINIMALIST
//
// tabPage_Modpacks
//
@@ -975,6 +1004,7 @@ private: System::Windows::Forms::FlowLayoutPanel^ flowLayoutPanel2;
resources->ApplyResources(this->listBox_Mods, L"listBox_Mods");
this->listBox_Mods->Name = L"listBox_Mods";
this->listBox_Mods->SelectedValueChanged += gcnew System::EventHandler(this, &ui::listBox_Mods_SelectedValueChanged);
#endif
//
// tabPage_Credits
//
@@ -1167,8 +1197,10 @@ private: System::Windows::Forms::FlowLayoutPanel^ flowLayoutPanel2;
this->tabPage_Components->ResumeLayout(false);
this->tabPage_Components->PerformLayout();
this->tabPage_Plugins->ResumeLayout(false);
#ifndef MINIMALIST
this->tabPage_Modpacks->ResumeLayout(false);
this->tabPage_Modpacks->PerformLayout();
#endif
this->tabPage_Credits->ResumeLayout(false);
this->tabPage_Credits->PerformLayout();
this->tabPage_Update->ResumeLayout(false);
@@ -1181,6 +1213,7 @@ private: System::Windows::Forms::FlowLayoutPanel^ flowLayoutPanel2;
}
#pragma endregion
#ifndef MINIMALIST
private: System::Void scanModpacks() {
button_ModSetActive->Enabled = false;
button_ModClone->Enabled = false;
@@ -1203,6 +1236,7 @@ private: System::Windows::Forms::FlowLayoutPanel^ flowLayoutPanel2;
std::cout << "[Launcher] File system error " << e.what() << " " << e.path1() << " " << e.path2() << " " << e.code() << std::endl;
}
}
#endif
private: System::Void SaveSettings() {
if (*ResolutionConfigChanged)
{
@@ -1424,7 +1458,9 @@ private: System::Void button_github_Click(System::Object^ sender, System::EventA
}
private: System::Void button_Apply_Click(System::Object^ sender, System::EventArgs^ e) {
SaveSettings();
#ifndef MINIMALIST
updateLanguage();
#endif
updateStyle();
}
private: System::Void Ui_KeyDown(System::Object^ sender, System::Windows::Forms::KeyEventArgs^ e) {
@@ -1501,6 +1537,7 @@ private: System::Void linkLabel_Console_LinkClicked(System::Object^ sender, Syst
ShowWindow(consoleHandle, SW_SHOW);
linkLabel_Console->Visible = false;
}
#ifndef MINIMALIST
private: System::Void listBox_Mods_SelectedValueChanged(System::Object^ sender, System::EventArgs^ e) {
button_ModSetActive->Enabled = true;
button_ModClone->Enabled = true;
@@ -1542,6 +1579,7 @@ private: System::Void tabPage_Modpacks_Enter(System::Object^ sender, System::Eve
listBox_Mods->SelectedIndex = listBox_Mods->FindString(gcnew String(mpstr));
free(mpstr);
}
#endif
private: System::Void label_Update_1_Click(System::Object^ sender, System::EventArgs^ e) {
}
};