Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
pokamest committed Aug 21, 2024
1 parent 639bd8e commit a75183d
Show file tree
Hide file tree
Showing 8 changed files with 3,219 additions and 3,261 deletions.
4 changes: 2 additions & 2 deletions build.bat
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ if exist .deps\prepared goto :render
if "%SigningCertificate%"=="" goto :success
if "%TimestampServer%"=="" goto :success
echo [+] Signing
signtool sign /sha1 "%SigningCertificate%" /fd sha256 /tr "%TimestampServer%" /td sha256 /d WireGuard x86\amneziawg.exe x86\wg.exe amd64\amneziawg.exe amd64\wg.exe arm64\amneziawg.exe arm64\wg.exe || goto :error
signtool sign /sha1 "%SigningCertificate%" /fd sha256 /tr "%TimestampServer%" /td sha256 /d WireGuard x86\amneziawg.exe x86\awg.exe amd64\amneziawg.exe amd64\awg.exe arm64\amneziawg.exe arm64\awg.exe || goto :error

:success
echo [+] Success. Launch amneziawg.exe.
Expand Down Expand Up @@ -78,7 +78,7 @@ if exist .deps\prepared goto :render
del .deps\src\*.exe .deps\src\*.o .deps\src\wincompat\*.o .deps\src\wincompat\*.lib 2> NUL
set LDFLAGS=-s
make --no-print-directory -C .deps\src PLATFORM=windows CC=%~2-w64-mingw32-gcc WINDRES=%~2-w64-mingw32-windres V=1 RUNSTATEDIR= SYSTEMDUNITDIR= -j%NUMBER_OF_PROCESSORS% || exit /b 1
move /Y .deps\src\wg.exe "%~1\awg.exe" > NUL || exit /b 1
move /Y .deps\src\awg.exe "%~1\awg.exe" > NUL || exit /b 1
)
if not exist "%~1\wintun.dll" (
copy /Y ".deps\wintun\bin\%~1\wintun.dll" "%~1\wintun.dll" > NUL || exit /b 1
Expand Down
4 changes: 2 additions & 2 deletions installer/build.bat
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ if exist .deps\prepared goto :build
if "%SigningCertificate%"=="" goto :success
if "%TimestampServer%"=="" goto :success
echo [+] Signing
signtool sign /sha1 "%SigningCertificate%" /fd sha256 /tr "%TimestampServer%" /td sha256 /d "WireGuard Setup" "dist\wireguard-*-%WIREGUARD_VERSION%.msi" || goto :error
signtool sign /sha1 "%SigningCertificate%" /fd sha256 /tr "%TimestampServer%" /td sha256 /d "AmneziaWG Setup" "dist\amneziawg-*-%WIREGUARD_VERSION%.msi" || goto :error

:success
echo [+] Success.
Expand All @@ -64,7 +64,7 @@ if exist .deps\prepared goto :build
if "%SigningCertificate%"=="" goto :skipsign
if "%TimestampServer%"=="" goto :skipsign
echo [+] Signing %1
signtool sign /sha1 "%SigningCertificate%" /fd sha256 /tr "%TimestampServer%" /td sha256 /d "WireGuard Setup Custom Actions" "%~1\customactions.dll" || exit /b 1
signtool sign /sha1 "%SigningCertificate%" /fd sha256 /tr "%TimestampServer%" /td sha256 /d "AmneziaWG Setup Custom Actions" "%~1\customactions.dll" || exit /b 1
:skipsign
"%WIX%bin\candle" %WIX_CANDLE_FLAGS% -dWIREGUARD_PLATFORM="%~1" -out "%~1\wireguard.wixobj" -arch %3 wireguard.wxs || exit /b %errorlevel%
echo [+] Linking %1
Expand Down
2 changes: 1 addition & 1 deletion installer/fetcher/Makefile
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ deploy: $(TARGET)
scp $< $(DEPLOYMENT_HOST):$(DEPLOYMENT_PATH)

sign: deploy
ssh $(DEPLOYMENT_HOST) '"C:\Program Files (x86)\Windows Kits\10\App Certification Kit\signtool.exe"' sign /sha1 $(SIGNING_CERTIFICATE) /fd sha256 /tr $(TIMESTAMP_SERVER) /td sha256 /d '"WireGuard Installer"' '$(DEPLOYMENT_PATH)\$(TARGET)'
ssh $(DEPLOYMENT_HOST) '"C:\Program Files (x86)\Windows Kits\10\App Certification Kit\signtool.exe"' sign /sha1 $(SIGNING_CERTIFICATE) /fd sha256 /tr $(TIMESTAMP_SERVER) /td sha256 /d '"AmneziaWG Installer"' '$(DEPLOYMENT_PATH)\$(TARGET)'
scp -T '$(DEPLOYMENT_HOST):$(DEPLOYMENT_PATH)\$(TARGET)' .

.PHONY: clean deploy sign
Expand Down
4 changes: 2 additions & 2 deletions installer/fetcher/constants.h
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
#define _CONSTANTS_H

#define release_public_key_base64 "RWRNqGKtBXftKTKPpBPGDMe8jHLnFQ0EdRy8Wg0apV6vTDFLAODD83G4"
#define msi_arch_prefix "wireguard-%s-"
#define msi_arch_prefix "amneziawg-%s-"
#define msi_suffix ".msi"
#define server "download.wireguard.com"
#define server "download.amnezia.org"
#define port (443)
#define latest_version_file "latest.sig"
#define msi_path "/windows-client/"
Expand Down
8 changes: 4 additions & 4 deletions main.go
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ func checkForWow64() {
fatalf("Unable to determine whether the process is running under WOW64: %v", err)
}
if b {
fatalf("You must use the native version of WireGuard on this computer.")
fatalf("You must use the native version of AmneziaWG on this computer.")
}
}

