FxQrcode

Table of Contents

1 FxQrcode

1.1 Overview

FxQrcode is a small and lightweight java desktop application to transfer data through QRCode to any portable device with ability of reading QRcode such as smartphones or tablets.

It generates the QRCode from user input, for instance, if the user type or paste the URL below, the app will generate a QRCode from it. As the example shows, it is useful to transfer URL from a computer to a smartphone or tablet.

screenshot.png

1.2 Download Binary Release

1.3 Building instructions

This application requires jarget app and scala compiler as building dependencies.

The jarget app can be donwload with:

$ curl -o ~/bin/jarget -L https://github.com/caiorss/jarget/raw/v2.1.0-beta-release/jarget && chmod +x ~/bin/jarget

Then to build run:

  • $ make force && make guard
$ make force && make guard 
jarget exec com.google.zxing/core/2.2,com.google.zxing/javase/2.2 -- scalac src/main.scala src/qrcode.scala -d bin/fxqrcode.jar
Downloading ---------------------
PackData(com.google.zxing,core,2.2)
----------------------------------
Package path = PackData(com.google.zxing,core,2.2)
Downloading file /home/archbox/.jarget/cache/com/google/zxing/core/2.2/core-2.2.pom.
File /home/archbox/.jarget/cache/com/google/zxing/core/2.2/core-2.2.pom downloaded. Ok.
Downloading file /home/archbox/.jarget/cache/com/google/zxing/core/2.2/core-2.2.jar.
File /home/archbox/.jarget/cache/com/google/zxing/core/2.2/core-2.2.jar downloaded. Ok.
Download Successful

... ... ... ... ... ... ... ...

~/bin/jarget  uber -scala -m bin/fxqrcode.jar -o bin/fxqrcode-uber.jar -p com.google.zxing/core/2.2 com.google.zxing/javase/2.2
Built file:  bin/fxqrcode-uber.jar ok
Run it with: $ java -jar bin/fxqrcode-uber.jar
java -jar proguard.jar @config.pro 
ProGuard, version 5.3.3
Reading input...
Reading program jar [/home/archbox/Documents/projects/fxqrcode.scala/bin/fxqrcode-uber.jar]
Reading library jar [/home/archbox/opt/jdk1.8.0_144/jre/lib/rt.jar]
Initializing...
Note: scala.Enumeration accesses a field 'MODULE$' dynamically
      Maybe this is program field 'fxqrcode.FunctionToListener$ { fxqrcode.FunctionToListener$ MODULE$; }'
      Maybe this is program field 'fxqrcode.Main$ { fxqrcode.Main$ MODULE$; }'
      Maybe this is program field 'fxqrcode.MainWindow$ { fxqrcode.MainWindow$ MODULE$; }'
      Maybe this is program field 'fxqrcode.QRCode$ { fxqrcode.QRCode$ MODULE$; }'

           ... ... ... ... ... ... ... 

Note: there were 1 accesses to class members by means of introspection.
      You should consider explicitly keeping the mentioned class members
      (using '-keep' or '-keepclassmembers').
      (http://proguard.sourceforge.net/manual/troubleshooting.html#dynamicalclassmember)
Ignoring unused library classes...
  Original number of library classes: 20180
  Final number of library classes:    620
Shrinking...
Removing unused program classes and class elements...
  Original number of program classes: 2784
  Final number of program classes:    1272
Inlining subroutines...
Preverifying...
Writing output...
Preparing output jar [/home/archbox/Documents/projects/fxqrcode.scala/bin/fxqrcode-proguard.jar]
  Copying resources from program jar [/home/archbox/Documents/projects/fxqrcode.scala/bin/fxqrcode-uber.jar]

It will build the file bin/fxqrcode-proguard.jar that can be run with $ java -jar bin/fxqrcode-proguard.jar or by double clicking at it.

1.4 Starting REPL for development

Run: $ make repl from the project root directory to load the source files from src directory.

$ make repl
~/bin/jarget  exec com.google.zxing/core/2.2,com.google.zxing/javase/2.2 -- scala -I loader.scala  
Welcome to Scala 2.12.3 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_144).
Type in expressions for evaluation. Or try :help.

scala> g
res1: fxqrcode.MainWindow = fxqrcode.MainWindow[frame0,0,0,579x535,invalid,layout=java.awt.BorderLayout,title=Fxqrcode,resizable,normal,defaultCloseOperation=HIDE_ON_CLOSE,rootPane=javax.swing.JRootPane[,1,24,577x510,invalid,layout=javax.swing.JRootPane$RootLayout,alignmentX=0.0,alignmentY=0.0,border=,flags=16777673,maximumSize=,minimumSize=,preferredSize=],rootPaneCheckingEnabled=true]

scala> g.getText()
res2: String =
"hello world

"

repl.png

Author: Caio Rodrigues Soares Silva

Created: 2017-10-18 Wed 16:22

Emacs 25.3.1 (Org mode 8.2.10)

Validate