Skip to content

Commit 345a559

Browse files
committed
base features scrcpy GUI
made base features such as mirroring and devices list
0 parents  commit 345a559

26 files changed

+2828
-0
lines changed

build.xml

+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!-- You may freely edit this file. See commented blocks below for -->
3+
<!-- some examples of how to customize the build. -->
4+
<!-- (If you delete it and reopen the project it will be recreated.) -->
5+
<!-- By default, only the Clean and Build commands use this build script. -->
6+
<!-- Commands such as Run, Debug, and Test only use this build script if -->
7+
<!-- the Compile on Save feature is turned off for the project. -->
8+
<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
9+
<!-- in the project's Project Properties dialog box.-->
10+
<project name="scrcpy_GUI" default="default" basedir=".">
11+
<description>Builds, tests, and runs the project scrcpy_GUI.</description>
12+
<import file="nbproject/build-impl.xml"/>
13+
<!--
14+
15+
There exist several targets which are by default empty and which can be
16+
used for execution of your tasks. These targets are usually executed
17+
before and after some main targets. They are:
18+
19+
-pre-init: called before initialization of project properties
20+
-post-init: called after initialization of project properties
21+
-pre-compile: called before javac compilation
22+
-post-compile: called after javac compilation
23+
-pre-compile-single: called before javac compilation of single file
24+
-post-compile-single: called after javac compilation of single file
25+
-pre-compile-test: called before javac compilation of JUnit tests
26+
-post-compile-test: called after javac compilation of JUnit tests
27+
-pre-compile-test-single: called before javac compilation of single JUnit test
28+
-post-compile-test-single: called after javac compilation of single JUunit test
29+
-pre-jar: called before JAR building
30+
-post-jar: called after JAR building
31+
-post-clean: called after cleaning build products
32+
33+
(Targets beginning with '-' are not intended to be called on their own.)
34+
35+
Example of inserting an obfuscator after compilation could look like this:
36+
37+
<target name="-post-compile">
38+
<obfuscate>
39+
<fileset dir="${build.classes.dir}"/>
40+
</obfuscate>
41+
</target>
42+
43+
For list of available properties check the imported
44+
nbproject/build-impl.xml file.
45+
46+
47+
Another way to customize the build is by overriding existing main targets.
48+
The targets of interest are:
49+
50+
-init-macrodef-javac: defines macro for javac compilation
51+
-init-macrodef-junit: defines macro for junit execution
52+
-init-macrodef-debug: defines macro for class debugging
53+
-init-macrodef-java: defines macro for class execution
54+
-do-jar: JAR building
55+
run: execution of project
56+
-javadoc-build: Javadoc generation
57+
test-report: JUnit report generation
58+
59+
An example of overriding the target for project execution could look like this:
60+
61+
<target name="run" depends="scrcpy_GUI-impl.jar">
62+
<exec dir="bin" executable="launcher.exe">
63+
<arg file="${dist.jar}"/>
64+
</exec>
65+
</target>
66+
67+
Notice that the overridden target depends on the jar target and not only on
68+
the compile target as the regular run target does. Again, for a list of available
69+
properties which you can use, check the target you are overriding in the
70+
nbproject/build-impl.xml file.
71+
72+
-->
73+
</project>

build/built-jar.properties

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#Tue, 24 Dec 2024 20:20:12 +0700
2+
3+
4+
C\:\\Users\\Administrator\\Documents\\NetBeansProjects\\scrcpy_GUI=

build/classes/.netbeans_automatic_build

Whitespace-only changes.

build/classes/.netbeans_update_resources

Whitespace-only changes.

build/classes/Scrcpy_GUI.class

3.25 KB
Binary file not shown.
1.07 KB
Binary file not shown.
778 Bytes
Binary file not shown.
779 Bytes
Binary file not shown.
774 Bytes
Binary file not shown.
557 Bytes
Binary file not shown.
1.83 KB
Binary file not shown.
1.09 KB
Binary file not shown.

build/classes/scrcpy_main_panel.class

9.58 KB
Binary file not shown.

build/classes/scrcpy_main_panel.form

