-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
124 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,13 +43,16 @@ jobs: | |
with: | ||
msystem: MINGW64 | ||
update: true | ||
install: git mingw-w64-x86_64-cc mingw-w64-x86_64-rust mingw-w64-x86_64-sqlite3 mingw-w64-x86_64-pkg-config | ||
install: git zip mingw-w64-x86_64-libzip mingw-w64-x86_64-rust mingw-w64-x86_64-sqlite3 mingw-w64-x86_64-pkg-config | ||
|
||
- name: Run cargo check | ||
run: cargo check --release | ||
|
||
- name: Build | ||
run: cargo build --release | ||
|
||
- name: Package | ||
run: tools/package_release_windows.sh ${{ github.ref_name }} | ||
|
||
- name: Upload artifact | ||
uses: actions/upload-release-asset@v1 | ||
|
@@ -58,9 +61,9 @@ jobs: | |
UPLOAD_URL: ${{ needs.create-release.outputs.upload_url }} | ||
with: | ||
upload_url: ${{ env.UPLOAD_URL }} | ||
asset_path: target/release/trsync.exe # FIXME : zip all executables ? | ||
asset_name: trsync_${{ github.ref_name }}_Win64.zip | ||
asset_content_type: application/octet-stream | ||
asset_path: TrSync_${{ github.ref_name }}_Win64.zip | ||
asset_name: TrSync_${{ github.ref_name }}_Win64.zip | ||
asset_content_type: application/zip | ||
|
||
build-linux: | ||
name: Build and package for Linux | ||
|
@@ -86,13 +89,29 @@ jobs: | |
- name: Build | ||
run: cargo build --release | ||
|
||
- name: Package | ||
run: tools/package_release_linux.sh ${{ github.ref_name }} | ||
|
||
- name: Upload artifact | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
UPLOAD_URL: ${{ needs.create-release.outputs.upload_url }} | ||
with: | ||
upload_url: ${{ env.UPLOAD_URL }} | ||
asset_path: target/release/trsync # FIXME all in zip ? | ||
asset_name: trsync_${{ github.ref_name }}_Linux | ||
asset_content_type: application/octet-stream | ||
asset_path: TrSync_${{ github.ref_name }}_Linux.zip | ||
asset_name: TrSync_${{ github.ref_name }}_Linux.zip | ||
asset_content_type: application/zip | ||
|
||
build-windows-installer: | ||
name: Build the Inno Setup Installer | ||
needs: build-msys-mingw64 | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Compile .ISS to .EXE Installer | ||
uses: Minionguyjpro/[email protected] | ||
with: | ||
path: src/setup.iss | ||
options: /O+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
; Script generated by the Inno Setup Script Wizard. | ||
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! | ||
|
||
#define MyAppName "Trsync" | ||
#define MyAppVersion "0.1" | ||
#define MyAppPublisher "Bastien Sevajol" | ||
#define MyAppURL "https://github.com/buxx/trsync" | ||
#define MyAppExeName "trsync-manager-systray.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={F09009FF-131C-464F-B269-DB8FFF3DA90D} FFFFFFFFFFFFFFFFFFIXME ! | ||
AppName={#MyAppName} | ||
AppVersion={#MyAppVersion} | ||
;AppVerName={#MyAppName} {#MyAppVersion} | ||
AppPublisher={#MyAppPublisher} | ||
AppPublisherURL={#MyAppURL} | ||
AppSupportURL={#MyAppURL} | ||
AppUpdatesURL={#MyAppURL} | ||
DefaultDirName={autopf}\{#MyAppName} | ||
DisableProgramGroupPage=yes | ||
; Remove the following line to run in administrative install mode (install for all users.) | ||
PrivilegesRequired=lowest | ||
PrivilegesRequiredOverridesAllowed=commandline | ||
OutputBaseFilename=trsync | ||
Compression=lzma | ||
SolidCompression=yes | ||
WizardStyle=modern | ||
|
||
[Languages] | ||
Name: "english"; MessagesFile: "compiler:Default.isl" | ||
Name: "french"; MessagesFile: "compiler:Languages\French.isl" | ||
|
||
[Tasks] | ||
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked | ||
|
||
[Files] | ||
Source: ".\trsync\target\release\trsync_manager_systray.exe"; DestDir: "{app}"; DestName: "trsync-manager-systray.exe"; Flags: ignoreversion | ||
Source: ".\trsync.conf"; DestDir: "{localappdata}"; Flags: ignoreversion; AfterInstall: UpdateConfig() | ||
; NOTE: Don't use "Flags: ignoreversion" on any shared system files | ||
|
||
[Icons] | ||
Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\trsync-manager-systray.exe" | ||
Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\trsync-manager-systray.exe"; Tasks: desktopicon | ||
Name: "{userstartup}\{#MyAppName}"; Filename: "{app}\trsync-manager-systray.exe"; WorkingDir: "{app}" | ||
|
||
[Run] | ||
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent; | ||
|
||
[Code] | ||
procedure UpdateConfig(); | ||
var | ||
LocalAppDataValue : string; | ||
FileName : string; | ||
MyFile : TStrings; | ||
MyText : string; | ||
TrsyncManagerConfigurePath : string; | ||
begin | ||
LocalAppDataValue := ExpandConstant('{localappdata}'); | ||
FileName := LocalAppDataValue + '\trsync.conf'; | ||
MyFile := TStringList.Create; | ||
try | ||
MyFile.LoadFromFile(FileName); | ||
MyText := MyFile.Text; | ||
{ Only save if text has been changed. } | ||
StringChangeEx(MyText, '\', '\\', True); | ||
MyFile.Text := MyText; | ||
MyFile.SaveToFile(FileName); | ||
finally | ||
MyFile.Free; | ||
end; | ||
end; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/usr/bin/env bash | ||
set -e # stop at first error | ||
|
||
[[ -z "$1" ]] && { echo "Please give package reference name as first parameter" ; exit 1; } | ||
FOLDER_NAME=TrSync_${1}_Linux | ||
|
||
mkdir -p ${FOLDER_NAME} | ||
cp target/release/trsync ${FOLDER_NAME} | ||
cp target/release/trsync_manager ${FOLDER_NAME} | ||
cp target/release/trsync_manager_systray ${FOLDER_NAME} | ||
cp LICENSE ${FOLDER_NAME} | ||
zip -r ${FOLDER_NAME}.zip ${FOLDER_NAME} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/usr/bin/env bash | ||
set -e # stop at first error | ||
|
||
[[ -z "$1" ]] && { echo "Please give package reference name as first parameter" ; exit 1; } | ||
FOLDER_NAME=TrSync_${1}_Win64 | ||
|
||
mkdir -p ${FOLDER_NAME} | ||
cp target/release/trsync.exe ${FOLDER_NAME} | ||
cp target/release/trsync_manager.exe ${FOLDER_NAME} | ||
cp target/release/trsync_manager_systray.exe ${FOLDER_NAME} | ||
cp LICENSE ${FOLDER_NAME} | ||
zip -r ${FOLDER_NAME}.zip ${FOLDER_NAME} |