Expand All @@ -114,14 +114,14 @@ func checkForAdminGroup() {
}
defer processToken.Close()
if !elevate.TokenIsElevatedOrElevatable(processToken) {
fatalf("WireGuard may only be used by users who are a member of the Builtin %s group.", elevate.AdminGroupName())
fatalf("AmneziaWG may only be used by users who are a member of the Builtin %s group.", elevate.AdminGroupName())
}
}

func checkForAdminDesktop() {
adminDesktop, err := elevate.IsAdminDesktop()
if !adminDesktop && err == nil {
fatalf("WireGuard is running, but the UI is only accessible from desktops of the Builtin %s group.", elevate.AdminGroupName())
fatalf("AmneziaWG is running, but the UI is only accessible from desktops of the Builtin %s group.", elevate.AdminGroupName())
}
}

Expand Down Expand Up @@ -180,7 +180,7 @@ func main() {
}
checkForAdminDesktop()
time.Sleep(30 * time.Second)
fatalf("WireGuard system tray icon did not appear after 30 seconds.")
fatalf("AmneziaWG system tray icon did not appear after 30 seconds.")
return
case "/uninstallmanagerservice":
if len(os.Args) != 2 {
Expand Down
2 changes: 1 addition & 1 deletion ui/raise.go
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func WaitForRaiseUIThenQuit() {
return 0
}, 0, 0, win.WINEVENT_SKIPOWNPROCESS|win.WINEVENT_OUTOFCONTEXT)
if err != nil {
showErrorCustom(nil, l18n.Sprintf("WireGuard Detection Error"), l18n.Sprintf("Unable to wait for WireGuard window to appear: %v", err))
showErrorCustom(nil, l18n.Sprintf("AmneziaWG Detection Error"), l18n.Sprintf("Unable to wait for AmneziaWG window to appear: %v", err))
}
for {
var msg win.MSG
Expand Down
2 changes: 1 addition & 1 deletion ui/ui.go
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func RunUI() {
if shouldQuitManagerWhenExiting {
_, err := manager.IPCClientQuit(true)
if err != nil {
showErrorCustom(nil, l18n.Sprintf("Error Exiting WireGuard"), l18n.Sprintf("Unable to exit service due to: %v. You may want to stop WireGuard from the service manager.", err))
showErrorCustom(nil, l18n.Sprintf("Error Exiting AmneziaWG"), l18n.Sprintf("Unable to exit service due to: %v. You may want to stop AmneziaWG from the service manager.", err))
}
}
}
Expand Down
Loading

0 comments on commit a75183d

Please sign in to comment.