Kaydet (Commit) 75da79f4 authored tarafından Emincan Özcan's avatar Emincan Özcan

v0.3.0

üst 9e713f52
...@@ -14,17 +14,27 @@ class PardusAppSeeder extends Seeder ...@@ -14,17 +14,27 @@ class PardusAppSeeder extends Seeder
*/ */
public function run() public function run()
{ {
// PardusApp::create([
// 'name' => 'Spotify',
// 'image_url' => "https://upload.wikimedia.org/wikipedia/commons/1/19/Spotify_logo_without_text.svg",
// 'scripts' => [
// 'sudo apt install curl -y',
// 'sudo curl -sS https://download.spotify.com/debian/pubkey_0D811D58.gpg | sudo apt-key add -',
// 'sudo echo "deb http://repository.spotify.com stable non-free" | sudo tee /etc/apt/sources.list.d/spotify.list',
// 'sudo apt-get update -y',
// 'sudo apt-get install spotify-client -y'
// ]
// ]);
PardusApp::create([ PardusApp::create([
'name' => 'Spotify', 'name' => 'Spotify',
'image_url' => "https://upload.wikimedia.org/wikipedia/commons/1/19/Spotify_logo_without_text.svg", 'image_url' => "https://upload.wikimedia.org/wikipedia/commons/1/19/Spotify_logo_without_text.svg",
'scripts' => [ 'scripts' => [
'sudo apt install curl -y',
'sudo curl -sS https://download.spotify.com/debian/pubkey_0D811D58.gpg | sudo apt-key add -',
'sudo echo "deb http://repository.spotify.com stable non-free" | sudo tee /etc/apt/sources.list.d/spotify.list',
'sudo apt-get update -y',
'sudo apt-get install spotify-client -y' 'sudo apt-get install spotify-client -y'
] ]
]); ]);
PardusApp::create([ PardusApp::create([
'name' => 'Audacity', 'name' => 'Audacity',
'image_url' => "https://upload.wikimedia.org/wikipedia/commons/f/f6/Audacity_Logo.svg", 'image_url' => "https://upload.wikimedia.org/wikipedia/commons/f/f6/Audacity_Logo.svg",
...@@ -46,11 +56,7 @@ class PardusAppSeeder extends Seeder ...@@ -46,11 +56,7 @@ class PardusAppSeeder extends Seeder
PardusApp::create([ PardusApp::create([
'name' => 'Krita', 'name' => 'Krita',
'image_url' => "https://upload.wikimedia.org/wikipedia/commons/7/73/Calligrakrita-base.svg", 'image_url' => "https://upload.wikimedia.org/wikipedia/commons/7/73/Calligrakrita-base.svg",
'scripts' => [ 'scripts' => ["sudo apt-get install krita -y"]
"sudo add-apt-repository ppa:kritalime/ppa -y",
"sudo apt update -y",
"sudo apt-get install krita -y"
]
]); ]);
PardusApp::create([ PardusApp::create([
...@@ -61,14 +67,10 @@ class PardusAppSeeder extends Seeder ...@@ -61,14 +67,10 @@ class PardusAppSeeder extends Seeder
PardusApp::create([ PardusApp::create([
'name' => 'Evince', 'name' => 'Evince',
'image_url' => "https://upload.wikimedia.org/wikipedia/commons/9/9b/GNOME_Document_Viewer_icon_2019.svg", 'image_url' => "https://upload.wikimedia.org/wikipedia/commons/9/9b/GNOME_Document_Viewer_icon_2019.svg",
'scripts' => [ 'scripts' => ["sudo apt-get install evince - y",]
"sudo add-apt-repository ppa:gnome3-team/gnome3-y",
"sudo apt-get update -y",
"sudo apt-get install evince - y",
]
]); ]);
PardusApp::create ([ PardusApp::create([
'name' => 'Git', 'name' => 'Git',
'image_url' => "https://upload.wikimedia.org/wikipedia/commons/3/3f/Git_icon.svg", 'image_url' => "https://upload.wikimedia.org/wikipedia/commons/3/3f/Git_icon.svg",
'scripts' => [ 'scripts' => [
...@@ -76,7 +78,7 @@ class PardusAppSeeder extends Seeder ...@@ -76,7 +78,7 @@ class PardusAppSeeder extends Seeder
] ]
]); ]);
PardusApp::create ([ PardusApp::create([
'name' => 'Git Cola', 'name' => 'Git Cola',
'image_url' => "https://upload.wikimedia.org/wikipedia/commons/a/a6/Breezeicons-apps-48-git-cola.svg", 'image_url' => "https://upload.wikimedia.org/wikipedia/commons/a/a6/Breezeicons-apps-48-git-cola.svg",
'scripts' => [ 'scripts' => [
...@@ -93,6 +95,7 @@ class PardusAppSeeder extends Seeder ...@@ -93,6 +95,7 @@ class PardusAppSeeder extends Seeder
"sudo rm -f gitkraken-amd64.deb", "sudo rm -f gitkraken-amd64.deb",
] ]
]); ]);
PardusApp::create([ PardusApp::create([
'name' => 'QBittorrent', 'name' => 'QBittorrent',
'image_url' => "https://upload.wikimedia.org/wikipedia/commons/6/66/New_qBittorrent_Logo.svg", 'image_url' => "https://upload.wikimedia.org/wikipedia/commons/6/66/New_qBittorrent_Logo.svg",
...@@ -118,17 +121,21 @@ class PardusAppSeeder extends Seeder ...@@ -118,17 +121,21 @@ class PardusAppSeeder extends Seeder
] ]
]); ]);
// PardusApp::create([
// 'name' => 'Zoom',
// 'image_url' => "https://seeklogo.com/images/Z/zoom-fondo-azul-vertical-logo-8246E36E95-seeklogo.com.png",
// 'scripts' => [
// 'sudo wget https://zoom.us/client/latest/zoom_amd64.deb',
// 'sudo apt --fix-broken install ~/zoom_amd64.deb -y',
// 'sudo rm -f zoom_amd64.deb',
// ]
// ]);
PardusApp::create([ PardusApp::create([
'name' => 'Zoom', 'name' => 'Zoom',
'image_url' => "https://seeklogo.com/images/Z/zoom-fondo-azul-vertical-logo-8246E36E95-seeklogo.com.png", 'image_url' => "https://seeklogo.com/images/Z/zoom-fondo-azul-vertical-logo-8246E36E95-seeklogo.com.png",
'scripts' => [ 'scripts' => ['sudo apt install zoom -y']
'sudo wget https://zoom.us/client/latest/zoom_amd64.deb',
'sudo apt --fix-broken install ~/zoom_amd64.deb -y',
'sudo rm -f zoom_amd64.deb',
]
]); ]);
PardusApp::create([ PardusApp::create([
'name' => 'Visual Studio Code (VS CODE)', 'name' => 'Visual Studio Code (VS CODE)',
'image_url' => "https://upload.wikimedia.org/wikipedia/commons/9/9a/Visual_Studio_Code_1.35_icon.svg", 'image_url' => "https://upload.wikimedia.org/wikipedia/commons/9/9a/Visual_Studio_Code_1.35_icon.svg",
...@@ -163,11 +170,7 @@ class PardusAppSeeder extends Seeder ...@@ -163,11 +170,7 @@ class PardusAppSeeder extends Seeder
PardusApp::create([ PardusApp::create([
'name' => 'Libre Office', 'name' => 'Libre Office',
'image_url' => "https://logos-download.com/wp-content/uploads/2020/06/LibreOffice_Logo_2.png", 'image_url' => "https://logos-download.com/wp-content/uploads/2020/06/LibreOffice_Logo_2.png",
'scripts' => [ 'scripts' => ['sudo apt install libreoffice -y',]
'sudo add-apt-repository ppa:libreoffice/ppa -y',
'sudo apt update -y',
'sudo apt install libreoffice -y',
]
]); ]);
PardusApp::create([ PardusApp::create([
...@@ -179,7 +182,7 @@ class PardusAppSeeder extends Seeder ...@@ -179,7 +182,7 @@ class PardusAppSeeder extends Seeder
PardusApp::create([ PardusApp::create([
'name' => 'Mozilla Firefox', 'name' => 'Mozilla Firefox',
'image_url' => "https://www.mozilla.org/media/protocol/img/logos/firefox/browser/logo.eb1324e44442.svg", 'image_url' => "https://www.mozilla.org/media/protocol/img/logos/firefox/browser/logo.eb1324e44442.svg",
'scripts' => ['sudo apt install firefox -y'] 'scripts' => ['( sudo apt install firefox-esr -y || sudo apt install firefox -y)']
]); ]);
PardusApp::create([ PardusApp::create([
...@@ -197,14 +200,14 @@ class PardusAppSeeder extends Seeder ...@@ -197,14 +200,14 @@ class PardusAppSeeder extends Seeder
PardusApp::create([ PardusApp::create([
'name' => 'Kdenlive', 'name' => 'Kdenlive',
'image_url' => "https://upload.wikimedia.org/wikipedia/commons/thumb/c/c6/Kdenlive-logo.svg/1280px-Kdenlive-logo.svg.png", 'image_url' => "https://upload.wikimedia.org/wikipedia/commons/thumb/c/c6/Kdenlive-logo.svg/1280px-Kdenlive-logo.svg.png",
'scripts' => ['sudo add-apt-repository ppa:kdenlive/kdenlive-stable -y','sudo apt update -y','sudo apt install kdenlive -y'] 'scripts' => ['sudo apt install kdenlive -y']
]); ]);
PardusApp::create([ PardusApp::create([
'name' => 'OpenShot', 'name' => 'OpenShot',
'image_url' => "https://w1.pngwing.com/pngs/392/185/png-transparent-openshot-personal-protective-equipment-video-editing-software-free-and-opensource-software-film-editing-nonlinear-editing-system-macos-avs-video-editor-computer-software-thumbnail.png", 'image_url' => "https://w1.pngwing.com/pngs/392/185/png-transparent-openshot-personal-protective-equipment-video-editing-software-free-and-opensource-software-film-editing-nonlinear-editing-system-macos-avs-video-editor-computer-software-thumbnail.png",
'scripts' => [ 'scripts' => [
'sudo add-apt-repository ppa:openshot.developers/ppa -y', 'sudo apt update -y', 'sudo apt-get install openshot-qt -y' 'sudo apt-get install openshot-qt -y'
] ]
]); ]);
...@@ -221,7 +224,7 @@ class PardusAppSeeder extends Seeder ...@@ -221,7 +224,7 @@ class PardusAppSeeder extends Seeder
'image_url' => "https://banner2.cleanpng.com/20190124/rs/kisspng-python-selenium-programming-language-computer-icon-pip-5c4a4a7ca92d33.171618491548372604693.jpg", 'image_url' => "https://banner2.cleanpng.com/20190124/rs/kisspng-python-selenium-programming-language-computer-icon-pip-5c4a4a7ca92d33.171618491548372604693.jpg",
'scripts' => [ 'scripts' => [
'sudo apt install python3-pip -y', 'sudo apt install python3-pip -y',
] ]
]); ]);
} }
} }
...@@ -7,7 +7,6 @@ function generateShellScriptFromBucket() { ...@@ -7,7 +7,6 @@ function generateShellScriptFromBucket() {
logDate=$(date +%s) logDate=$(date +%s)
echo "Kurulum öncesi hazırlıklar gerçekleştiriliyor. " echo "Kurulum öncesi hazırlıklar gerçekleştiriliyor. "
sudo apt update -y ${outputRedirection} sudo apt update -y ${outputRedirection}
sudo apt-get install software-properties-common -y ${outputRedirection}
echo "Kurulum öncesi hazırlıklar tamamlandı. Yüklemeler başlatılıyor." echo "Kurulum öncesi hazırlıklar tamamlandı. Yüklemeler başlatılıyor."
`; `;
......
...@@ -10,7 +10,7 @@ function generateInstallationScriptFromBucket() { ...@@ -10,7 +10,7 @@ function generateInstallationScriptFromBucket() {
scripts.push( scripts.push(
'find /etc/apt/sources.list.d/ -name "*.save" -type f -delete' 'find /etc/apt/sources.list.d/ -name "*.save" -type f -delete'
); );
const cmd = scripts.join(";"); const cmd = scripts.join(" && ");
return { id, cmd }; return { id, cmd };
}); });
} }
......
...@@ -14,23 +14,24 @@ export default function installListener(event, data) { ...@@ -14,23 +14,24 @@ export default function installListener(event, data) {
const window = BrowserWindow.getFocusedWindow(); const window = BrowserWindow.getFocusedWindow();
window.webContents.send("open-installation-screen"); window.webContents.send("open-installation-screen");
clearTmp(); clearTmp();
// state = {};
const preInstallationCheckPath = getCheckPath("pre-installation");
const watcherInterval = setInterval(() => watcher(window), 100); const watcherInterval = setInterval(() => watcher(window), 100);
const command = const command =
"apt update -y; apt install -y software-properties-common;" + `cat /dev/null > ${preInstallationCheckPath} && echo 'in-progress' > ${preInstallationCheckPath};
( ( apt update -y && echo 'end' > ${preInstallationCheckPath} ) ||
echo 'error' > ${preInstallationCheckPath} ); ` +
data data
.map((app) => { .map((app) => {
const checkPath = getCheckPath(app.id); const checkPath = getCheckPath(app.id);
const shellPath = getShellPath(app.id); const shellPath = getShellPath(app.id);
console.log({ checkPath, shellPath }); console.log({ checkPath, shellPath });
return `cat /dev/null > ${checkPath}; return ` cat /dev/null > ${checkPath}; echo 'in-progress' > ${checkPath}; cat /dev/null > ${shellPath}; echo '${app.cmd}' > ${shellPath};
echo 'in-progress' > ${checkPath}; ( (sh ${shellPath} && echo 'end' > ${checkPath}) || ( echo 'error' > ${checkPath}) ); `;
cat /dev/null > ${shellPath};
echo '${app.cmd}' > ${shellPath};
sh ${shellPath};
echo 'end' > ${checkPath};`;
}) })
.join(""); .join("");
// return console.log(command);
window.webContents.send("installation-start"); window.webContents.send("installation-start");
sudo.exec(command, { name: "Pardus Kataliz" }, (err, stdout, stderr) => { sudo.exec(command, { name: "Pardus Kataliz" }, (err, stdout, stderr) => {
if (err) { if (err) {
......
...@@ -11,6 +11,7 @@ async function fetchData() { ...@@ -11,6 +11,7 @@ async function fetchData() {
try { try {
const response = await axios.get( const response = await axios.get(
"https://kataliz-admin.emincanozcan.com/api/get-all-data" "https://kataliz-admin.emincanozcan.com/api/get-all-data"
// "http://localhost/api/get-all-data"
); );
const data = response.data.data; const data = response.data.data;
pardusApps.value = data["pardus_apps"]; pardusApps.value = data["pardus_apps"];
......
...@@ -44,6 +44,10 @@ export default { ...@@ -44,6 +44,10 @@ export default {
setup() { setup() {
const isEnd = ref(false); const isEnd = ref(false);
const installationState = reactive({}); const installationState = reactive({});
installationState["pre-installation"] = {
name: "Ön Kurulumlar",
status: "Hazırlanıyor...",
};
store.bucket.value.forEach((appId) => { store.bucket.value.forEach((appId) => {
const app = store.pardusApps.value.find((app) => app.id === appId); const app = store.pardusApps.value.find((app) => app.id === appId);
installationState[app.id] = { installationState[app.id] = {
...@@ -58,6 +62,8 @@ export default { ...@@ -58,6 +62,8 @@ export default {
installationState[data.id].status = "Kurulum tamamlandı."; installationState[data.id].status = "Kurulum tamamlandı.";
} else if (data.status === "in-progress") { } else if (data.status === "in-progress") {
installationState[data.id].status = "Kuruluyor."; installationState[data.id].status = "Kuruluyor.";
} else if (data.status === "error") {
installationState[data.id].status = "Hata: Kurulum tamamlanamadı.";
} }
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment