Skip to content

Commit

Permalink
#10
Browse files Browse the repository at this point in the history
  • Loading branch information
XDPXI committed Jul 16, 2024
1 parent f6f5636 commit 68dad49
Show file tree
Hide file tree
Showing 65 changed files with 2,036 additions and 364 deletions.
Binary file added ZtrolixLibsInstaller-Universal.jar
Binary file not shown.
Binary file added ZtrolixLibsInstaller-Windows.exe
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
653 changes: 328 additions & 325 deletions ZtrolixLibsDownloader.java → universal/ZtrolixLibsDownloader.java

Large diffs are not rendered by default.

70 changes: 35 additions & 35 deletions compile.bat → universal/compile.bat
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
@echo off
set JAVA_FILE=ZtrolixLibsDownloader.java
set CLASS_FILES=ZtrolixLibsDownloader*.class
set MANIFEST_FILE=manifest.txt
set JAR_FILE=ZtrolixLibsInstaller.jar

echo Compiling %JAVA_FILE%...
javac -Xlint:deprecation %JAVA_FILE%
if %errorlevel% neq 0 (
echo Compilation failed!
pause
exit /b %errorlevel%
)

echo Creating JAR file %JAR_FILE%...
echo Main-Class: ZtrolixLibsDownloader > %MANIFEST_FILE%
jar cfm %JAR_FILE% %MANIFEST_FILE% %CLASS_FILES%
if %errorlevel% neq 0 (
echo Failed to create JAR file!
pause
exit /b %errorlevel%
)

echo Running %JAR_FILE%...
java -jar %JAR_FILE%
if %errorlevel% neq 0 (
echo Failed to run JAR file!
pause
exit /b %errorlevel%
)

echo Cleaning up...
del %CLASS_FILES%
del %MANIFEST_FILE%
echo Done!
@echo off
set JAVA_FILE=ZtrolixLibsDownloader.java
set CLASS_FILES=ZtrolixLibsDownloader*.class
set MANIFEST_FILE=manifest.txt
set JAR_FILE=ZtrolixLibsInstaller-Universal.jar

echo Compiling %JAVA_FILE%...
javac -Xlint:deprecation %JAVA_FILE%
if %errorlevel% neq 0 (
echo Compilation failed!
pause
exit /b %errorlevel%
)

echo Creating JAR file %JAR_FILE%...
echo Main-Class: ZtrolixLibsDownloader > %MANIFEST_FILE%
jar cfm %JAR_FILE% %MANIFEST_FILE% %CLASS_FILES%
if %errorlevel% neq 0 (
echo Failed to create JAR file!
pause
exit /b %errorlevel%
)

echo Running %JAR_FILE%...
java -jar %JAR_FILE%
if %errorlevel% neq 0 (
echo Failed to run JAR file!
pause
exit /b %errorlevel%
)

echo Cleaning up...
del %CLASS_FILES%
del %MANIFEST_FILE%
echo Done!
pause
8 changes: 4 additions & 4 deletions run.bat → universal/run.bat
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@echo off
title Run
cls

@echo off
title Run
cls

java -jar ZtrolixLibsDownloader.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added windows/.vs/ZtrolixLibs-Win/v17/.suo
Binary file not shown.
86 changes: 86 additions & 0 deletions windows/.vs/ZtrolixLibs-Win/v17/DocumentLayout.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
{
"Version": 1,
"WorkspaceRootPath": "D:\\GitHub\\ZtrolixLibs\\windows\\",
"Documents": [
{
"AbsoluteMoniker": "D:0:0:{9ED1E173-BB85-4669-BFD9-06E331EF0FCB}|ZtrolixLibs-Win.csproj|D:\\GitHub\\ZtrolixLibs\\windows\\mainwindow.xaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{9ED1E173-BB85-4669-BFD9-06E331EF0FCB}|ZtrolixLibs-Win.csproj|solutionrelative:mainwindow.xaml.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{00000000-0000-0000-0000-000000000000}|\u003CSolution\u003E|ZtrolixLibs-Win||{04B8AB82-A572-4FEF-95CE-5222444B6B64}|"
},
{
"AbsoluteMoniker": "D:0:0:{9ED1E173-BB85-4669-BFD9-06E331EF0FCB}|ZtrolixLibs-Win.csproj|d:\\github\\ztrolixlibs\\windows\\mainwindow.xaml||{F11ACC28-31D1-4C80-A34B-F4E09D3D753C}",
"RelativeMoniker": "D:0:0:{9ED1E173-BB85-4669-BFD9-06E331EF0FCB}|ZtrolixLibs-Win.csproj|solutionrelative:mainwindow.xaml||{F11ACC28-31D1-4C80-A34B-F4E09D3D753C}"
},
{
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|D:\\ZtrolixLibs\\ZtrolixLibsDownloader.java||{8B382828-6202-11D1-8870-0000F87579D2}"
},
{
"AbsoluteMoniker": "D:0:0:{9ED1E173-BB85-4669-BFD9-06E331EF0FCB}|ZtrolixLibs-Win.csproj|d:\\github\\ztrolixlibs\\windows\\||{B270807C-D8C6-49EB-8EBE-8E8D566637A1}|5e9a8ac2-4f34-4521-858f-4c248ba31532"
}
],
"DocumentGroupContainers": [
{
"Orientation": 0,
"VerticalTabListWidth": 256,
"DocumentGroups": [
{
"DockedWidth": 200,
"SelectedChildIndex": 3,
"Children": [
{
"$type": "Document",
"DocumentIndex": 3,
"Title": "ZtrolixLibsDownloader.java",
"DocumentMoniker": "D:\\ZtrolixLibs\\ZtrolixLibsDownloader.java",
"RelativeDocumentMoniker": "..\\..\\..\\ZtrolixLibs\\ZtrolixLibsDownloader.java",
"ToolTip": "D:\\ZtrolixLibs\\ZtrolixLibsDownloader.java",
"RelativeToolTip": "..\\..\\..\\ZtrolixLibs\\ZtrolixLibsDownloader.java",
"ViewState": "AgIAAAAAAAAAAAAAAAAAAMIAAAAFAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001630|",
"WhenOpened": "2024-06-26T06:11:24.379Z"
},
{
"$type": "Document",
"DocumentIndex": 1,
"Title": "ZtrolixLibs-Win",
"DocumentMoniker": "D:\\GitHub\\ZtrolixLibs\\windows\\ZtrolixLibs-Win.csproj",
"RelativeDocumentMoniker": "ZtrolixLibs-Win.csproj",
"ToolTip": "D:\\GitHub\\ZtrolixLibs\\windows\\ZtrolixLibs-Win.csproj",
"RelativeToolTip": "ZtrolixLibs-Win.csproj",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001001|",
"WhenOpened": "2024-06-26T05:54:00.255Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 2,
"Title": "MainWindow.xaml",
"DocumentMoniker": "D:\\GitHub\\ZtrolixLibs\\windows\\MainWindow.xaml",
"RelativeDocumentMoniker": "MainWindow.xaml",
"ToolTip": "D:\\GitHub\\ZtrolixLibs\\windows\\MainWindow.xaml",
"RelativeToolTip": "MainWindow.xaml",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003549|",
"WhenOpened": "2024-06-26T05:43:02.863Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 0,
"Title": "MainWindow.xaml.cs",
"DocumentMoniker": "D:\\GitHub\\ZtrolixLibs\\windows\\MainWindow.xaml.cs",
"RelativeDocumentMoniker": "MainWindow.xaml.cs",
"ToolTip": "D:\\GitHub\\ZtrolixLibs\\windows\\MainWindow.xaml.cs",
"RelativeToolTip": "MainWindow.xaml.cs",
"ViewState": "AgIAAGQAAAAAAAAAAAAAwCYAAAA6AAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-06-26T05:43:02.511Z",
"EditorCaption": ""
}
]
}
]
}
]
}
6 changes: 6 additions & 0 deletions windows/App.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8.1" />
</startup>
</configuration>
9 changes: 9 additions & 0 deletions windows/App.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Application x:Class="ZtrolixLibs_Win.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:ZtrolixLibs_Win"
StartupUri="MainWindow.xaml">
<Application.Resources>

</Application.Resources>
</Application>
17 changes: 17 additions & 0 deletions windows/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;

namespace ZtrolixLibs_Win
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
}
}
59 changes: 59 additions & 0 deletions windows/MainWindow.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<Window x:Class="ZtrolixLibs_Win.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:ZtrolixLibs_Win"
mc:Ignorable="d"
Title="ZtrolixLibs" Loaded="Window_Loaded" FontFamily="Arial Rounded MT Bold" Height="250" Width="400" WindowStartupLocation="CenterScreen" ResizeMode="CanMinimize" Cursor="" WindowStyle="None" BorderThickness="1">
<Window.BorderBrush>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FFFF3131"/>
<GradientStop Color="#FFFF914D" Offset="1"/>
</LinearGradientBrush>
</Window.BorderBrush>
<Window.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FFFF3131"/>
<GradientStop Color="#FFFF914D" Offset="1"/>
</LinearGradientBrush>
</Window.Background>
<Grid>
<Grid MouseLeftButtonDown="MoveWindow" Margin="1,1,1,216">
<Border Background="#FF323232" CornerRadius="10">
<Grid>
<Border Background="Red" BorderBrush="Red" BorderThickness="3" CornerRadius="5" Margin="368,4,5,4">
<Button Click="Close" FontSize="9" Content="✖️" BorderThickness="1" Background="Red" BorderBrush="Red" Margin="-1,-1,-1,-1" />
</Border>
<Border Background="Orange" BorderBrush="Orange" BorderThickness="3" CornerRadius="5" Margin="340,4,33,4">
<Button Click="Minimize" FontSize="9" Content="" Background="Orange" BorderThickness="1" BorderBrush="Orange" Margin="-1,-1,-1,-1"/>
</Border>
<Label Content="ZtrolixLibs Installer" HorizontalAlignment="Left" Margin="4,0,0,0" VerticalAlignment="Center" Foreground="White" FontFamily="Arial Rounded MT Bold"/>
</Grid>
</Border>
</Grid>

<Grid Margin="1,34,1,1">
<Border Background="#FF323232" CornerRadius="10">
<Grid>
<DockPanel LastChildFill="False">
<StackPanel DockPanel.Dock="Bottom" Margin="10">
<ComboBox x:Name="TypeComboBox" SelectionChanged="TypeComboBox_SelectionChanged"/>
<ComboBox x:Name="VersionComboBox" Margin="0,10,0,0"/>
<Border CornerRadius="5" Margin="0,10,0,0" BorderThickness="3" BorderBrush="#FF7924C9" Background="#FF7924C9">
<Button Foreground="White" BorderBrush="#FF7924C9" Background="#FF7924C9" Content="Download and Install" Height="30" Click="DownloadButton_Click" OpacityMask="Black"/>
</Border>
<Border x:Name="DownloadProgressBarBorder" Visibility="Collapsed" CornerRadius="5" Margin="0,10,0,0" BorderThickness="3" BorderBrush="Black" Background="Black">
<ProgressBar x:Name="DownloadProgressBar" Height="15" Background="Black" BorderBrush="Black"/>
</Border>

</StackPanel>
</DockPanel>
<Label Content="ZtrolixLibs" HorizontalAlignment="Center" Margin="0,10,0,0" VerticalAlignment="Top" Foreground="White" FontSize="36"/>

<Image Visibility="Collapsed" Name="Downloaded" Source="/download.png" Stretch="None" />
</Grid>
</Border>
</Grid>
</Grid>
</Window>
Loading

0 comments on commit 68dad49

Please sign in to comment.