diff --git a/Dockerfile b/Dockerfile index cfa1a56..b6cf0ac 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ ARG ARCH=aarch64 -ARG VERSION=1.15 -ARG UBUNTU_VERSION=22.04 +ARG VERSION=12.2.0 +ARG UBUNTU_VERSION=24.04 ARG REPO=axisecp ARG SDK=acap-native-sdk FROM ${REPO}/${SDK}:${VERSION}-${ARCH}-ubuntu${UBUNTU_VERSION} diff --git a/Readme.md b/Readme.md index ff607a0..ea83028 100644 --- a/Readme.md +++ b/Readme.md @@ -102,7 +102,7 @@ Files or directories can be excluded from being copied into the container by pre | `-prune` | Set to true execute 'docker system prune -f' after build. | `false` | | `-pwd` | The root password for the camera where the EAP application is installed. | `""` | | `-start` | Set to true to start the application after installation. | `false` | -| `-version` | Set to specifiy the sdk version for the ACAP image like, for example -version 1.12 | | +| `-sdk` | Set to specifiy the sdk version for the ACAP image like, for example -version 1.12 | `12.2.0` | | `-watch` | Set to true to monitor the package log after building. | `false` | diff --git a/main.go b/main.go index 583aa36..e1431fb 100644 --- a/main.go +++ b/main.go @@ -21,7 +21,8 @@ func main() { arch := flag.String("arch", "aarch64", "The architecture for the ACAP application: 'aarch64' or 'armv7hf'.") doStart := flag.Bool("start", false, "Set to true to start the application after installation.") createProject := flag.Bool("newapp", false, "Generate a new goxis app.") - sdk_version := flag.String("sdk", "", "The version of the SDK to use. (blank = Version 1.15)") + sdk_version := flag.String("sdk", "", "The version of the SDK to use. (blank = 12.2.0)") + ubunutu_version := flag.String("ubunutu", "", "The Ubunut version to use. (blank = 24.04)") doInstall := flag.Bool("install", false, "Set to true to install the application on the camera.") prune := flag.Bool("prune", false, "Set to true execute 'docker system prune -f' after build.") lowestSdkVersion := flag.Bool("lowsdk", false, "Set to true to build with acap-sdk version 3.5 and ubunutu 20.04") @@ -76,21 +77,22 @@ func main() { } buildConfig := BuildConfiguration{ - AppDirectory: *appDirectory, - Arch: *arch, - Manifest: amf, - ManifestPath: *manifestPath, - Ip: *ip, - Pwd: *pwd, - DoStart: *doStart, - DoInstall: *doInstall, - LowestSdk: *lowestSdkVersion, - Watch: *watch, - Dockerfile: *dockerFile, - FilesToAdd: *filesToAdd, - Prune: *prune, - ImageName: fmt.Sprintf("%s:%s", *arch, amf.ACAPPackageConf.Setup.AppName), - SdkVersion: *sdk_version, + AppDirectory: *appDirectory, + Arch: *arch, + Manifest: amf, + ManifestPath: *manifestPath, + Ip: *ip, + Pwd: *pwd, + DoStart: *doStart, + DoInstall: *doInstall, + LowestSdk: *lowestSdkVersion, + Watch: *watch, + Dockerfile: *dockerFile, + FilesToAdd: *filesToAdd, + Prune: *prune, + ImageName: fmt.Sprintf("%s:%s", *arch, amf.ACAPPackageConf.Setup.AppName), + SdkVersion: *sdk_version, + UbunutVersion: *ubunutu_version, } // Configure SDK and architecture for the specific app configureSdk(*lowestSdkVersion, &buildConfig) diff --git a/utils.go b/utils.go index aabf9c0..9d80f5a 100644 --- a/utils.go +++ b/utils.go @@ -113,11 +113,13 @@ func configureSdk(lowestSdkVersion bool, buildConfig *BuildConfiguration) { } } else { buildConfig.Sdk = "acap-native-sdk" - buildConfig.UbunutVersion = "22.04" + if buildConfig.UbunutVersion == "" { + buildConfig.UbunutVersion = "24.04" + } if buildConfig.SdkVersion != "" { buildConfig.Version = buildConfig.SdkVersion } else { - buildConfig.Version = "1.14" + buildConfig.Version = "12.2.0" } } fmt.Println("Using SDK:", buildConfig.Sdk)