+210
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,210 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
3+
<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo">
4+
<Properties>
5+
<Property name="defaultCloseOperation" type="int" value="3"/>
6+
<Property name="title" type="java.lang.String" value="Minimal GUI Scrcpy"/>
7+
</Properties>
8+
<SyntheticProperties>
9+
<SyntheticProperty name="formSizePolicy" type="int" value="1"/>
10+
<SyntheticProperty name="generateCenter" type="boolean" value="false"/>
11+
</SyntheticProperties>
12+
<AuxValues>
13+
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
14+
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
15+
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
16+
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
17+
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
18+
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
19+
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
20+
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
21+
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
22+
</AuxValues>
23+
24+
<Layout>
25+
<DimensionLayout dim="0">
26+
<Group type="103" groupAlignment="0" attributes="0">
27+
<Component id="jPanel1" alignment="0" max="32767" attributes="0"/>
28+
</Group>
29+
</DimensionLayout>
30+
<DimensionLayout dim="1">
31+
<Group type="103" groupAlignment="0" attributes="0">
32+
<Component id="jPanel1" alignment="0" max="32767" attributes="0"/>
33+
</Group>
34+
</DimensionLayout>
35+
</Layout>
36+
<SubComponents>
37+
<Container class="javax.swing.JPanel" name="jPanel1">
38+
39+
<Layout>
40+
<DimensionLayout dim="0">
41+
<Group type="103" groupAlignment="0" attributes="0">
42+
<Component id="jTabbedPane2" alignment="0" max="32767" attributes="0"/>
43+
<Group type="102" alignment="0" attributes="0">
44+
<EmptySpace min="-2" pref="311" max="-2" attributes="0"/>
45+
<Component id="jLabel1" min="-2" max="-2" attributes="0"/>
46+
<EmptySpace max="32767" attributes="0"/>
47+
</Group>
48+
</Group>
49+
</DimensionLayout>
50+
<DimensionLayout dim="1">
51+
<Group type="103" groupAlignment="0" attributes="0">
52+
<Group type="102" alignment="1" attributes="0">
53+
<EmptySpace max="-2" attributes="0"/>
54+
<Component id="jLabel1" min="-2" max="-2" attributes="0"/>
55+
<EmptySpace max="-2" attributes="0"/>
56+
<Component id="jTabbedPane2" pref="379" max="32767" attributes="0"/>
57+
</Group>
58+
</Group>
59+
</DimensionLayout>
60+
</Layout>
61+
<SubComponents>
62+
<Container class="javax.swing.JTabbedPane" name="jTabbedPane2">
63+
64+
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout"/>
65+
<SubComponents>
66+
<Container class="javax.swing.JPanel" name="jPanel2">
67+
<Constraints>
68+
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout$JTabbedPaneConstraintsDescription">
69+
<JTabbedPaneConstraints tabName="List Devices">
70+
<Property name="tabTitle" type="java.lang.String" value="List Devices"/>
71+
</JTabbedPaneConstraints>
72+
</Constraint>
73+
</Constraints>
74+
75+
<Layout>
76+
<DimensionLayout dim="0">
77+
<Group type="103" groupAlignment="0" attributes="0">
78+
<Group type="102" alignment="0" attributes="0">
79+
<Component id="jScrollPane1" min="-2" pref="659" max="-2" attributes="0"/>
80+
<EmptySpace max="-2" attributes="0"/>
81+
<Group type="103" groupAlignment="0" max="-2" attributes="0">
82+
<Component id="refreshButton" max="32767" attributes="0"/>
83+
<Component id="selectButton" max="32767" attributes="0"/>
84+
<Component id="jButton1" max="32767" attributes="0"/>
85+
</Group>
86+
<EmptySpace pref="9" max="32767" attributes="0"/>
87+
</Group>
88+
</Group>
89+
</DimensionLayout>
90+
<DimensionLayout dim="1">
91+
<Group type="103" groupAlignment="0" attributes="0">
92+
<Group type="102" alignment="0" attributes="0">
93+
<Component id="jScrollPane1" min="-2" pref="336" max="-2" attributes="0"/>
94+
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
95+
</Group>
96+
<Group type="102" alignment="0" attributes="0">
97+
<EmptySpace max="-2" attributes="0"/>
98+
<Component id="refreshButton" min="-2" max="-2" attributes="0"/>
99+
<EmptySpace max="-2" attributes="0"/>
100+
<Component id="selectButton" min="-2" max="-2" attributes="0"/>
101+
<EmptySpace max="-2" attributes="0"/>
102+
<Component id="jButton1" min="-2" max="-2" attributes="0"/>
103+
<EmptySpace max="32767" attributes="0"/>
104+
</Group>
105+
</Group>
106+
</DimensionLayout>
107+
</Layout>
108+
<SubComponents>
109+
<Container class="javax.swing.JScrollPane" name="jScrollPane1">
110+
<AuxValues>
111+
<AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
112+
</AuxValues>
113+
114+
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
115+
<SubComponents>
116+
<Component class="javax.swing.JList" name="list_devices">
117+
<Properties>
118+
<Property name="model" type="javax.swing.ListModel" editor="org.netbeans.modules.form.editors2.ListModelEditor">
119+
<StringArray count="5">
120+
<StringItem index="0" value="Item 1"/>
121+
<StringItem index="1" value="Item 2"/>
122+
<StringItem index="2" value="Item 3"/>
123+
<StringItem index="3" value="Item 4"/>
124+
<StringItem index="4" value="Item 5"/>
125+
</StringArray>
126+
</Property>
127+
</Properties>
128+
<AuxValues>
129+
<AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="&lt;String&gt;"/>
130+
</AuxValues>
131+
</Component>
132+
</SubComponents>
133+
</Container>
134+
<Component class="javax.swing.JButton" name="selectButton">
135+
<Properties>
136+
<Property name="text" type="java.lang.String" value="info"/>
137+
</Properties>
138+
<Events>
139+
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="selectButtonActionPerformed"/>
140+
</Events>
141+
</Component>
142+
<Component class="javax.swing.JButton" name="refreshButton">
143+
<Properties>
144+
<Property name="text" type="java.lang.String" value="Refresh"/>
145+
</Properties>
146+
<Events>
147+
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="refreshButtonActionPerformed"/>
148+
</Events>
149+
</Component>
150+
<Component class="javax.swing.JButton" name="jButton1">
151+
<Properties>
152+
<Property name="text" type="java.lang.String" value="Run"/>
153+
</Properties>
154+
<Events>
155+
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton1ActionPerformed"/>
156+
</Events>
157+
</Component>
158+
</SubComponents>
159+
</Container>
160+
<Container class="javax.swing.JPanel" name="jPanel3">
161+
<Constraints>
162+
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout$JTabbedPaneConstraintsDescription">
163+
<JTabbedPaneConstraints tabName="Scrcpy Option">
164+
<Property name="tabTitle" type="java.lang.String" value="Scrcpy Option"/>
165+
</JTabbedPaneConstraints>
166+
</Constraint>
167+
</Constraints>
168+
169+
<Layout>
170+
<DimensionLayout dim="0">
171+
<Group type="103" groupAlignment="0" attributes="0">
172+
<Group type="102" alignment="0" attributes="0">
173+
<EmptySpace max="-2" attributes="0"/>
174+
<Component id="currDeviceCode" min="-2" max="-2" attributes="0"/>
175+
<EmptySpace pref="639" max="32767" attributes="0"/>
176+
</Group>
177+
</Group>
178+
</DimensionLayout>
179+
<DimensionLayout dim="1">
180+
<Group type="103" groupAlignment="0" attributes="0">
181+
<Group type="102" alignment="0" attributes="0">
182+
<EmptySpace max="-2" attributes="0"/>
183+
<Component id="currDeviceCode" min="-2" max="-2" attributes="0"/>
184+
<EmptySpace pref="322" max="32767" attributes="0"/>
185+
</Group>
186+
</Group>
187+
</DimensionLayout>
188+
</Layout>
189+
<SubComponents>
190+
<Component class="javax.swing.JLabel" name="currDeviceCode">
191+
<Properties>
192+
<Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
193+
<Color blue="cc" green="cc" red="cc" type="rgb"/>
194+
</Property>
195+
<Property name="text" type="java.lang.String" value="No Device Selected"/>
196+
</Properties>
197+
</Component>
198+
</SubComponents>
199+
</Container>
200+
</SubComponents>
201+
</Container>
202+
<Component class="javax.swing.JLabel" name="jLabel1">
203+
<Properties>
204+
<Property name="text" type="java.lang.String" value="Minimal GUI Scrcpy"/>
205+
</Properties>
206+
</Component>
207+
</SubComponents>
208+
</Container>
209+
</SubComponents>
210+
</Form>

