From 90ac96e9cb16901f4402fe436c297e9225fa928a Mon Sep 17 00:00:00 2001 From: sigonasr2 Date: Sun, 29 May 2022 16:55:52 -0500 Subject: [PATCH] Setup initial server and client Co-authored-by: sigonasr2 --- Java/scripts/build.sh | 3 +- Java/scripts/commit.sh | 1 + Java/scripts/filelist | 5 ++ Java/scripts/jar.sh | 3 +- Java/scripts/md5 | 6 +-- Java/scripts/version_info | 2 + bin/JavaProjectTemplate.jar | Bin 8133 -> 0 bytes bin/SigShare.jar | Bin 0 -> 8945 bytes sig | 2 +- src/sig/JavaProjectTemplate.java | 21 -------- src/sig/SigShare.java | 86 +++++++++++++++++++++++++++++++ src/sig/engine/Panel.java | 48 +++-------------- utils/define.sh | 1 + utils/filelist | 5 ++ utils/main.sh | 2 +- utils/md5 | 7 ++- utils/search.sh | 57 ++++++++++++++++---- 17 files changed, 166 insertions(+), 83 deletions(-) create mode 100644 Java/scripts/filelist create mode 100644 Java/scripts/version_info delete mode 100644 bin/JavaProjectTemplate.jar create mode 100644 bin/SigShare.jar delete mode 100644 src/sig/JavaProjectTemplate.java create mode 100644 src/sig/SigShare.java create mode 100644 utils/filelist diff --git a/Java/scripts/build.sh b/Java/scripts/build.sh index a9eba68..b8a2bed 100755 --- a/Java/scripts/build.sh +++ b/Java/scripts/build.sh @@ -1,7 +1,8 @@ #Builds and runs the project. #Java +source ${LANGUAGE}/scripts/version_info rm -Rf out/* -javac -Xlint:unchecked -cp ${PROJECT_DIR}/.. -d ${OUT_DIR} ${PROJECT_DIR}/*.java +javac -source ${SOURCE_VERSION} -target ${TARGET_VERSION} -Xlint:unchecked -cp ${PROJECT_DIR}/.. -d ${OUT_DIR} ${PROJECT_DIR}/*.java printf "\n\n\nRunning Program...\n\n" ORIGINAL_LOC=$(pwd) cd $OUT_DIR diff --git a/Java/scripts/commit.sh b/Java/scripts/commit.sh index 689cc0b..36b45b5 100755 --- a/Java/scripts/commit.sh +++ b/Java/scripts/commit.sh @@ -1,6 +1,7 @@ #Adds a commit message and pushes project to github repository. #Java COMMIT_MESSAGE="$*" +FIRST_LINE=true while IFS= read -r line do if [ "$FIRST_LINE" = true ]; then diff --git a/Java/scripts/filelist b/Java/scripts/filelist new file mode 100644 index 0000000..0ddba96 --- /dev/null +++ b/Java/scripts/filelist @@ -0,0 +1,5 @@ +build.sh +clean.sh +commit.sh +jar.sh +version_info diff --git a/Java/scripts/jar.sh b/Java/scripts/jar.sh index 532ab48..1d3fad6 100755 --- a/Java/scripts/jar.sh +++ b/Java/scripts/jar.sh @@ -1,7 +1,8 @@ #Builds a runnable jar file using ${MAIN_CLASS} as an entry point and then runs the newly generated jar. #Java +source ${LANGUAGE}/scripts/version_info rm -Rf bin/* -javac -Xlint:unchecked -cp src -d bin ${PROJECT_DIR}/${PROJECT_NAME}.java +javac -source ${SOURCE_VERSION} -target ${TARGET_VERSION} -Xlint:unchecked -cp src -d bin ${PROJECT_DIR}/${PROJECT_NAME}.java printf "\n\n\nGenerating Manifest...\n\n" touch manifest echo "Main-Class: ${MAIN_CLASS}" >> manifest diff --git a/Java/scripts/md5 b/Java/scripts/md5 index e1dbce1..d4665a7 100644 --- a/Java/scripts/md5 +++ b/Java/scripts/md5 @@ -1,4 +1,4 @@ -build.sh:377a432ffbd63b53322d1451a214201d - +build.sh:55f0208b07ba384f45009d6f92fe88fe - clean.sh:96ce35f2d2dcb555421e00a6afda23ca - -commit.sh:b186d649fa17c68926fe1caec4a7216c - -jar.sh:cce5e429168700490f9c413b665d13d6 - +commit.sh:5e4448db9ad48e72ec3a1ff4f5763b41 - +jar.sh:56f9b7c6dc8e85f28ffefe9ce82b1f07 - diff --git a/Java/scripts/version_info b/Java/scripts/version_info new file mode 100644 index 0000000..51b7812 --- /dev/null +++ b/Java/scripts/version_info @@ -0,0 +1,2 @@ +export SOURCE_VERSION="1.8" +export TARGET_VERSION="1.8" \ No newline at end of file diff --git a/bin/JavaProjectTemplate.jar b/bin/JavaProjectTemplate.jar deleted file mode 100644 index 37133e2c71f4be13a732f86d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*WEu#m}w$ZSmh`(SQ2*y+QunM+e^DeEfFq{?o_rsqw3o{w0)zfAjHIV^x-W1^Y`4 P;pZjxGj(kK^&kERZcKWB diff --git a/bin/SigShare.jar b/bin/SigShare.jar new file mode 100644 index 0000000000000000000000000000000000000000..ad402b04459466ba21670402d37f3cade78e5a45 GIT binary patch literal 8945 zcmb7q1yEb<)-D9MQe0Y~Kq*ojQrz9$-Jv+arFd|PQ@pqqcP$!<6RcPvP(q;vlAjsF;{NvSKz%jxKHs>z?KO--t*aB$8OsBo~& zOwG1vb1(93?|oOBnp*IgQDWz8*JhbfUBR1CC7e-YSKiz6;#5{+S5lkzsX=GMs9ECU z*PFv;nP5kYXA{h{hnG2i_dmmQ~#ixmizr0*Q8<3M#k;0h&qP+6*m#lJy5_7Mtw@!k@e#k1CG z7k-bYa!tF*iYie z0^NCldhQF!v;COf*`UJf+v&aM6kMnuBL=F!j4Gm>=r>U)VU)53`_D3b8@@yNRLc;J zmMB!UO-sfG>VFNp*7M$exb*-7fr`-`!6RReHeQ7-UE?@nHD-%OX<)UDO{bvunS0RM z9)&#gGn(L7g)13`AiJinhv}%WDw|-jwU|1lM?=Il=?2|r>nM`#lP-#UjTUCUHNY2J*um_Y`>XPscd z!xwu|-uMFN%32@Xs6q^8jfp3*fzmEPyrPh5U%;%5>|Th#ckG5m-e+g?Qer2_=l;r) zYQ}OR99Z~S4I0#|pF7U$UuFZjz_R#&cPsPi9arRo2y@_ut| zgkiCWUab&gg%|Ln#AAdSjTZ+UF@os83a-HN9+Uh2Mywmj3t5+~|qe}TsuuUd{TJ~Sis!KQ7+^E#Nbztk|P`BR{hll@2X{SR{>SmN;)8XB4myxA}- zxuAp?LKPGH3+2rPIyRCW`~EK}p4A!|j@13h?wa;HA7B@*>+Qbn?mHj*KR{Hd`=hfl z03o*@#7c)5tuVHh5j6Qr9uM}(f(?c*x0@Xn01>9WCy+a0*CDq*fS=EHP|WU$1J5kcrs5%4CO z>TbfUr5G|p-aWK#1H!0`A5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K_&z|G|r6Bxf zDf}t_p&k6@Ed0~-?<9fW9EHC`?AP)?rhj8B{Puv0^1qV_{_?Q=Yxyr~!Jp~=eRlDi zT=17%{aXIE_>*ez-y;5=aQr1LzX%S$?f*0H_%ra|ySBf3vwz9PpN4;%fBf?g`#WC! z>4W#zDCY0M|LXSs)5qVd`8TrtCBcvW@bMSU{nN$Yx5J-ll+ga+Li4YOfTjut=I>BA Pzb=7a`=#v3@4Np4!dxgV literal 0 HcmV?d00001 diff --git a/sig b/sig index a659f7b..cf87e2c 100755 --- a/sig +++ b/sig @@ -1,6 +1,6 @@ source utils/define.sh -define PROJECT_NAME "JavaProjectTemplate" +define PROJECT_NAME "SigShare" define PROJECT_DIR "src/sig" define MAIN_CLASS "sig.${PROJECT_NAME}" define OUT_DIR "bin" diff --git a/src/sig/JavaProjectTemplate.java b/src/sig/JavaProjectTemplate.java deleted file mode 100644 index ac5ae34..0000000 --- a/src/sig/JavaProjectTemplate.java +++ /dev/null @@ -1,21 +0,0 @@ -package sig; - -import javax.swing.JFrame; -import sig.engine.Panel; - -public class JavaProjectTemplate { - public static final String PROGRAM_NAME="Sig's Java Project Template"; - public static void main(String[] args) { - JFrame f = new JFrame(PROGRAM_NAME); - Panel p = new Panel(f); - - p.init(); - - f.add(p); - f.setSize(1280,720); - f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); - f.setVisible(true); - - p.render(); - } -} diff --git a/src/sig/SigShare.java b/src/sig/SigShare.java new file mode 100644 index 0000000..7a65ccf --- /dev/null +++ b/src/sig/SigShare.java @@ -0,0 +1,86 @@ +package sig; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; +import java.io.OutputStream; +import java.io.PrintWriter; +import java.net.ServerSocket; +import java.net.Socket; +import java.util.regex.Pattern; + +import javax.swing.JFrame; +import java.awt.Toolkit; +import sig.engine.Panel; + +public class SigShare { + public static final String PROGRAM_NAME="SigShare"; + public static void main(String[] args) { + if (args.length==2&&args[1].equalsIgnoreCase("server")) { + ServerSocket socket; + try { + socket = new ServerSocket(4191); + System.out.println("Listening on port 4191."); + try (Socket client = socket.accept()) { + System.out.println("New client connection detected: "+client.toString()); + System.out.println("Sending initial data..."); + BufferedReader in = new BufferedReader(new InputStreamReader(client.getInputStream(),"ISO-8859-1")); + OutputStream clientOutput = client.getOutputStream(); + int SCREEN_WIDTH=(int)Toolkit.getDefaultToolkit().getScreenSize().getWidth(); + int SCREEN_HEIGHT=(int)Toolkit.getDefaultToolkit().getScreenSize().getHeight(); + clientOutput.write(("DESKTOP "+(int)Toolkit.getDefaultToolkit().getScreenSize().getWidth()+" "+(int)Toolkit.getDefaultToolkit().getScreenSize().getHeight()+"\r\n").getBytes()); + System.out.println("Send initial screen"); + for (int y=0;y server|client"); + return; + } + } +} diff --git a/src/sig/engine/Panel.java b/src/sig/engine/Panel.java index 2f558f7..caa9363 100644 --- a/src/sig/engine/Panel.java +++ b/src/sig/engine/Panel.java @@ -12,13 +12,11 @@ import java.util.List; import javax.swing.JFrame; import javax.swing.JPanel; -import sig.JavaProjectTemplate; +import sig.SigShare; public class Panel extends JPanel implements Runnable { JFrame window; public int pixel[]; - public int width=1280; - public int height=720; final int CIRCLE_PRECISION=32; final int OUTLINE_COL=Color.BRIGHT_WHITE.getColor(); private Thread thread; @@ -55,14 +53,14 @@ public class Panel extends JPanel implements Runnable { */ public void init(){ cm = getCompatibleColorModel(); - int screenSize = width * height; + int screenSize = getWidth() * getHeight(); if(pixel == null || pixel.length < screenSize){ pixel = new int[screenSize]; } if(thread.isInterrupted() || !thread.isAlive()){ thread.start(); } - mImageProducer = new MemoryImageSource(width, height, cm, pixel,0, width); + mImageProducer = new MemoryImageSource(getWidth(), getHeight(), cm, pixel,0, getWidth()); mImageProducer.setAnimated(true); mImageProducer.setFullBufferUpdates(true); imageBuffer = Toolkit.getDefaultToolkit().createImage(mImageProducer); @@ -80,7 +78,7 @@ public class Panel extends JPanel implements Runnable { if (window!=null&&System.currentTimeMillis()-lastSecond>=1000) { - window.setTitle(JavaProjectTemplate.PROGRAM_NAME+" - FPS: "+(frameCount-lastFrameCount)); + window.setTitle(SigShare.PROGRAM_NAME+" - FPS: "+(frameCount-lastFrameCount)); lastFrameCount=frameCount; lastSecond=System.currentTimeMillis(); } @@ -103,44 +101,12 @@ public class Panel extends JPanel implements Runnable { int[] p = pixel; // this avoid crash when resizing //a=h/w - for (int x=0;x=0) { Draw(p,index,col.getColor()); } @@ -308,7 +274,7 @@ public class Panel extends JPanel implements Runnable { // request a JPanel re-drawing repaint(); //System.out.println("Repaint "+frameCount++); - //try {Thread.sleep(1);} catch (InterruptedException e) {} + try {Thread.sleep(16);} catch (InterruptedException e) {} } } } \ No newline at end of file diff --git a/utils/define.sh b/utils/define.sh index 39a23d7..be5dbad 100755 --- a/utils/define.sh +++ b/utils/define.sh @@ -12,6 +12,7 @@ if [[ $(pwd) != *"SigScript" ]]; then source utils/search.sh find . -type f -name md5 -delete + find . -type f -name filelist -delete #Check for hashes FILES=$(cat utils/.updateDirectories) diff --git a/utils/filelist b/utils/filelist new file mode 100644 index 0000000..95ad5ff --- /dev/null +++ b/utils/filelist @@ -0,0 +1,5 @@ +.coauthors +define.sh +main.sh +search.sh +.updateDirectories diff --git a/utils/main.sh b/utils/main.sh index b04ffab..158326e 100644 --- a/utils/main.sh +++ b/utils/main.sh @@ -16,7 +16,7 @@ if [ -z "$1" ] FILES=$(ls -1A ./$LANGUAGE/scripts | sed -e 's/\.sh$//' | sed -e 's/^/ /') for f in $FILES do - if [ $f != "md5" ]; then + if [ $f != "md5" ] && [ $f != "version_info" ] && [ $f != "filelist" ]; then DESC="$(head -n1 ./$LANGUAGE/scripts/$f.sh)" printf "\n\t%-15s%-65s" $f "${DESC:1}" fi diff --git a/utils/md5 b/utils/md5 index 32d88fe..a47b4f9 100644 --- a/utils/md5 +++ b/utils/md5 @@ -1,5 +1,4 @@ -.coauthors:3785ad38663e5fc43e574914ad067294 - -define.sh:74ea08fb12cab1053663f87007ddd29a - -main.sh:eacf0984141d284db6681dee4dc39ffa - -search.sh:7162a8e3487a5cca5a3a24d55230e24d - +define.sh:883c4033be11b6d1268b852beada5463 - +main.sh:663ac9bb9ee46eb8cd1d717e8eb5e486 - +search.sh:2a471ffc3daa12f96157e613873f589d - .updateDirectories:0ede00461e947494545e694040787b3f - diff --git a/utils/search.sh b/utils/search.sh index 13307c4..73885b0 100644 --- a/utils/search.sh +++ b/utils/search.sh @@ -8,11 +8,14 @@ function search() { search $1$g/ else echo "$1$g is a file" - if [ $g != "md5" ]; then - SUM=$(md5sum < $1$g) - echo "$g:$SUM" >> $1md5 + if [ $g != "md5" ] && [ $g != "filelist" ]; then + if [ $g != ".coauthors" ] && [ $g != "version_info" ]; then + SUM=$(md5sum < $1$g) + echo "$g:$SUM" >> $1md5 + fi + echo "$g" >> $1filelist else - echo " md5 file, ignoring..." + echo " ignoring $g..." fi fi done @@ -24,7 +27,7 @@ function check() { if [ -f "$1/md5" ]; then echo " md5: https://raw.githubusercontent.com/sigonasr2/SigScript/main/$1md5" - curl -H 'Cache-Control: no-cache, no-store' -s https://raw.githubusercontent.com/sigonasr2/SigScript/main/$1md5 --output /tmp/out + curl -H 'Cache-Control: no-cache, no-store' -s "https://raw.githubusercontent.com/sigonasr2/SigScript/main/$1md5" --output /tmp/out cmp -s $1/md5 /tmp/out if [ "$?" -ne 0 ] then @@ -35,21 +38,55 @@ function check() { IFS=':' read -ra split <<< $line g="${split[0]}" echo "LINE -- $g" - if [ "$g" != "md5" ]; then + if [ "$g" != "md5" ] && [ "$g" != "filelist" ]; then + if [ -f $1$g ]; + then + if [ "$g" != ".coauthors" ] && [ "$g" != "version_info" ]; then + echo "++Redownload $1$g..." + if [ -f "$1$g" ]; then + curl -H 'Cache-Control: no-cache, no-store' "https://raw.githubusercontent.com/sigonasr2/SigScript/main/$1$g" --output $1$g + else + echo "===Could not find directory, assuming regular scripts directory exists." + curl -H 'Cache-Control: no-cache, no-store' "https://raw.githubusercontent.com/sigonasr2/SigScript/main/$1$g" --output $LANGUAGE/scripts/$g + fi + fi + else + echo "++==Downloading $1$g..." + curl -H 'Cache-Control: no-cache, no-store' "https://raw.githubusercontent.com/sigonasr2/SigScript/main/$1$g" --output $1$g + fi + fi + done < /tmp/out + fi + fi + if [ -f "$1/filelist" ]; + then + echo " filelist: https://raw.githubusercontent.com/sigonasr2/SigScript/main/$1filelist" + curl -H 'Cache-Control: no-cache, no-store' -s "https://raw.githubusercontent.com/sigonasr2/SigScript/main/$1filelist" --output /tmp/out + cmp -s $1/filelist /tmp/out + if [ "$?" -ne 0 ] + then + echo " Differences detected!" + cat /tmp/out + while IFS= read -r line + do + IFS=':' read -ra split <<< $line + g="${split[0]}" + echo "LINE -- $g" + if [ "$g" != "md5" ] && [ "$g" != "filelist" ]; then if [ -f $1$g ]; then - if [ "$g" != ".coauthors" ]; then + if [ "$g" != ".coauthors" ] && [ "$g" != "version_info" ]; then echo "++Redownload $1$g..." if [ -f "$1$g" ]; then - curl -H 'Cache-Control: no-cache, no-store' https://raw.githubusercontent.com/sigonasr2/SigScript/main/$1$g --output $1$g + curl -H 'Cache-Control: no-cache, no-store' "https://raw.githubusercontent.com/sigonasr2/SigScript/main/$1$g" --output $1$g else echo "===Could not find directory, assuming regular scripts directory exists." - curl -H 'Cache-Control: no-cache, no-store' https://raw.githubusercontent.com/sigonasr2/SigScript/main/$1$g --output $LANGUAGE/scripts/$g + curl -H 'Cache-Control: no-cache, no-store' "https://raw.githubusercontent.com/sigonasr2/SigScript/main/$1$g" --output $LANGUAGE/scripts/$g fi fi else echo "++==Downloading $1$g..." - curl -H 'Cache-Control: no-cache, no-store' https://raw.githubusercontent.com/sigonasr2/SigScript/main/$1$g --output $1$g + curl -H 'Cache-Control: no-cache, no-store' "https://raw.githubusercontent.com/sigonasr2/SigScript/main/$1$g" --output $1$g fi fi done < /tmp/out