diff --git a/.travis.yml b/.travis.yml index aad6dd7..c306f99 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ ####################################################################### -# Copyright (C) 2017 Kaloyan Raev +# Copyright (C) 2017-2018 Kaloyan Raev and others # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -16,6 +16,33 @@ ####################################################################### language: java +env: + global: + - JAVA_LIBSTORJ_VERSION=0.8.1 + install: true -script: mvn clean verify \ No newline at end of file +script: mvn clean verify + +before_deploy: +- mvn package +# Prepare a package for Windows +- curl -sSL https://github.com/Storj/java-libstorj/releases/download/$JAVA_LIBSTORJ_VERSION/java-libstorj-$JAVA_LIBSTORJ_VERSION-win64-dlls.zip -O +- unzip java-libstorj-$JAVA_LIBSTORJ_VERSION-win64-dlls.zip +- zip -j goobox-sync-storj-$TRAVIS_TAG-win64.zip java-libstorj-dlls-$JAVA_LIBSTORJ_VERSION/* src/main/resources/win64/* target/goobox-sync-storj-$TRAVIS_TAG.jar +# Prepare a package for macOS +- mkdir -p java-libstorj-$JAVA_LIBSTORJ_VERSION-mac-dylibs +- curl -sSL https://github.com/Storj/java-libstorj/releases/download/$JAVA_LIBSTORJ_VERSION/java-libstorj-$JAVA_LIBSTORJ_VERSION-macos-dylibs.tar.gz | tar -zxv -C java-libstorj-$JAVA_LIBSTORJ_VERSION-mac-dylibs +- zip -j goobox-sync-storj-$TRAVIS_TAG-darwin.zip java-libstorj-$JAVA_LIBSTORJ_VERSION-mac-dylibs/* src/main/resources/goobox-sync-storj target/goobox-sync-storj-$TRAVIS_TAG.jar + +deploy: + provider: releases + api_key: + secure: S/q7PYrt2JxBvMyQbaKcVRAD8uCfWuca5ZTIE2euiOeI7ZLHhRItHrqAF/1LcOPhbwwg3Sit4yjlkAv5LYFCKWXH5lHMtzQTTxDJ06MoP7H8jjXquOJL3rxnfldmjRcwp7+JgoPp7HdwFVp3yVrJXLuMqRLMxOllbq9QMMj1cE85Tq6SrAxeujTkRGyAZXAQf0lsd0rl5jc1fxraTEcj8CseRcYAmkIYvmc7hpOEE4WFincYIfJz+o4WWYAIWOuwJ2TCfvCZfp2ibxDtykaUQgKwGaM0bc5LqsoqRBr6fNecsfw7KfLZKhqS+W1s3i+2UeJOgKrdjFi7jFbgi8CpJX0HxFrQX/yKkj4UfWF+5J+yAcvn9sq1hEUI8udKx+9jMvduRxViebGvJ/DgmkeJEvOumQ+Cd2cdTJJYVyX8NL9tVUQBg5biDoZ4qU+RIGzGIWvIRDVjynnl0nMTS0+RxPQM31a2cNnPeNgpqJAIxAjdShgM09fWyfnIds0WAu44eKt96IIfyXw564zTd6Rq4MODRIWxqUxOH8/7/3nMwI5tk4a/Rrhfd+svtHOJO71iMKTdNeGUmaigksPNdxHH72X98oHsH49DnafEgOkpUSIzy5ppFtXYqPygkaH589gqzwbADrXEy55BXoZKeQmD7iBRkx+YODydgoHA/1dyTGU= + skip_cleanup: true + file: + - goobox-sync-storj-$TRAVIS_TAG-win64.zip + - goobox-sync-storj-$TRAVIS_TAG-darwin.zip + on: + tags: true + repo: GooBox/goobox-sync-storj diff --git a/src/main/resources/goobox-sync-storj b/src/main/resources/goobox-sync-storj new file mode 100755 index 0000000..34feed8 --- /dev/null +++ b/src/main/resources/goobox-sync-storj @@ -0,0 +1,2 @@ +#!/bin/bash +java -jar goobox-sync-storj-0.0.25.jar diff --git a/src/main/resources/win64/GooboxContextMenus_x64.dll b/src/main/resources/win64/GooboxContextMenus_x64.dll new file mode 100644 index 0000000..925ffb5 Binary files /dev/null and b/src/main/resources/win64/GooboxContextMenus_x64.dll differ diff --git a/src/main/resources/win64/GooboxOverlay1OK_x64.dll b/src/main/resources/win64/GooboxOverlay1OK_x64.dll new file mode 100644 index 0000000..78b7c87 Binary files /dev/null and b/src/main/resources/win64/GooboxOverlay1OK_x64.dll differ diff --git a/src/main/resources/win64/GooboxOverlay2Syncing_x64.dll b/src/main/resources/win64/GooboxOverlay2Syncing_x64.dll new file mode 100644 index 0000000..9e3524a Binary files /dev/null and b/src/main/resources/win64/GooboxOverlay2Syncing_x64.dll differ diff --git a/src/main/resources/win64/GooboxOverlay3Warning_x64.dll b/src/main/resources/win64/GooboxOverlay3Warning_x64.dll new file mode 100644 index 0000000..5afdaa2 Binary files /dev/null and b/src/main/resources/win64/GooboxOverlay3Warning_x64.dll differ diff --git a/src/main/resources/win64/GooboxOverlay4Error_x64.dll b/src/main/resources/win64/GooboxOverlay4Error_x64.dll new file mode 100644 index 0000000..8fd1270 Binary files /dev/null and b/src/main/resources/win64/GooboxOverlay4Error_x64.dll differ diff --git a/src/main/resources/win64/LiferayNativityUtil_x64.dll b/src/main/resources/win64/LiferayNativityUtil_x64.dll new file mode 100644 index 0000000..80f8327 Binary files /dev/null and b/src/main/resources/win64/LiferayNativityUtil_x64.dll differ diff --git a/src/main/resources/win64/LiferayNativityWindowsUtil_x64.dll b/src/main/resources/win64/LiferayNativityWindowsUtil_x64.dll new file mode 100644 index 0000000..134ff0d Binary files /dev/null and b/src/main/resources/win64/LiferayNativityWindowsUtil_x64.dll differ diff --git a/src/main/resources/win64/goobox-sync-storj-debug.bat b/src/main/resources/win64/goobox-sync-storj-debug.bat new file mode 100644 index 0000000..d1ba6f6 --- /dev/null +++ b/src/main/resources/win64/goobox-sync-storj-debug.bat @@ -0,0 +1,85 @@ +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem goobox-sync-storj startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem goobox-sync-storj app version +set GOOBOX_SYNC_STORJ_VERSION=0.0.25 + +@rem Add default JVM options here. You can also use JAVA_OPTS and GOOBOX_SYNC_STORJ_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS=-XX:+CreateMinidumpOnCrash -agentlib:jdwp=transport=dt_socket,server=y,address=8000,suspend=y + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windows variants + +if not "%OS%" == "Windows_NT" goto win9xME_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* + +:execute +@rem Setup the command line + +@rem Execute goobox-sync-storj +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GOOBOX_SYNC_STORJ_OPTS% -jar "%APP_HOME%\goobox-sync-storj-%GOOBOX_SYNC_STORJ_VERSION%.jar" %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GOOBOX_SYNC_STORJ_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GOOBOX_SYNC_STORJ_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega \ No newline at end of file diff --git a/src/main/resources/win64/goobox-sync-storj.bat b/src/main/resources/win64/goobox-sync-storj.bat new file mode 100644 index 0000000..c77ad03 --- /dev/null +++ b/src/main/resources/win64/goobox-sync-storj.bat @@ -0,0 +1,85 @@ +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem goobox-sync-storj startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem goobox-sync-storj app version +set GOOBOX_SYNC_STORJ_VERSION=0.0.25 + +@rem Add default JVM options here. You can also use JAVA_OPTS and GOOBOX_SYNC_STORJ_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS=-XX:+CreateMinidumpOnCrash + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windows variants + +if not "%OS%" == "Windows_NT" goto win9xME_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* + +:execute +@rem Setup the command line + +@rem Execute goobox-sync-storj +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GOOBOX_SYNC_STORJ_OPTS% -jar "%APP_HOME%\goobox-sync-storj-%GOOBOX_SYNC_STORJ_VERSION%.jar" %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GOOBOX_SYNC_STORJ_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GOOBOX_SYNC_STORJ_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/src/main/resources/win64/list-db.bat b/src/main/resources/win64/list-db.bat new file mode 100644 index 0000000..2546660 --- /dev/null +++ b/src/main/resources/win64/list-db.bat @@ -0,0 +1,86 @@ +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem goobox-sync-storj startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem goobox-sync-storj app version +set GOOBOX_SYNC_STORJ_VERSION=0.0.25 + +@rem Add default JVM options here. You can also use JAVA_OPTS and GOOBOX_SYNC_STORJ_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS=-XX:+CreateMinidumpOnCrash +set GOOBOX_SYNC_STORJ_OPTS=-Dlogback.configurationFile=logback-disable.xml + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windows variants + +if not "%OS%" == "Windows_NT" goto win9xME_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* + +:execute +@rem Setup the command line + +@rem Execute goobox-sync-storj +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GOOBOX_SYNC_STORJ_OPTS% -cp "%APP_HOME%\goobox-sync-storj-%GOOBOX_SYNC_STORJ_VERSION%.jar" io.goobox.sync.storj.db.DB %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GOOBOX_SYNC_STORJ_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GOOBOX_SYNC_STORJ_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/src/main/resources/win64/register-dlls.bat b/src/main/resources/win64/register-dlls.bat new file mode 100644 index 0000000..ebaf412 --- /dev/null +++ b/src/main/resources/win64/register-dlls.bat @@ -0,0 +1,5 @@ +regsvr32 GooboxOverlay1OK_x64.dll +regsvr32 GooboxOverlay2Syncing_x64.dll +regsvr32 GooboxOverlay3Warning_x64.dll +regsvr32 GooboxOverlay4Error_x64.dll +regsvr32 GooboxContextMenus_x64.dll \ No newline at end of file diff --git a/src/main/resources/win64/unregister-dlls.bat b/src/main/resources/win64/unregister-dlls.bat new file mode 100644 index 0000000..91b973d --- /dev/null +++ b/src/main/resources/win64/unregister-dlls.bat @@ -0,0 +1,5 @@ +regsvr32 -u GooboxOverlay1OK_x64.dll +regsvr32 -u GooboxOverlay2Syncing_x64.dll +regsvr32 -u GooboxOverlay3Warning_x64.dll +regsvr32 -u GooboxOverlay4Error_x64.dll +regsvr32 -u GooboxContextMenus_x64.dll \ No newline at end of file