dist/README.TXT

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
========================
2+
BUILD OUTPUT DESCRIPTION
3+
========================
4+
5+
When you build an Java application project that has a main class, the IDE
6+
automatically copies all of the JAR
7+
files on the projects classpath to your projects dist/lib folder. The IDE
8+
also adds each of the JAR files to the Class-Path element in the application
9+
JAR files manifest file (MANIFEST.MF).
10+
11+
To run the project from the command line, go to the dist folder and
12+
type the following:
13+
14+
java -jar "scrcpy_GUI.jar"
15+
16+
To distribute this project, zip up the dist folder (including the lib folder)
17+
and distribute the ZIP file.
18+
19+
Notes:
20+
21+
* If two JAR files on the project classpath have the same name, only the first
22+
JAR file is copied to the lib folder.
23+
* Only JAR files are copied to the lib folder.
24+
If the classpath contains other types of files or folders, these files (folders)
25+
are not copied.
26+
* If a library on the projects classpath also has a Class-Path element
27+
specified in the manifest,the content of the Class-Path element has to be on
28+
the projects runtime path.
29+
* To set a main class in a standard Java project, right-click the project node
30+
in the Projects window and choose Properties. Then click Run and enter the
31+
class name in the Main Class field. Alternatively, you can manually type the
32+
class name in the manifest Main-Class element.

dist/scrcpy_GUI.jar

11.8 KB
Binary file not shown.

manifest.mf

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Manifest-Version: 1.0
2+
X-COMMENT: Main-Class will be added automatically by build
3+

0 commit comments

Comments
 (0)