Skip to content

Commit

Permalink
初コミット
Browse files Browse the repository at this point in the history
  • Loading branch information
Budobudou committed Apr 5, 2024
0 parents commit 0c397dd
Show file tree
Hide file tree
Showing 21 changed files with 1,065 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
bin/
obj/
.vs/
dist/
MainWindow.glade~
pioneos-oobe_*
405 changes: 405 additions & 0 deletions MainWindow.cs

Large diffs are not rendered by default.

493 changes: 493 additions & 0 deletions MainWindow.glade

Large diffs are not rendered by default.

22 changes: 22 additions & 0 deletions Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
using System;
using Gtk;

namespace oobe
{
class Program
{
[STAThread]
public static void Main(string[] args)
{
Application.Init();

var app = new Application("net.ospio.oobe", GLib.ApplicationFlags.None);
app.Register(GLib.Cancellable.Current);
var win = new MainWindow();
win.Maximize();
app.AddWindow(win);
win.Show();
Application.Run();
}
}
}
24 changes: 24 additions & 0 deletions makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
build:
dotnet publish ./oobe.csproj -c Release -o dist -r linux-x64 --self-contained true

dist: build
dotnet publish ./oobe.csproj -c Release -o dist -r linux-x64 --self-contained true
rm -rf app
mkdir app
cp -r ./src/* app/
cp ./dist/oobe app/etc/pioneos/oobe

chmod +x app/DEBIAN/postinst
chmod +x app/DEBIAN/prerm

dpkg-deb --build app
mv app.deb pioneos-oobe_1.0-9_amd64.deb
rm -rf app
rm -rf dist
rm -rf bin
rm -rf obj
clean:
rm -rf app
rm -rf dist
rm -rf bin
rm -rf obj
26 changes: 26 additions & 0 deletions oobe.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<PublishSingleFile>true</PublishSingleFile>
<PublishTrimmed>true</PublishTrimmed>
<TrimMode>partial</TrimMode>
<PublishReadyToRun>true</PublishReadyToRun>
<DebuggerSupport>false</DebuggerSupport>

</PropertyGroup>

<ItemGroup>
<None Remove="**\*.glade" />
<EmbeddedResource Include="**\*.glade">
<LogicalName>%(Filename)%(Extension)</LogicalName>
</EmbeddedResource>
</ItemGroup>

<ItemGroup>
<PackageReference Include="GtkSharp" Version="3.24.24.*" />
</ItemGroup>

</Project>
25 changes: 25 additions & 0 deletions oobe.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.5.002.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "oobe", "oobe.csproj", "{41FA29E7-2475-4A10-B53C-2A96553C6D3C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{41FA29E7-2475-4A10-B53C-2A96553C6D3C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{41FA29E7-2475-4A10-B53C-2A96553C6D3C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{41FA29E7-2475-4A10-B53C-2A96553C6D3C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{41FA29E7-2475-4A10-B53C-2A96553C6D3C}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {C53D86B6-3CE4-424D-8A0E-DA7ECE4A4BB0}
EndGlobalSection
EndGlobal
8 changes: 8 additions & 0 deletions src/DEBIAN/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Package: pioneos-oobe
Version: 1.0-8
Section: base
Priority: optional
Architecture: amd64
#Depends:
Maintainer: budobudou <email@address.com>
Description: PioneOS OOBE
6 changes: 6 additions & 0 deletions src/DEBIAN/postinst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh

set -e
chmod -R 4755 /etc/pioneos/oobe
chmod 4755 /usr/bin/startoobe
exit 0
5 changes: 5 additions & 0 deletions src/DEBIAN/prerm
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh

set -e
rm -rf /etc/pioneos/oobe/
exit 0
12 changes: 12 additions & 0 deletions src/etc/pioneos/oobe/Assets/ReboottoWindows.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[Desktop Entry]
Version=1.0
Type=Application
Name=Reboot to Windows
Name[ja]=Windows へ再起動
Comment[ja]=grub-reboot を利用して Windows へ再起動します。
Exec=/bin/rebootwin
Icon=distributor-logo-windows
Path=
Terminal=true
StartupNotify=false
Categories=ConsoleOnly;Utility;System;
Binary file added src/etc/pioneos/oobe/Assets/internet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/etc/pioneos/oobe/Assets/network.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/etc/pioneos/oobe/Assets/pioneos.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/etc/pioneos/oobe/Assets/pioneos2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/etc/pioneos/oobe/Assets/usernameoff.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/etc/pioneos/oobe/Assets/usernameon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions src/etc/pioneos/oobe/fini.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/sh
echo "PioneOS のセットアップを完了しています"
rm -rf /etc/calamares
rm -f /usr/share/applications/install-pioneos.desktop
rm '/etc/skel/.config/autostart/PioneOS Setup.desktop'
cp /etc/pioneos/xfce-perchannel-xml/xfce4-desktop.xml /etc/skel/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml
cp /etc/pioneos/xfce-perchannel-xml/xfce4-panel.xml /etc/skel/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml
apt-get -y remove pioneos-oobe
apt-get -y remove calamares
apt-get -y autopurge *linux-image-6.1.0*
apt-get -y update
reboot
7 changes: 7 additions & 0 deletions src/etc/pioneos/oobe/fini2.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh
echo "PioneOS のセットアップを完了しています2"
rm '~/.config/autostart/PioneOS Setup.desktop'
pkill xfconfd
cp /etc/pioneos/xfce-perchannel-xml/xfce4-desktop.xml ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml
cp /etc/pioneos/xfce-perchannel-xml/xfce4-panel.xml ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml

10 changes: 10 additions & 0 deletions src/etc/pioneos/oobe/livetodesktop.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/sh
pkill xfconfd
cp /etc/pioneos/xfce-perchannel-xml/xfce4-desktop.xml /home/demo/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml
cp /etc/pioneos/xfce-perchannel-xml/xfce4-panel.xml /home/demo/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml
cp /etc/pioneos/xfce-perchannel-xml/xfce4-desktop.xml /etc/skel/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml
cp /etc/pioneos/xfce-perchannel-xml/xfce4-panel.xml /etc/skel/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml
rm /etc/pioneos/oobe/oobe
rm /usr/bin/startoobe
systemctl restart lightdm.service && pkill xfce4

4 changes: 4 additions & 0 deletions src/etc/pioneos/oobe/windowstimesync.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
echo "Windows とのデュアルブートを最適化しています。"
hwclock --verbose --systohc --localtime
cp /etc/pioneos/oobe/Assets/ReboottoWindows.desktop /usr/share/applications/ReboottoWindows.desktop

0 comments on commit 0c397dd

Please sign in to comment.