Skip to content

Commit

Permalink
Package into .app and .exe, Update libraries used, change package nam…
Browse files Browse the repository at this point in the history
…e to com.airsquared.blobsaver, add read information directly from device
  • Loading branch information
airsquared committed Oct 6, 2018
1 parent c42c904 commit 0e4ae44
Show file tree
Hide file tree
Showing 60 changed files with 1,166 additions and 631 deletions.
2 changes: 1 addition & 1 deletion .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 0 additions & 13 deletions .idea/modules/blobsaver.iml

This file was deleted.

2 changes: 1 addition & 1 deletion .idea/modules/blobsaver_main.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/modules/blobsaver_test.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ If you have an antivirus or firewall, you may need to disable some other setting
## Features
- **Automatically save blobs in the background**
- Store up to ten devices with presets
- Choose where to save blobs with file picker
- Save blobs for beta versions
- Automatically read ECID and other info from device so you don't to get it manually
- No need to download entire .ipsw for beta versions(just specify link)
- Choose where to save blobs with file picker
- Explains how to get ECID, Board Config(if needed), and information necessary for beta versions
- Automatically checks for updates and prompts if available
- Optionally specify device identifier instead of using device picker
Expand All @@ -25,13 +26,16 @@ If you have an antivirus or firewall, you may need to disable some other setting
Please send feedback via [Github Issue](https://github.com/airsquared/blobsaver/issues/new/choose) or [Reddit PM](https://www.reddit.com//message/compose?to=01110101_00101111&subject=Blobsaver+Feedback) if you encounter any bugs/problems or have a feature request.

## TODO:
- Package into .app/.exe [maybe this](https://github.com/Jorl17/jar2app)
- Better notifications

## Built With
- JDK 8
- [IntelliJ Idea](https://www.jetbrains.com/idea/)
- [Gradle](https://gradle.org/)
- [Gradle](https://gradle.org/)
- [shadow](https://github.com/johnrengelman/shadow) (gradle plugin)
- [gradle-macappbundle](https://github.com/crotwell/gradle-macappbundle) (Mac) (gradle plugin)
- [gradle-launch4j](https://github.com/TheBoegl/gradle-launch4j) (Windows) (gradle plugin)
- [Inno Setup](http://www.jrsoftware.org/isinfo.php) (Windows) (for creating Windows installer)

## License
This project is licensed under GNU GPL v3.0-only - see the [LICENSE](https://github.com/airsquared/blobsaver/blob/master/LICENSE) file for details
51 changes: 51 additions & 0 deletions blobsaver.iss
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "blobsaver"
#define MyAppVersion "2.2"
#define MyAppPublisher "blobsaver"
#define MyAppURL "https://www.github.com/airsquared/blobsaver"
#define MyAppExeName "blobsaver.exe"

[Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{F5EAE50A-1E3A-4DA5-B2F0-4D29968E59CD}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={pf}\{#MyAppName}
DisableDirPage=yes
DisableProgramGroupPage=yes
LicenseFile=src\main\resources\com\airsquared\blobsaver\gpl-3.0_windows.txt
OutputDir=build\innosetup
OutputBaseFilename=blobsaver_setup
SetupIconFile=icons\blob_emoji.ico
Compression=lzma
SolidCompression=yes

[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"

[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked; OnlyBelowVersion: 0,6.1

[Files]
Source: "build\launch4j\blobsaver.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "build\launch4j\lib\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
; NOTE: Don't use "Flags: ignoreversion" on any shared system files

[Icons]
Name: "{commonprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: quicklaunchicon

[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent

64 changes: 59 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
plugins {
id 'com.github.johnrengelman.shadow' version '2.0.4' // plugin for fat jar
id 'edu.sc.seis.launch4j' version '2.4.4' // for bundling into .exe
id "edu.sc.seis.macAppBundle" version "2.2.2" // for bundling into .app
id 'com.github.johnrengelman.shadow' version '2.0.4' // for fat jar
id 'java'
}

version '2.1'

version null
sourceCompatibility = 1.8

repositories {
mavenCentral()
maven {
url "http://repo.spring.io/plugins-release/"
url "http://repo.spring.io/plugins-release/" // for junique
}
}

Expand All @@ -29,11 +30,64 @@ compileJava {

jar {
manifest {
attributes 'Main-Class': 'blobsaver.Main'
attributes 'Main-Class': 'com.airsquared.blobsaver.Main'
}
}

shadowJar {
classifier = null // remove '-all' suffix
from "LICENSE"
}

macAppBundle {
mainClassName = "com.airsquared.blobsaver.Main"
// bundleJRE = true
icon = "icons/blob_emoji.icns"
backgroundImage = "icons/dmg_background.png"
appName = 'blobsaver'
dmgName = 'blobsaver-macos'
}

launch4j { // Windows only, don't use this, use createWindowsInstaller
mainClassName = "com.airsquared.blobsaver.Main"
copyright = "Copyright (c) 2018 airsquared"
downloadUrl = "https://java.com/inc/BrowserRedirect1.jsp"
icon = "${projectDir}/icons/blob_emoji.ico"
}

task createWindowsInstaller(type: Exec, dependsOn: 'createExe') {
// IMPORTANT: first make sure you have installed Inno Setup
// Install Inno Setup Preprocessor (ISPP) along with Inno Setup
// and make sure you have wine in your path if you are not on windows
// Inno Setup **MUST** be installed to C:\Program Files (x86)\Inno Setup 5\
doFirst {
new File(projectDir, "build/innosetup/").mkdirs()
workingDir = projectDir
println "running Inno Setup Compiler"
if (System.getProperty("os.name").toUpperCase().contains("WINDOWS")) {
commandLine 'C:\\Program Files (x86)\\Inno Setup 5\\ISCC.exe', '/Qp', 'blobsaver.iss'
} else {
commandLine 'wine', 'C:\\Program Files (x86)\\Inno Setup 5\\ISCC.exe', '/Qp', 'blobsaver.iss'
}
}
}

void buildEverything() {
println "creating fat/uber jar with shadowJar:"
shadowJar.execute()
println "creating mac app bundle:"
if (System.getProperty("os.name").toUpperCase().contains("MAC")) {
println " creating full .dmg"
createDmg.execute()
} else {
println " creating .zip with .app inside"
createAppZip.execute()
}
println "creating windows installer with inno setup:"
println " **IMPORTANT:** (for creating windows installer)"
println " first make sure you have installed Inno Setup first"
println " and make sure you have wine in your path if you are not on windows"
println " Inno Setup **MUST** be installed to C:\\Program Files (x86)\\Inno Setup 5\\"

createWindowsInstaller.execute()
}
Binary file added icons/blob_emoji.icns
Binary file not shown.
Binary file added icons/blob_emoji.ico
Binary file not shown.
Binary file added icons/dmg_background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 0e4ae44

Please sign in to comment.