diff --git a/client/icons/LighthouseProject.icns b/client/icons/LighthouseProject.icns new file mode 100644 index 0000000..aeef058 Binary files /dev/null and b/client/icons/LighthouseProject.icns differ diff --git a/client/icons/icon.png b/client/icons/icon.png new file mode 100644 index 0000000..015a72a Binary files /dev/null and b/client/icons/icon.png differ diff --git a/client/icons/mac.icns b/client/icons/mac.icns new file mode 100644 index 0000000..e202d1d Binary files /dev/null and b/client/icons/mac.icns differ diff --git a/client/src/main/java/lighthouse/Main.java b/client/src/main/java/lighthouse/Main.java index 083381a..2c49b5b 100644 --- a/client/src/main/java/lighthouse/Main.java +++ b/client/src/main/java/lighthouse/Main.java @@ -11,7 +11,6 @@ import javafx.fxml.*; import javafx.geometry.*; import javafx.scene.*; -import javafx.scene.control.*; import javafx.scene.effect.*; import javafx.scene.image.*; import javafx.scene.input.*; @@ -52,14 +51,17 @@ public class Main extends Application { public static final Logger log = LoggerFactory.getLogger(Main.class); - public static final String APP_NAME = "Crowdfunding App"; + public static final String APP_NAME = "Lighthouse"; // UpdateFX stuff. Version is incremented monotonically after a new version is released. public static final int VERSION = 27; - // No online updates URL for "Crowdfunding App". - @Nullable public static final String UPDATES_BASE_URL = null; + public static final String UPDATES_BASE_URL = "https://www.vinumeris.com/lighthouse/updates"; public static final List UPDATE_SIGNING_KEYS = Crypto.decode( + // Two keys during temporary transition from a key that was not password protected to one that is. + // At release the old key will be removed. + "02A3CDE5D0EDC281637C67AA67C0CB009EA6573E0F101C6E018ACB91393C08C129", // old + "02AA4D7E966BFA942D3BEABD2049A49DB6AE92C417D8837C328BC02F8B50411A97" // new ); public static final int UPDATE_SIGNING_THRESHOLD = 1; @@ -150,7 +152,7 @@ public void start(Stage stage) throws Exception { log.info("We are running on: {} with Java {}", System.getProperty("os.name"), System.getProperty("java.version")); // Show the crash dialog for any exceptions that we don't handle and that hit the main loop. - CrashFX.setup(); + CrashFX.setup("Lighthouse/" + Main.VERSION, AppDirectory.dir().resolve("crashes"), URI.create("https://www.vinumeris.com/crashfx/upload")); // Set up the basic window with an empty UI stack, and put a quick splash there. reached("JFX initialised"); prefs = new UserPrefs(); @@ -284,6 +286,7 @@ private void initGUI(Stage stage) throws IOException { log.warn("Prism is using software rendering"); log.info("Primary screen scale factor is {}", GuiUtils.getPixelScale()); mainStage = stage; + stage.getIcons().add(new Image(Main.class.getResourceAsStream("icon.png"))); Font.loadFont(Main.class.getResource("nanlight-webfont.ttf").toString(), 10); Font.loadFont(Main.class.getResource("nanlightbold-webfont.ttf").toString(), 10); // Create the scene with a StackPane so we can overlay things on top of the main UI. @@ -309,7 +312,11 @@ private void initGUI(Stage stage) throws IOException { } private Node createLoadingUI() { - StackPane pane = new StackPane(new Label("Crowdfunding app")); + ImageView lighthouseLogo = new ImageView(getResource("Logo.jpg").toString()); + lighthouseLogo.setFitWidth(500); + lighthouseLogo.setPreserveRatio(true); + StackPane.setAlignment(lighthouseLogo, Pos.CENTER); + StackPane pane = new StackPane(lighthouseLogo); pane.setPadding(new Insets(20)); pane.setStyle("-fx-background-color: white"); return pane; diff --git a/client/src/main/java/lighthouse/MainWindow.java b/client/src/main/java/lighthouse/MainWindow.java index b704de8..31b338c 100644 --- a/client/src/main/java/lighthouse/MainWindow.java +++ b/client/src/main/java/lighthouse/MainWindow.java @@ -487,6 +487,12 @@ public void tellUserToSendSomeMoney() { }); } + @FXML + public void onRedditAdClicked(MouseEvent event) { + log.info("reddit ad clicked"); + Main.instance.getHostServices().showDocument("https://www.reddit.com/r/LighthouseProjects"); + } + //region Generic Bitcoin wallet related code @FXML public void emptyWallet(ActionEvent event) { diff --git a/client/src/main/resources/lighthouse/main.css b/client/src/main/resources/lighthouse/main.css index ccb7635..5fe7ae8 100644 --- a/client/src/main/resources/lighthouse/main.css +++ b/client/src/main/resources/lighthouse/main.css @@ -34,6 +34,7 @@ .gradient-pane { -fx-background-color: #3c777b; + -fx-background-image: url("low-point-lighthouse-darkgreen.jpg"); -fx-background-position: bottom right; -fx-background-repeat: no-repeat; } @@ -264,4 +265,17 @@ .edit-project-grid .link-label { -fx-font-weight: normal; +} + +.reddit-ad { + -fx-border-color: #ffffff; + -fx-border-radius: 6; + -fx-border-style: dashed; + -fx-background-radius: 6; + -fx-background-color: #ffffff33; + -fx-padding: 30px; + -fx-cursor: hand; +} +.reddit-ad:hover { + -fx-background-color: #ffffffcc; } \ No newline at end of file diff --git a/client/src/main/resources/lighthouse/main.fxml b/client/src/main/resources/lighthouse/main.fxml index fc7a302..a3152b0 100644 --- a/client/src/main/resources/lighthouse/main.fxml +++ b/client/src/main/resources/lighthouse/main.fxml @@ -2,12 +2,10 @@ - - - + + - - + @@ -16,9 +14,9 @@ - + @@ -93,6 +91,11 @@ + + + + + diff --git a/client/src/main/resources/lighthouse/reddit-ad.png b/client/src/main/resources/lighthouse/reddit-ad.png new file mode 100644 index 0000000..6338f0e Binary files /dev/null and b/client/src/main/resources/lighthouse/reddit-ad.png differ diff --git a/linux-package.sh b/linux-package.sh new file mode 100755 index 0000000..a0e4dc5 --- /dev/null +++ b/linux-package.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +set -e + +# Extract the version number. +ver=$( sed -n 's/^.*final int VERSION = //p' client/src/main/java/lighthouse/Main.java ) +ver="${ver:0:${#ver}-1}" +build=updates/builds/processed/$ver.jar + +if [ ! -e "$build" ]; then + echo "Must run package.sh first to generate build" + exit 1 +fi + +javapackager -deploy \ + -BappVersion=$ver \ + -Bcategory=Office,Finance \ + -BlicenseType=Apache \ + -BlicenseFile=LICENSE \ + -Bemail=contact@vinumeris.com \ + -Bicon=client/icons/icon.png \ + -native deb \ + -name lighthouse \ + -title "Lighthouse: a peer to peer crowdfunding app that uses Bitcoin" \ + -vendor Vinumeris \ + -outdir deploy \ + -appclass lighthouse.Main \ + -srcfiles $build \ + -srcfiles package/linux/LICENSE \ + -srcfiles package/linux/postinst \ + -srcfiles package/linux/prerm \ + -outfile lighthouse diff --git a/mac-package.sh b/mac-package.sh new file mode 100755 index 0000000..b20b4b4 --- /dev/null +++ b/mac-package.sh @@ -0,0 +1,35 @@ +#!/bin/bash + +set -e + +# Extract the version number. +ver=$( sed -n 's/^.*final int VERSION = //p' client/src/main/java/lighthouse/Main.java ) +ver="${ver:0:${#ver}-1}" +build=updates/builds/processed/$ver.jar + +# Generate the plist from the template +sed "s|JAR_NAME_STRING_GOES_HERE|$ver.jar|" package/macosx/Info.template.plist >package/macosx/Info.plist + +if [ ! -e "$build" ]; then + echo "Must run package.sh first to generate build" + exit 1 +fi + +jh=$(/usr/libexec/java_home -v 1.8) +if [ -e ../min-jdk ]; then + jh=`pwd`/../min-jdk/Contents/Home +fi +$jh/bin/javapackager -deploy \ + -BappVersion=$ver \ + -Bmac.CFBundleIdentifier=com.vinumeris.lighthouse \ + -Bmac.CFBundleName=Lighthouse \ + -Bicon=client/icons/mac.icns \ + -Bruntime="$jh/../../" \ + -native dmg \ + -name Lighthouse \ + -title Lighthouse \ + -vendor Vinumeris \ + -outdir deploy \ + -appclass lighthouse.Main \ + -srcfiles $build \ + -outfile Lighthouse diff --git a/package.sh b/package.sh new file mode 100755 index 0000000..48544ac --- /dev/null +++ b/package.sh @@ -0,0 +1,44 @@ +#!/bin/bash + +set -e + +if grep 'String UPDATES_BASE_URL = null' client/src/main/java/lighthouse/Main.java >/dev/null; then + echo "Don't use this for Crowdfunding App" + exit 1 +fi +# Extract the version number. +ver=$( sed -n 's/^.*final int VERSION = //p' client/src/main/java/lighthouse/Main.java ) +ver="${ver:0:${#ver}-1}" + +echo "Building version $ver..." +mvn -q -U clean package -DskipTests +[ ! -e updates ] && mkdir -p updates/builds + +dest=updates/builds/$ver.jar + +echo "Running ProGuard to delete dead code and shrink JAR ..." +java -jar ~/.m2/repository/net/sf/proguard/proguard-base/5.0/proguard-base-5.0.jar @client/proguard.pro + +du -h client/target/shaded.jar client/target/lighthouse.jar + +cp client/target/lighthouse.jar $dest +echo "Copied build as version $ver to $dest" + +echo "Generating Windows build script" +sed "s/__VERSION__/$ver/g" package/windows/Lighthouse.iss.template >package/windows/Lighthouse.iss +echo "& 'C:\Program Files\Java\stripped8u31-64\bin\javapackager.exe' -deploy -BappVersion=$ver -native exe -name Lighthouse -title Lighthouse -vendor Vinumeris -outdir deploy -appclass lighthouse.Main -srcfiles .\\updates\\builds\\processed\\$ver.jar -outfile Lighthouse -Bruntime='c:\Program Files\Java\stripped8u31-64\jre'" >win-build.ps1 +echo "& 'C:\Program Files (x86)\Java\jdk1.8.0_31\bin\javapackager.exe' -deploy -BappVersion=$ver -native exe -name Lighthouse -title Lighthouse -vendor Vinumeris -outdir deploy -appclass lighthouse.Main -srcfiles .\\updates\\builds\\processed\\$ver.jar -outfile Lighthouse -Bruntime='c:\Program Files (x86)\Java\jdk1.8.0_31\jre'" >>win-build.ps1 + +if [[ "$1" != "--nosign" ]]; then + echo "Generating online update site" + rm updates/site/* || true + java -jar tools/updatefx.jar --url=https://s3-eu-west-1.amazonaws.com/vinumeris/lighthouse/updates --gzip-from=7 updates +fi + +if [[ $1 == "--package" ]]; then + if [ -e /Library ]; then + ./mac-package.sh + elif [ -e /proc ]; then + ./linux-package.sh + fi +fi \ No newline at end of file diff --git a/package/linux/LICENSE b/package/linux/LICENSE new file mode 100644 index 0000000..7a4a3ea --- /dev/null +++ b/package/linux/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/package/linux/postinst b/package/linux/postinst new file mode 100644 index 0000000..1472336 --- /dev/null +++ b/package/linux/postinst @@ -0,0 +1,2 @@ +#!/bin/sh +ln -s /opt/lighthouse/lighthouse /usr/bin/lighthouse diff --git a/package/linux/prerm b/package/linux/prerm new file mode 100644 index 0000000..5c4daea --- /dev/null +++ b/package/linux/prerm @@ -0,0 +1,2 @@ +#!/bin/sh +rm -f /usr/bin/lighthouse diff --git a/package/macosx/Info.template.plist b/package/macosx/Info.template.plist new file mode 100644 index 0000000..ff7a8d6 --- /dev/null +++ b/package/macosx/Info.template.plist @@ -0,0 +1,148 @@ + + + + + LSMinimumSystemVersion + 10.7.4 + CFBundleDevelopmentRegion + English + CFBundleAllowMixedLocalizations + + CFBundleExecutable + Lighthouse + CFBundleIconFile + Lighthouse.icns + CFBundleIdentifier + com.vinumeris.lighthouse + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + Lighthouse + CFBundlePackageType + APPL + CFBundleShortVersionString + 19 + CFBundleSignature + ???? + + LSApplicationCategoryType + Unknown + CFBundleVersion + 100 + NSHumanReadableCopyright + Copyright (C) 2015 + JVMRuntime + .. + JVMMainClassName + lighthouse.Main + JVMAppClasspath + + JVMMainJarName + JAR_NAME_STRING_GOES_HERE + JVMPreferencesID + lighthouse + JVMOptions + + + + JVMUserOptions + + + + NSHighResolutionCapable + true + + CFBundleDocumentTypes + + + CFBundleTypeExtensions + + lighthouse-project + + CFBundleTypeIconFile + LighthouseProject + CFBundleTypeName + Lighthouse Project + CFBundleTypeRole + Editor + CFBundleTypeName + com.vinumeris.lighthouse.project + LSItemContentTypes + + com.vinumeris.lighthouse.project + + LSHandlerRank + Owner + + + + CFBundleTypeExtensions + + lighthouse-pledge + + CFBundleTypeIconFile + Lighthouse + CFBundleTypeName + Lighthouse Pledge + CFBundleTypeRole + Editor + CFBundleTypeName + com.vinumeris.lighthouse.project + LSItemContentTypes + + com.vinumeris.lighthouse.project + + LSHandlerRank + Owner + + + + UTExportedTypeDeclarations + + + UTTypeDescription + Lighthouse Project + UTTypeIdentifier + com.vinumeris.lighthouse.project + UTTypeTagSpecification + + public.filename-extension + + lighthouse-project + + public.mime-type + + application/vnd.vinumeris.lighthouse-project + + + UTTypeConformsTo + + public.data + + + + UTTypeDescription + Lighthouse Pledge + UTTypeIdentifier + com.vinumeris.lighthouse.pledge + UTTypeTagSpecification + + public.filename-extension + + lighthouse-pledge + + public.mime-type + + application/vnd.vinumeris.lighthouse-pledge + + + UTTypeConformsTo + + public.data + + + + + + diff --git a/package/windows/Lighthouse-setup-icon.bmp b/package/windows/Lighthouse-setup-icon.bmp new file mode 100644 index 0000000..b585441 Binary files /dev/null and b/package/windows/Lighthouse-setup-icon.bmp differ diff --git a/package/windows/Lighthouse.ico b/package/windows/Lighthouse.ico new file mode 100644 index 0000000..3570ecd Binary files /dev/null and b/package/windows/Lighthouse.ico differ diff --git a/package/windows/Lighthouse.iss.template b/package/windows/Lighthouse.iss.template new file mode 100644 index 0000000..77f291f --- /dev/null +++ b/package/windows/Lighthouse.iss.template @@ -0,0 +1,91 @@ +;This file will be executed next to the application bundle image +;I.e. current directory will contain folder Lighthouse with application files +[Setup] +AppId={{lighthouse}} +AppName=Lighthouse +AppVersion=__VERSION__ +AppVerName=Lighthouse +AppPublisher=Vinumeris +AppComments=Lighthouse +AppCopyright=Copyright (C) 2014 +AppPublisherURL=https://www.vinumeris.com +AppSupportURL=https://www.vinumeris.com +;AppUpdatesURL=http://java.com/ +DefaultDirName={localappdata}\Lighthouse +DisableStartupPrompt=Yes +DisableDirPage=Yes +DisableProgramGroupPage=Yes +DisableReadyPage=Yes +DisableFinishedPage=Yes +DisableWelcomePage=Yes +DefaultGroupName=Vinumeris +;Optional License +LicenseFile= +;WinXP or above +MinVersion=0,5.1 +OutputBaseFilename=Lighthouse +Compression=lzma +SolidCompression=yes +PrivilegesRequired=lowest +SetupIconFile=Lighthouse\Lighthouse.ico +UninstallDisplayIcon={app}\Lighthouse.ico +UninstallDisplayName=Lighthouse +WizardImageStretch=No +WizardSmallImageFile=Lighthouse-setup-icon.bmp +ArchitecturesInstallIn64BitMode=x64 +ChangesAssociations=Yes + +[Languages] +Name: "english"; MessagesFile: "compiler:Default.isl" + +[Files] +Source: "Lighthouse\Lighthouse.exe"; DestDir: "{app}"; Flags: ignoreversion +Source: "Lighthouse\runtime\jre\bin\plugin2\msvcr100.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "Lighthouse\runtime\jre\bin\msvcp100.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "Lighthouse\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs + +[Icons] +Name: "{group}\Lighthouse"; Filename: "{app}\Lighthouse.exe"; IconFilename: "{app}\Lighthouse.ico"; Check: returnTrue() +Name: "{commondesktop}\Lighthouse"; Filename: "{app}\Lighthouse.exe"; IconFilename: "{app}\Lighthouse.ico"; Check: returnFalse() + +[Registry] +Root: HKCU; Subkey: "SOFTWARE\Classes\.lighthouse-project"; ValueType: string; ValueName: ""; ValueData: "lhprojectfile"; Flags: uninsdeletevalue +Root: HKCU; Subkey: "SOFTWARE\Classes\.lighthouse-project\lhprojectfile"; ValueType: string; ValueName: ""; ValueData: ""; Flags: uninsdeletekey +Root: HKCU; Subkey: "SOFTWARE\Classes\.lighthouse-project\lhprojectfile\ShellNew"; ValueType: string; ValueName: ""; ValueData: ""; Flags: uninsdeletekey +Root: HKCU; Subkey: "SOFTWARE\Classes\lhprojectfile"; ValueType: string; ValueName: ""; ValueData: "Lighthouse Project File"; Flags: uninsdeletekey +Root: HKCU; Subkey: "SOFTWARE\Classes\lhprojectfile\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\Lighthouse.ico,0" +Root: HKCU; Subkey: "SOFTWARE\Classes\lhprojectfile\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\Lighthouse.exe"" ""%1""" +Root: HKCU; Subkey: "SOFTWARE\Classes\.lighthouse-pledge"; ValueType: string; ValueName: ""; ValueData: "lhpledgefile"; Flags: uninsdeletevalue +Root: HKCU; Subkey: "SOFTWARE\Classes\.lighthouse-pledge\lhpledgefile"; ValueType: string; ValueName: ""; ValueData: ""; Flags: uninsdeletekey +Root: HKCU; Subkey: "SOFTWARE\Classes\.lighthouse-pledge\lhpledgefile\ShellNew"; ValueType: string; ValueName: ""; ValueData: ""; Flags: uninsdeletekey +Root: HKCU; Subkey: "SOFTWARE\Classes\lhpledgefile"; ValueType: string; ValueName: ""; ValueData: "Lighthouse Pledge File"; Flags: uninsdeletekey +Root: HKCU; Subkey: "SOFTWARE\Classes\lhpledgefile\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\Lighthouse.ico,0" +Root: HKCU; Subkey: "SOFTWARE\Classes\lhpledgefile\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\Lighthouse.exe"" ""%1""" + + +[Run] +Filename: "{app}\Lighthouse.exe"; Description: "{cm:LaunchProgram,Lighthouse}"; Flags: nowait postinstall skipifsilent; Check: returnTrue() +Filename: "{app}\Lighthouse.exe"; Parameters: "-install -svcName ""Lighthouse"" -svcDesc ""Lighthouse"" -mainExe ""Lighthouse.exe"" "; Check: returnFalse() + +[UninstallRun] +Filename: "{app}\Lighthouse.exe "; Parameters: "-uninstall -svcName Lighthouse -stopOnUninstall"; Check: returnFalse() + +[Code] +function returnTrue(): Boolean; +begin + Result := True; +end; + +function returnFalse(): Boolean; +begin + Result := False; +end; + +function InitializeSetup(): Boolean; +begin +// Possible future improvements: +// if version less or same => just launch app +// if upgrade => check if same app is running and wait for it to exit +// Add pack200/unpack200 support? + Result := True; +end; diff --git a/strip-jre.sh b/strip-jre.sh new file mode 100755 index 0000000..56e53a7 --- /dev/null +++ b/strip-jre.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +if [ ! -e javafx-src.zip ]; then + echo "Not in the right directory" + exit 1 +fi +rm javafx-src.zip COPYRIGHT LICENSE README.html THIRDPARTYLICENSEREADME-JAVAFX.txt THIRDPARTYLICENSEREADME.txt +rm jre/lib/libjfxwebkit.dylib jre/lib/libgstreamer-lite.dylib jre/lib/libglib-lite.dylib jre/lib/libAppleScriptEngine.dylib jre/lib/plugin.jar jre/lib/ext/nashorn.jar + +packages="apple/laf com/apple/laf com/oracle/webservices com/sun/corba com/sun/java/swing com/sun/media/sound" +packages="$packages com/sun/jndi com/sun/org/glassfish com/sun/org/omg com/sun/xml/internal/ws java/rmi javax/activation" +packages="$packages javax/management javax/naming javax/rmi javax/smartcardio javax/sound javax/swing" +packages="$packages javax/xml/ws org/omg sun/applet sun/corba sun/management sun/rmi sun/swing" + +args="" +for p in $packages; do + args="$args $p/*" +done +zip -d jre/lib/rt.jar $args \ No newline at end of file