Skip to content

Commit 0e4ae44

Browse files
committed
Package into .app and .exe, Update libraries used, change package name to com.airsquared.blobsaver, add read information directly from device
1 parent c42c904 commit 0e4ae44

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+1166
-631
lines changed

.idea/modules.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules/blobsaver.iml

Lines changed: 0 additions & 13 deletions
This file was deleted.

.idea/modules/blobsaver_main.iml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules/blobsaver_test.iml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@ If you have an antivirus or firewall, you may need to disable some other setting
1313
## Features
1414
- **Automatically save blobs in the background**
1515
- Store up to ten devices with presets
16-
- Choose where to save blobs with file picker
1716
- Save blobs for beta versions
17+
- Automatically read ECID and other info from device so you don't to get it manually
1818
- No need to download entire .ipsw for beta versions(just specify link)
19+
- Choose where to save blobs with file picker
1920
- Explains how to get ECID, Board Config(if needed), and information necessary for beta versions
2021
- Automatically checks for updates and prompts if available
2122
- Optionally specify device identifier instead of using device picker
@@ -25,13 +26,16 @@ If you have an antivirus or firewall, you may need to disable some other setting
2526
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.
2627

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

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

3640
## License
3741
This project is licensed under GNU GPL v3.0-only - see the [LICENSE](https://github.com/airsquared/blobsaver/blob/master/LICENSE) file for details

blobsaver.iss

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
; Script generated by the Inno Setup Script Wizard.
2+
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
3+
4+
#define MyAppName "blobsaver"
5+
#define MyAppVersion "2.2"
6+
#define MyAppPublisher "blobsaver"
7+
#define MyAppURL "https://www.github.com/airsquared/blobsaver"
8+
#define MyAppExeName "blobsaver.exe"
9+
10+
[Setup]
11+
; NOTE: The value of AppId uniquely identifies this application.
12+
; Do not use the same AppId value in installers for other applications.
13+
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
14+
AppId={{F5EAE50A-1E3A-4DA5-B2F0-4D29968E59CD}
15+
AppName={#MyAppName}
16+
AppVersion={#MyAppVersion}
17+
;AppVerName={#MyAppName} {#MyAppVersion}
18+
AppPublisher={#MyAppPublisher}
19+
AppPublisherURL={#MyAppURL}
20+
AppSupportURL={#MyAppURL}
21+
AppUpdatesURL={#MyAppURL}
22+
DefaultDirName={pf}\{#MyAppName}
23+
DisableDirPage=yes
24+
DisableProgramGroupPage=yes
25+
LicenseFile=src\main\resources\com\airsquared\blobsaver\gpl-3.0_windows.txt
26+
OutputDir=build\innosetup
27+
OutputBaseFilename=blobsaver_setup
28+
SetupIconFile=icons\blob_emoji.ico
29+
Compression=lzma
30+
SolidCompression=yes
31+
32+
[Languages]
33+
Name: "english"; MessagesFile: "compiler:Default.isl"
34+
35+
[Tasks]
36+
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
37+
Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked; OnlyBelowVersion: 0,6.1
38+
39+
[Files]
40+
Source: "build\launch4j\blobsaver.exe"; DestDir: "{app}"; Flags: ignoreversion
41+
Source: "build\launch4j\lib\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
42+
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
43+
44+
[Icons]
45+
Name: "{commonprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
46+
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
47+
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: quicklaunchicon
48+
49+
[Run]
50+
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
51+

build.gradle

Lines changed: 59 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
plugins {
2-
id 'com.github.johnrengelman.shadow' version '2.0.4' // plugin for fat jar
2+
id 'edu.sc.seis.launch4j' version '2.4.4' // for bundling into .exe
3+
id "edu.sc.seis.macAppBundle" version "2.2.2" // for bundling into .app
4+
id 'com.github.johnrengelman.shadow' version '2.0.4' // for fat jar
35
id 'java'
46
}
57

6-
version '2.1'
7-
8+
version null
89
sourceCompatibility = 1.8
910

1011
repositories {
1112
mavenCentral()
1213
maven {
13-
url "http://repo.spring.io/plugins-release/"
14+
url "http://repo.spring.io/plugins-release/" // for junique
1415
}
1516
}
1617

@@ -29,11 +30,64 @@ compileJava {
2930

3031
jar {
3132
manifest {
32-
attributes 'Main-Class': 'blobsaver.Main'
33+
attributes 'Main-Class': 'com.airsquared.blobsaver.Main'
3334
}
3435
}
3536

3637
shadowJar {
3738
classifier = null // remove '-all' suffix
3839
from "LICENSE"
40+
}
41+
42+
macAppBundle {
43+
mainClassName = "com.airsquared.blobsaver.Main"
44+
// bundleJRE = true
45+
icon = "icons/blob_emoji.icns"
46+
backgroundImage = "icons/dmg_background.png"
47+
appName = 'blobsaver'
48+
dmgName = 'blobsaver-macos'
49+
}
50+
51+
launch4j { // Windows only, don't use this, use createWindowsInstaller
52+
mainClassName = "com.airsquared.blobsaver.Main"
53+
copyright = "Copyright (c) 2018 airsquared"
54+
downloadUrl = "https://java.com/inc/BrowserRedirect1.jsp"
55+
icon = "${projectDir}/icons/blob_emoji.ico"
56+
}
57+
58+
task createWindowsInstaller(type: Exec, dependsOn: 'createExe') {
59+
// IMPORTANT: first make sure you have installed Inno Setup
60+
// Install Inno Setup Preprocessor (ISPP) along with Inno Setup
61+
// and make sure you have wine in your path if you are not on windows
62+
// Inno Setup **MUST** be installed to C:\Program Files (x86)\Inno Setup 5\
63+
doFirst {
64+
new File(projectDir, "build/innosetup/").mkdirs()
65+
workingDir = projectDir
66+
println "running Inno Setup Compiler"
67+
if (System.getProperty("os.name").toUpperCase().contains("WINDOWS")) {
68+
commandLine 'C:\\Program Files (x86)\\Inno Setup 5\\ISCC.exe', '/Qp', 'blobsaver.iss'
69+
} else {
70+
commandLine 'wine', 'C:\\Program Files (x86)\\Inno Setup 5\\ISCC.exe', '/Qp', 'blobsaver.iss'
71+
}
72+
}
73+
}
74+
75+
void buildEverything() {
76+
println "creating fat/uber jar with shadowJar:"
77+
shadowJar.execute()
78+
println "creating mac app bundle:"
79+
if (System.getProperty("os.name").toUpperCase().contains("MAC")) {
80+
println " creating full .dmg"
81+
createDmg.execute()
82+
} else {
83+
println " creating .zip with .app inside"
84+
createAppZip.execute()
85+
}
86+
println "creating windows installer with inno setup:"
87+
println " **IMPORTANT:** (for creating windows installer)"
88+
println " first make sure you have installed Inno Setup first"
89+
println " and make sure you have wine in your path if you are not on windows"
90+
println " Inno Setup **MUST** be installed to C:\\Program Files (x86)\\Inno Setup 5\\"
91+
92+
createWindowsInstaller.execute()
3993
}

icons/blob_emoji.icns

103 KB
Binary file not shown.

icons/blob_emoji.ico

33.1 KB
Binary file not shown.

icons/dmg_background.png

65.9 KB
Loading

0 commit comments

Comments
 (0)