Commit 103708216d
Unsigned
Layout: unified · split
Build/CurdInstaller.exe deleted
Binary file not shown.
Build/build → Build/buildlinux renamed
Build/buildwindows +1 −4
| @@ -1,4 +1 @@ | |||
| 1 | @echo off | 1 | GOOS=windows GOARCH=amd64 go build -o curd.exe -ldflags="-s -w" cmd/curd/main.go\ No newline at end of file |
| 2 | set GOOS=windows | ||
| 3 | set GOARCH=amd64 | ||
| 4 | go build -o curd.exe -ldflags="-s -w" -trimpath cmd\curd\main.go\ No newline at end of file | ||
Build/curd-windows-build.iss +25
| @@ -0,0 +1,25 @@ | |||
| 1 | [Setup] | ||
| 2 | AppName=Curd Installer | ||
| 3 | AppVersion=0.0.3 | ||
| 4 | DefaultDirName={pf}\Curd | ||
| 5 | DefaultGroupName=Curd | ||
| 6 | AllowNoIcons=yes | ||
| 7 | OutputBaseFilename=CurdInstaller | ||
| 8 | UsePreviousAppDir=yes | ||
| 9 | Compression=lzma2 | ||
| 10 | SolidCompression=yes | ||
| 11 | |||
| 12 | [Tasks] | ||
| 13 | ; Define a task for creating a desktop shortcut | ||
| 14 | Name: "desktopicon"; Description: "Create a &desktop shortcut"; GroupDescription: "Additional Options"; | ||
| 15 | |||
| 16 | [Files] | ||
| 17 | ; Copy the Curd executable to the install directory | ||
| 18 | Source: "Z:releases/curd-0.0.3/windows/curd.exe"; DestDir: "{app}"; Flags: ignoreversion | ||
| 19 | Source: "Z:\home/wraient/Projects/curd/Build/mpv.exe"; DestDir: "{app}\bin"; Flags: ignoreversion | ||
| 20 | |||
| 21 | [Icons] | ||
| 22 | ; Create the application icon in the Start Menu | ||
| 23 | Name: "{group}\Curd"; Filename: "{app}\curd.exe" | ||
| 24 | ; Create a desktop shortcut if the user checked the option | ||
| 25 | Name: "{userdesktop}\Curd"; Filename: "{app}\curd.exe"; Tasks: desktopicon | ||
Build/curd-windows-build_original.iss deleted −25
| @@ -1,25 +0,0 @@ | |||
| 1 | [Setup] | ||
| 2 | AppName=Curd Installer | ||
| 3 | AppVersion=1.0 | ||
| 4 | DefaultDirName={pf}\Curd | ||
| 5 | DefaultGroupName=Curd | ||
| 6 | AllowNoIcons=yes | ||
| 7 | OutputBaseFilename=CurdInstaller | ||
| 8 | UsePreviousAppDir=yes | ||
| 9 | Compression=lzma2 | ||
| 10 | SolidCompression=yes | ||
| 11 | |||
| 12 | [Tasks] | ||
| 13 | ; Define a task for creating a desktop shortcut | ||
| 14 | Name: "desktopicon"; Description: "Create a &desktop shortcut"; GroupDescription: "Additional Options"; | ||
| 15 | |||
| 16 | [Files] | ||
| 17 | ; Copy the Curd executable to the install directory | ||
| 18 | Source: "C:\Users\Rushikesh\Documents\Projects\curd\curd.exe"; DestDir: "{app}"; Flags: ignoreversion | ||
| 19 | Source: "C:\Users\Rushikesh\Documents\Projects\curd\bin\mpv.exe"; DestDir: "{app}\bin"; Flags: ignoreversion | ||
| 20 | |||
| 21 | [Icons] | ||
| 22 | ; Create the application icon in the Start Menu | ||
| 23 | Name: "{group}\Curd"; Filename: "{app}\curd.exe" | ||
| 24 | ; Create a desktop shortcut if the user checked the option | ||
| 25 | Name: "{userdesktop}\Curd"; Filename: "{app}\curd.exe"; Tasks: desktopicon | ||
Build/curd.exe deleted
Binary file not shown.
Build/release added +90
| @@ -0,0 +1,90 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | |||
| 3 | # Function to comment/uncomment lines in internal/player.go | ||
| 4 | function toggle_winio_import() { | ||
| 5 | local action="$1" | ||
| 6 | local file="internal/player.go" | ||
| 7 | |||
| 8 | if [ "$action" == "comment" ]; then | ||
| 9 | # Comment out the go-winio import line | ||
| 10 | sed -i 's|^\(\s*"github.com/Microsoft/go-winio"\)|// \1|' "$file" | ||
| 11 | # Comment out the usage of winio.DialPipe | ||
| 12 | sed -i 's|^\(.*conn, err = winio.DialPipe.*\)|// \1|' "$file" | ||
| 13 | elif [ "$action" == "uncomment" ]; then | ||
| 14 | # Uncomment the go-winio import line | ||
| 15 | sed -i 's|// \(\s*"github.com/Microsoft/go-winio"\)|\1|' "$file" | ||
| 16 | # Uncomment the usage of winio.DialPipe | ||
| 17 | sed -i 's|^// \(.*conn, err = winio.DialPipe.*\)|\1|' "$file" | ||
| 18 | fi | ||
| 19 | } | ||
| 20 | |||
| 21 | |||
| 22 | # Ask for version number | ||
| 23 | read -p "Enter the version number: " version | ||
| 24 | release_folder="releases/curd-$version" | ||
| 25 | windows_folder="$release_folder/windows" | ||
| 26 | linux_folder="$release_folder/linux" | ||
| 27 | installer_script="Build/curd-windows-build.iss" | ||
| 28 | |||
| 29 | # Ensure required directories exist | ||
| 30 | mkdir -p "$windows_folder" "$linux_folder" | ||
| 31 | |||
| 32 | # Update version in the installer script | ||
| 33 | sed -i "s/^AppVersion=.*/AppVersion=$version/" "$installer_script" | ||
| 34 | |||
| 35 | # Update Source paths in the installer script | ||
| 36 | sed -i "s|Source: \".*curd.exe\"|Source: \"Z:$windows_folder/curd.exe\"|" "$installer_script" | ||
| 37 | # sed -i "s|Source: \".*mpv.exe\"|Source: \"Z:$windows_folder/mpv.exe\"|" "$installer_script" | ||
| 38 | |||
| 39 | # Comment out winio-related lines for Linux build | ||
| 40 | echo "Commenting out go-winio lines for Linux build..." | ||
| 41 | toggle_winio_import "comment" | ||
| 42 | |||
| 43 | # Build Linux binary | ||
| 44 | echo "Building Linux binary..." | ||
| 45 | bash Build/buildlinux | ||
| 46 | |||
| 47 | # Move the Linux binary to the release folder | ||
| 48 | if [ -f "curd" ]; then | ||
| 49 | mv curd "$linux_folder/" | ||
| 50 | else | ||
| 51 | echo "Linux build failed. Please check Build/buildlinux." | ||
| 52 | exit 1 | ||
| 53 | fi | ||
| 54 | |||
| 55 | # Uncomment winio-related lines after Linux build | ||
| 56 | echo "Uncommenting go-winio lines..." | ||
| 57 | toggle_winio_import "uncomment" | ||
| 58 | |||
| 59 | # Build Windows binary | ||
| 60 | echo "Building Windows binary..." | ||
| 61 | bash Build/buildwindows | ||
| 62 | |||
| 63 | # Move the Windows binary to the release folder | ||
| 64 | if [ -f "curd.exe" ]; then | ||
| 65 | mv curd.exe "$windows_folder/" | ||
| 66 | else | ||
| 67 | echo "Windows build failed. Please check Build/buildwindows." | ||
| 68 | exit 1 | ||
| 69 | fi | ||
| 70 | |||
| 71 | # # Copy mpv.exe to the Windows release folder | ||
| 72 | # if [ -f "Build/mpv.exe" ]; then | ||
| 73 | # cp "Build/mpv.exe" "$windows_folder/" | ||
| 74 | # else | ||
| 75 | # echo "mpv.exe not found. Skipping copy." | ||
| 76 | # fi | ||
| 77 | |||
| 78 | # Create Windows installer with Inno Setup | ||
| 79 | echo "Creating Windows installer..." | ||
| 80 | wine "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" "$installer_script" | ||
| 81 | |||
| 82 | # Move installer to the release folder | ||
| 83 | installer_output="Build/Output/CurdInstaller.exe" # Replace with actual output location if different | ||
| 84 | if [ -f "$installer_output" ]; then | ||
| 85 | mv "$installer_output" "$windows_folder/CurdInstaller-v$version.exe" | ||
| 86 | else | ||
| 87 | echo "Installer creation failed. Please check Inno Setup script output." | ||
| 88 | fi | ||
| 89 | |||
| 90 | echo "Release build completed in $release_folder." | ||