Import Upstream version 0.2.1
|
@ -0,0 +1,29 @@
|
|||
TEMPLATE = subdirs
|
||||
|
||||
SUBDIRS += \
|
||||
src/plugins/VirtualKeyboard \
|
||||
src/plugins/Reflex \
|
||||
src/plugins/PluginDll \
|
||||
src/plugins/PluginService \
|
||||
src/plugins/KChoiceLanguage \
|
||||
src/plugins/KTimeZone \
|
||||
src/plugins/PluginTask \
|
||||
src/plugins/KyLicense \
|
||||
src/plugins/KUserRegister \
|
||||
src/plugins/KPartition \
|
||||
src/Installer_main
|
||||
|
||||
|
||||
CONFIG += ordered \
|
||||
qt
|
||||
|
||||
|
||||
TRANSLATIONS += \
|
||||
$$PWD/language/zh_CN.ts \
|
||||
$$PWD/language/en_US.ts
|
||||
|
||||
#INCLUDEPATH += /home/xy/Downloads/workdir/git/2020-6new
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,315 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE QtCreatorProject>
|
||||
<!-- Written by QtCreator 4.11.0, 2022-04-15T11:05:58. -->
|
||||
<qtcreator>
|
||||
<data>
|
||||
<variable>EnvironmentId</variable>
|
||||
<value type="QByteArray">{1772e99f-9971-470e-88dc-a299543e69ad}</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.ActiveTarget</variable>
|
||||
<value type="int">0</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.EditorSettings</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<value type="bool" key="EditorConfiguration.AutoIndent">true</value>
|
||||
<value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
|
||||
<value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value>
|
||||
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
|
||||
<value type="QString" key="language">Cpp</value>
|
||||
<valuemap type="QVariantMap" key="value">
|
||||
<value type="QByteArray" key="CurrentPreferences">CppGlobal</value>
|
||||
</valuemap>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
|
||||
<value type="QString" key="language">QmlJS</value>
|
||||
<valuemap type="QVariantMap" key="value">
|
||||
<value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value>
|
||||
</valuemap>
|
||||
</valuemap>
|
||||
<value type="int" key="EditorConfiguration.CodeStyle.Count">2</value>
|
||||
<value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
|
||||
<value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
|
||||
<value type="int" key="EditorConfiguration.IndentSize">4</value>
|
||||
<value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
|
||||
<value type="int" key="EditorConfiguration.MarginColumn">80</value>
|
||||
<value type="bool" key="EditorConfiguration.MouseHiding">true</value>
|
||||
<value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
|
||||
<value type="int" key="EditorConfiguration.PaddingMode">1</value>
|
||||
<value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
|
||||
<value type="bool" key="EditorConfiguration.ShowMargin">false</value>
|
||||
<value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value>
|
||||
<value type="bool" key="EditorConfiguration.SmartSelectionChanging">true</value>
|
||||
<value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
|
||||
<value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
|
||||
<value type="int" key="EditorConfiguration.TabSize">8</value>
|
||||
<value type="bool" key="EditorConfiguration.UseGlobal">true</value>
|
||||
<value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
|
||||
<value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
|
||||
<value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
|
||||
<value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
|
||||
<value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.PluginSettings</variable>
|
||||
<valuemap type="QVariantMap"/>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.Target.0</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">桌面</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">桌面</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{d72b6a79-5369-4aef-b502-3250cd82b20f}</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/lifa/mygit2/ukylin/build-Kylin-Installer-unknown-Debug</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">true</value>
|
||||
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">false</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">false</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Debug</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/lifa/mygit2/ukylin/build-Kylin-Installer-unknown-Release</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
|
||||
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">false</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">true</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/lifa/mygit2/ukylin/build-Kylin-Installer-unknown-Profile</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">true</value>
|
||||
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">true</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">true</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Profile</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">3</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Deploy</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
|
||||
<value type="QString" key="Analyzer.Perf.CallgraphMode">dwarf</value>
|
||||
<valuelist type="QVariantList" key="Analyzer.Perf.Events">
|
||||
<value type="QString">cpu-cycles</value>
|
||||
</valuelist>
|
||||
<valuelist type="QVariantList" key="Analyzer.Perf.ExtraArguments"/>
|
||||
<value type="int" key="Analyzer.Perf.Frequency">250</value>
|
||||
<valuelist type="QVariantList" key="Analyzer.Perf.RecordArguments">
|
||||
<value type="QString">-e</value>
|
||||
<value type="QString">cpu-cycles</value>
|
||||
<value type="QString">--call-graph</value>
|
||||
<value type="QString">dwarf,4096</value>
|
||||
<value type="QString">-F</value>
|
||||
<value type="QString">250</value>
|
||||
</valuelist>
|
||||
<value type="QString" key="Analyzer.Perf.SampleMode">-F</value>
|
||||
<value type="bool" key="Analyzer.Perf.Settings.UseGlobalSettings">true</value>
|
||||
<value type="int" key="Analyzer.Perf.StackSize">4096</value>
|
||||
<value type="bool" key="Analyzer.QmlProfiler.AggregateTraces">false</value>
|
||||
<value type="bool" key="Analyzer.QmlProfiler.FlushEnabled">false</value>
|
||||
<value type="uint" key="Analyzer.QmlProfiler.FlushInterval">1000</value>
|
||||
<value type="QString" key="Analyzer.QmlProfiler.LastTraceFile"></value>
|
||||
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
|
||||
<valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
|
||||
<value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
|
||||
<value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
|
||||
<value type="QString" key="Analyzer.Valgrind.KCachegrindExecutable">kcachegrind</value>
|
||||
<value type="int" key="Analyzer.Valgrind.LeakCheckOnFinish">1</value>
|
||||
<value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
|
||||
<valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
|
||||
<value type="int" key="Analyzer.Valgrind.SelfModifyingCodeDetection">1</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.ShowReachable">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
|
||||
<value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value>
|
||||
<valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
|
||||
<value type="int">0</value>
|
||||
<value type="int">1</value>
|
||||
<value type="int">2</value>
|
||||
<value type="int">3</value>
|
||||
<value type="int">4</value>
|
||||
<value type="int">5</value>
|
||||
<value type="int">6</value>
|
||||
<value type="int">7</value>
|
||||
<value type="int">8</value>
|
||||
<value type="int">9</value>
|
||||
<value type="int">10</value>
|
||||
<value type="int">11</value>
|
||||
<value type="int">12</value>
|
||||
<value type="int">13</value>
|
||||
<value type="int">14</value>
|
||||
</valuelist>
|
||||
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
|
||||
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Installer_main2</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:/home/lifa/mygit2/ukylin/kylin-os-installer/src/Installer_main/Installer_main.pro</value>
|
||||
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey">/home/lifa/mygit2/ukylin/kylin-os-installer/src/Installer_main/Installer_main.pro</value>
|
||||
<value type="QString" key="RunConfiguration.Arguments"></value>
|
||||
<value type="bool" key="RunConfiguration.Arguments.multi">false</value>
|
||||
<value type="QString" key="RunConfiguration.OverrideDebuggerStartup"></value>
|
||||
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
|
||||
<value type="bool" key="RunConfiguration.UseLibrarySearchPath">true</value>
|
||||
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
||||
<value type="QString" key="RunConfiguration.WorkingDirectory"></value>
|
||||
<value type="QString" key="RunConfiguration.WorkingDirectory.default">/home/lifa/mygit2/ukylin/build-Kylin-Installer-unknown-Debug/src/Installer_main</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.TargetCount</variable>
|
||||
<value type="int">1</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
|
||||
<value type="int">22</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>Version</variable>
|
||||
<value type="int">22</value>
|
||||
</data>
|
||||
</qtcreator>
|
|
@ -0,0 +1,54 @@
|
|||
|
||||
TODO:
|
||||
选择安装方式时,默认高亮到快速安装
|
||||
|
||||
file:
|
||||
/etc/network/interfaces
|
||||
/etc/resolv.conf
|
||||
/etc/udev/rules.d/70-persistent-net.rules
|
||||
/etc/apt/sources.list
|
||||
/etc/apt/preferences.d
|
||||
/etc/papersize
|
||||
/etc/apt/trusted.gpg
|
||||
/etc/init.d/apparmor
|
||||
/etc/default/locale
|
||||
/etc/environment
|
||||
/etc/locale.gen
|
||||
/etc/X11/xorg.conf.failsafe
|
||||
/etc/lightdm/lightdm.conf
|
||||
/etc/debconf.conf
|
||||
/etc/default/keyboard.pre-ubiquity
|
||||
/etc/default/keyboard
|
||||
/target/etc/initramfs-tools/modules
|
||||
/etc/init.d/console-setup
|
||||
/etc/console-setup/ckb
|
||||
/etc/casper.conf
|
||||
/etc/X11/xinit/xinput.d/all_ALL
|
||||
/etc/X11/xinit/xinput.d/default
|
||||
/etc/X11/xorg.conf
|
||||
usr/sbin/update-initramfs
|
||||
/boot/grub/locale
|
||||
|
||||
#systemsetting.ini
|
||||
[config]
|
||||
autologin=0;1自动登录,0密码登录
|
||||
devpath=/dev/sda;全盘安装磁盘
|
||||
hostname=tr-PC;hostname
|
||||
language=zh_CN;语言
|
||||
password=gf45dr;登录密码
|
||||
timezone=Asia/Shanghai;时区
|
||||
username=tr;用户名
|
||||
automatic-installation = 1;1全盘安装,0自定义安装
|
||||
factory-backup =0;1工厂备份,0否
|
||||
enable-swapfile=false; 使用 swapfile,优先级低于引导参数 kyswapfile
|
||||
|
||||
|
||||
[custompartition]
|
||||
bootloader=;引导路径
|
||||
partitions=;被挂载的分区
|
||||
|
||||
[setting]
|
||||
EnableSwap=false;交换分区
|
||||
FileSystem="ext4;ext3;ext2;btrfs;jfs;xfs;fat16;fat32;efi;linux-swap;unused";创建分区页面的文件系统列表
|
||||
FileSystemBoot="ext4;vfat";boot分区文件系统格式
|
||||
PartitionMountedPoints=";/;/boot;/home;/tmp;/var;/srv;/opt;/usr/local";创建分区页面的挂载点
|
|
@ -0,0 +1,63 @@
|
|||
# Configuration for systemwide password quality limits
|
||||
# Defaults:
|
||||
#
|
||||
# Number of characters in the new password that must not be present in the
|
||||
# old password.
|
||||
# difok = 1
|
||||
#
|
||||
# Minimum acceptable size for the new password (plus one if
|
||||
# credits are not disabled which is the default). (See pam_cracklib manual.)
|
||||
# Cannot be set to lower value than 6.
|
||||
# minlen = 8
|
||||
#
|
||||
# The maximum credit for having digits in the new password. If less than 0
|
||||
# it is the minimum number of digits in the new password.
|
||||
# dcredit = 0
|
||||
#
|
||||
# The maximum credit for having uppercase characters in the new password.
|
||||
# If less than 0 it is the minimum number of uppercase characters in the new
|
||||
# password.
|
||||
# ucredit = 0
|
||||
#
|
||||
# The maximum credit for having lowercase characters in the new password.
|
||||
# If less than 0 it is the minimum number of lowercase characters in the new
|
||||
# password.
|
||||
# lcredit = 0
|
||||
#
|
||||
# The maximum credit for having other characters in the new password.
|
||||
# If less than 0 it is the minimum number of other characters in the new
|
||||
# password.
|
||||
# ocredit = 0
|
||||
#
|
||||
# The minimum number of required classes of characters for the new
|
||||
# password (digits, uppercase, lowercase, others).
|
||||
# minclass = 0
|
||||
#
|
||||
# The maximum number of allowed consecutive same characters in the new password.
|
||||
# The check is disabled if the value is 0.
|
||||
# maxrepeat = 0
|
||||
#
|
||||
# The maximum number of allowed consecutive characters of the same class in the
|
||||
# new password.
|
||||
# The check is disabled if the value is 0.
|
||||
# maxclassrepeat = 0
|
||||
#
|
||||
# Whether to check for the words from the passwd entry GECOS string of the user.
|
||||
# The check is enabled if the value is not 0.
|
||||
# gecoscheck = 0
|
||||
#
|
||||
# Whether to check for the words from the cracklib dictionary.
|
||||
# The check is enabled if the value is not 0.
|
||||
dictcheck = 0
|
||||
#
|
||||
# Whether to check if it contains the user name in some form.
|
||||
# The check is enabled if the value is not 0.
|
||||
# usercheck = 1
|
||||
#
|
||||
# Whether the check is enforced by the PAM module and possibly other
|
||||
# applications.
|
||||
# The new password is rejected if it fails the check and the value is not 0.
|
||||
# enforcing = 1
|
||||
#
|
||||
# Path to the cracklib dictionaries. Default is to use the cracklib default.
|
||||
# dictpath =
|
|
@ -0,0 +1,10 @@
|
|||
[Unit]
|
||||
Description=delete-oem-user
|
||||
After=lightdm.service
|
||||
|
||||
[Service]
|
||||
Type=notify
|
||||
ExecStart=/usr/share/kylin-os-installer/data/delete-oem-user.sh
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
|
@ -0,0 +1,104 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
remove_service() {
|
||||
if [ -f /lib/systemd/system/delete-oem-user.service ]; then
|
||||
rm -f /lib/systemd/system/delete-oem-user.service
|
||||
fi
|
||||
}
|
||||
|
||||
delete_oem_user() {
|
||||
if getent passwd 'oem' >/dev/null; then
|
||||
if [ -f /etc/sudoers.d/oem ]; then
|
||||
rm -f /etc/sudoers.d/oem
|
||||
fi
|
||||
pkill -u 'oem' || true
|
||||
userdel --force --remove 'oem' || true
|
||||
fi
|
||||
}
|
||||
|
||||
remove_user_dir() {
|
||||
for user in $(ls /home); do
|
||||
if ! getent passwd ${user} >/dev/null; then
|
||||
rm -rf /home/${user}/.config || true
|
||||
fi
|
||||
rmdir /home/${user} || true
|
||||
done
|
||||
}
|
||||
|
||||
remove_packages()
|
||||
{
|
||||
# remove package list
|
||||
packages_list_remove=(
|
||||
kylin-os-installer
|
||||
casper
|
||||
ukui-installer-wayland
|
||||
)
|
||||
|
||||
for i in ${packages_list_remove[*]}; do
|
||||
if dpkg -l | grep -q $i; then
|
||||
apt purge -y $i || true
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
copy_log() {
|
||||
if [ -f /tmp/oem.log ]; then
|
||||
mkdir -p /var/log/installer
|
||||
cp /tmp/oem.log /var/log/installer
|
||||
fi
|
||||
}
|
||||
|
||||
restart_lightdm() {
|
||||
systemctl restart lightdm
|
||||
}
|
||||
|
||||
set_test_mode_lightdm() {
|
||||
if grep -q 'test-mode=true' /usr/share/kylin-os-installer/ky-installer.cfg; then
|
||||
restart_lightdm
|
||||
fi
|
||||
}
|
||||
|
||||
set_990_9a0_lightdm() {
|
||||
if egrep -qi 'kirin.?9[09]0' /proc/cpuinfo; then
|
||||
systemctl restart lightdm
|
||||
fi
|
||||
}
|
||||
#临时解决3a5000 oem无法进入桌面问题
|
||||
set_3a5000_lightdm() {
|
||||
if egrep -qi '3A5000' /proc/cpuinfo; then
|
||||
systemctl restart lightdm
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
|
||||
restart_kylin_support_kirin() {
|
||||
if [[ -f /lib/systemd/system/kylin-support-kirin.service ]]; then
|
||||
systemctl restart kylin-support-kirin
|
||||
fi
|
||||
}
|
||||
|
||||
# delete-oem-user.service 是拷贝的,需要单独移除
|
||||
remove_service >>/tmp/oem.log
|
||||
|
||||
remove_packages >>/tmp/oem.log
|
||||
|
||||
set_990_9a0_lightdm
|
||||
|
||||
delete_oem_user >>/tmp/oem.log
|
||||
|
||||
remove_user_dir >>/tmp/oem.log
|
||||
|
||||
copy_log
|
||||
|
||||
set_test_mode_lightdm
|
||||
|
||||
#set_3a5000_lightdm
|
||||
|
||||
restart_kylin_support_kirin
|
||||
#restart_lightdm
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
/usr/bin/ukui-kwin_x11 &
|
||||
/usr/bin/ukui-settings-daemon &
|
||||
/usr/bin/sleep 5
|
||||
/usr/bin/kylin-os-installer
|
|
@ -0,0 +1,29 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
if [[ -f /usr/share/glib-2.0/schemas/org.ukui.flash-disk.autoload.gschema.xml ]]; then
|
||||
gsettings set org.ukui.flash-disk.autoload ifautoload false
|
||||
fi
|
||||
|
||||
#防止锁屏
|
||||
gsettings set org.ukui.power-manager sleep-computer-ac -1 || true
|
||||
gsettings set org.ukui.power-manager sleep-computer-battery -1 || true
|
||||
|
||||
gsettings set org.ukui.screensaver idle-lock -1 || true
|
||||
gsettings set org.ukui.screensaver idle-delay -1 || true
|
||||
gsettings set org.ukui.screensaver idle-activation-enabled false || true
|
||||
|
||||
gsettings set org.ukui.power-manager sleep-display-ac -1 || true
|
||||
gsettings set org.ukui.power-manager sleep-display-battery -1 || true
|
||||
|
||||
|
||||
|
||||
# 卸载可能由于自动挂载的目录
|
||||
sudo umount /media/*/* || true
|
||||
|
||||
# 禁用 Win 键
|
||||
sudo xmodmap -e "keycode 133 =" || true
|
||||
sudo xmodmap -e "keycode 134 =" || true
|
||||
|
||||
sudo /usr/lib/udisks2/udisks2-inhibit /usr/bin/kylin-os-installer
|
|
@ -0,0 +1,33 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
if [[ -f /usr/share/glib-2.0/schemas/org.ukui.flash-disk.autoload.gschema.xml ]]; then
|
||||
gsettings set org.ukui.flash-disk.autoload ifautoload false
|
||||
fi
|
||||
|
||||
#防止锁屏
|
||||
gsettings set org.ukui.power-manager sleep-computer-ac -1 || true
|
||||
gsettings set org.ukui.power-manager sleep-computer-battery -1 || true
|
||||
|
||||
gsettings set org.ukui.screensaver idle-lock -1 || true
|
||||
gsettings set org.ukui.screensaver idle-delay -1 || true
|
||||
gsettings set org.ukui.screensaver idle-activation-enabled false || true
|
||||
|
||||
gsettings set org.ukui.power-manager sleep-display-ac -1 || true
|
||||
gsettings set org.ukui.power-manager sleep-display-battery -1 || true
|
||||
|
||||
|
||||
|
||||
|
||||
# 卸载可能由于自动挂载的目录
|
||||
if grep -q media.oem /proc/mounts; then
|
||||
echo 'Kylin123.' | sudo -S umount /media/oem/*
|
||||
fi
|
||||
|
||||
# 990,9A0 wayland 需要此设置
|
||||
if egrep -qi 'kirin.?9[09]0' /proc/cpuinfo; then
|
||||
xhost +SI:localuser:root
|
||||
fi
|
||||
|
||||
sudo /usr/lib/udisks2/udisks2-inhibit /usr/bin/kylin-os-installer oem
|
|
@ -0,0 +1,19 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
if [[ -f /usr/share/glib-2.0/schemas/org.ukui.flash-disk.autoload.gschema.xml ]]; then
|
||||
gsettings set org.ukui.flash-disk.autoload ifautoload false
|
||||
fi
|
||||
|
||||
# 卸载可能由于自动挂载的目录
|
||||
if grep -q media.oem /proc/mounts; then
|
||||
echo 'qwe123' | sudo -S umount /media/oem/*
|
||||
fi
|
||||
|
||||
# 990,9A0 wayland 需要此设置
|
||||
if egrep -qi 'kirin.?9[09]0' /proc/cpuinfo; then
|
||||
xhost +SI:localuser:root
|
||||
fi
|
||||
|
||||
sudo /usr/lib/udisks2/udisks2-inhibit /usr/bin/kylin-os-installer oem automatic
|
|
@ -0,0 +1,32 @@
|
|||
[Unit]
|
||||
Description=End-user configuration after initial OEM installation
|
||||
ConditionFileIsExecutable=/usr/bin/kylin-os-installer-live oem
|
||||
ConditionPathExists=/dev/tty1
|
||||
|
||||
# We never want to run the oem-config job in the live environment (as is the
|
||||
# case in some custom configurations) or in recovery mode.
|
||||
ConditionKernelCommandLine=!boot=casper
|
||||
ConditionKernelCommandLine=!single
|
||||
ConditionKernelCommandLine=!rescue
|
||||
ConditionKernelCommandLine=!emergency
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
StandardInput=tty
|
||||
StandardOutput=tty
|
||||
StandardError=tty
|
||||
TTYPath=/dev/tty1
|
||||
TTYReset=yes
|
||||
TTYVHangup=yes
|
||||
ExecStart=/bin/sh -ec '\
|
||||
for x in $(cat /proc/cmdline); do \
|
||||
case $x in \
|
||||
debug-oem-config) debug=--debug ;; \
|
||||
ubiquity/frontend=*) export frontend="${x#*=}" ;; \
|
||||
automatic-oem-config) automatic=--automatic ;; \
|
||||
esac; \
|
||||
done; \
|
||||
exec /usr/bin/kylin-os-installer-oem $debug $automatic'
|
||||
|
||||
[Install]
|
||||
WantedBy=oem-config.target
|
|
@ -0,0 +1,7 @@
|
|||
[Unit]
|
||||
Description=OEM Configuration
|
||||
Requires=basic.target
|
||||
Conflicts=rescue.service rescue.target multi-user.target
|
||||
After=basic.target rescue.service rescue.target
|
||||
AllowIsolate=yes
|
||||
Wants=oem-config.service network-manager.service getty-static.service systemd-user-sessions.service
|
|
@ -0,0 +1,23 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
run_qc_dir() {
|
||||
name=$1
|
||||
for i in ${name}/*; do
|
||||
if [ -x "$i" ]; then
|
||||
filename=$(basename $i)
|
||||
echo "$(date +'%b %d %H:%M:%S') ${filename}"
|
||||
. "$i"
|
||||
else
|
||||
echo "跳过 $i"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
if [[ -d /usr/share/oem-test ]]; then
|
||||
run_qc_dir /usr/share/oem-test
|
||||
fi
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
[Desktop Entry]
|
||||
Encoding=UTF-8
|
||||
Type=Application
|
||||
Version=1.0
|
||||
Name=oem-test
|
||||
Name[zh_CN]=审核模式
|
||||
GenericName=oem test
|
||||
Exec=sudo mate-terminal -x /usr/sbin/oem-qc
|
||||
Keywords=kylin;auti-mode
|
||||
Icon=oem-test
|
||||
Terminal=true
|
||||
Categories=Qt;System;
|
||||
StartupNotify=True
|
|
@ -0,0 +1,16 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
gsettings set org.ukui.power-manager sleep-computer-ac -1 || true
|
||||
gsettings set org.ukui.power-manager sleep-computer-battery -1 || true
|
||||
|
||||
gsettings set org.ukui.screensaver idle-lock -1 || true
|
||||
gsettings set org.ukui.screensaver idle-delay -1 || true
|
||||
gsettings set org.ukui.screensaver idle-activation-enabled false || true
|
||||
|
||||
gsettings set org.ukui.power-manager sleep-display-ac -1 || true
|
||||
gsettings set org.ukui.power-manager sleep-display-battery -1 || true
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
[Desktop Entry]
|
||||
Encoding=UTF-8
|
||||
Type=Application
|
||||
Version=1.0
|
||||
Name=oem-unlock
|
||||
Name[zh_CN]=auti-unlock
|
||||
GenericName=oem unlock
|
||||
Exec=/usr/sbin/oem-unlock
|
||||
Keywords=kylin;auti-unlock
|
||||
Icon=oem-unlock
|
||||
Terminal=false
|
||||
Categories=Qt;System;
|
||||
StartupNotify=True
|
|
@ -0,0 +1,27 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
# 990 或 9a0 不使用此启动安装程序的方式
|
||||
if egrep -qi 'kirin.?9[09]0' /proc/cpuinfo; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if ! grep -q live /proc/cmdline; then
|
||||
|
||||
if [[ -e /etc/xdg/autostart/ukui-kwin.desktop ]]; then
|
||||
mv /etc/xdg/autostart/ukui-kwin.desktop /
|
||||
fi
|
||||
|
||||
rm -rf /etc/xdg/autostart
|
||||
mkdir -p /etc/xdg/autostart
|
||||
|
||||
if [[ -e /ukui-kwin.desktop ]]; then
|
||||
mv /ukui-kwin.desktop /etc/xdg/autostart/
|
||||
fi
|
||||
|
||||
cp /usr/share/applications/kylin-os-installer.desktop /etc/xdg/autostart
|
||||
rm -f /usr/bin/peony-qt-desktop || true
|
||||
fi
|
||||
|
||||
|
|
@ -0,0 +1 @@
|
|||
<svg id="安装程序" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 128 128"><defs><style>.cls-1{font-size:12px;fill:#ffeb3b;font-family:SimHei;}.cls-2{font-size:9px;fill:#fff;}.cls-3{fill:url(#未命名的渐变_26);}.cls-4,.cls-5{fill:#f9f9f9;}.cls-4{fill-rule:evenodd;}</style><linearGradient id="未命名的渐变_26" x1="93.5" y1="115.1" x2="34.5" y2="12.9" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#dd4814"/><stop offset="1" stop-color="#dd7514"/></linearGradient></defs><text class="cls-1" transform="translate(0 -68)">128<tspan class="cls-2"><tspan x="0" y="10.8">外框线:128 x 128 px</tspan><tspan x="0" y="21.6">主图案:112 x 112 px</tspan><tspan x="0" y="32.4">圆(不规则形状):118 x 118 px</tspan><tspan x="0" y="43.2">中心图:80 x 80 px</tspan><tspan x="0" y="54">圆角:12 px</tspan><tspan x="0" y="64.8">线宽:8 px</tspan></tspan></text><g id="_128" data-name="128"><circle class="cls-3" cx="64" cy="64" r="59"/><polygon class="cls-4" points="61 58.58 64.1 54.42 62.94 49.98 64.97 44.08 60.23 48.91 59.55 48.72 60.81 45.72 56.36 50.17 52.1 52.78 47.65 61.1 50.07 67.29 50.94 72.03 51.91 74.45 48.43 78.61 53.26 78.61 53.94 74.25 55.88 71.25 59.07 71.83 62.65 70.38 65.35 69.03 67.97 70.77 64.87 74.45 61.68 77.35 66.61 77.44 66.61 75.51 70.48 72.51 71.83 74.16 67.87 79.86 72.9 79.86 72.7 77.06 76.38 73.67 74.54 69.9 74.25 65.35 78.03 63.23 80.06 63.61 82.96 62.65 83.73 56.84 79.38 58.2 76.67 62.16 72.03 64.58 65.64 61.97 61 58.58"/><circle class="cls-5" cx="85" cy="29" r="8"/><circle class="cls-5" cx="22" cy="64" r="8"/><circle class="cls-5" cx="85" cy="100" r="8"/><path class="cls-5" d="M49.86,83.38a24,24,0,0,1,0-38.79L43,32.33a38,38,0,0,0-15.75,22,11,11,0,0,1,0,19.34A38.06,38.06,0,0,0,42.63,95.42Z"/><path class="cls-5" d="M54.23,42.09A24,24,0,0,1,88,62.5h14A37.83,37.83,0,0,0,91.54,37.83,11,11,0,0,1,74.13,27.38a38,38,0,0,0-26.79,2.46Z"/><path class="cls-5" d="M87.74,67.5A24,24,0,0,1,54.18,85.89L46.94,98A38,38,0,0,0,74,100.65c0-.22,0-.43,0-.65a11,11,0,0,1,17-9.23A37.86,37.86,0,0,0,101.83,67.5Z"/></g></svg>
|
After Width: | Height: | Size: 2.1 KiB |
|
@ -0,0 +1 @@
|
|||
<svg id="安装程序" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 16 16"><defs><style>.cls-1{fill:url(#未命名的渐变_26);}.cls-2,.cls-3{fill:#f9f9f9;}.cls-2{fill-rule:evenodd;}</style><linearGradient id="未命名的渐变_26" x1="12" y1="14.93" x2="4" y2="1.07" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#dd4814"/><stop offset="1" stop-color="#dd7514"/></linearGradient></defs><g id="_16" data-name="16"><circle class="cls-1" cx="8" cy="8" r="8"/><polygon class="cls-2" points="7.59 7.27 8.01 6.7 7.86 6.1 8.13 5.3 7.49 5.95 7.4 5.93 7.57 5.52 6.96 6.13 6.39 6.48 5.78 7.61 6.11 8.45 6.23 9.09 6.36 9.42 5.89 9.98 6.54 9.98 6.64 9.39 6.9 8.98 7.33 9.06 7.82 8.87 8.18 8.68 8.54 8.92 8.12 9.42 7.68 9.81 8.35 9.82 8.35 9.56 8.88 9.15 9.06 9.38 8.53 10.15 9.21 10.15 9.18 9.77 9.68 9.31 9.43 8.8 9.39 8.18 9.9 7.89 10.18 7.95 10.57 7.82 10.68 7.03 10.09 7.21 9.72 7.75 9.09 8.08 8.22 7.72 7.59 7.27"/><circle class="cls-3" cx="11" cy="3" r="1"/><circle class="cls-3" cx="2" cy="8" r="1"/><circle class="cls-3" cx="11" cy="13" r="1"/><path class="cls-3" d="M6.92,5.21a3,3,0,0,1,4,2.42h2a5,5,0,0,0-1.14-2.81A2.09,2.09,0,0,1,11,5,2,2,0,0,1,9,3.1,5.58,5.58,0,0,0,8,3a4.92,4.92,0,0,0-2.2.52Z"/><path class="cls-3" d="M11,8.38A3,3,0,0,1,8,11a3,3,0,0,1-1-.18l-.9,1.79A5,5,0,0,0,8,13a5.58,5.58,0,0,0,1-.1A2,2,0,0,1,11,11a2.09,2.09,0,0,1,.83.18A5,5,0,0,0,13,8.38Z"/><path class="cls-3" d="M6.33,10.49a3,3,0,0,1-.07-4.92L5.16,3.91A5,5,0,0,0,3.27,6.46a2,2,0,0,1,0,3.08,5,5,0,0,0,2.17,2.73Z"/></g></svg>
|
After Width: | Height: | Size: 1.5 KiB |
|
@ -0,0 +1 @@
|
|||
<svg id="安装程序" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 22 22"><defs><style>.cls-1{fill:url(#未命名的渐变_26);}.cls-2,.cls-3{fill:#f9f9f9;}.cls-2{fill-rule:evenodd;}</style><linearGradient id="未命名的渐变_26" x1="16.5" y1="20.53" x2="5.5" y2="1.47" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#dd4814"/><stop offset="1" stop-color="#dd7514"/></linearGradient></defs><g id="_22" data-name="22"><circle class="cls-1" cx="11" cy="11" r="11"/><polygon class="cls-2" points="10.44 9.99 11.02 9.21 10.8 8.38 11.18 7.29 10.3 8.19 10.17 8.15 10.4 7.59 9.57 8.42 8.78 8.91 7.95 10.46 8.4 11.61 8.57 12.5 8.75 12.95 8.1 13.72 9 13.72 9.13 12.91 9.48 12.35 10.08 12.46 10.75 12.19 11.25 11.94 11.74 12.26 11.16 12.95 10.57 13.49 11.49 13.51 11.49 13.15 12.21 12.59 12.46 12.89 11.72 13.96 12.66 13.96 12.62 13.43 13.31 12.8 12.97 12.1 12.91 11.25 13.62 10.86 13.99 10.93 14.53 10.75 14.68 9.67 13.87 9.92 13.36 10.66 12.5 11.11 11.31 10.62 10.44 9.99"/><circle class="cls-3" cx="15" cy="4" r="2"/><circle class="cls-3" cx="3" cy="11" r="2"/><circle class="cls-3" cx="15" cy="18" r="2"/><path class="cls-3" d="M16,11.5A5,5,0,0,1,9,15.59L8,17.3a6.73,6.73,0,0,0,4.77.46,2.24,2.24,0,0,1,2.23-2,2.27,2.27,0,0,1,.94.21,7,7,0,0,0,2-4.46Z"/><path class="cls-3" d="M9,6.41A5,5,0,0,1,16,10.5h2a7,7,0,0,0-2-4.46,2.27,2.27,0,0,1-.94.21,2.24,2.24,0,0,1-2.23-2A6.73,6.73,0,0,0,8,4.7Z"/><path class="cls-3" d="M8.16,15.1a5,5,0,0,1,0-8.2l-1-1.71a7.06,7.06,0,0,0-2.87,4,2.24,2.24,0,0,1,0,3.72,7.06,7.06,0,0,0,2.87,3.95Z"/></g></svg>
|
After Width: | Height: | Size: 1.6 KiB |
|
@ -0,0 +1 @@
|
|||
<svg id="安装程序" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><defs><style>.cls-1{fill:url(#未命名的渐变_26);}.cls-2,.cls-3{fill:#f9f9f9;}.cls-2{fill-rule:evenodd;}</style><linearGradient id="未命名的渐变_26" x1="17.5" y1="21.53" x2="6.5" y2="2.47" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#dd4814"/><stop offset="1" stop-color="#dd7514"/></linearGradient></defs><g id="_24" data-name="24"><circle class="cls-1" cx="12" cy="12" r="11"/><polygon class="cls-2" points="11.44 10.99 12.02 10.21 11.8 9.38 12.18 8.29 11.3 9.19 11.17 9.15 11.4 8.59 10.57 9.42 9.78 9.91 8.95 11.46 9.4 12.61 9.57 13.5 9.75 13.95 9.1 14.72 10 14.72 10.13 13.91 10.48 13.35 11.08 13.46 11.75 13.19 12.25 12.94 12.74 13.26 12.16 13.95 11.57 14.49 12.49 14.51 12.49 14.15 13.21 13.59 13.46 13.89 12.72 14.96 13.66 14.96 13.62 14.43 14.31 13.8 13.97 13.1 13.91 12.25 14.62 11.86 14.99 11.93 15.53 11.75 15.68 10.67 14.87 10.92 14.36 11.66 13.5 12.11 12.31 11.62 11.44 10.99"/><circle class="cls-3" cx="16" cy="5" r="2"/><circle class="cls-3" cx="4" cy="12" r="2"/><circle class="cls-3" cx="16" cy="19" r="2"/><path class="cls-3" d="M17,12.5A5,5,0,0,1,10,16.59L9,18.3a6.73,6.73,0,0,0,4.77.46,2.24,2.24,0,0,1,2.23-2,2.27,2.27,0,0,1,.94.21,7,7,0,0,0,2-4.46Z"/><path class="cls-3" d="M10,7.41A5,5,0,0,1,17,11.5h2a7,7,0,0,0-2-4.46,2.27,2.27,0,0,1-.94.21,2.24,2.24,0,0,1-2.23-2A6.73,6.73,0,0,0,9,5.7Z"/><path class="cls-3" d="M9.16,16.1a5,5,0,0,1,0-8.2l-1-1.71a7.06,7.06,0,0,0-2.87,4,2.24,2.24,0,0,1,0,3.72,7.06,7.06,0,0,0,2.87,3.95Z"/></g></svg>
|
After Width: | Height: | Size: 1.6 KiB |
|
@ -0,0 +1 @@
|
|||
<svg id="安装程序" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 256 256"><defs><style>.cls-1{fill:url(#未命名的渐变_26);}.cls-2,.cls-3{fill:#f9f9f9;}.cls-2{fill-rule:evenodd;}</style><linearGradient id="未命名的渐变_26" x1="185.01" y1="226.74" x2="70.99" y2="29.26" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#dd4814"/><stop offset="1" stop-color="#dd7514"/></linearGradient></defs><g id="_256" data-name="256"><circle class="cls-1" cx="128" cy="128" r="114"/><polygon class="cls-2" points="122.21 117.53 128.19 109.5 125.94 100.9 129.87 89.5 120.71 98.85 119.4 98.47 121.83 92.68 113.24 101.28 105.01 106.32 96.42 122.39 101.09 134.35 102.77 143.51 104.64 148.18 97.91 156.22 107.26 156.22 108.56 147.81 112.3 142.02 118.47 143.14 125.38 140.33 130.62 137.72 135.66 141.08 129.68 148.18 123.52 153.79 133.05 153.98 133.05 150.24 140.52 144.45 143.14 147.62 135.47 158.65 145.19 158.65 144.82 153.23 151.92 146.69 148.37 139.4 147.81 130.62 155.1 126.5 159.02 127.25 164.63 125.38 166.13 114.17 157.72 116.79 152.48 124.45 143.51 129.12 131.18 124.08 122.21 117.53"/><circle class="cls-3" cx="170.5" cy="57.5" r="16.5"/><circle class="cls-3" cx="45.5" cy="128.5" r="16.5"/><circle class="cls-3" cx="171.5" cy="198.5" r="16.5"/><path class="cls-3" d="M109,85.38a48,48,0,0,1,67.68,38.12h25.09A72.72,72.72,0,0,0,180.2,77a22,22,0,0,1-31.12-18.16A72.94,72.94,0,0,0,95.86,64Z"/><path class="cls-3" d="M100.41,167.53a47.94,47.94,0,0,1,.8-77.63L88.12,68.54a73.09,73.09,0,0,0-29.59,41.38,22,22,0,0,1-.43,36.45,73.09,73.09,0,0,0,30,43.08Z"/><path class="cls-3" d="M176.86,132.5a48,48,0,0,1-68.75,39.71L95.83,194A73,73,0,0,0,149,199.2a1.34,1.34,0,0,1,0-.2,22,22,0,0,1,32.52-19.33,72.66,72.66,0,0,0,20.39-47.17Z"/></g></svg>
|
After Width: | Height: | Size: 1.7 KiB |
|
@ -0,0 +1 @@
|
|||
<svg id="安装程序" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 32 32"><defs><style>.cls-1{fill:url(#未命名的渐变_26);}.cls-2,.cls-3{fill:#f9f9f9;}.cls-2{fill-rule:evenodd;}</style><linearGradient id="未命名的渐变_26" x1="23.5" y1="28.99" x2="8.5" y2="3.01" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#dd4814"/><stop offset="1" stop-color="#dd7514"/></linearGradient></defs><g id="_32" data-name="32"><circle class="cls-1" cx="16" cy="16" r="15"/><polygon class="cls-2" points="15.24 14.62 16.02 13.57 15.73 12.43 16.25 10.93 15.04 12.16 14.87 12.12 15.19 11.35 14.06 12.48 12.97 13.15 11.84 15.26 12.46 16.84 12.68 18.04 12.93 18.66 12.04 19.71 13.27 19.71 13.44 18.61 13.93 17.84 14.75 17.99 15.66 17.62 16.34 17.28 17.01 17.72 16.22 18.66 15.41 19.39 16.66 19.42 16.66 18.93 17.65 18.16 17.99 18.58 16.98 20.03 18.26 20.03 18.21 19.32 19.15 18.46 18.68 17.5 18.61 16.34 19.57 15.8 20.08 15.9 20.82 15.66 21.02 14.18 19.91 14.53 19.22 15.53 18.04 16.15 16.42 15.48 15.24 14.62"/><circle class="cls-3" cx="21.5" cy="6.5" r="2.5"/><circle class="cls-3" cx="5.5" cy="15.5" r="2.5"/><circle class="cls-3" cx="21.5" cy="25.5" r="2.5"/><path class="cls-3" d="M12.72,21a6,6,0,0,1,.06-10.08L10.72,7.51a10.07,10.07,0,0,0-4,4.73,3.48,3.48,0,0,1-.32,6.62,10,10,0,0,0,4.08,5.49Z"/><path class="cls-3" d="M13.67,10.47a6,6,0,0,1,8.3,5h4a10,10,0,0,0-2.5-6.12,3.45,3.45,0,0,1-2,.62A3.5,3.5,0,0,1,18,6.5a2.85,2.85,0,0,1,0-.29A9.71,9.71,0,0,0,16,6a10,10,0,0,0-4.4,1Z"/><path class="cls-3" d="M22,16.5a6,6,0,0,1-8.37,5l-2.24,3.36A10,10,0,0,0,16,26a9.71,9.71,0,0,0,2-.21,2.85,2.85,0,0,1,0-.29A3.5,3.5,0,0,1,21.5,22a3.45,3.45,0,0,1,2,.62A10,10,0,0,0,26,16.5Z"/></g></svg>
|
After Width: | Height: | Size: 1.7 KiB |
|
@ -0,0 +1 @@
|
|||
<svg id="安装程序" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 48 48"><defs><style>.cls-1{fill:url(#未命名的渐变_26);}.cls-2,.cls-3{fill:#f9f9f9;}.cls-2{fill-rule:evenodd;}</style><linearGradient id="未命名的渐变_26" x1="34.5" y1="42.19" x2="13.5" y2="5.81" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#dd4814"/><stop offset="1" stop-color="#dd7514"/></linearGradient></defs><g id="_48" data-name="48"><circle class="cls-1" cx="24" cy="24" r="21"/><polygon class="cls-2" points="22.93 22.07 24.03 20.59 23.62 19.01 24.34 16.91 22.66 18.63 22.42 18.56 22.86 17.49 21.28 19.08 19.77 20.01 18.18 22.97 19.04 25.17 19.35 26.86 19.7 27.72 18.46 29.2 20.18 29.2 20.42 27.65 21.11 26.58 22.24 26.79 23.52 26.27 24.48 25.79 25.41 26.41 24.31 27.72 23.17 28.75 24.93 28.79 24.93 28.1 26.31 27.03 26.79 27.61 25.38 29.65 27.17 29.65 27.1 28.65 28.41 27.44 27.75 26.1 27.65 24.48 28.99 23.73 29.71 23.86 30.75 23.52 31.02 21.45 29.47 21.93 28.51 23.35 26.86 24.21 24.59 23.28 22.93 22.07"/><circle class="cls-3" cx="32" cy="11" r="3"/><circle class="cls-3" cx="9" cy="24" r="3"/><circle class="cls-3" cx="32" cy="37" r="3"/><path class="cls-3" d="M32.94,25a9,9,0,0,1-12.56,7.23l-2.8,4.2A13.91,13.91,0,0,0,28,37.4c0-.13,0-.26,0-.4a4,4,0,0,1,6.14-3.37A13.93,13.93,0,0,0,38,25Z"/><path class="cls-3" d="M20.38,15.77A9,9,0,0,1,32.94,23h5a13.93,13.93,0,0,0-3.81-8.63A4,4,0,0,1,28,11c0-.14,0-.27,0-.4a13.91,13.91,0,0,0-10.46,1Z"/><path class="cls-3" d="M18.65,31.22a9,9,0,0,1,0-14.44l-2.77-4.16a14,14,0,0,0-5.37,7.68,4,4,0,0,1,0,7.4,14,14,0,0,0,5.37,7.68Z"/></g></svg>
|
After Width: | Height: | Size: 1.6 KiB |
|
@ -0,0 +1 @@
|
|||
<svg id="安装程序" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 512 512"><defs><style>.cls-1{fill:url(#未命名的渐变_26);}.cls-2,.cls-3{fill:#f9f9f9;}.cls-2{fill-rule:evenodd;}</style><linearGradient id="未命名的渐变_26" x1="369.02" y1="451.75" x2="142.98" y2="60.25" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#dd4814"/><stop offset="1" stop-color="#dd7514"/></linearGradient></defs><g id="_512" data-name="512"><circle class="cls-1" cx="256" cy="256" r="226"/><polygon class="cls-2" points="244.51 235.25 256.37 219.32 251.93 202.28 259.7 179.68 241.55 198.2 238.96 197.46 243.77 185.98 226.73 203.02 210.43 213.02 193.39 244.88 202.65 268.6 205.98 286.75 209.69 296.01 196.35 311.94 214.88 311.94 217.47 295.27 224.88 283.79 237.1 286.01 250.81 280.45 261.19 275.27 271.19 281.93 259.33 296.01 247.11 307.13 266 307.5 266 300.09 280.82 288.6 286.01 294.9 270.82 316.76 290.08 316.76 289.34 306.02 303.42 293.05 296.38 278.6 295.27 261.19 309.72 253.04 317.5 254.52 328.62 250.81 331.58 228.58 314.91 233.77 304.53 248.96 286.75 258.22 262.3 248.22 244.51 235.25"/><circle class="cls-3" cx="339.5" cy="116.5" r="32.5"/><circle class="cls-3" cx="92.5" cy="256.5" r="32.5"/><circle class="cls-3" cx="340.5" cy="396.5" r="32.5"/><path class="cls-3" d="M219.43,170.84A94,94,0,0,1,350.35,246h50.24A143.61,143.61,0,0,0,359,155.37a43.48,43.48,0,0,1-63-37,144.52,144.52,0,0,0-103.23,9.7Z"/><path class="cls-3" d="M350.74,264a94,94,0,0,1-133.29,78.26L190.9,385A144.46,144.46,0,0,0,297,395.36a43.48,43.48,0,0,1,63-37.74A143.5,143.5,0,0,0,400.83,264Z"/><path class="cls-3" d="M117.34,292.2a144.16,144.16,0,0,0,58.13,83.5l26.47-42.56a93.91,93.91,0,0,1,1.76-153.52l-26.45-42.53A144.2,144.2,0,0,0,117.55,221a43.48,43.48,0,0,1-.21,71.25Z"/></g></svg>
|
After Width: | Height: | Size: 1.8 KiB |
|
@ -0,0 +1 @@
|
|||
<svg id="安装程序" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 64 64"><defs><style>.cls-1{fill:url(#未命名的渐变_26);}.cls-2,.cls-3{fill:#f9f9f9;}.cls-2{fill-rule:evenodd;}</style><linearGradient id="未命名的渐变_26" x1="46.5" y1="57.12" x2="17.5" y2="6.88" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#dd4814"/><stop offset="1" stop-color="#dd7514"/></linearGradient></defs><g id="_64" data-name="64"><circle class="cls-1" cx="32" cy="32" r="29"/><polygon class="cls-2" points="30.53 29.34 32.05 27.29 31.48 25.11 32.48 22.21 30.15 24.58 29.81 24.49 30.43 23.02 28.24 25.2 26.15 26.48 23.97 30.57 25.15 33.62 25.58 35.95 26.06 37.13 24.35 39.18 26.72 39.18 27.06 37.04 28.01 35.57 29.57 35.85 31.33 35.14 32.67 34.47 33.95 35.33 32.43 37.13 30.86 38.56 33.28 38.61 33.28 37.66 35.19 36.18 35.85 36.99 33.9 39.8 36.37 39.8 36.28 38.42 38.09 36.75 37.18 34.9 37.04 32.67 38.89 31.62 39.89 31.81 41.32 31.33 41.7 28.48 39.56 29.15 38.23 31.1 35.95 32.28 32.81 31 30.53 29.34"/><circle class="cls-3" cx="42.5" cy="14.5" r="4.5"/><circle class="cls-3" cx="11.5" cy="31.5" r="4.5"/><circle class="cls-3" cx="42.5" cy="49.5" r="4.5"/><path class="cls-3" d="M27.46,20.9A11.82,11.82,0,0,1,32,20,12,12,0,0,1,43.9,30.5h7a19,19,0,0,0-5.17-11.58A5.43,5.43,0,0,1,42.5,20,5.5,5.5,0,0,1,37,14.5a7,7,0,0,1,.06-.8,18.8,18.8,0,0,0-13.34,1.21Z"/><path class="cls-3" d="M24.85,41.61a11.95,11.95,0,0,1,0-19.22l-3.72-5.95a19.07,19.07,0,0,0-7.32,10.07,5.5,5.5,0,0,1-.23,10.08,19,19,0,0,0,7.55,11Z"/><path class="cls-3" d="M43.9,33.5A12,12,0,0,1,32,44a11.82,11.82,0,0,1-4.54-.9l-3.74,6A18.84,18.84,0,0,0,32,51a19.14,19.14,0,0,0,5.06-.7,7,7,0,0,1-.06-.8A5.5,5.5,0,0,1,42.5,44a5.43,5.43,0,0,1,3.26,1.08A19,19,0,0,0,50.93,33.5Z"/></g></svg>
|
After Width: | Height: | Size: 1.8 KiB |
|
@ -0,0 +1 @@
|
|||
<svg id="安装程序" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 96 96"><defs><style>.cls-1{fill:url(#未命名的渐变_26);}.cls-2,.cls-3{fill:#f9f9f9;}.cls-2{fill-rule:evenodd;}</style><linearGradient id="未命名的渐变_26" x1="70" y1="86.11" x2="26" y2="9.89" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#dd4814"/><stop offset="1" stop-color="#dd7514"/></linearGradient></defs><g id="_96" data-name="96"><circle class="cls-1" cx="48" cy="48" r="44"/><polygon class="cls-2" points="45.76 43.96 48.07 40.86 47.21 37.54 48.72 33.14 45.19 36.75 44.68 36.6 45.62 34.37 42.3 37.69 39.13 39.63 35.81 45.84 37.61 50.45 38.26 53.99 38.98 55.79 36.39 58.89 39.99 58.89 40.5 55.65 41.94 53.41 44.32 53.84 46.99 52.76 49.01 51.75 50.96 53.05 48.65 55.79 46.27 57.95 49.95 58.03 49.95 56.58 52.83 54.35 53.84 55.57 50.88 59.83 54.64 59.83 54.49 57.74 57.23 55.21 55.86 52.4 55.65 49.01 58.46 47.42 59.97 47.71 62.14 46.99 62.72 42.66 59.47 43.67 57.45 46.63 53.99 48.43 49.23 46.48 45.76 43.96"/><circle class="cls-3" cx="64.5" cy="20.5" r="6.5"/><circle class="cls-3" cx="16.5" cy="47.5" r="6.5"/><circle class="cls-3" cx="64.5" cy="75.5" r="6.5"/><path class="cls-3" d="M40.35,30.62A19,19,0,0,1,66.89,46h9a28,28,0,0,0-8-17.71A8.37,8.37,0,0,1,64.5,29,8.5,8.5,0,0,1,56,21.18,27.66,27.66,0,0,0,48,20a27.94,27.94,0,0,0-12.21,2.82Z"/><path class="cls-3" d="M66.89,50A19,19,0,0,1,40.43,65.42l-4.28,7.94A27.91,27.91,0,0,0,56,74.82,8.5,8.5,0,0,1,64.5,67a8.37,8.37,0,0,1,3.39.71,28,28,0,0,0,8-17.71Z"/><path class="cls-3" d="M37,63.43a18.94,18.94,0,0,1-.08-30.81l-4.55-7.8A28.06,28.06,0,0,0,21.07,40.34a8.49,8.49,0,0,1-.23,14.46A28,28,0,0,0,32.66,71.42Z"/></g></svg>
|
After Width: | Height: | Size: 1.7 KiB |
|
@ -0,0 +1,26 @@
|
|||
[config]
|
||||
="======"
|
||||
autologin=0
|
||||
automatic-installation=0
|
||||
devpath=/dev/sda
|
||||
enable-swapfile=false
|
||||
factory-backup=0
|
||||
hostname=sa-QiTianM425-N000
|
||||
language=en_US
|
||||
password=@ByteArray(123qwe)
|
||||
reboot=0
|
||||
timezone=Asia/Shanghai
|
||||
username=sa
|
||||
|
||||
[custompartition]
|
||||
bootloader=/dev/sda ATA ST1000DM003-1SB1
|
||||
partitions="/boot/efi:/dev/sda1;/:/dev/sda7;linux-swap:/dev/sda5;"
|
||||
|
||||
[setting]
|
||||
EnableSwap=false
|
||||
FileSystem="ext4;ext3;fat16;fat32;efi;linux-swap;unused"
|
||||
FileSystemBoot="ext4;vfat"
|
||||
PartitionMountedPoints=";/;/boot;/data;/backup;/home;/tmp"
|
||||
|
||||
[specialmodel]
|
||||
computer="mips64el/loongson-3;loongsonarch64/generic"
|
|
@ -0,0 +1,14 @@
|
|||
[Desktop Entry]
|
||||
Encoding=UTF-8
|
||||
Type=Application
|
||||
Version=1.0
|
||||
Name=Install Kylin
|
||||
Name[zh_CN]=安装 Kylin
|
||||
GenericName=Kylin OS Installer
|
||||
Exec=/usr/bin/kylin-os-installer-live
|
||||
Comment=Kylin — Installer for Kylin Live
|
||||
Keywords=kylin;system;install;debian;installer
|
||||
Icon=kylin-os-installer
|
||||
Terminal=false
|
||||
Categories=Qt;System;
|
||||
StartupNotify=True
|
|
@ -0,0 +1,898 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="bo_CN">
|
||||
<context>
|
||||
<name>KInstaller::CreatePartitionFrame</name>
|
||||
<message>
|
||||
<source>OK</source>
|
||||
<translation>གཏན་འཁེལ་བྱེད་པ།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>close</source>
|
||||
<translation>ཁ་རྒྱག</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Size(MiB)</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>End of this space</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>Create Partition</source>
|
||||
<translation>བགོ་ཁུལ་གསར་འཛུགས།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Root partition size is greater than 15GiB,
|
||||
but Huawei machines require greater than 25GiB.</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>Location for the new partition</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>Logical</source>
|
||||
<translation>གཏན་ཚིགས།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Beginning of this space</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>Mount point</source>
|
||||
<translation>འགེལ་ཚེག:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Primary</source>
|
||||
<translation>བདག་པོ།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Type for the new partition:</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>Recommended efi partition size is between 256MiB and 2GiB.</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>Used to:</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>Recommended boot partition size is between 500MiB and 2GiB.</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>Mount point starts with '/'</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>KInstaller::ModifyPartitionFrame</name>
|
||||
<message>
|
||||
<source>OK</source>
|
||||
<translation>གཏན་འཁེལ་བྱེད་པ།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>close</source>
|
||||
<translation>ཁ་རྒྱག</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Format partition.</source>
|
||||
<translation>རྣམ་གཞག་ཅན་གྱི་བགོ་ཁུལ།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Mount point</source>
|
||||
<translation>འགེལ་ཚེག:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Modify Partition</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>unused</source>
|
||||
<translation>སྤྱད་ཚར།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Used to:</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>Mount point starts with '/'</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>KServer::EncryptSetFrame</name>
|
||||
<message>
|
||||
<source>OK</source>
|
||||
<translation>གཏན་འཁེལ་བྱེད་པ།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>close</source>
|
||||
<translation>ཁ་རྒྱག</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Cancel</source>
|
||||
<translation>མེད་པར་བཟོ་བ</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Please keep your password properly.If you forget it,
|
||||
you will not be able to access the disk data.</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>confirm password:</source>
|
||||
<translation>གཏན་འཁེལ་གསང་གྲངས།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>password:</source>
|
||||
<translation>གསང་ཨང་།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Two password entries are inconsistent!</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>KServer::MessageBox</name>
|
||||
<message>
|
||||
<source>OK</source>
|
||||
<translation>གཏན་འཁེལ་བྱེད་པ།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>close</source>
|
||||
<translation>ཁ་རྒྱག</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Cancel</source>
|
||||
<translation>མེད་པར་བཟོ་བ</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>KInstaller::TableWidgetView</name>
|
||||
<message>
|
||||
<source>no</source>
|
||||
<translation>མིན།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>yes</source>
|
||||
<translation>ཡིན།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>add </source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>Create partition table</source>
|
||||
<translation>བགོ་ཁུལ་གསར་འཛུགས།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>change </source>
|
||||
<translation>བསྒྱུར་བ།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>delete </source>
|
||||
<translation>འདོར་བ།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>freespace</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QObject</name>
|
||||
<message>
|
||||
<source>wd</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>good</source>
|
||||
<translation>བཟང་པོ།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>size</source>
|
||||
<translation>ཆེ་ཆུང་།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>type</source>
|
||||
<translation> རིགས་རྣམ།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>used</source>
|
||||
<translation>སྤྱད་ཚར།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>kylin-data</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>No capital letter errors</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>Format %1 partition, %2
|
||||
</source>
|
||||
<translation>རྣམ་གཞག་ཅན་གྱི་བགོ་ཁུལ།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>other</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>The password contains more than %1 characters of the same class consecutively</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>The password contains words from the real name of the user in some form</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>The password contains less than %1 uppercase letters</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>The password contains less than %1 lowercase letters</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>Fatal failure</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>The password contains forbidden words in some form</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>No password supplied</source>
|
||||
<translation>གསང་ཨང་མཁོ་འདོན་བྱས་མེད་པ།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Too short</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>The password is shorter than %1 characters</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>No special character error</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>No number error</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>The password contains the user name in some form</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>The configuration file is malformed</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>Show debug informations</source>
|
||||
<translation>ཚོད་སྒྲིག་ཆ་འཕྲིན་འཆར་བ།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>New Partition Table %1
|
||||
</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>The password fails the dictionary check</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>Swap partition</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>mounted</source>
|
||||
<translation>བཀལ་ཟིན་པ།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Bad integer value</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>Password generation failed - required entropy too low for settings</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>The password contains less than %1 character classes</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>Is empty</source>
|
||||
<translation>སྟོང་པ་ཡིན།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>%1 partition mountPoint %2
|
||||
</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>Create new partition %1,%2,%3
|
||||
</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>Setting %s is not of string type</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>Too long</source>
|
||||
<translation> རིང་དྲགས་པ།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>The password is too similar to the old one</source>
|
||||
<translation>གསང་ཨང་གསར་པ་དང་གསང་ཨང་རྙིང་པ་འདྲ་དྲགས་པ།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Too weak</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>The password is too short</source>
|
||||
<translation>གསང་ཨང་གསར་པ་ཐུང་དྲགས་པ།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>device</source>
|
||||
<translation>སྒྲིག་ཆས།(_D)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>The password contains too few non-alphanumeric characters</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>format</source>
|
||||
<translation>རྣམ་གཞག</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Delete partition %1
|
||||
</source>
|
||||
<translation>བགོ་ཁུལ་བསུབ་པ།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>lenovo</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>The password contains too long of a monotonic character sequence</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>system</source>
|
||||
<translation>རྒྱུད་ཁོངས།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>unused</source>
|
||||
<translation>སྤྱད་ཚར།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>The password is the same as the old one</source>
|
||||
<translation>གསང་ཨང་གསར་པ་དང་གསང་ཨང་རྙིང་པ་གཅིག་པ་རེད།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>The password contains too many same characters consecutively</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>The password contains too many characters of the same class consecutively</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>The password is just rotated old one</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>samsung</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>The password is a palindrome</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>seagate</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>Bad integer value of setting</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>The password contains monotonic sequence longer than %1 characters</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>Setting is not of string type</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>Unknown setting</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>Freespace</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>Memory allocation error</source>
|
||||
<translation>ནང་གསོག་བགོ་འགྲེམས་ཀྱི་ནོར་འཁྲུལ།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>The password contains too few digits</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>The password contains less than %1 non-alphanumeric characters</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>The password contains more than %1 same characters consecutively</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>Unknown error</source>
|
||||
<translation>གསང་ཨང་རྙོག་འཛིང་ཚད་བླང་བྱ་དང་མི་མཐུན་པ།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>The password contains too few uppercase letters</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>The password contains too few lowercase letters</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>Create new partition %1,%2
|
||||
</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>Setting is not of integer type</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>Opening the configuration file failed</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>No lowercase letter errors</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>The password contains less than %1 digits</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>Invalid character error</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>Cannot obtain random numbers from the RNG device</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>Setting %s is not of integer type</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>Format partition %1,%2,%3
|
||||
</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>The password does not contain enough character classes</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>Memory allocation error when setting</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>The password differs with case changes only</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>The first character is wrong</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>KInstaller::MainPartFrame</name>
|
||||
<message>
|
||||
<source>This machine not support EFI partition
|
||||
</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>Next</source>
|
||||
<translation>རྗེས་མ།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Repeated mountpoint
|
||||
</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>Boot partition too small
|
||||
</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>Formatted the whole disk</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>BootLoader method %1 inconsistent with the disk partition table
|
||||
type %2.</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>Coexist Install</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>Confirm Full Installation</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>Custom install</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>Boot filesystem invalid
|
||||
</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>Boot partition not in the first partition
|
||||
</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>Confirm the above operations</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>No Efi partition
|
||||
</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>InvalidId
|
||||
</source>
|
||||
<translation>ནུས་མེད།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>No backup partition
|
||||
</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>Choose Installation Method</source>
|
||||
<translation>སྒྲིག་འཇུག་བྱ་ཐབས།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Partition too small
|
||||
</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>Confirm Custom Installation</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>No root partition
|
||||
</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>No boot partition
|
||||
</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>Disk must be greater than 50G or No disk selected</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>Only one EFI partition is allowed
|
||||
</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>%1 设备上第1分区为 boot, 将设为 ext4;
|
||||
%1 设备上第2分区为 extend;
|
||||
%1 设备上第5分区为 /, 将设为 ext4;
|
||||
%1 设备上第6分区为 backup, 将设为 ext4;
|
||||
%1 设备上第7分区为 data, 将设为 ext4;
|
||||
%1 设备上第8分区为 swap, 将设为 swap;
|
||||
</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>Full install</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>Efi partition number invalid
|
||||
</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>%1 设备上第1分区为 EFI, 将设为 vfat;
|
||||
%1 设备上第2分区为 boot, 将设为 ext4;
|
||||
%1 设备上第3分区为 /, 将设为 ext4;
|
||||
%1 设备上第4分区为 backup, 将设为 ext4;
|
||||
%1 设备上第5分区为 data, 将设为 ext4;
|
||||
%1 设备上第6分区为 swap, 将设为 swap;
|
||||
</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>Root partition size is greater than 15GiB,
|
||||
but Huawei machines require greater than 25GiB.
|
||||
</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>Efi partition too small
|
||||
</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>BootLoader method %1 inconsistent with the disk partition table
|
||||
type %2, cannot have efi partition.</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>BackUp partition too small
|
||||
</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>The filesystem type FAT16 or FAT32 is not fully-function filesystem,
|
||||
except EFI partition, other partition not proposed</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>KInstaller::LanguageFrame</name>
|
||||
<message>
|
||||
<source>Next</source>
|
||||
<translation>རྗེས་མ།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Select Language</source>
|
||||
<translation>སྒྲིག་འགོད་སྐད་བརྡ།</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>KInstaller::LicenseFrame</name>
|
||||
<message>
|
||||
<source>Next</source>
|
||||
<translation>རྗེས་མ།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Read License Agreement</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>I have read and agree to the terms of the agreement</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>KInstaller::TimeZoneFrame</name>
|
||||
<message>
|
||||
<source>Next</source>
|
||||
<translation>རྗེས་མ།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Select Timezone</source>
|
||||
<translation>དུས་ཚོད་འདེམ་པ།</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>KInstaller::UserFrame</name>
|
||||
<message>
|
||||
<source>Next</source>
|
||||
<translation>རྗེས་མ།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Detecte fingerprint device.
|
||||
Fingerprint entry can be done through [biometric management tool].</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>hostname</source>
|
||||
<translation>གཙོ་འཁོར་གྱི་མིང་།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Automatic login on boot</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>Your username only letters,numbers,underscore and hyphen are allowed, no more than 32 bits in length.
|
||||
but start with a lowercase letter</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>username</source>
|
||||
<translation>སྤྱོད་མཁན་མིང་།:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Create User</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>Two password entries are inconsistent!</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>Your hostname only letters,numbers,underscore and hyphen are allowed, no more than 64 bits in length.</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>enter the password again</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>new password</source>
|
||||
<translation>གསང་གྲངས་གསར་པ།</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>KInstaller::InstallerMainWidget</name>
|
||||
<message>
|
||||
<source>back</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>quit</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>About to exit the installer, restart the computer.</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>Installer is about to exit and the computer will be shut down.</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>About to exit the installer and return to the trial interface.</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>keyboard</source>
|
||||
<translation>མཐེབ་གཞོང་།</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>KInstaller::MiddleFrameManager</name>
|
||||
<message>
|
||||
<source>next</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>KInstaller::FinishedFrame</name>
|
||||
<message>
|
||||
<source>Installation Finished</source>
|
||||
<translation>སྒྲིག་འཇུག་བྱས་ཚར།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Restart</source>
|
||||
<translation>བསྐྱར་སློང་།</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>KInstaller::InstallingFrame</name>
|
||||
<message>
|
||||
<source>The system is being installed, please do not turn off the computer</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>KInstaller::CustomPartitiondelegate</name>
|
||||
<message>
|
||||
<source>%1 MsDos new partition table will be created.
|
||||
</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>%1 GPT new partition table will be created.
|
||||
</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>#%1 partition on the device %2 will be mounted %3.
|
||||
</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>#%1 partition on the device %2 will be mounted %3.
|
||||
</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>#%1 partition on the device %2 will be deleted.
|
||||
</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>#%1 partition on the device %2 will be formated %3.
|
||||
</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>#%1 partition on the device %2 will be created.
|
||||
</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>KInstaller::PrepareInstallFrame</name>
|
||||
<message>
|
||||
<source>Start Installation</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>Check it and click [Start Installation]</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>KInstaller::CustomPartitionFrame</name>
|
||||
<message>
|
||||
<source>Revert</source>
|
||||
<translation>སླར་གསོ།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Device for boot loader path:</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>KInstaller::InstallErrorFrame</name>
|
||||
<message>
|
||||
<source>Installation Failed</source>
|
||||
<translation>སྒྲིག་འཇུག་ཕམ་པ།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>The computer restarted unexpectedly or encountered an error.
|
||||
please click "restart" to restart the computer, and then reinstall</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>Restart</source>
|
||||
<translation>བསྐྱར་སློང་།</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>KInstaller::InstallingOEMConfigFrame</name>
|
||||
<message>
|
||||
<source>Progressing system configuration</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>KInstaller::FullPartitionFrame</name>
|
||||
<message>
|
||||
<source>Please choose custom way to install, disk size less than 50G!</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<source>Full disk encryption</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
|
@ -0,0 +1,23 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
if [[ "${is_minimal}" == "true" ]]; then
|
||||
return 0
|
||||
elif [[ "${is_ghost}" == "true" ]]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
[ -d /cdrom/pool ] || \
|
||||
return 0
|
||||
|
||||
#sed -i "s/^/#/g" /etc/apt/sources.list
|
||||
|
||||
#TODO, 优化获取方式
|
||||
CODENAME=$(ls -l /cdrom/dists | awk '/^d/{print $NF}')
|
||||
|
||||
mv /target/etc/apt/sources.list{,.bak}
|
||||
echo "deb file:/cdrom ${CODENAME} main restricted" >>/target/etc/apt/sources.list
|
||||
|
||||
# todo, set timeout
|
||||
chroot /target apt-get update --allow-insecure-repositories -y
|
|
@ -0,0 +1,61 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
if [[ "${is_minimal}" == "true" ]]; then
|
||||
return 0
|
||||
elif [[ "${is_ghost}" == "true" ]]; then
|
||||
return 0
|
||||
# audit mode
|
||||
elif [[ "${is_audit_mode}" == "false" ]]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
USERNAME=test
|
||||
PASSWORD=qwe123
|
||||
AUTO_LOGIN=1
|
||||
KUID=11111
|
||||
# sudo 免密
|
||||
echo "test ALL=(ALL) NOPASSWD: ALL" >/target/etc/sudoers.d/test
|
||||
|
||||
### TODO, 重复代码
|
||||
# groups zz adm cdrom sudo dip plugdev lpadmin sambashare
|
||||
msg "设置用户 ${USERNAME}"
|
||||
chroot /target useradd -u ${KUID} -m -s /bin/bash "${USERNAME}"
|
||||
chroot /target sh -c "echo ${USERNAME}:${PASSWORD} | chpasswd"
|
||||
|
||||
add_groups() {
|
||||
user_default_groups=(adm cdrom sudo dip plugdev lpadmin sambashare debian-tor libvirtd lxd)
|
||||
for group in ${user_default_groups[*]}; do
|
||||
chroot /target sh -c 'adduser ${USERNAME} $group || true'
|
||||
done
|
||||
}
|
||||
|
||||
set_autologin() {
|
||||
if [[ "${AUTO_LOGIN}" == "1" ]]; then
|
||||
if [[ -d /target/etc/lightdm ]]; then
|
||||
# Configure LightDM autologin
|
||||
LightDMCustomFile=/target/etc/lightdm/lightdm.conf
|
||||
AutologinParameters="autologin-guest=false\n\
|
||||
autologin-user=${USERNAME}\n\
|
||||
autologin-user-timeout=0"
|
||||
if ! grep -qs '^autologin-user' ${LightDMCustomFile}; then
|
||||
if ! grep -qs '^\[Seat:\*\]' ${LightDMCustomFile}; then
|
||||
echo '[Seat:*]' >>${LightDMCustomFile}
|
||||
fi
|
||||
sed -i "s/\[Seat:\*\]/\[SeatDefaults]\n${AutologinParameters}/" ${LightDMCustomFile}
|
||||
# 设置 test 自动登录
|
||||
else
|
||||
sed -i "s/^autologin-user=.*$/autologin-user=${USERNAME}/g" ${LightDMCustomFile}
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
add_groups
|
||||
|
||||
set_autologin
|
||||
|
||||
if [[ "${is_audit_mode}" == "true" ]]; then
|
||||
chroot /target /bin/sh -c "unset DEBIAN_HAS_FRONTEND && apt-get install -y kylin-audit-mode"
|
||||
fi
|
|
@ -0,0 +1,64 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
if [[ "${is_minimal}" == "true" ]]; then
|
||||
return 0
|
||||
elif [[ "${is_ghost}" == "true" ]]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
# TODO, repeat code
|
||||
### Install third-party software packages for local
|
||||
do_third_party() {
|
||||
dirname=$1
|
||||
rsync -aHA ${dirname}/third-party /target/tmp
|
||||
chroot /target /bin/sh -c 'find /tmp/third-party -name "*.deb" >/tmp/third-party/packages.list'
|
||||
count=$(cat /target/tmp/third-party/packages.list | wc -l)
|
||||
if [ $count -ne 0 ]; then
|
||||
chroot /target /bin/sh -c 'unset DEBIAN_HAS_FRONTEND && UCF_FORCE_CONFFNEW=YES dpkg -i $(cat /tmp/third-party/packages.list | xargs)'
|
||||
fi
|
||||
rm -rf /target/tmp/third-party
|
||||
}
|
||||
|
||||
install_package() {
|
||||
pkgdir=$1
|
||||
if [[ ! -d /target/tmp/third-party/${pkgdir} ]]; then
|
||||
return
|
||||
fi
|
||||
|
||||
count=$(find /target/tmp/third-party/${pkgdir} -name "*.deb" | wc -l)
|
||||
|
||||
if [ $count -ne 0 ]; then
|
||||
chroot /target /bin/sh -c "unset DEBIAN_HAS_FRONTEND && UCF_FORCE_CONFFNEW=YES dpkg -i /tmp/third-party/${pkgdir}/*.deb"
|
||||
fi
|
||||
}
|
||||
|
||||
do_990third_party() {
|
||||
dirname=$1
|
||||
rsync -aHA ${dirname}/third-party /target/tmp
|
||||
install_package "common"
|
||||
|
||||
if [[ "${hw_typedata}" =~ "pguv" ]]; then
|
||||
install_package "pguv"
|
||||
elif [[ "${hw_typedata}" =~ "klvu" ]]; then
|
||||
install_package "klvu"
|
||||
elif [[ "${hw_typedata}" =~ "klvv" ]]; then
|
||||
install_package "klvv"
|
||||
fi
|
||||
|
||||
rm -rf /target/tmp/third-party
|
||||
}
|
||||
|
||||
if [[ -d /home/kylin/third-party ]]; then
|
||||
do_third_party "/home/kylin"
|
||||
fi
|
||||
|
||||
### Install third-party software packages
|
||||
if [[ -d /cdrom/third-party ]]; then
|
||||
if [[ "${is_990_9a0}" == true ]]; then
|
||||
do_990third_party "/cdrom"
|
||||
else
|
||||
do_third_party "/cdrom"
|
||||
fi
|
||||
fi
|
|
@ -0,0 +1,13 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
if [[ "${is_minimal}" = "true" ]]; then
|
||||
return 0
|
||||
elif [[ "${is_ghost}" = "true" ]]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
if [[ -f /target/etc/apt/sources.list.bak ]]; then
|
||||
mv /target/etc/apt/sources.list{.bak,}
|
||||
fi
|
|
@ -0,0 +1,126 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
# /boot/efi 512M
|
||||
# /boot 1024M
|
||||
# / 6
|
||||
# /backup free/9
|
||||
# /data 4
|
||||
# swap ram*1.2
|
||||
|
||||
if [[ "${is_efi}" == "false" ]]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
disk=$(get_value devpath)
|
||||
size=$(fdisk -s "${disk}")
|
||||
real_size=$(( size / 1024 ))
|
||||
|
||||
disk_custom=$(get_value disk-custom)
|
||||
|
||||
if [[ "${disk_custom}" == "true" ]]; then
|
||||
|
||||
|
||||
efi=$(get_value disk-efi)
|
||||
boot=$(get_value disk-boot)
|
||||
backup_size=$(get_value disk-backup)
|
||||
swap=$(get_value disk-swap)
|
||||
root_size=$(get_value disk-root)
|
||||
data_size=$(get_value disk-data)
|
||||
|
||||
|
||||
efi=$efi
|
||||
boot=$boot
|
||||
backup_size=$backup_size
|
||||
swap=$swap
|
||||
root_size=$root_size
|
||||
data_size=$data_size
|
||||
|
||||
disk_size=$(( real_size - efi - boot - backup_size - swap - root_size - data_size ))
|
||||
|
||||
if [ $disk_size -lt 0 ]; then
|
||||
echo " the size of disk_custom is false " || exit 1
|
||||
fi
|
||||
|
||||
|
||||
echo "efi: $efi"
|
||||
echo "boot: $boot"
|
||||
echo "root_size: $root_size"
|
||||
echo "backup_size: $backup_size"
|
||||
echo "data_size: $data_size"
|
||||
echo "swap: $swap"
|
||||
# echo "swapfile: $swapfile"
|
||||
return 0
|
||||
fi
|
||||
|
||||
|
||||
|
||||
### efi
|
||||
efi=512
|
||||
|
||||
### boot
|
||||
boot=1024
|
||||
|
||||
### backup
|
||||
backup_size=$(( real_size / 9 ))
|
||||
if [ $backup_size -lt 16384 ]; then
|
||||
backup_size=16384
|
||||
elif [ $backup_size -gt 102400 ]; then
|
||||
backup_size=102400
|
||||
fi
|
||||
|
||||
|
||||
ram=$(cat < /proc/meminfo | grep ^MemTotal: | awk '{print $2}')
|
||||
|
||||
|
||||
### swap
|
||||
swap=$(( ram * 12 / 1024 / 10 ))
|
||||
if [ $swap -gt 64000 ]; then
|
||||
swap=64000
|
||||
fi
|
||||
swapfile=0
|
||||
if [[ "${is_swapfile}" == "true" ]]; then
|
||||
swapfile=${swap}
|
||||
swap=0
|
||||
fi
|
||||
|
||||
|
||||
free_size=$(( real_size - efi - boot - backup_size - swap ))
|
||||
|
||||
|
||||
### root
|
||||
|
||||
root_size=$(( free_size * 6 / 10 ))
|
||||
if [ $root_size -lt 16384 ]; then
|
||||
root_size=16384
|
||||
if [ $free_size -lt 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
elif [ $root_size -gt 102400 ]; then
|
||||
root_size=102400
|
||||
fi
|
||||
root_size=$((root_size + swapfile))
|
||||
|
||||
|
||||
### data
|
||||
data_size=$(( free_size - root_size ))
|
||||
if [ $data_size -lt 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
data_device=$(get_value data-device)
|
||||
if [[ -n ${data_device} ]]; then
|
||||
free_size=$(( real_size - efi - boot - swap ))
|
||||
root_size=$(( free_size * 5 / 10 ))
|
||||
backup_size=$(( free_size - root_size ))
|
||||
data_size=0
|
||||
fi
|
||||
|
||||
echo "efi: $efi"
|
||||
echo "boot: $boot"
|
||||
echo "root_size: $root_size"
|
||||
echo "backup_size: $backup_size"
|
||||
echo "data_size: $data_size"
|
||||
echo "swap: $swap"
|
||||
echo "swapfile: $swapfile"
|
|
@ -0,0 +1,119 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
# /boot 1024M
|
||||
# / 6
|
||||
# /backup free/9
|
||||
# /data 4
|
||||
# swap ram*1.2
|
||||
|
||||
if [[ "${is_efi}" == "true" ]]; then
|
||||
return
|
||||
fi
|
||||
|
||||
disk=$(get_value devpath)
|
||||
size=$(fdisk -s "${disk}")
|
||||
real_size=$(( size / 1024 ))
|
||||
|
||||
disk_custom=$(get_value disk-custom)
|
||||
|
||||
if [[ "${disk_custom}" == "true" ]]; then
|
||||
|
||||
|
||||
# efi=$(get_value disk-efi)
|
||||
boot=$(get_value disk-boot)
|
||||
backup_size=$(get_value disk-backup)
|
||||
swap=$(get_value disk-swap)
|
||||
root_size=$(get_value disk-root)
|
||||
data_size=$(get_value disk-data)
|
||||
|
||||
|
||||
# efi=$efi
|
||||
boot=$boot
|
||||
backup_size=$backup_size
|
||||
swap=$swap
|
||||
root_size=$root_size
|
||||
data_size=$data_size
|
||||
|
||||
disk_size=$(( real_size - boot - backup_size - swap - root_size - data_size ))
|
||||
|
||||
if [ $disk_size -lt 0 ]; then
|
||||
echo " the size of disk_custom is false " || exit 1
|
||||
fi
|
||||
|
||||
|
||||
# echo "efi: $efi"
|
||||
echo "boot: $boot"
|
||||
echo "root_size: $root_size"
|
||||
echo "backup_size: $backup_size"
|
||||
echo "data_size: $data_size"
|
||||
echo "swap: $swap"
|
||||
# echo "swapfile: $swapfile"
|
||||
return 0
|
||||
fi
|
||||
|
||||
|
||||
|
||||
### boot
|
||||
boot=1024
|
||||
|
||||
|
||||
### backup
|
||||
backup_size=$(( real_size / 9 ))
|
||||
if [ $backup_size -lt 16384 ]; then
|
||||
backup_size=16384
|
||||
elif [ $backup_size -gt 102400 ]; then
|
||||
backup_size=102400
|
||||
fi
|
||||
|
||||
|
||||
ram=$(cat < /proc/meminfo | grep ^MemTotal: | awk '{print $2}')
|
||||
|
||||
|
||||
### swap
|
||||
swap=$(( ram * 12 / 1024 / 10 ))
|
||||
if [ $swap -gt 64000 ]; then
|
||||
swap=64000
|
||||
fi
|
||||
swapfile=0
|
||||
if [[ "${is_swapfile}" == "true" ]]; then
|
||||
swapfile=${swap}
|
||||
swap=0
|
||||
fi
|
||||
free_size=$(( real_size - boot - backup_size - swap ))
|
||||
|
||||
|
||||
### root
|
||||
root_size=$(( free_size * 6 / 10 ))
|
||||
if [ $root_size -lt 16384 ]; then
|
||||
root_size=16384
|
||||
if [ $free_size -lt 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
elif [ $root_size -gt 102400 ]; then
|
||||
root_size=102400
|
||||
fi
|
||||
root_size=$((root_size + swapfile))
|
||||
|
||||
### data
|
||||
data_size=$(( free_size - root_size ))
|
||||
if [ $data_size -lt 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
data_device=$(get_value data-device)
|
||||
if [[ -n ${data_device} ]]; then
|
||||
free_size=$(( real_size - boot - swap ))
|
||||
root_size=$(( free_size * 5 / 10 ))
|
||||
backup_size=$(( free_size - root_size ))
|
||||
data_size=0
|
||||
fi
|
||||
|
||||
|
||||
echo "boot: $boot"
|
||||
echo "root_size: $root_size"
|
||||
echo "backup_size: $backup_size"
|
||||
echo "data_size: $data_size"
|
||||
echo "swap: $swap"
|
||||
echo "swapfile: $swapfile"
|
|
@ -0,0 +1,19 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
if [[ "${is_minimal}" == "true" ]]; then
|
||||
return 0
|
||||
elif [[ "${is_ghost}" == "true" ]]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
TIMEZONE=$(get_value timezone)
|
||||
|
||||
msg "设置时区为 ${TIMEZONE}"
|
||||
ln -sf /usr/share/zoneinfo/"${TIMEZONE}" /etc/localtime
|
||||
|
||||
# 写入硬件时间
|
||||
if [[ -f /dev/rtc0 ]]; then
|
||||
hwclock -w
|
||||
fi
|
|
@ -0,0 +1,23 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
if [[ "${is_minimal}" = "true" ]]; then
|
||||
return 0
|
||||
elif [[ "${is_ghost}" = "true" ]]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
LANGUAGE=$(get_value language)
|
||||
|
||||
echo "zh_CN.UTF-8 UTF-8
|
||||
en_US.UTF-8 UTF-8
|
||||
bo_CN.UTF-8 UTF-8" >/etc/locale.gen
|
||||
|
||||
msg "设置语言为 ${LANGUAGE}"
|
||||
echo "LANG=${LANGUAGE}.UTF-8" >/etc/default/locale
|
||||
if [[ "${LANGUAGE}" = "zh_CN" ]]; then
|
||||
echo "LANGUAGE=\"zh_CN:zh\"" >>/etc/default/locale
|
||||
fi
|
||||
|
||||
locale-gen
|
|
@ -0,0 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ x"${is_minimal}" == x"true" ]; then
|
||||
return
|
||||
fi
|
|
@ -0,0 +1,2 @@
|
|||
#!/bin/bash
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
if [[ "${is_minimal}" = "true" ]]; then
|
||||
return 0
|
||||
elif [[ "${is_ghost}" = "true" ]]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
HOSTNAME=$(get_value hostname)
|
||||
# oem mode
|
||||
if [[ "${is_oem_mode}" = "true" ]]; then
|
||||
HOSTNAME=oem-PC
|
||||
fi
|
||||
|
||||
echo "${HOSTNAME}" >/etc/hostname
|
||||
#hostnamectl set-hostname "${HOSTNAME}"
|
||||
|
||||
echo -e "127.0.0.1\tlocalhost
|
||||
127.0.1.1\t${HOSTNAME}
|
||||
|
||||
# The following lines are desirable for IPv6 capable hosts
|
||||
::1 ip6-localhost ip6-loopback
|
||||
fe00::0 ip6-localnet
|
||||
ff00::0 ip6-mcastprefix
|
||||
ff02::1 ip6-allnodes
|
||||
ff02::2 ip6-allrouters
|
||||
" >/etc/hosts
|
|
@ -0,0 +1,2 @@
|
|||
#!/bin/bash
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
if [[ "${is_minimal}" = "true" ]]; then
|
||||
return 0
|
||||
elif [[ "${is_ghost}" = "true" ]]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
[ -d /cdrom/pool ] || \
|
||||
return 0
|
||||
|
||||
sed -i "s/^/#/g" /etc/apt/sources.list
|
||||
|
||||
#TODO, 优化获取方式
|
||||
CODENAME=$(ls -l /cdrom/dists | awk '/^d/{print $NF}')
|
||||
|
||||
#rm -rf /etc/apt/sources.list.d
|
||||
echo "deb file:/cdrom ${CODENAME} main restricted" >>/etc/apt/sources.list
|
||||
|
||||
# todo, set timeout
|
||||
apt-get update --allow-insecure-repositories -y
|
|
@ -0,0 +1,67 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
karch=$(uname -m)
|
||||
# 字符串包含
|
||||
if [[ ${karch} =~ "mips" ]] || [[ ${karch} =~ "loongarch" ]]; then
|
||||
do_mips_bootloader
|
||||
return 0
|
||||
elif [[ ${karch} =~ "sw_64" ]]; then
|
||||
do_sw64_bootloader
|
||||
return 0
|
||||
fi
|
||||
|
||||
# TODO, IS_UEFI
|
||||
|
||||
#TODO, -f lsb-release
|
||||
#DISTRO_ID=$(lsb_release -is)
|
||||
automatic=$(get_value automatic-installation)
|
||||
disk=
|
||||
if [[ "${automatic}" = "1" ]]; then
|
||||
disk=$(get_value devpath)
|
||||
else
|
||||
disktmp1=$(get_value bootloader | sed 's/\"//g')
|
||||
disk="${disktmp1%% *}"
|
||||
fi
|
||||
|
||||
BOOT_METHOD="UEFI"
|
||||
if [[ "${is_efi}" = "false" ]]; then
|
||||
BOOT_METHOD="legacy"
|
||||
fi
|
||||
|
||||
case ${BOOT_METHOD} in
|
||||
"UEFI")
|
||||
# TODO, 统一安装
|
||||
if ! dpkg -l | grep -q grub-efi; then
|
||||
apt install -y grub-efi efibootmgr
|
||||
fi
|
||||
grub-install || \
|
||||
msg "grub-install for uefi failed!!!"
|
||||
#TODO, copy to boot
|
||||
#TODO, fix boot order
|
||||
|
||||
;;
|
||||
"legacy")
|
||||
if [[ $(uname -m) != "aarch64" ]]; then
|
||||
apt install -y grub-pc
|
||||
fi
|
||||
grub-install --no-floppy --force "${disk}" || \
|
||||
msg "grub-install for legacy failed!!!"
|
||||
|
||||
;;
|
||||
esac
|
||||
|
||||
# 兼容性考虑
|
||||
copy_efi() {
|
||||
if [[ $(uname -m) = "aarch64" ]]; then
|
||||
if [[ -f /boot/efi/EFI/kylin/grubaa64.efi ]]; then
|
||||
mkdir -p /boot/efi/EFI/neokylin
|
||||
cp /boot/efi/EFI/kylin/grubaa64.efi /boot/efi/EFI/neokylin/grubaa64.efi
|
||||
mkdir -p /boot/efi/EFI/boot
|
||||
cp /boot/efi/EFI/kylin/grubaa64.efi /boot/efi/EFI/boot/grubaa64.efi
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
copy_efi
|
|
@ -0,0 +1,65 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
if [[ "${is_minimal}" = "true" ]]; then
|
||||
return 0
|
||||
elif [[ "${is_ghost}" = "true" ]]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
USERNAME=$(get_value username)
|
||||
PASSWORD=$(get_value_bytearray password)
|
||||
AUTO_LOGIN=$(get_value autologin)
|
||||
KUID=1000
|
||||
|
||||
# oem mode
|
||||
if [[ "${is_oem_mode}" = "true" ]]; then
|
||||
USERNAME=oem
|
||||
PASSWORD=Kylin123.
|
||||
AUTO_LOGIN=1
|
||||
KUID=29999
|
||||
# sudo 免密
|
||||
echo "oem ALL=(ALL) NOPASSWD: ALL" >/etc/sudoers.d/oem
|
||||
fi
|
||||
|
||||
### TODO
|
||||
# groups zz adm cdrom sudo dip plugdev lpadmin sambashare
|
||||
msg "设置用户 ${USERNAME}"
|
||||
useradd -m -s /bin/bash -u ${KUID} "${USERNAME}"
|
||||
usermod -c "${USERNAME}" "${USERNAME}"
|
||||
echo "${USERNAME}:${PASSWORD}" | chpasswd
|
||||
# /etc/sudoers
|
||||
|
||||
add_groups() {
|
||||
user_default_groups=(adm cdrom sudo dip plugdev lpadmin sambashare debian-tor libvirtd lxd)
|
||||
for group in ${user_default_groups[*]}; do
|
||||
adduser ${USERNAME} $group || true
|
||||
done
|
||||
}
|
||||
|
||||
set_autologin() {
|
||||
if [[ "${AUTO_LOGIN}" = "1" ]]; then
|
||||
if [[ -d /etc/lightdm ]]; then
|
||||
# Configure LightDM autologin
|
||||
LightDMCustomFile=/etc/lightdm/lightdm.conf
|
||||
AutologinParameters="autologin-guest=false\n\
|
||||
autologin-user=${USERNAME}\n\
|
||||
autologin-user-timeout=0"
|
||||
if ! grep -qs '^autologin-user' ${LightDMCustomFile}; then
|
||||
if ! grep -qs '^\[Seat:\*\]' ${LightDMCustomFile}; then
|
||||
echo '[Seat:*]' >>${LightDMCustomFile}
|
||||
fi
|
||||
sed -i "s/\[Seat:\*\]/\[SeatDefaults]\n${AutologinParameters}/" ${LightDMCustomFile}
|
||||
# oem config scenario
|
||||
else
|
||||
#sed -i "s/^\(\(str *\)\?autologin-user\)=.*$/\1=${USERNAME}/g;" /etc/lightdm/lightdm.conf
|
||||
sed -i "s/^autologin-user=.*$/autologin-user=${USERNAME}/g" ${LightDMCustomFile}
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
add_groups
|
||||
|
||||
set_autologin
|
|
@ -0,0 +1,44 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
# TODO, 多次重复
|
||||
disk=$(get_value devpath)
|
||||
if echo "${disk}" | grep -q nvme; then
|
||||
disk=${disk}p
|
||||
fi
|
||||
|
||||
readonly GENFSTAB="${IN_TARGET}"/in_chroot/genfstab
|
||||
if [[ -f "${GENFSTAB}" ]]; then
|
||||
if [[ "${is_990_9a0}" = "true" ]]; then
|
||||
bash "${GENFSTAB}" -p / >/etc/fstab
|
||||
# 990, 9a0 不自动挂载 swapfile
|
||||
sed -i "/${swap_file}/d" /etc/fstab
|
||||
sed -i '/\/boot/s/rw,/ro,/g' /etc/fstab
|
||||
else
|
||||
bash "${GENFSTAB}" -p -U / >/etc/fstab
|
||||
fi
|
||||
fi
|
||||
|
||||
# 删除安装介质
|
||||
tac /etc/fstab | sed -n '/cdrom/,+1!p' | tac >/etc/fstab.new
|
||||
mv /etc/fstab.new /etc/fstab
|
||||
|
||||
# 修改 /data, /backup 的 options
|
||||
#sed -n '/\/data /p' /etc/fstab |
|
||||
# while read dev mp fs options; do
|
||||
# sed -i "s/\\$mp .*/\\$mp \t$fs \trw,user,x-gvfs-show,nosuid,nofail \t0 0/" /etc/fstab
|
||||
# done
|
||||
|
||||
sed -n '/\/backup /p' /etc/fstab |
|
||||
while read dev mp fs options; do
|
||||
sed -i "s/\\$mp .*/\\$mp \t$fs \tnoauto \t0 0/" /etc/fstab
|
||||
done
|
||||
|
||||
# add bind
|
||||
if grep -q '/home' /proc/mounts; then
|
||||
echo -e "/data/home \t/home \tnone \tdefaults,bind \t0 0" >>/etc/fstab
|
||||
fi
|
||||
if grep -q '/root' /proc/mounts; then
|
||||
echo -e "/data/root \t/root \tnone \tdefaults,bind \t0 0" >>/etc/fstab
|
||||
fi
|
|
@ -0,0 +1,29 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
if [[ $(uname -m) =~ 'sw_64' ]]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
if grep -q 'zh_CN' /etc/default/locale; then
|
||||
touch /usr/share/initramfs-tools/scripts/lang_is_zh
|
||||
else
|
||||
rm -f /usr/share/initramfs-tools/scripts/lang_is_zh || true
|
||||
fi
|
||||
|
||||
if [[ -f /usr/sbin/update-initramfs ]]; then
|
||||
msg "更新 initramfs"
|
||||
update-initramfs -u
|
||||
sync
|
||||
fi
|
||||
|
||||
if [[ -f /usr/sbin/update-grub ]]; then
|
||||
update-grub
|
||||
fi
|
||||
|
||||
#
|
||||
if [[ "x`archdetect`" = "xloongarch64/generic" ]] && [[ -f /usr/sbin/grub-install ]]; then
|
||||
grub-install || true
|
||||
fi
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
if [[ "${is_990_9a0}" = "true" ]]; then
|
||||
hw_next_boot "hd"
|
||||
fi
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
if [[ "${is_minimal}" = "true" ]]; then
|
||||
return 0
|
||||
elif [[ "${is_ghost}" = "true" ]]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
if [[ -d /cdrom/QC ]]; then
|
||||
/usr/bin/rsync -a /cdrom/QC/ /usr/share/oem-test/
|
||||
fi
|
|
@ -0,0 +1,15 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
if [[ "${is_minimal}" = "true" ]]; then
|
||||
return 0
|
||||
elif [[ "${is_ghost}" = "true" ]]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
### automatically install the packages listed in the /cdrom/.kylin-post-packages
|
||||
if [[ -f /cdrom/.kylin-post-packages ]]; then
|
||||
msg "安装光盘源列表包"
|
||||
/bin/sh -c "unset DEBIAN_HAS_FRONTEND && apt-get install -y $(cat /cdrom/.kylin-post-packages | grep -v ^\# | xargs)"
|
||||
fi
|
|
@ -0,0 +1,34 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
if [[ "${is_minimal}" = "true" ]]; then
|
||||
return 0
|
||||
elif [[ "${is_ghost}" = "true" ]]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
sed -i "/^deb cdrom:/s/^/#/" /etc/apt/sources.list
|
||||
|
||||
### TODO v10pro only
|
||||
DISTRIB_RELEASE=$(grep -r PRETTY_NAME= /etc/os-release)
|
||||
DISTRIB_RELEASE=${DISTRIB_RELEASE#*=}
|
||||
|
||||
case ${DISTRIB_RELEASE} in
|
||||
'"Kylin V10 SP1"')
|
||||
echo "
|
||||
deb http://archive.kylinos.cn/kylin/KYLIN-ALL 10.1 main restricted universe multiverse
|
||||
deb http://archive.kylinos.cn/kylin/partner 10.1 main" >/etc/apt/sources.list
|
||||
;;
|
||||
'"Kylin V10"')
|
||||
echo "
|
||||
deb http://archive.kylinos.cn/kylin/KYLIN-ALL 10.0 main restricted universe multiverse
|
||||
" >/etc/apt/sources.list
|
||||
;;
|
||||
*)
|
||||
echo "
|
||||
deb http://archive.launchpad.dev/kylin/ v101 main restricted universe multiverse
|
||||
deb http://archive.launchpad.dev/kylin-desktop/ v101 main restricted universe multiverse
|
||||
" >/etc/apt/sources.list
|
||||
;;
|
||||
esac
|
|
@ -0,0 +1,18 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
# 删除链接,重新拷贝授权文件
|
||||
if [[ -L /etc/.kyinfo ]]; then
|
||||
rm -f /etc/.kyinfo
|
||||
if [[ -f /cdrom/.kyinfo ]]; then
|
||||
rsync -a /cdrom/.kyinfo /etc
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -L /etc/LICENSE ]]; then
|
||||
rm -f /etc/LICENSE
|
||||
if [[ -f /cdrom/LICENSE ]]; then
|
||||
rsync -a /cdrom/LICENSE /etc
|
||||
fi
|
||||
fi
|
|
@ -0,0 +1,47 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
# remove package list
|
||||
packages_list_remove=(
|
||||
kylin-os-installer
|
||||
casper
|
||||
ukui-installer-wayland
|
||||
ubiquity
|
||||
)
|
||||
|
||||
# oem mode 不删除安装包
|
||||
if [[ "${is_oem_mode}" = "true" ]]; then
|
||||
packages_list_remove=(
|
||||
ukui-installer-wayland
|
||||
)
|
||||
if [[ "${is_990_9a0}" = "true" ]]; then
|
||||
packages_list_remove=(
|
||||
casper
|
||||
)
|
||||
fi
|
||||
|
||||
if egrep -qi '3A5000' /proc/cpuinfo; then
|
||||
packages_list_remove=(
|
||||
ukui-installer-wayland
|
||||
casper
|
||||
)
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
if [[ "${is_ghost}" == "true" ]]; then
|
||||
packages_list_remove=(
|
||||
kylin-os-installer
|
||||
casper
|
||||
)
|
||||
|
||||
fi
|
||||
|
||||
|
||||
for i in ${packages_list_remove[*]}; do
|
||||
if dpkg -l | grep -q $i; then
|
||||
msg "移除 $i"
|
||||
apt purge -y $i
|
||||
fi
|
||||
done
|
|
@ -0,0 +1,71 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
if [[ "${is_minimal}" = "true" ]]; then
|
||||
return 0
|
||||
elif [[ "${is_ghost}" = "true" ]]; then
|
||||
return 0
|
||||
elif [[ "${is_oem_mode}" = "false" ]]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
oem_mode=
|
||||
if grep -q 'test-mode' /proc/cmdline; then
|
||||
oem_mode="oem-automatic"
|
||||
# 拷贝自定义的配置
|
||||
if [[ -f /cdrom/kyple-installer.cfg ]]; then
|
||||
cp /cdrom/kyple-installer.cfg /usr/share/kylin-os-installer/ky-installer.cfg
|
||||
echo 'test-mode=true' >>/usr/share/kylin-os-installer/ky-installer.cfg
|
||||
fi
|
||||
else
|
||||
oem_mode="oem"
|
||||
fi
|
||||
|
||||
if grep -q 'auti-mode' /proc/cmdline; then
|
||||
if [[ -f /usr/share/kylin-os-installer/data/oem-qc.desktop ]]; then
|
||||
cp -a /usr/share/kylin-os-installer/data/oem-qc.desktop /etc/xdg/autostart
|
||||
cp -a /usr/share/kylin-os-installer/data/oem-qc /usr/sbin/oem-qc
|
||||
|
||||
if grep -q 'auti-only' /proc/cmdline; then
|
||||
cp -a /usr/share/kylin-os-installer/scripts/oem.sh /usr/sbin/oem-second
|
||||
if [[ -f /cdrom/ky-installer.cfg ]]; then
|
||||
cp /cdrom/ky-installer.cfg /usr/share/kylin-os-installer/ky-installer.cfg
|
||||
fi
|
||||
else
|
||||
cp -a /usr/share/kylin-os-installer/scripts/oem-second /usr/sbin/
|
||||
fi
|
||||
fi
|
||||
if [[ -f /usr/share/kylin-os-installer/data/oem-unlock.desktop ]]; then
|
||||
cp -a /usr/share/kylin-os-installer/data/oem-unlock.desktop /etc/xdg/autostart
|
||||
cp -a /usr/share/kylin-os-installer/data/oem-unlock /usr/sbin/oem-unlock
|
||||
fi
|
||||
else
|
||||
# if [[ -f /usr/share/kylin-os-installer/data/oem-qc.service ]]; then
|
||||
# cp -a /usr/share/kylin-os-installer/data/oem-qc.service /lib/systemd/system
|
||||
# cp -a /usr/share/kylin-os-installer/scripts/oem-second /usr/sbin/
|
||||
# /bin/systemctl enable oem-qc.service
|
||||
# fi
|
||||
|
||||
cp -a /usr/share/applications/kylin-os-installer.desktop /etc/xdg/autostart
|
||||
sed -i "/Exec/d" /etc/xdg/autostart/kylin-os-installer.desktop
|
||||
echo "Exec=/usr/bin/kylin-os-installer-${oem_mode}" >>/etc/xdg/autostart/kylin-os-installer.desktop
|
||||
fi
|
||||
|
||||
|
||||
|
||||
if [[ "${is_990_9a0}" = "true" ]]; then
|
||||
sed -i "s/kylin-os-installer/kylin-os-installer-${oem_mode}/" /usr/bin/start-installer
|
||||
else
|
||||
# cp -a /usr/share/applications/kylin-os-installer.desktop /etc/xdg/autostart
|
||||
# sed -i "/Exec/d" /etc/xdg/autostart/kylin-os-installer.desktop
|
||||
# echo "Exec=/usr/bin/kylin-os-installer-${oem_mode}" >>/etc/xdg/autostart/kylin-os-installer.desktop
|
||||
|
||||
/bin/systemctl disable kylin-os-installer
|
||||
fi
|
||||
|
||||
# 删除用户与重启 lightdm
|
||||
if [[ -f /usr/share/kylin-os-installer/data/delete-oem-user.service ]]; then
|
||||
cp -a /usr/share/kylin-os-installer/data/delete-oem-user.service /lib/systemd/system
|
||||
/bin/systemctl disable delete-oem-user.service
|
||||
fi
|
|
@ -0,0 +1,513 @@
|
|||
#!/bin/bash
|
||||
|
||||
shopt -s extglob
|
||||
|
||||
# generated from util-linux source: libmount/src/utils.c
|
||||
declare -A pseudofs_types=([anon_inodefs]=1
|
||||
[autofs]=1
|
||||
[bdev]=1
|
||||
[bpf]=1
|
||||
[binfmt_misc]=1
|
||||
[cgroup]=1
|
||||
[cgroup2]=1
|
||||
[configfs]=1
|
||||
[cpuset]=1
|
||||
[debugfs]=1
|
||||
[devfs]=1
|
||||
[devpts]=1
|
||||
[devtmpfs]=1
|
||||
[dlmfs]=1
|
||||
[efivarfs]=1
|
||||
[fuse.gvfs-fuse-daemon]=1
|
||||
[fusectl]=1
|
||||
[hugetlbfs]=1
|
||||
[mqueue]=1
|
||||
[nfsd]=1
|
||||
[none]=1
|
||||
[pipefs]=1
|
||||
[proc]=1
|
||||
[pstore]=1
|
||||
[ramfs]=1
|
||||
[rootfs]=1
|
||||
[rpc_pipefs]=1
|
||||
[securityfs]=1
|
||||
[sockfs]=1
|
||||
[spufs]=1
|
||||
[sysfs]=1
|
||||
[tmpfs]=1)
|
||||
|
||||
# generated from: pkgfile -vbr '/fsck\..+' | awk -F. '{ print $NF }' | sort
|
||||
declare -A fsck_types=([cramfs]=1
|
||||
[exfat]=1
|
||||
[ext2]=1
|
||||
[ext3]=1
|
||||
[ext4]=1
|
||||
[ext4dev]=1
|
||||
[jfs]=1
|
||||
[minix]=1
|
||||
[msdos]=1
|
||||
[reiserfs]=1
|
||||
[vfat]=1
|
||||
[xfs]=1)
|
||||
|
||||
out() { printf "$1 $2\n" "${@:3}"; }
|
||||
error() { out "==> ERROR:" "$@"; } >&2
|
||||
warning() { out "==> WARNING:" "$@"; } >&2
|
||||
msg() { out "==>" "$@"; }
|
||||
msg2() { out " ->" "$@";}
|
||||
die() { error "$@"; exit 1; }
|
||||
|
||||
ignore_error() {
|
||||
"$@" 2>/dev/null
|
||||
return 0
|
||||
}
|
||||
|
||||
in_array() {
|
||||
local i
|
||||
for i in "${@:2}"; do
|
||||
[[ $1 = "$i" ]] && return 0
|
||||
done
|
||||
return 1
|
||||
}
|
||||
|
||||
chroot_add_mount() {
|
||||
mount "$@" && CHROOT_ACTIVE_MOUNTS=("$2" "${CHROOT_ACTIVE_MOUNTS[@]}")
|
||||
}
|
||||
|
||||
chroot_maybe_add_mount() {
|
||||
local cond=$1; shift
|
||||
if eval "$cond"; then
|
||||
chroot_add_mount "$@"
|
||||
fi
|
||||
}
|
||||
|
||||
chroot_policyd() {
|
||||
cat << EOF > "$1/usr/sbin/policy-rc.d"
|
||||
#!/bin/sh
|
||||
exit 101
|
||||
EOF
|
||||
chmod +x "$1/usr/sbin/policy-rc.d"
|
||||
}
|
||||
|
||||
chroot_setup() {
|
||||
CHROOT_ACTIVE_MOUNTS=()
|
||||
[[ $(trap -p EXIT) ]] && die '(BUG): attempting to overwrite existing EXIT trap'
|
||||
trap "chroot_teardown $1" EXIT
|
||||
|
||||
chroot_add_mount proc "$1/proc" -t proc -o nosuid,noexec,nodev &&
|
||||
chroot_add_mount sys "$1/sys" -t sysfs -o nosuid,noexec,nodev,ro &&
|
||||
ignore_error chroot_maybe_add_mount "[[ -d '$1/sys/firmware/efi/efivars' ]]" \
|
||||
efivarfs "$1/sys/firmware/efi/efivars" -t efivarfs -o nosuid,noexec,nodev &&
|
||||
chroot_add_mount udev "$1/dev" -t devtmpfs -o mode=0755,nosuid &&
|
||||
chroot_add_mount devpts "$1/dev/pts" -t devpts -o mode=0620,gid=5,nosuid,noexec &&
|
||||
chroot_add_mount shm "$1/dev/shm" -t tmpfs -o mode=1777,nosuid,nodev &&
|
||||
chroot_add_mount /run "$1/run" --bind &&
|
||||
chroot_add_mount tmp "$1/tmp" -t tmpfs -o mode=1777,strictatime,nodev,nosuid
|
||||
chroot_policyd "$1"
|
||||
}
|
||||
|
||||
chroot_teardown() {
|
||||
if (( ${#CHROOT_ACTIVE_MOUNTS[@]} )); then
|
||||
umount "${CHROOT_ACTIVE_MOUNTS[@]}"
|
||||
fi
|
||||
unset CHROOT_ACTIVE_MOUNTS
|
||||
rm -f "$1/usr/sbin/policy-rc.d"
|
||||
}
|
||||
|
||||
try_cast() (
|
||||
_=$(( $1#$2 ))
|
||||
) 2>/dev/null
|
||||
|
||||
valid_number_of_base() {
|
||||
local base=$1 len=${#2} i=
|
||||
|
||||
for (( i = 0; i < len; i++ )); do
|
||||
try_cast "$base" "${2:i:1}" || return 1
|
||||
done
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
mangle() {
|
||||
local i= chr= out=
|
||||
local {a..f}= {A..F}=
|
||||
|
||||
for (( i = 0; i < ${#1}; i++ )); do
|
||||
chr=${1:i:1}
|
||||
case $chr in
|
||||
[[:space:]\\])
|
||||
printf -v chr '%03o' "'$chr"
|
||||
out+=\\
|
||||
;;
|
||||
esac
|
||||
out+=$chr
|
||||
done
|
||||
|
||||
printf '%s' "$out"
|
||||
}
|
||||
|
||||
unmangle() {
|
||||
local i= chr= out= len=$(( ${#1} - 4 ))
|
||||
local {a..f}= {A..F}=
|
||||
|
||||
for (( i = 0; i < len; i++ )); do
|
||||
chr=${1:i:1}
|
||||
case $chr in
|
||||
\\)
|
||||
if valid_number_of_base 8 "${1:i+1:3}" ||
|
||||
valid_number_of_base 16 "${1:i+1:3}"; then
|
||||
printf -v chr '%b' "${1:i:4}"
|
||||
(( i += 3 ))
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
out+=$chr
|
||||
done
|
||||
|
||||
printf '%s' "$out${1:i}"
|
||||
}
|
||||
|
||||
optstring_match_option() {
|
||||
local candidate pat patterns
|
||||
|
||||
IFS=, read -ra patterns <<<"$1"
|
||||
for pat in "${patterns[@]}"; do
|
||||
if [[ $pat = *=* ]]; then
|
||||
# "key=val" will only ever match "key=val"
|
||||
candidate=$2
|
||||
else
|
||||
# "key" will match "key", but also "key=anyval"
|
||||
candidate=${2%%=*}
|
||||
fi
|
||||
|
||||
[[ $pat = "$candidate" ]] && return 0
|
||||
done
|
||||
|
||||
return 1
|
||||
}
|
||||
|
||||
optstring_remove_option() {
|
||||
local o options_ remove=$2 IFS=,
|
||||
|
||||
read -ra options_ <<<"${!1}"
|
||||
|
||||
for o in "${!options_[@]}"; do
|
||||
optstring_match_option "$remove" "${options_[o]}" && unset 'options_[o]'
|
||||
done
|
||||
|
||||
declare -g "$1=${options_[*]}"
|
||||
}
|
||||
|
||||
optstring_normalize() {
|
||||
local o options_ norm IFS=,
|
||||
|
||||
read -ra options_ <<<"${!1}"
|
||||
|
||||
# remove empty fields
|
||||
for o in "${options_[@]}"; do
|
||||
[[ $o ]] && norm+=("$o")
|
||||
done
|
||||
|
||||
# avoid empty strings, reset to "defaults"
|
||||
declare -g "$1=${norm[*]:-defaults}"
|
||||
}
|
||||
|
||||
optstring_append_option() {
|
||||
if ! optstring_has_option "$1" "$2"; then
|
||||
declare -g "$1=${!1},$2"
|
||||
fi
|
||||
|
||||
optstring_normalize "$1"
|
||||
}
|
||||
|
||||
optstring_prepend_option() {
|
||||
local options_=$1
|
||||
|
||||
if ! optstring_has_option "$1" "$2"; then
|
||||
declare -g "$1=$2,${!1}"
|
||||
fi
|
||||
|
||||
optstring_normalize "$1"
|
||||
}
|
||||
|
||||
optstring_get_option() {
|
||||
local opts o
|
||||
|
||||
IFS=, read -ra opts <<<"${!1}"
|
||||
for o in "${opts[@]}"; do
|
||||
if optstring_match_option "$2" "$o"; then
|
||||
declare -g "$o"
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
|
||||
return 1
|
||||
}
|
||||
|
||||
optstring_has_option() {
|
||||
local "${2%%=*}"
|
||||
|
||||
optstring_get_option "$1" "$2"
|
||||
}
|
||||
|
||||
dm_name_for_devnode() {
|
||||
read dm_name <"/sys/class/block/${1#/dev/}/dm/name"
|
||||
if [[ $dm_name ]]; then
|
||||
printf '/dev/mapper/%s' "$dm_name"
|
||||
else
|
||||
# don't leave the caller hanging, just print the original name
|
||||
# along with the failure.
|
||||
print '%s' "$1"
|
||||
error 'Failed to resolve device mapper name for: %s' "$1"
|
||||
fi
|
||||
}
|
||||
|
||||
fstype_is_pseudofs() {
|
||||
(( pseudofs_types["$1"] ))
|
||||
}
|
||||
|
||||
fstype_has_fsck() {
|
||||
(( fsck_types["$1"] ))
|
||||
}
|
||||
|
||||
|
||||
write_source() {
|
||||
local src=$1 spec= label= uuid= comment=()
|
||||
|
||||
label=$(lsblk -rno LABEL "$1" 2>/dev/null)
|
||||
uuid=$(lsblk -rno UUID "$1" 2>/dev/null)
|
||||
|
||||
# bind mounts do not have a UUID!
|
||||
|
||||
case $bytag in
|
||||
'')
|
||||
[[ $uuid ]] && comment=("UUID=$uuid")
|
||||
[[ $label ]] && comment+=("LABEL=$(mangle "$label")")
|
||||
;;
|
||||
LABEL)
|
||||
spec=$label
|
||||
[[ $uuid ]] && comment=("$src" "UUID=$uuid")
|
||||
;;
|
||||
UUID)
|
||||
spec=$uuid
|
||||
comment=("$src")
|
||||
[[ $label ]] && comment+=("LABEL=$(mangle "$label")")
|
||||
;;
|
||||
*)
|
||||
[[ $uuid ]] && comment=("$1" "UUID=$uuid")
|
||||
[[ $label ]] && comment+=("LABEL=$(mangle "$label")")
|
||||
[[ $bytag ]] && spec=$(lsblk -rno "$bytag" "$1" 2>/dev/null)
|
||||
;;
|
||||
esac
|
||||
|
||||
[[ $comment ]] && printf '# %s\n' "${comment[*]}"
|
||||
|
||||
if [[ $spec ]]; then
|
||||
printf '%-20s' "$bytag=$(mangle "$spec")"
|
||||
else
|
||||
printf '%-20s' "$(mangle "$src")"
|
||||
fi
|
||||
}
|
||||
|
||||
optstring_apply_quirks() {
|
||||
local varname=$1 fstype=$2
|
||||
|
||||
# SELinux displays a 'seclabel' option in /proc/self/mountinfo. We can't know
|
||||
# if the system we're generating the fstab for has any support for SELinux (as
|
||||
# one might install Arch from a Fedora environment), so let's remove it.
|
||||
optstring_remove_option "$varname" seclabel
|
||||
|
||||
# Prune 'relatime' option for any pseudofs. This seems to be a rampant
|
||||
# default which the kernel often exports even if the underlying filesystem
|
||||
# doesn't support it. Example: https://bugs.archlinux.org/task/54554.
|
||||
if awk -v fstype="$fstype" '$1 == fstype { exit 1 }' /proc/filesystems; then
|
||||
optstring_remove_option "$varname" relatime
|
||||
fi
|
||||
|
||||
case $fstype in
|
||||
f2fs)
|
||||
# These are Kconfig options for f2fs. Kernels supporting the options will
|
||||
# only provide the negative versions of these (e.g. noacl), and vice versa
|
||||
# for kernels without support.
|
||||
optstring_remove_option "$varname" noacl,acl,nouser_xattr,user_xattr
|
||||
;;
|
||||
vfat)
|
||||
# Before Linux v3.8, "cp" is prepended to the value of the codepage.
|
||||
if optstring_get_option "$varname" codepage && [[ $codepage = cp* ]]; then
|
||||
optstring_remove_option "$varname" codepage
|
||||
optstring_append_option "$varname" "codepage=${codepage#cp}"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
usage() {
|
||||
cat <<EOF
|
||||
usage: ${0##*/} [options] root
|
||||
|
||||
Options:
|
||||
-f <filter> Restrict output to mountpoints matching the prefix FILTER
|
||||
-L Use labels for source identifiers (shortcut for -t LABEL)
|
||||
-p Exclude pseudofs mounts (default behavior)
|
||||
-P Include pseudofs mounts
|
||||
-t <tag> Use TAG for source identifiers (TAG should be one of: LABEL,
|
||||
UUID, PARTLABEL, PARTUUID)
|
||||
-U Use UUIDs for source identifiers (shortcut for -t UUID)
|
||||
|
||||
-h Print this help message
|
||||
|
||||
genfstab generates output suitable for addition to an fstab file based on the
|
||||
devices mounted under the mountpoint specified by the given root.
|
||||
|
||||
EOF
|
||||
}
|
||||
|
||||
if [[ -z $1 || $1 = @(-h|--help) ]]; then
|
||||
usage
|
||||
exit $(( $# ? 0 : 1 ))
|
||||
fi
|
||||
|
||||
while getopts ':f:LPpt:U' flag; do
|
||||
case $flag in
|
||||
L)
|
||||
bytag=LABEL
|
||||
;;
|
||||
U)
|
||||
bytag=UUID
|
||||
;;
|
||||
f)
|
||||
prefixfilter=$OPTARG
|
||||
;;
|
||||
P)
|
||||
pseudofs=1
|
||||
;;
|
||||
p)
|
||||
pseudofs=0
|
||||
;;
|
||||
t)
|
||||
bytag=${OPTARG^^}
|
||||
;;
|
||||
:)
|
||||
die '%s: option requires an argument -- '\''%s'\' "${0##*/}" "$OPTARG"
|
||||
;;
|
||||
?)
|
||||
die '%s: invalid option -- '\''%s'\' "${0##*/}" "$OPTARG"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
shift $(( OPTIND - 1 ))
|
||||
|
||||
(( $# )) || die "No root directory specified"
|
||||
root=$(realpath -mL "$1"); shift
|
||||
|
||||
if ! mountpoint -q "$root"; then
|
||||
die "$root is not a mountpoint"
|
||||
fi
|
||||
|
||||
# handle block devices
|
||||
cat <<EOF
|
||||
# /etc/fstab: static file system information.
|
||||
#
|
||||
# Use 'blkid' to print the universally unique identifier for a
|
||||
# device; this may be used with UUID= as a more robust way to name devices
|
||||
# that works even if disks are added and removed. See fstab(5).
|
||||
#
|
||||
EOF
|
||||
printf "%-15s %-15s %-7s %-15s %-7s %s\n" '# <file system>' '<mount point>' '<type>' '<options>' '<dump>' '<pass>'
|
||||
findmnt -Recvruno SOURCE,TARGET,FSTYPE,OPTIONS,FSROOT "$root" |
|
||||
while read -r src target fstype opts fsroot; do
|
||||
if (( !pseudofs )) && fstype_is_pseudofs "$fstype"; then
|
||||
continue
|
||||
fi
|
||||
|
||||
[[ $target = "$prefixfilter"* ]] || continue
|
||||
|
||||
# default 5th and 6th columns
|
||||
dump=0 pass=0
|
||||
|
||||
src=$(unmangle "$src")
|
||||
target=$(unmangle "$target")
|
||||
target=${target#$root}
|
||||
|
||||
if (( !foundroot )) && findmnt "$src" "$root" >/dev/null; then
|
||||
# this is root. we can't possibly have more than one...
|
||||
pass=1 foundroot=1
|
||||
fi
|
||||
|
||||
# if there's no fsck tool available, then only pass=0 makes sense.
|
||||
if ! fstype_has_fsck "$fstype"; then
|
||||
pass=0
|
||||
fi
|
||||
|
||||
if [[ $fsroot != / ]]; then
|
||||
if [[ $fstype = btrfs ]]; then
|
||||
opts+=,subvol=${fsroot#/}
|
||||
else
|
||||
# it's a bind mount
|
||||
src=$(findmnt -funcevo TARGET "$src")$fsroot
|
||||
if [[ $src -ef $target ]]; then
|
||||
# hrmm, this is weird. we're probably looking at a file or directory
|
||||
# that was bound into a chroot from the host machine. Ignore it,
|
||||
# because this won't actually be a valid mount. Worst case, the user
|
||||
# just re-adds it.
|
||||
continue
|
||||
fi
|
||||
fstype=none
|
||||
opts+=,bind
|
||||
pass=0
|
||||
fi
|
||||
fi
|
||||
|
||||
# filesystem quirks
|
||||
case $fstype in
|
||||
fuseblk)
|
||||
# well-behaved FUSE filesystems will report themselves as fuse.$fstype.
|
||||
# this is probably NTFS-3g, but let's just make sure.
|
||||
if ! newtype=$(lsblk -no FSTYPE "$src") || [[ -z $newtype ]]; then
|
||||
# avoid blanking out fstype, leading to an invalid fstab
|
||||
error 'Failed to derive real filesystem type for FUSE device on %s' "$target"
|
||||
else
|
||||
fstype=$newtype
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
optstring_apply_quirks "opts" "$fstype"
|
||||
|
||||
# write one line
|
||||
write_source "$src"
|
||||
printf '\t%-10s' "/$(mangle "${target#/}")" "$fstype" "$opts"
|
||||
printf '\t%s %s' "$dump" "$pass"
|
||||
printf '\n\n'
|
||||
done
|
||||
|
||||
# handle swaps devices
|
||||
{
|
||||
# ignore header
|
||||
read
|
||||
|
||||
while read -r device type _ _ prio; do
|
||||
options=defaults
|
||||
if (( prio >= 0 )); then
|
||||
options+=,pri=$prio
|
||||
fi
|
||||
|
||||
# skip files marked deleted by the kernel
|
||||
[[ $device = *'\040(deleted)' ]] && continue
|
||||
|
||||
if [[ $type = file ]]; then
|
||||
printf '%-20s' "${device#${root%/}}"
|
||||
elif [[ $device = /dev/dm-+([0-9]) ]]; then
|
||||
# device mapper doesn't allow characters we need to worry
|
||||
# about being mangled, and it does the escaping of dashes
|
||||
# for us in sysfs.
|
||||
write_source "$(dm_name_for_devnode "$device")"
|
||||
else
|
||||
write_source "$(unmangle "$device")"
|
||||
fi
|
||||
|
||||
printf '\t%-10s\t%-10s\t%-10s\t0 0\n\n' 'none' 'swap' "$options"
|
||||
done
|
||||
} </proc/swaps
|
||||
|
||||
# vim: et ts=2 sw=2 ft=sh:
|
|
@ -0,0 +1,21 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
. /tmp/utils
|
||||
|
||||
#timedatectl set-ntp true
|
||||
mkdir -p /var/log/installer
|
||||
|
||||
do_inchroot() {
|
||||
# 运行 "${IN_TARGET}"/in_chroot/ 脚本
|
||||
run_scripts_dir "${IN_TARGET}"/in_chroot
|
||||
|
||||
if [[ -d /cdrom/hooks/in_chroot ]]; then
|
||||
run_scripts_dir /cdrom/hooks/in_chroot
|
||||
fi
|
||||
}
|
||||
|
||||
do_inchroot
|
||||
|
||||
msg "k.sh 运行结束"
|
|
@ -0,0 +1,26 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
oem_mode=
|
||||
if grep -q 'test-mode' /proc/cmdline; then
|
||||
oem_mode="oem-automatic"
|
||||
else
|
||||
oem_mode="oem"
|
||||
fi
|
||||
|
||||
cp -a /usr/share/applications/kylin-os-installer.desktop /etc/xdg/autostart || echo "kylin-os-installer.desktop is unexit" >>/var/log/installer/kylin-os-installer.log
|
||||
sed -i "/Exec/d" /etc/xdg/autostart/kylin-os-installer.desktop
|
||||
echo "Exec=/usr/bin/kylin-os-installer-${oem_mode}" >>/etc/xdg/autostart/kylin-os-installer.desktop
|
||||
|
||||
if [[ -f /etc/xdg/autostart/oem-qc.desktop ]]; then
|
||||
rm -f /etc/xdg/autostart/oem-qc.desktop
|
||||
fi
|
||||
|
||||
if [[ -f /etc/xdg/autostart/oem-unlock.desktop ]]; then
|
||||
rm -f /etc/xdg/autostart/oem-unlock.desktop
|
||||
fi
|
||||
if [[ -f /usr/sbin/oem-unlock ]]; then
|
||||
rm -f /usr/sbin/oem-unlock
|
||||
fi
|
||||
|
|
@ -0,0 +1,262 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
cfgFile=/usr/share/kylin-os-installer/ky-installer.cfg
|
||||
logFile=/var/log/installer/kylin-os-installer-oem.log
|
||||
|
||||
if [[ -f /etc/xdg/autostart/oem-qc.desktop ]]; then
|
||||
sudo rm -f /etc/xdg/autostart/oem-qc.desktop
|
||||
fi
|
||||
|
||||
userName=
|
||||
timeZone=
|
||||
password=
|
||||
autoLogin=
|
||||
userDefGroup=
|
||||
|
||||
msg() {
|
||||
echo "$(date +'%Y-%m-%d %H:%M:%S') $*" >> $logFile
|
||||
}
|
||||
|
||||
get_value()
|
||||
{
|
||||
indexStr=$1
|
||||
valueStr=
|
||||
|
||||
valueStr=$(grep "^$indexStr=" "$cfgFile")
|
||||
valueStr=${valueStr##*=}
|
||||
echo "${valueStr}"
|
||||
}
|
||||
|
||||
get_value_bytearray() {
|
||||
local key=$1
|
||||
local value
|
||||
value=$(grep "^$key" "$cfgFile")
|
||||
|
||||
# TODO, 连续空格有问题
|
||||
if ! egrep -q '^password=.?@ByteArray' $cfgFile; then
|
||||
echo "${value#*=}"
|
||||
return 0
|
||||
fi
|
||||
|
||||
value1=$(echo "${value#*\(}")
|
||||
echo "${value1%)*}"
|
||||
}
|
||||
|
||||
set_timezone()
|
||||
{
|
||||
timeZone=$(get_value "timezone")
|
||||
#msg "Set timezone to $timeZone"
|
||||
ln -sf /usr/share/zoneinfo/$timeZone /etc/localtime
|
||||
|
||||
hwclock -w
|
||||
}
|
||||
|
||||
set_user()
|
||||
{
|
||||
userName=$(get_value "username")
|
||||
password=$(get_value_bytearray "password")
|
||||
autoLogin=$(get_value "autologin")
|
||||
KUID=1000
|
||||
|
||||
#msg "Set user $userName"
|
||||
useradd -m -s /bin/bash -u "${KUID}" "${userName}"
|
||||
usermod -c "${userName}" "${userName}"
|
||||
echo "$userName:$password" | chpasswd
|
||||
}
|
||||
|
||||
add_groups()
|
||||
{
|
||||
userName=$(get_value "username")
|
||||
userDefGroup=(adm cdrom sudo dip plugdev lpadmin sambashare debian-tor libvirtd lxd)
|
||||
for item in ${userDefGroup[*]}; do
|
||||
adduser $userName $item || true
|
||||
done
|
||||
}
|
||||
|
||||
set_auto_login()
|
||||
{
|
||||
if [[ "${autoLogin}" == "1" ]]; then
|
||||
if [[ -d /etc/lightdm ]]; then
|
||||
LightDMCustomFile=/etc/lightdm/lightdm.conf
|
||||
autoLoginParam="autologin-guest=false\n\
|
||||
autologin-user=$userName\n\
|
||||
autologin-user-timeout=0"
|
||||
|
||||
if ! grep -qs '^autologin-user' ${LightDMCustomFile}; then
|
||||
if ! grep -qs '^\[Seat:\*\]' ${LightDMCustomFile}; then
|
||||
echo '[Seat:*]' >>${LightDMCustomFile}
|
||||
fi
|
||||
sed -i "s/\[Seat:\*\]/\[SeatDefaults]\n${AutologinParameters}/" ${LightDMCustomFile}
|
||||
# oem config scenario
|
||||
else
|
||||
#sed -i "s/^\(\(str *\)\?autologin-user\)=.*$/\1=${USERNAME}/g;" /etc/lightdm/lightdm.conf
|
||||
sed -i "s/^autologin-user=.*$/autologin-user=${userName}/g" ${LightDMCustomFile}
|
||||
fi
|
||||
fi
|
||||
else
|
||||
if [[ -f /etc/lightdm/lightdm.conf ]]; then
|
||||
rm -f /etc/lightdm/lightdm.conf
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
set_language()
|
||||
{
|
||||
language=$(get_value "language")
|
||||
echo "zh_CN.UTF-8 UTF-8
|
||||
en_US.UTF-8 UTF-8" > /etc/locale.gen
|
||||
|
||||
#msg "Set language $language"
|
||||
echo "LANG=$language.UTF-8" > /etc/default/locale
|
||||
if [[ "$language" == "zh_CN" ]]; then
|
||||
echo "LANGUAGE=\"zh_CN:zh\"" >> /etc/default/locale
|
||||
fi
|
||||
|
||||
locale-gen
|
||||
|
||||
if [[ -f /lib/systemd/system/accounts-daemon.service ]]; then
|
||||
systemctl restart accounts-daemon || true
|
||||
fi
|
||||
}
|
||||
|
||||
set_hostname()
|
||||
{
|
||||
HOSTNAME=$(get_value "hostname")
|
||||
echo "${HOSTNAME}" >/etc/hostname
|
||||
hostnamectl set-hostname "${HOSTNAME}"
|
||||
|
||||
echo -e "127.0.0.1\tlocalhost
|
||||
|
||||
127.0.1.1\t${HOSTNAME}
|
||||
# The following lines are desirable for IPv6 capable hosts
|
||||
::1 ip6-localhost ip6-loopback
|
||||
fe00::0 ip6-localnet
|
||||
ff00::0 ip6-mcastprefix
|
||||
ff02::1 ip6-allnodes
|
||||
ff02::2 ip6-allrouters
|
||||
" >/etc/hosts
|
||||
|
||||
# bug 39277, 重启蓝牙服务
|
||||
if [[ -f /lib/systemd/system/bluetooth.service ]]; then
|
||||
/bin/systemctl restart bluetooth.service || true
|
||||
fi
|
||||
}
|
||||
|
||||
remove_packages()
|
||||
{
|
||||
# remove package list
|
||||
packages_list_remove=(
|
||||
kylin-os-installer
|
||||
casper
|
||||
ukui-installer-wayland
|
||||
ubiquity
|
||||
)
|
||||
|
||||
for i in ${packages_list_remove[*]}; do
|
||||
if dpkg -l | grep -q $i; then
|
||||
msg "移除 $i"
|
||||
apt purge -y $i
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
remove_oem_service() {
|
||||
if [[ -f /lib/systemd/system/oem-config.service ]]; then
|
||||
/bin/systemctl disable oem-config.service || true
|
||||
/bin/systemctl disable oem-config.target || true
|
||||
rm -f /lib/systemd/system/oem-config.*
|
||||
/bin/systemctl --no-block isolate graphical.target || true
|
||||
fi
|
||||
|
||||
# if [[ -f /etc/xdg/autostart/oem-qc.desktop ]]; then
|
||||
# rm -f /etc/xdg/autostart/oem-qc.desktop
|
||||
# fi
|
||||
|
||||
if [[ -f /usr/share/kylin-os-installer/data/oem-qc.desktop ]]; then
|
||||
rm -f /usr/share/kylin-os-installer/data/oem-qc.desktop
|
||||
fi
|
||||
if [[ -f /etc/xdg/autostart/kylin-os-installer.desktop ]]; then
|
||||
rm -f /etc/xdg/autostart/kylin-os-installer.desktop
|
||||
fi
|
||||
|
||||
if [[ -f /usr/share/kylin-os-installer/data/oem-unlock.desktop ]]; then
|
||||
rm -f /usr/share/kylin-os-installer/data/oem-unlock.desktop
|
||||
fi
|
||||
|
||||
if [[ -f /etc/xdg/autostart/oem-unlock.desktop ]]; then
|
||||
rm -f /etc/xdg/autostart/oem-unlock.desktop
|
||||
fi
|
||||
|
||||
if [[ -f /usr/sbin/oem-unlock ]]; then
|
||||
rm -f /usr/sbin/oem-unlock
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
delete_oem_user() {
|
||||
if getent passwd 'oem' >/dev/null; then
|
||||
if [[ -f /etc/sudoers.d/oem ]]; then
|
||||
rm -f /etc/sudoers.d/oem
|
||||
fi
|
||||
pkill -u 'oem' || true
|
||||
userdel --force --remove 'oem' || true
|
||||
fi
|
||||
}
|
||||
|
||||
set_test_mode() {
|
||||
if grep -q 'test-mode=true' ${cfgFile}; then
|
||||
userName=$(get_value "username")
|
||||
# sudo 免密
|
||||
echo "${userName} ALL=(ALL) NOPASSWD: ALL" >/etc/sudoers.d/${userName}
|
||||
|
||||
if [[ ! -z "$DISPLAY" ]]; then
|
||||
xset s off -dpms
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
restart_lightdm()
|
||||
{
|
||||
systemctl restart lightdm
|
||||
}
|
||||
|
||||
set_language >>${logFile}
|
||||
set_timezone >>${logFile}
|
||||
set_hostname >>${logFile}
|
||||
set_user >>${logFile}
|
||||
add_groups >>${logFile}
|
||||
|
||||
set_test_mode >>${logFile}
|
||||
|
||||
set_auto_login >>${logFile}
|
||||
remove_oem_service >>${logFile}
|
||||
systemctl start delete-oem-user.service
|
||||
|
||||
case $1 in
|
||||
'user')
|
||||
set_user
|
||||
;;
|
||||
'host')
|
||||
set_hostname
|
||||
;;
|
||||
'time')
|
||||
set_timezone
|
||||
;;
|
||||
'locale')
|
||||
set_language
|
||||
;;
|
||||
'autologin')
|
||||
set_auto_login
|
||||
;;
|
||||
'addgroup')
|
||||
add_groups
|
||||
;;
|
||||
'unload')
|
||||
rm_ky_installer
|
||||
;;
|
||||
'logout')
|
||||
restart_lightdm
|
||||
;;
|
||||
esac
|
|
@ -0,0 +1,22 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
#
|
||||
# 卸载设备
|
||||
|
||||
TARGET=/target
|
||||
USER=$(id -un 999)
|
||||
|
||||
if [[ -f /usr/share/glib-2.0/schemas/org.ukui.flash-disk.autoload.gschema.xml ]]; then
|
||||
# 取消自动挂载设置
|
||||
sudo -u ${USER:-kylin} gsettings set org.ukui.flash-disk.autoload ifautoload false
|
||||
fi
|
||||
|
||||
swapoff -a || true
|
||||
|
||||
umount /media/*/* || true
|
||||
|
||||
# 卸载 target 及虚拟文件系统
|
||||
if grep -q '/target' /proc/mounts; then
|
||||
umount -l /target || true
|
||||
fi
|
|
@ -0,0 +1,10 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
# Inhibit display screensaver.
|
||||
|
||||
if [[ ! -z "$DISPLAY" ]]; then
|
||||
# 防止屏幕熄灭
|
||||
xset s off -dpms
|
||||
fi
|
|
@ -0,0 +1,115 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
automatic=$(get_value automatic-installation)
|
||||
if [[ "$automatic" == "0" ]]; then
|
||||
return 0
|
||||
elif [[ "${is_efi}" == "true" ]]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
. /usr/share/kylin-os-installer/scripts/autopart.sh
|
||||
disk=$(get_value devpath)
|
||||
disk_custom=$(get_value disk-custom)
|
||||
data_device=$(get_value data-device)
|
||||
|
||||
parted -s "${disk}" mktable msdos
|
||||
|
||||
### boot
|
||||
start=1
|
||||
end=$((boot + 1))
|
||||
parted -s "${disk}" mkpart primary ext4 1MiB "${end}"MiB
|
||||
|
||||
### ext
|
||||
start=$((end + 2))
|
||||
end=$((end + root_size))
|
||||
parted -s "${disk}" mkpart extended "${start}"MiB 100%
|
||||
|
||||
### root
|
||||
start=$((start + 1))
|
||||
|
||||
if [[ "${isluks_lvm}" == "true" ]]; then
|
||||
parted -s "${disk}" mkpart logical ext4 "${start}"MiB 100%
|
||||
else
|
||||
parted -s "${disk}" mkpart logical ext4 "${start}"MiB "${end}"MiB
|
||||
fi
|
||||
|
||||
if [[ "${isluks_lvm}" == "true" ]]; then
|
||||
PASSWORD="$(get_value_bytearray encryptyPWD)"
|
||||
parted -s "${disk}" set 1 boot on
|
||||
partprobe "${disk}"
|
||||
sync
|
||||
if echo "${disk}" | grep -q nvme; then
|
||||
disk=${disk}p
|
||||
fi
|
||||
sleep 1
|
||||
modprobe sm4_generic || true
|
||||
if grep -q sm4 /proc/crypto; then
|
||||
echo "${PASSWORD}" | cryptsetup -c sm4-xts-plain64 -h sha256 -s 256 luksFormat "${disk}"5 -q
|
||||
else
|
||||
echo "${PASSWORD}" | cryptsetup -c aes-xts-plain64 -h sha256 -s 512 luksFormat "${disk}"5 -q
|
||||
fi
|
||||
echo "${PASSWORD}" | cryptsetup luksOpen "${disk}"5 "${disk##*/}"5_crypt
|
||||
root_uuid=$(lsblk -ro name,uuid | grep "${disk##*/}5 " | awk '{print $2}')
|
||||
echo "${disk##*/}5_crypt UUID=${root_uuid} none luks" >/etc/crypttab
|
||||
pvcreate -ffy /dev/mapper/"${disk##*/}"5_crypt
|
||||
vgcreate kylin-vg /dev/mapper/"${disk##*/}"5_crypt
|
||||
lvcreate --wipesignatures n -L "${root_size}" -n root kylin-vg
|
||||
lvcreate --wipesignatures n -L "${backup_size}" -n backup kylin-vg
|
||||
lvcreate --wipesignatures n -L "${data_size}" -n data kylin-vg
|
||||
|
||||
if [[ "${disk_custom}" == "true" ]]; then
|
||||
lvcreate --wipesignatures n -l "${data_size}" -n swap kylin-vg
|
||||
else
|
||||
lvcreate --wipesignatures n -l 100%free -n swap kylin-vg
|
||||
fi
|
||||
|
||||
return 0
|
||||
fi
|
||||
|
||||
|
||||
### backup
|
||||
start=$((end + 1))
|
||||
end=$((end + backup_size))
|
||||
parted -s "${disk}" mkpart logical ext4 "${start}"MiB "${end}"MiB
|
||||
|
||||
|
||||
### data
|
||||
start=$((end + 1))
|
||||
end=$((end + data_size))
|
||||
if [[ "${is_swapfile}" = "true" ]]; then
|
||||
parted -s "${disk}" mkpart logical ext4 "${start}"MiB 100%
|
||||
elif [[ -n ${data_device} ]]; then
|
||||
### swap partition
|
||||
start=$((end + 1))
|
||||
end=$((end + swap))
|
||||
|
||||
if [[ "${disk_custom}" == "true" ]]; then
|
||||
parted -s "${disk}" mkpart logical linux-swap "${start}"MiB "${end}"MiB
|
||||
else
|
||||
parted -s "${disk}" mkpart logical linux-swap "${start}"MiB 100%
|
||||
fi
|
||||
umount -l "${data_device}" || true
|
||||
parted -s "${data_device}" mktable msdos
|
||||
parted -s "${data_device}" mkpart primary ext4 1MiB 100%
|
||||
|
||||
else
|
||||
parted -s "${disk}" mkpart logical ext4 "${start}"MiB "${end}"MiB
|
||||
|
||||
### swap partition
|
||||
start=$((end + 1))
|
||||
end=$((end + swap))
|
||||
|
||||
if [[ "${disk_custom}" == "true" ]]; then
|
||||
parted -s "${disk}" mkpart logical linux-swap "${start}"MiB "${end}"MiB
|
||||
else
|
||||
parted -s "${disk}" mkpart logical linux-swap "${start}"MiB 100%
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
|
||||
parted -s "${disk}" set 1 boot on
|
||||
partprobe "${disk}"
|
||||
sync
|
|
@ -0,0 +1,117 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
automatic=$(get_value automatic-installation)
|
||||
if [[ "$automatic" == "0" ]]; then
|
||||
return 0
|
||||
elif [[ "${is_efi}" == "false" ]]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
. /usr/share/kylin-os-installer/scripts/autopart-efi.sh
|
||||
disk=$(get_value devpath)
|
||||
disk_custom=$(get_value disk-custom)
|
||||
data_device=$(get_value data-device)
|
||||
|
||||
|
||||
parted -s "${disk}" mktable gpt
|
||||
|
||||
### efi
|
||||
start=1
|
||||
end=$((efi + 1))
|
||||
parted -s "${disk}" mkpart "EFI" fat32 1MiB "${end}"MiB
|
||||
|
||||
### boot
|
||||
start=${end}
|
||||
end=$((end + boot))
|
||||
parted -s "${disk}" mkpart "boot" ext4 "${start}"MiB "${end}"MiB
|
||||
|
||||
### root
|
||||
start=${end}
|
||||
end=$((end + root_size))
|
||||
|
||||
if [[ "${isluks_lvm}" == "true" ]]; then
|
||||
parted -s "${disk}" mkpart "SYSROOT" ext4 "${start}"MiB 100%
|
||||
else
|
||||
parted -s "${disk}" mkpart "SYSROOT" ext4 "${start}"MiB "${end}"MiB
|
||||
fi
|
||||
|
||||
|
||||
if [[ "${isluks_lvm}" == "true" ]]; then
|
||||
PASSWORD="$(get_value_bytearray encryptyPWD)"
|
||||
parted -s "${disk}" set 1 esp on
|
||||
partprobe "${disk}"
|
||||
sync
|
||||
if echo "${disk}" | grep -q nvme; then
|
||||
disk=${disk}p
|
||||
fi
|
||||
sleep 1
|
||||
modprobe sm4_generic || true
|
||||
if grep -q sm4 /proc/crypto; then
|
||||
echo "${PASSWORD}" | cryptsetup -c sm4-xts-plain64 -h sha256 -s 256 luksFormat "${disk}"3 -q
|
||||
else
|
||||
echo "${PASSWORD}" | cryptsetup -c aes-xts-plain64 -h sha256 -s 512 luksFormat "${disk}"3 -q
|
||||
fi
|
||||
echo "${PASSWORD}" | cryptsetup luksOpen "${disk}"3 "${disk##*/}"3_crypt
|
||||
root_uuid=$(lsblk -ro name,uuid | grep "${disk##*/}3 " | awk '{print $2}')
|
||||
echo "${disk##*/}3_crypt UUID=${root_uuid} none luks" >/etc/crypttab
|
||||
pvcreate -ffy /dev/mapper/"${disk##*/}"3_crypt
|
||||
vgcreate kylin-vg /dev/mapper/"${disk##*/}"3_crypt
|
||||
lvcreate --wipesignatures n -L "${root_size}" -n root kylin-vg
|
||||
lvcreate --wipesignatures n -L "${backup_size}" -n backup kylin-vg
|
||||
lvcreate --wipesignatures n -L "${data_size}" -n data kylin-vg
|
||||
|
||||
if [[ "${disk_custom}" == "true" ]]; then
|
||||
lvcreate --wipesignatures n -l "${data_size}" -n swap kylin-vg
|
||||
else
|
||||
lvcreate --wipesignatures n -l 100%free -n swap kylin-vg
|
||||
fi
|
||||
return 0
|
||||
fi
|
||||
|
||||
|
||||
### backup
|
||||
start=${end}
|
||||
end=$((end + backup_size))
|
||||
parted -s "${disk}" mkpart "backup" ext4 "${start}"MiB "${end}"MiB
|
||||
|
||||
### data
|
||||
start=${end}
|
||||
end=$((end + data_size))
|
||||
if [[ "${is_swapfile}" == "true" ]]; then
|
||||
parted -s "${disk}" mkpart "data" ext4 "${start}"MiB 100%
|
||||
elif [[ -n ${data_device} ]]; then
|
||||
umount -l "${data_device}" || true
|
||||
parted -s "${data_device}" mktable gpt
|
||||
parted -s "${data_device}" mkpart "data" ext4 1MiB 100%
|
||||
|
||||
### swap partition
|
||||
start=${end}
|
||||
end=$((end + swap))
|
||||
|
||||
if [[ "${disk_custom}" == "true" ]]; then
|
||||
parted -s "${disk}" mkpart logical linux-swap "${start}"MiB "${end}"MiB
|
||||
else
|
||||
parted -s "${disk}" mkpart logical linux-swap "${start}"MiB 100%
|
||||
fi
|
||||
|
||||
else
|
||||
parted -s "${disk}" mkpart "data" ext4 "${start}"MiB "${end}"MiB
|
||||
|
||||
### swap partition
|
||||
start=${end}
|
||||
end=$((end + swap))
|
||||
|
||||
if [[ "${disk_custom}" == "true" ]]; then
|
||||
parted -s "${disk}" mkpart logical linux-swap "${start}"MiB "${end}"MiB
|
||||
else
|
||||
parted -s "${disk}" mkpart logical linux-swap "${start}"MiB 100%
|
||||
fi
|
||||
|
||||
|
||||
fi
|
||||
|
||||
parted -s "${disk}" set 1 esp on
|
||||
partprobe "${disk}"
|
||||
sync
|
|
@ -0,0 +1,141 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
automatic=$(get_value automatic-installation)
|
||||
if [[ "$automatic" == "0" ]]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
disk=$(get_value devpath)
|
||||
data_device=$(get_value data-device)
|
||||
|
||||
|
||||
partprobe "${disk}" && sync
|
||||
if echo "${disk}" | grep -q nvme; then
|
||||
disk=${disk}p
|
||||
fi
|
||||
|
||||
|
||||
sleep 1
|
||||
|
||||
has_backup=0
|
||||
|
||||
do_mkfs_efi(){
|
||||
#if egrep -qi 'kirin.?990' /proc/cpuinfo; then
|
||||
if [[ "${is_990_9a0}" == "true" ]]; then
|
||||
sudo mkfs.vfat -s1 -n ESP "${disk}1"
|
||||
else
|
||||
sudo mkfs.vfat -n ESP "${disk}1"
|
||||
fi
|
||||
}
|
||||
|
||||
do_prepare_sw() {
|
||||
umount -l /media/*/* || true
|
||||
dmsetup remove_all -f
|
||||
#gsettings set org.ukui.flash-disk.autoload ifautoload false
|
||||
}
|
||||
|
||||
do_mkfs_boot() {
|
||||
boot_part=$1
|
||||
if [[ "$(archdetect)" == "sw64/generic" ]]; then
|
||||
do_prepare_sw
|
||||
mkfs.ext3 -Fq -L SYSBOOT "${boot_part}"
|
||||
else
|
||||
mkfs.ext4 -Fq -L SYSBOOT "${boot_part}"
|
||||
fi
|
||||
}
|
||||
|
||||
if [[ "${is_efi}" == "true" ]]; then
|
||||
do_mkfs_efi
|
||||
|
||||
do_mkfs_boot "${disk}2"
|
||||
|
||||
part_root="${disk}3"
|
||||
part_backup="${disk}4"
|
||||
if [[ -n ${data_device} ]]; then
|
||||
if echo "${data_device}" | grep -q nvme; then
|
||||
data_device=${data_device}p
|
||||
fi
|
||||
part_data="${data_device}1"
|
||||
part_swap="${disk}5"
|
||||
else
|
||||
part_data="${disk}5"
|
||||
part_swap="${disk}6"
|
||||
fi
|
||||
if [[ "${isluks_lvm}" == "true" ]]; then
|
||||
part_root="/dev/mapper/kylin--vg-root"
|
||||
part_backup="/dev/mapper/kylin--vg-backup"
|
||||
part_data="/dev/mapper/kylin--vg-data"
|
||||
part_swap="/dev/mapper/kylin--vg-swap"
|
||||
fi
|
||||
|
||||
mkfs.ext4 -Fq -L SYSROOT "${part_root}"
|
||||
mkfs.ext4 -Fq -L KYLIN-BACKUP "${part_backup}"
|
||||
mkfs.ext4 -Fq -L DATA "${part_data}"
|
||||
|
||||
if [[ "${is_swapfile}" == "false" ]]; then
|
||||
mkswap -L SWAP "${part_swap}"
|
||||
swapon "${part_swap}"
|
||||
fi
|
||||
|
||||
mkdir -p /target
|
||||
mount "${part_root}" /target
|
||||
mkdir -p /target/boot
|
||||
mount "${disk}2" /target/boot
|
||||
mkdir -p /target/boot/efi
|
||||
mount "${disk}1" /target/boot/efi
|
||||
mkdir -p /target/data
|
||||
mount "${part_data}" /target/data
|
||||
chmod 1777 /target/data
|
||||
mkdir -p /target/backup
|
||||
mount "${part_backup}" /target/backup
|
||||
set_backup "${part_backup}"
|
||||
|
||||
do_bind_data
|
||||
|
||||
else
|
||||
do_mkfs_boot "${disk}1"
|
||||
|
||||
part_root="${disk}5"
|
||||
part_backup="${disk}6"
|
||||
if [[ -n ${data_device} ]]; then
|
||||
if echo "${data_device}" | grep -q nvme; then
|
||||
data_device=${data_device}p
|
||||
fi
|
||||
part_data="${data_device}1"
|
||||
part_swap="${disk}7"
|
||||
else
|
||||
part_data="${disk}7"
|
||||
part_swap="${disk}8"
|
||||
fi
|
||||
|
||||
if [[ "${isluks_lvm}" == "true" ]]; then
|
||||
part_root="/dev/mapper/kylin--vg-root"
|
||||
part_backup="/dev/mapper/kylin--vg-backup"
|
||||
part_data="/dev/mapper/kylin--vg-data"
|
||||
part_swap="/dev/mapper/kylin--vg-swap"
|
||||
fi
|
||||
|
||||
mkfs.ext4 -Fq -L SYSROOT "${part_root}"
|
||||
mkfs.ext4 -Fq -L KYLIN-BACKUP "${part_backup}"
|
||||
mkfs.ext4 -Fq -L DATA "${part_data}"
|
||||
|
||||
if [[ "${is_swapfile}" == "false" ]]; then
|
||||
mkswap -L SWAP "${part_swap}"
|
||||
swapon "${part_swap}"
|
||||
fi
|
||||
|
||||
mkdir -p /target
|
||||
mount "${part_root}" /target
|
||||
mkdir -p /target/boot
|
||||
mount "${disk}1" /target/boot
|
||||
mkdir -p /target/data
|
||||
mount "${part_data}" /target/data
|
||||
chmod 1777 /target/data
|
||||
mkdir -p /target/backup
|
||||
mount "${part_backup}" /target/backup
|
||||
set_backup "${part_backup}"
|
||||
|
||||
do_bind_data
|
||||
fi
|
|
@ -0,0 +1,91 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
set_swap() {
|
||||
while (true); do
|
||||
if ! echo ${array} | grep -q linux-swap; then
|
||||
break
|
||||
fi
|
||||
swaptmp=${array#*linux-swap:}
|
||||
swapdev=$(echo ${swaptmp%%|*})
|
||||
#mkswap ${swapdev}
|
||||
swapon ${swapdev}
|
||||
|
||||
array=$(echo ${swaptmp} | cut -d'\' -f2-)
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
automatic=$(get_value automatic-installation)
|
||||
if [[ $automatic -eq 0 ]]; then
|
||||
|
||||
partlists=$(get_value partitions | sed 's/\"//g')
|
||||
array_space=${partlists//;/ }
|
||||
array=${partlists//;/|}
|
||||
|
||||
list=
|
||||
for i in ${array_space[@]}; do
|
||||
list="$list $(echo $i | cut -d: -f1)"
|
||||
done
|
||||
sort_list=$(echo $list | tr ' ' '\n' | sort)
|
||||
|
||||
for mountpoint in $sort_list; do
|
||||
dev0=$(echo ${array#*$mountpoint:})
|
||||
dev=$(echo ${dev0%%|*})
|
||||
|
||||
if [[ $mountpoint == "linux-swap" ]]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
if [[ $mountpoint == "kylin-data" ]]; then
|
||||
mkdir -p /target/data
|
||||
mount $dev /target/data
|
||||
do_bind_data
|
||||
continue
|
||||
fi
|
||||
|
||||
mkdir -p /target$mountpoint
|
||||
mount $dev /target$mountpoint
|
||||
|
||||
if [[ $mountpoint == "/backup" ]]; then
|
||||
set_backup $dev
|
||||
fi
|
||||
|
||||
if [[ $mountpoint == "/data" ]]; then
|
||||
chmod 1777 /target$mountpoint >/dev/null
|
||||
fi
|
||||
done
|
||||
|
||||
set_swap
|
||||
fi
|
||||
|
||||
deal_squashfs() {
|
||||
if [[ "${is_minimal}" == "true" ]]; then
|
||||
minimal_squashfs=$(find /cdrom/casper -name '*img' | head -1)
|
||||
# 挂载最小系统镜像
|
||||
if [[ $minimal_squashfs =~ 'img' ]]; then
|
||||
mount -r $minimal_squashfs /rofs
|
||||
fi
|
||||
elif [[ "${is_ghost}" == "true" ]]; then
|
||||
ghost_img=$(get_value ghost-path)
|
||||
# 挂载 ghost 镜像
|
||||
if [[ ${ghost_img} =~ 'img' ]]; then
|
||||
mount -r $ghost_img /rofs || true
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
msg "正在拷贝基础文件系统..."
|
||||
# 判断使用最小系统镜像或 ghost
|
||||
deal_squashfs
|
||||
rsync -aHAX /rofs/ /target
|
||||
msg "文件系统拷贝完成"
|
||||
sync
|
||||
|
||||
# 加密
|
||||
if [[ "${isluks_lvm}" == "true" ]]; then
|
||||
rsync /etc/crypttab /target/etc
|
||||
rm -f /target/etc/grub.d/05* || true
|
||||
rm -f /target/etc/grub.d/06* || true
|
||||
fi
|
|
@ -0,0 +1,36 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
is_automatic=$(get_value automatic-installation)
|
||||
if [[ "${is_swapfile}" = "false" ]] || [[ "${is_990_9a0}" = "false" ]]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
ram=$(cat < /proc/meminfo | grep ^MemTotal: | awk '{print $2}')
|
||||
|
||||
|
||||
### swapfile size
|
||||
swapfile=$(( ram * 12 / 1024 / 10 ))
|
||||
if [ $swapfile -gt 64000 ]; then
|
||||
swapfile=64000
|
||||
fi
|
||||
|
||||
do_setup_swapfile() {
|
||||
dd if=/dev/zero of=/target/${swap_file} bs=1M count=${swapfile:-1}
|
||||
chmod 0600 /target/${swap_file}
|
||||
mkswap /target/${swap_file}
|
||||
swapon /target/${swap_file}
|
||||
|
||||
offset=$(filefrag -v /target/${swap_file} | awk '{if($1=="0:"){print $4}}')
|
||||
root=$(findmnt -rno SOURCE /target)
|
||||
|
||||
if [[ -f /target/etc/default/grub ]]; then
|
||||
sed -ri "s@quiet splash@resume=${root} systemd.kylin_force_hibernate=true resume_offset=${offset:0:-2} quiet splash@" /target/etc/default/grub
|
||||
fi
|
||||
}
|
||||
|
||||
do_setup_swapfile
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
do_mountfs() {
|
||||
mkdir -p /target/{dev,run,dev/pts,proc,sys}
|
||||
mount --bind /dev /target/dev
|
||||
mount --bind /run /target/run
|
||||
mount -vt devpts devpts /target/dev/pts -o gid=5,mode=620
|
||||
mount -vt proc proc /target/proc
|
||||
mount -vt sysfs sysfs /target/sys
|
||||
}
|
||||
|
||||
do_mount_cdrom() {
|
||||
mkdir -p /target/cdrom
|
||||
mount --bind /cdrom /target/cdrom
|
||||
}
|
||||
|
||||
do_mountfs
|
||||
|
||||
do_mount_cdrom
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/bash
|
||||
sudo swapoff -a || true
|
||||
sudo umount -l /target || true
|
|
@ -0,0 +1,418 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# 工具
|
||||
|
||||
CONFIGFILE=/tmp/ky-installer.cfg
|
||||
LOG_FILE=/var/log/installer/kylin-os-installer.log
|
||||
IN_TARGET=/tmp/k-i/
|
||||
|
||||
msg() {
|
||||
echo "$(date +'%Y-%m-%d %H:%M:%S') $*" >&2
|
||||
}
|
||||
|
||||
get_value() {
|
||||
local key=$1
|
||||
local value
|
||||
value=$(grep "^$key=" "$CONFIGFILE")
|
||||
echo "${value#*=}"
|
||||
}
|
||||
|
||||
get_value_bytearray() {
|
||||
local key=$1
|
||||
local value
|
||||
value=$(grep "^$key=" "$CONFIGFILE")
|
||||
|
||||
if ! egrep -q "^$key=.?@ByteArray" $CONFIGFILE; then
|
||||
echo "${value#*=}"
|
||||
return 0
|
||||
fi
|
||||
|
||||
value1=$(echo "${value#*\(}")
|
||||
echo "${value1%)*}"
|
||||
}
|
||||
|
||||
set_backup() {
|
||||
backup_dev=$1
|
||||
backup_uuid=$(blkid -o value -s UUID $backup_dev)
|
||||
mkdir -p /target/etc
|
||||
echo "RECOVERY_DEV_UUID=$backup_uuid
|
||||
SNAPSHOT_ENABLED=1" >/target/etc/.bootinfo
|
||||
mkdir -p /target/backup/current
|
||||
mkdir -p /target/backup/snapshots
|
||||
msg "设置备份还原分区完成"
|
||||
}
|
||||
|
||||
# 卸载文件系统
|
||||
umount_all() {
|
||||
msg "正在卸载文件系统..."
|
||||
sync
|
||||
umount -l /target || true
|
||||
if mount | grep -q /backup; then
|
||||
umount -l /backup || true
|
||||
fi
|
||||
msg "卸载完成"
|
||||
}
|
||||
|
||||
do_mipsel_loongson_2f() {
|
||||
ROOT=
|
||||
ARCH=$(archdetect)
|
||||
case $ARCH in
|
||||
mipsel/loongson-2f)
|
||||
# Configure PMON to load GRUB by default.
|
||||
if [ ! -e $ROOT/boot.cfg ] && [ ! -e $ROOT/boot/boot.cfg ]; then
|
||||
pmon_partition="$(grub_probe -d -t drive "$bootfs" | \
|
||||
sed 's/.*,//; s/[^0-9]//g')"
|
||||
if [ "$pmon_partition" ]; then
|
||||
pmon_partition=$(($pmon_partition - 1))
|
||||
else
|
||||
pmon_partition=0 # fallback guess
|
||||
fi
|
||||
if [[ "$rootfs" == "$bootfs" ]]; then
|
||||
pmon_grub_path=/boot/grub.elf
|
||||
pmon_boot_cfg_path=$ROOT/boot.cfg
|
||||
else
|
||||
pmon_grub_path=/grub.elf
|
||||
pmon_boot_cfg_path=$ROOT/boot/boot.cfg
|
||||
fi
|
||||
cat > $pmon_boot_cfg_path <<EOF
|
||||
default 0
|
||||
timeout 0
|
||||
showmenu 0
|
||||
|
||||
title Boot with GRUB
|
||||
kernel (wd0,$pmon_partition)$pmon_grub_path
|
||||
args nil
|
||||
EOF
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
do_mips_bootloader() {
|
||||
if [[ -f /usr/sbin/update-grub ]]; then
|
||||
update-grub
|
||||
fi
|
||||
|
||||
rsync -r /cdrom/boot/ /boot
|
||||
|
||||
pushd /boot
|
||||
ln -fs . boot || true
|
||||
popd
|
||||
|
||||
# 其他设置
|
||||
do_mipsel_loongson_2f
|
||||
|
||||
# bug 32789, 创建 esp 时无法引导
|
||||
if [[ -d /boot/efi ]] && [[ -d /boot/EFI ]]; then
|
||||
rsync -a /boot/{EFI/,efi}
|
||||
fi
|
||||
}
|
||||
|
||||
do_sw64_bootloader() {
|
||||
grub_opts="root=UUID=$(blkid -o value -s UUID $(findmnt / -no source))"
|
||||
swap_dev=$(grep /dev /proc/swaps | head -1 | awk '{print $1}')
|
||||
swap_opts=""
|
||||
if [[ ! -z "${swap_dev}" ]]; then
|
||||
swap_opts="resume=UUID=$(blkid -o value -s UUID ${swap_dev})"
|
||||
fi
|
||||
rsync -r /cdrom/boot/ /boot
|
||||
sed -i "s|boot=casper|${grub_opts} ${swap_opts}|g" /boot/grub/grub.cfg
|
||||
|
||||
pushd /boot
|
||||
ln -fs . boot || true
|
||||
popd
|
||||
}
|
||||
|
||||
# 根据磁盘大小自动选择磁盘
|
||||
auto_select_disk() {
|
||||
DiskList=`LANG=en_US; sudo fdisk -l | awk '{if($1=="Disk" && $2!="identifier:" && $2!="model:") print $2$5}'`
|
||||
MAX=$[$(get_value max)]
|
||||
MIN=$[$(get_value min)]
|
||||
Size_0=1024
|
||||
Size_1=1024
|
||||
Ret=
|
||||
|
||||
for i in $DiskList
|
||||
do
|
||||
Val=`LANG=en_US; echo $i | cut -d ':' -f 2`
|
||||
Val=$[$Val / 1024 / 1024 / 1024]
|
||||
Disk=`LANG=en_US; echo $i | cut -d ':' -f 1`
|
||||
if [[ `echo "$Val < 35" | bc` -eq 1 ]]; then
|
||||
continue
|
||||
fi
|
||||
if [[ `echo "$Val < $Size_0" | bc` -eq 1 ]]; then
|
||||
Size_0=$Val
|
||||
Ret_back=$Disk
|
||||
fi
|
||||
if [[ `echo "$Val >= $MIN" | bc` -eq 1 ]] &&
|
||||
[[ `echo "$Val <= $MAX" | bc` -eq 1 ]] &&
|
||||
[[ `echo "$Val < $Size_1" | bc` -eq 1 ]]; then
|
||||
Size_1=$Val
|
||||
Ret=$Disk
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -z $Ret ]; then
|
||||
Ret=$Ret_back
|
||||
fi
|
||||
|
||||
echo $Ret
|
||||
}
|
||||
|
||||
auto_disk() {
|
||||
DiskList=`LANG=en_US; sudo fdisk -l | awk '{if($1=="Disk" && $2!="identifier:" && $2!="model:") print $2$5}'`
|
||||
MAX=2050
|
||||
MIN=80
|
||||
Size_0=80
|
||||
Size_1=80
|
||||
Size_2=80
|
||||
|
||||
Ret=
|
||||
|
||||
if echo $DiskList | grep -q 'nvme'; then
|
||||
DiskList=`LANG=en_US; sudo fdisk -l | awk '{if($1=="Disk" && $2!="identifier:" && $2!="model:") print $2$5}' | grep "nvme"`
|
||||
elif echo $DiskList | grep -q 'sd'; then
|
||||
DiskList=`LANG=en_US; sudo fdisk -l | awk '{if($1=="Disk" && $2!="identifier:" && $2!="model:") print $2$5}' | grep "sd"`
|
||||
else
|
||||
DiskList=$DiskList
|
||||
fi
|
||||
|
||||
num=1
|
||||
fdd=1
|
||||
for i in $DiskList
|
||||
do
|
||||
Val=`LANG=en_US; echo $i | cut -d ':' -f 2`
|
||||
Val=$[$Val / 1024 / 1024 / 1024]
|
||||
|
||||
Disk=`LANG=en_US; echo $i | cut -d ':' -f 1`
|
||||
|
||||
if [[ `echo "$Val < 35" | bc` -eq 1 ]]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
Sd=${Disk##*/}
|
||||
fdd=$( cat /sys/block/${Sd}/queue/rotational )
|
||||
if [[ $fdd == 0 || $num == 0 ]];then
|
||||
num=0
|
||||
if [[ $fdd == 1 ]];then
|
||||
continue
|
||||
fi
|
||||
if [[ `echo "$Val > $Size_0" | bc` -eq 1 ]]; then
|
||||
Size_0=$Val
|
||||
Ret_back=$Disk
|
||||
fi
|
||||
|
||||
if [[ `echo "$Val >= $MIN" | bc` -eq 1 ]] &&
|
||||
[[ `echo "$Val <= $MAX" | bc` -eq 1 ]] &&
|
||||
[[ `echo "$Val > $Size_2" | bc` -eq 1 ]]; then
|
||||
Size_2=$Val
|
||||
Ret=$Disk
|
||||
fi
|
||||
continue
|
||||
fi
|
||||
|
||||
if [[ `echo "$Val > $Size_0" | bc` -eq 1 ]]; then
|
||||
Size_0=$Val
|
||||
Ret_back=$Disk
|
||||
fi
|
||||
|
||||
if [[ `echo "$Val >= $MIN" | bc` -eq 1 ]] &&
|
||||
[[ `echo "$Val <= $MAX" | bc` -eq 1 ]] &&
|
||||
[[ `echo "$Val > $Size_1" | bc` -eq 1 ]]; then
|
||||
Size_1=$Val
|
||||
Ret=$Disk
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
|
||||
if [ -z $Ret ]; then
|
||||
Ret=$Ret_back
|
||||
fi
|
||||
|
||||
echo $Ret
|
||||
sed -i "/devpath/d" /tmp/ky-installer.cfg
|
||||
echo "devpath=$Ret" >>/tmp/ky-installer.cfg
|
||||
}
|
||||
|
||||
get_disk() {
|
||||
disk_num=0
|
||||
disk_menu=$(lsblk -d | grep -v NAME | grep -v loop | awk '{print $1}')
|
||||
for i in ${disk_menu}
|
||||
do
|
||||
disk_remove=$(cat /sys/block/$i/removable)|| disk_remove=1
|
||||
if [[ ${disk_remove} == 0 ]]; then
|
||||
disk_num=`expr ${disk_num} + 1`
|
||||
fi
|
||||
done
|
||||
echo ${disk_num}
|
||||
if [[ ${disk_num} -ge 2 ]]; then
|
||||
echo " DISK more than 1"
|
||||
else
|
||||
auto_disk
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
get_is_efi() {
|
||||
if type archdetect >/dev/null 2>&1; then
|
||||
archdetect=$(archdetect)
|
||||
else
|
||||
archdetect=unknown/generic
|
||||
fi
|
||||
arch=${archdetect%/*}
|
||||
sub=${archdetect#*/}
|
||||
ret=true
|
||||
case "$arch" in
|
||||
alpha|sw64)
|
||||
ret=false;;
|
||||
amd64|i386)
|
||||
case "$sub" in
|
||||
mac|efi)
|
||||
ret=true;;
|
||||
*)
|
||||
ret=false;;
|
||||
esac;;
|
||||
arm|armhf|armel)
|
||||
ret=false;;
|
||||
arm64)
|
||||
ret=true;;
|
||||
mips64el)
|
||||
case "$sub" in
|
||||
efi)
|
||||
ret=true;;
|
||||
*)
|
||||
ret=false;;
|
||||
esac;;
|
||||
mips|mipsel)
|
||||
ret=false;;
|
||||
*)
|
||||
ret=true;;
|
||||
esac
|
||||
|
||||
# 华为 990 设置为 efi
|
||||
if egrep -qi 'kirin.?9[09]0' /proc/cpuinfo; then
|
||||
ret=true
|
||||
fi
|
||||
|
||||
echo $ret
|
||||
}
|
||||
|
||||
readonly is_efi=$(get_is_efi)
|
||||
|
||||
# 优先使用引导参数中设置
|
||||
set_swap_mode() {
|
||||
if grep -q kyswapfile /proc/cmdline; then
|
||||
readonly is_swapfile=true
|
||||
return 0
|
||||
fi
|
||||
readonly is_swapfile=$(get_value enable-swapfile)
|
||||
}
|
||||
set_swap_mode
|
||||
|
||||
get_oem_mode() {
|
||||
ret=false
|
||||
if grep -qi 'oem-config/enable=true' /proc/cmdline; then
|
||||
ret=true
|
||||
fi
|
||||
echo $ret
|
||||
}
|
||||
|
||||
readonly is_oem_mode=$(get_oem_mode)
|
||||
|
||||
# 审核模式,工厂安装
|
||||
get_audit_mode() {
|
||||
ret=false
|
||||
if grep -qiE 'auditmode|ple-mode' /proc/cmdline; then
|
||||
ret=true
|
||||
fi
|
||||
echo $ret
|
||||
}
|
||||
|
||||
readonly is_audit_mode=$(get_audit_mode)
|
||||
|
||||
|
||||
get_is_990_9a0() {
|
||||
ret=false
|
||||
# 匹配 kirin 990 5g, kirin990, kirin 9006c
|
||||
if egrep -qi 'kirin.?9[09]0' /proc/cpuinfo; then
|
||||
ret=true
|
||||
fi
|
||||
echo $ret
|
||||
}
|
||||
readonly is_990_9a0=$(get_is_990_9a0)
|
||||
|
||||
readonly swap_file=swap_file
|
||||
|
||||
get_is_minimal() {
|
||||
ret=false
|
||||
if egrep -qi kylin-minimal /proc/cmdline; then
|
||||
ret=true
|
||||
fi
|
||||
echo $ret
|
||||
}
|
||||
readonly is_minimal=$(get_is_minimal)
|
||||
|
||||
readonly is_ghost=$(get_value ghost)
|
||||
|
||||
readonly isluks_lvm=$(get_value encrypty)
|
||||
|
||||
run_scripts_dir() {
|
||||
name=$1
|
||||
for i in ${name}/*; do
|
||||
if [ -x "$i" ]; then
|
||||
filename=$(basename $i)
|
||||
echo "$(date +'%b %d %H:%M:%S') ${filename}"
|
||||
. "$i"
|
||||
else
|
||||
msg "跳过 $i"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
get_hw_typedata() {
|
||||
typedata=$(dmidecode -s system-product-name)
|
||||
ret="${typedata#* }"
|
||||
if [[ "${typedata}" =~ "PGUV" ]]; then
|
||||
ret=pguv
|
||||
elif [[ "${typedata}" =~ "KLVU" ]]; then
|
||||
ret=klvu
|
||||
elif [[ "${typedata}" =~ "KLVV" ]]; then
|
||||
ret=klvv
|
||||
fi
|
||||
echo $ret
|
||||
}
|
||||
readonly hw_typedata=$(get_hw_typedata)
|
||||
|
||||
# 华为更改启动项
|
||||
hw_next_boot() {
|
||||
next_boot=$1
|
||||
boot_order_file="/boot/efi/EFI/BOOT/HwBootOrder.ini"
|
||||
case $next_boot in
|
||||
hd|HD)
|
||||
echo HwBootOrder=0123 > ${boot_order_file}
|
||||
;;
|
||||
pxe|PXE)
|
||||
echo HwBootOrder=2013 > ${boot_order_file}
|
||||
;;
|
||||
*)
|
||||
echo "Error argument $next_boot, only hd or pxe is supported"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
msg "set next order to $next_boot is done"
|
||||
}
|
||||
|
||||
do_bind_data() {
|
||||
mkdir -p /target/{home,root}
|
||||
mkdir -p /target/data/{home,root,usershare}
|
||||
|
||||
mount --bind /target/data/home /target/home
|
||||
mount --bind /target/data/root /target/root
|
||||
|
||||
chmod -R 1777 /target/data/usershare >/dev/null
|
||||
}
|
||||
|
|
@ -0,0 +1,142 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
# 拷贝配置文件
|
||||
do_copy_config() {
|
||||
# 使用绝对路径,方便在 /target 中加载
|
||||
cp utils /tmp
|
||||
|
||||
# sp1 使用 automatic
|
||||
if grep -q automatic /proc/cmdline; then
|
||||
[[ -f /cdrom/ky-installer.cfg ]] && cp /cdrom/ky-installer.cfg /tmp
|
||||
# 990/9A0 使用此设置,ple-mode 审核模式,test-mode 全自动安装模式
|
||||
elif grep -qE 'ple-mode|test-mode' /proc/cmdline; then
|
||||
[[ -f /cdrom/kyple-installer.cfg ]] && cp /cdrom/kyple-installer.cfg /tmp/ky-installer.cfg
|
||||
else
|
||||
cp /usr/share/kylin-os-installer/ky-installer.cfg /tmp
|
||||
fi
|
||||
}
|
||||
|
||||
do_copy_config
|
||||
|
||||
. /tmp/utils
|
||||
|
||||
|
||||
# 运行 prepare 脚本
|
||||
do_prepare() {
|
||||
mkdir -p /var/log/installer
|
||||
|
||||
run_scripts_dir prepare
|
||||
|
||||
if [[ -d /cdrom/hooks/prepare ]]; then
|
||||
run_scripts_dir /cdrom/hooks/prepare
|
||||
fi
|
||||
}
|
||||
|
||||
# 运行 in_chroot 脚本
|
||||
do_run_target() {
|
||||
mkdir -p /target/${IN_TARGET}
|
||||
cp utils /tmp/ky-installer.cfg /target/tmp
|
||||
cp -r k.sh in_chroot /target/${IN_TARGET}
|
||||
|
||||
chroot /target bash ${IN_TARGET}/k.sh >>${LOG_FILE} 2>&1
|
||||
}
|
||||
|
||||
# 运行 after 脚本
|
||||
do_after() {
|
||||
run_scripts_dir after
|
||||
|
||||
if [[ -d /cdrom/hooks/after ]]; then
|
||||
run_scripts_dir /cdrom/hooks/after
|
||||
fi
|
||||
}
|
||||
|
||||
# 执行 post 脚本
|
||||
do_cdrom_post_actions() {
|
||||
if [[ -f /cdrom/.kylin-post-actions ]] && [[ "${is_ghost}" != "true" ]]; then
|
||||
cp /cdrom/.kylin-post-actions /target/${IN_TARGET}
|
||||
chroot /target bash ${IN_TARGET}/.kylin-post-actions >>${LOG_FILE} 2>&1
|
||||
fi
|
||||
|
||||
if [[ -f /cdrom/.kylin-post-actions-nochroot ]] && [[ "${is_ghost}" != "true" ]]; then
|
||||
bash /cdrom/.kylin-post-actions-nochroot >>${LOG_FILE} 2>&1
|
||||
fi
|
||||
}
|
||||
|
||||
# 拷贝日志
|
||||
do_copy_log() {
|
||||
msg "正在拷贝安装日志..."
|
||||
cp -r /var/log/installer/ /target/var/log/
|
||||
}
|
||||
|
||||
# 出厂备份
|
||||
do_factory_backup() {
|
||||
umount /target/backup
|
||||
msg "正在进行系统备份..."
|
||||
## 工厂备份
|
||||
/usr/bin/backup-auto --factorybackup /target /backup || true
|
||||
msg "系统备份完成"
|
||||
}
|
||||
|
||||
do_install_success() {
|
||||
if [[ "${is_990_9a0}" == "true" ]]; then
|
||||
mkdir -p /target/boot/efi
|
||||
touch /target/boot/efi/INSTALL_SUCCESS
|
||||
fi
|
||||
}
|
||||
|
||||
handle_factory_backup() {
|
||||
factory_backup=$(get_value factory-backup)
|
||||
if [[ -f /target/etc/.bootinfo ]]; then
|
||||
if grep -q 'factory-backup' /proc/cmdline; then
|
||||
do_factory_backup
|
||||
elif [[ $factory_backup -eq 1 ]]; then
|
||||
do_factory_backup
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
do_finished() {
|
||||
echo 'finished'
|
||||
touch /tmp/z-finished-install
|
||||
}
|
||||
|
||||
# 运行 prepare 阶段脚本
|
||||
mkdir -p /var/log/installer
|
||||
|
||||
#自动安装自动选择磁盘安装方案
|
||||
if grep -q automatic /proc/cmdline; then
|
||||
devpath=$(get_value devpath)
|
||||
if [[ -z $devpath ]]; then
|
||||
auto_disk >>${LOG_FILE}
|
||||
else
|
||||
get_disk >>${LOG_FILE}
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
do_prepare >>${LOG_FILE} 2>&1
|
||||
|
||||
# 执行 target inchroot 脚本
|
||||
do_run_target
|
||||
|
||||
# 运行 after 阶段脚本
|
||||
do_after >>${LOG_FILE} 2>&1
|
||||
|
||||
# 执行 postactions 脚本
|
||||
do_cdrom_post_actions
|
||||
|
||||
# 拷贝安装日志
|
||||
do_copy_log
|
||||
|
||||
do_install_success
|
||||
|
||||
# 处理出厂备份
|
||||
handle_factory_backup
|
||||
|
||||
# 卸载文件系统
|
||||
umount_all
|
||||
|
||||
do_finished
|
|
@ -0,0 +1,95 @@
|
|||
#-------------------------------------------------
|
||||
#
|
||||
# Project created by QtCreator 2020-06-17T13:22:56
|
||||
#
|
||||
#-------------------------------------------------
|
||||
|
||||
QT += core gui svg
|
||||
|
||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets xml
|
||||
|
||||
TARGET = kylin-os-installer
|
||||
TEMPLATE = app
|
||||
|
||||
CONFIG += c++11 \
|
||||
link_pkgconfig
|
||||
|
||||
# The following define makes your compiler emit warnings if you us
|
||||
e
|
||||
# any feature of Qt which has been marked as deprecated (the exact warnings
|
||||
# depend on your compiler). Please consult the documentation of the
|
||||
# deprecated API in order to know how to port your code away from it.
|
||||
DEFINES += QT_DEPRECATED_WARNINGS
|
||||
|
||||
# You can also make your code fail to compile if you use deprecated APIs.
|
||||
# In order to do so, uncomment the following line.
|
||||
# You can also select to disable deprecated APIs only up to a certain version of Qt.
|
||||
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
||||
|
||||
|
||||
SOURCES += \
|
||||
detailbutton.cpp \
|
||||
installermainwidget_auto.cpp \
|
||||
installingoemconfigframe.cpp \
|
||||
main.cpp \
|
||||
installermainwidget.cpp \
|
||||
ksetting.cpp \
|
||||
installingframe.cpp \
|
||||
myprobar.cpp \
|
||||
uilt/slidershow.cpp \
|
||||
uilt/showprogressbar.cpp \
|
||||
finishedInstall.cpp
|
||||
|
||||
|
||||
|
||||
HEADERS += \
|
||||
detailbutton.h \
|
||||
installermainwidget.h \
|
||||
installermainwidget_auto.h \
|
||||
installingoemconfigframe.h \
|
||||
ksetting.h \
|
||||
installingframe.h \
|
||||
myprobar.h \
|
||||
uilt/slidershow.h \
|
||||
uilt/showprogressbar.h \
|
||||
finishedInstall.h
|
||||
|
||||
|
||||
RESOURCES += \
|
||||
resource.qrc
|
||||
|
||||
|
||||
PKGCONFIG += x11 xrandr
|
||||
|
||||
unix:!macx: LIBS += -L/usr/lib/x86_64-linux-gnu/ -lyaml-cpp
|
||||
|
||||
INCLUDEPATH += /usr/lib/x86_64-linux-gnu
|
||||
DEPENDPATH += /usr/lib/x86_64-linux-gnu
|
||||
|
||||
|
||||
unix:!macx: LIBS += -L$$PWD/../KPlugins/ -lReflex
|
||||
|
||||
INCLUDEPATH += $$PWD/../plugins/Reflex
|
||||
DEPENDPATH += $$PWD/../plugins/Reflex
|
||||
|
||||
unix:!macx: LIBS += -L$$PWD/../KPlugins/ -lPluginDll
|
||||
|
||||
INCLUDEPATH += $$PWD/../plugins/PluginDll
|
||||
DEPENDPATH += $$PWD/../plugins/PluginDll
|
||||
|
||||
unix:!macx: LIBS += -L$$PWD/../KPlugins/ -lPluginTask
|
||||
|
||||
INCLUDEPATH += $$PWD/../plugins/PluginTask
|
||||
DEPENDPATH += $$PWD/../plugins/PluginTask
|
||||
|
||||
unix:!macx: LIBS += -L$$PWD/../KPlugins/ -lPluginService
|
||||
|
||||
INCLUDEPATH += $$PWD/../plugins/PluginService
|
||||
DEPENDPATH += $$PWD/../plugins/PluginService
|
||||
|
||||
|
||||
|
||||
unix:!macx: LIBS += -L$$OUT_PWD/../plugins/VirtualKeyboard/ -lVirtualKeyboard
|
||||
|
||||
INCLUDEPATH += $$PWD/../plugins/VirtualKeyboard
|
||||
DEPENDPATH += $$PWD/../plugins/VirtualKeyboard
|
|
@ -0,0 +1,9 @@
|
|||
# YAML: list of lists of strings.
|
||||
sequence:
|
||||
- view:
|
||||
- KChoiceLanguage
|
||||
# - KChoiceImg
|
||||
- KTimeZone
|
||||
- KUserRegister
|
||||
- KPartition
|
||||
- exec:
|
|
@ -0,0 +1,10 @@
|
|||
# YAML: list of lists of strings.
|
||||
sequence:
|
||||
- view:
|
||||
- KChoiceLanguage
|
||||
# - KTimeZone
|
||||
# - KyLicense
|
||||
# - KChoiceImg
|
||||
# - KUserRegister
|
||||
- KPartition
|
||||
- exec:
|
|
@ -0,0 +1,10 @@
|
|||
# YAML: list of lists of strings.
|
||||
sequence:
|
||||
- view:
|
||||
- KChoiceLanguage
|
||||
- KTimeZone
|
||||
# - KyLicense
|
||||
# - KChoiceImg
|
||||
- KUserRegister
|
||||
# - KPartition
|
||||
- exec:
|
After Width: | Height: | Size: 2.1 MiB |
After Width: | Height: | Size: 328 KiB |
After Width: | Height: | Size: 1.5 MiB |
After Width: | Height: | Size: 401 KiB |
After Width: | Height: | Size: 1.0 MiB |
After Width: | Height: | Size: 775 B |
After Width: | Height: | Size: 261 B |
|
@ -0,0 +1,3 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="8" height="8" viewBox="0 0 8 8">
|
||||
<circle id="椭圆_11" data-name="椭圆 11" cx="4" cy="4" r="4" fill="#fff" opacity="0.702"/>
|
||||
</svg>
|
After Width: | Height: | Size: 184 B |
|
@ -0,0 +1,3 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="8" height="8" viewBox="0 0 8 8">
|
||||
<circle id="椭圆_11_拷贝" data-name="椭圆 11 拷贝" cx="4" cy="4" r="4" fill="#fff" opacity="0.149"/>
|
||||
</svg>
|
After Width: | Height: | Size: 198 B |
After Width: | Height: | Size: 297 B |